Expand description
§grp-core
is a library that contains the abstracted logic to interact with the most used platforms for git repositories for know it supports github, gitlab, gitea, forgejo and codeberg
§How it works?
grp-core expose an Enum called Platform witch allows you
to deside wich platform to interact with, it also provides a self
matching method to create the enum based on a configuration.
§Example 1
create a github interactive platform (only allows you to interact with github)
use grp_core::Platform;
let platform = Platform::Github;§Example 2
create an interactive platform based on a &str parameter, this allows you to create one logic for any platform and just change the &str to change the platform you will interact with.
use grp_core::Platform;
let platform = Platform::matches("github");
assert!(platform.unwrap() == Platform::Github);§Configuration
grp-core expose an struct called Config, wich contains the basic information to
connect and authenticate to the platform and its needed almost in every interaction method.
a feature rich example can be found at https://github.com/feraxhp/grp
Modules§
Macros§
Structs§
- Config
- Config
- Error
- Error
- JSON
- default implementation for deserialize a json, returning a grp_core::Error directly, very usefull for use ? in an already returning Result<T, Error>
Enums§
Constants§
- SUPPORTED_
REPOS - Current list of suported repos