diff options
author | 2025-04-11 12:54:54 -0700 | |
---|---|---|
committer | 2025-04-11 12:57:13 -0700 | |
commit | c43c233c9b14e65d461405857c6e6c758cd9fb23 (patch) | |
tree | a2dc536661010dae8ed1e3dfc2a899476b4a2779 /src/config.h | |
parent | 11f44a70736de47ec7eca82860ed6780d273749e (diff) | |
download | github-mirror-c43c233c9b14e65d461405857c6e6c758cd9fb23.tar.gz github-mirror-c43c233c9b14e65d461405857c6e6c758cd9fb23.tar.zst github-mirror-c43c233c9b14e65d461405857c6e6c758cd9fb23.zip |
Allow for multiple owners and tokens
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/config.h b/src/config.h index ece19d9..13f2649 100644 --- a/src/config.h +++ b/src/config.h @@ -12,20 +12,29 @@ extern const char *config_locations[]; +struct github_cfg { + // Borrowed + /// Github graphql API endpoint + const char *endpoint; + /// Client user agent + const char *user_agent; + /// The owner of the repositories + const char *owner; + + // Owned + /// Github auth token + const char *token; + /// Next owner in the list + struct github_cfg *next; +}; + struct config { /// The content of the config file char *contents; size_t contents_len; - const char *token; - /// Whether the token's memory is owned or borrowed from contents - int token_owned; - - const char *endpoint; - const char *user_agent; - - /// The owner of the repositories - const char *owner; + /// Repo owners to mirror + struct github_cfg *head; /// The filepath to the git mirrors /// Default: /srv/git |