package main import "time" // GitHubRepo githubrepo struct type GitHubRepo struct { Name string `json:"name"` CloneURL string `json:"clone_url"` } // GogsOrg gogsrepo struct type GogsOrg struct { ID int `json:"id"` Username string `json:"username"` } // GogsMigrateRepo defines the repo to migrate type GogsMigrateRepo struct { Name string CloneURL string UID int Mirror bool } // Config merge all config elements type Config struct { globalconfig GlobalConfig gogsconfig GogsConfig githubconfig GitHubConfig } // GlobalConfig is the global config of github-to-gogs type GlobalConfig struct { RequestTimeout time.Duration UserAgent string Threads int } // GitHubConfig is the GitHub config type GitHubConfig struct { MaxPerPage int PageNum int AuthUsername string AuthPassword string ContentType string } // GogsConfig is the Gogs config type GogsConfig struct { UID int Username string DestUsername string RepoURLTmpl string OrgsURLTmpl string MigrateURL string AuthToken string ContentType string Mirror bool }