grp_core/lib.rs
1//! # grp-core
2//! is a library that contains the abstracted logic to
3//! interact with the most used platforms for git repositories
4//! for know it supports _github_, _gitlab_, _gitea_, _forgejo_ and _codeberg_
5//!
6//! ## How it works?
7//! grp-core expose an Enum called `Platform` witch allows you
8//! to deside wich platform to interact with, it also provides a self
9//! matching method to create the enum based on a configuration.
10//!
11//! ### Example 1
12//! create a github interactive platform (only allows you to interact with github)
13//!
14//! ~~~
15//! use grp_core::Platform;
16//!
17//! let platform = Platform::Github;
18//! ~~~
19//! ### Example 2
20//! create an interactive platform based on a &str parameter, this allows
21//! you to create one logic for any platform and just change the &str to
22//! change the platform you will interact with.
23//!
24//! ~~~
25//! use grp_core::Platform;
26//!
27//! let platform = Platform::matches("github");
28//!
29//! assert!(platform.unwrap() == Platform::Github);
30//! ~~~
31//!
32//! ## Configuration
33//! grp-core expose an struct called `Config`, wich contains the basic information to
34//! connect and authenticate to the platform and its needed almost in every interaction method.
35//!
36//! a feature rich example can be found at _https://github.com/feraxhp/grp_
37//!
38
39pub mod animation;
40mod platform;
41mod specific;
42mod request;
43mod config;
44mod system;
45mod common;
46mod error;
47mod json;
48
49pub use platform::SUPPORTED_REPOS;
50pub use platform::Platform;
51
52pub use error::structs::Error;
53pub use error::types::ErrorType;
54
55pub mod structs {
56 pub use super::common::structs::*;
57 pub use super::common::users::structs::*;
58}
59
60pub use json::JSON;
61pub use config::Config;