59 lines
1002 B
Go
59 lines
1002 B
Go
|
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 ...
|
||
|
type GogsMigrateRepo struct {
|
||
|
Name string
|
||
|
CloneURL string
|
||
|
UID int
|
||
|
Mirror bool
|
||
|
}
|
||
|
|
||
|
// Config ...
|
||
|
type Config struct {
|
||
|
globalconfig GlobalConfig
|
||
|
gogsconfig GogsConfig
|
||
|
githubconfig GitHubConfig
|
||
|
}
|
||
|
|
||
|
// GlobalConfig ...
|
||
|
type GlobalConfig struct {
|
||
|
RequestTimeout time.Duration
|
||
|
UserAgent string
|
||
|
}
|
||
|
|
||
|
// GitHubConfig ...
|
||
|
type GitHubConfig struct {
|
||
|
StarsPages string
|
||
|
MaxPagesNumber int
|
||
|
AuthUsername string
|
||
|
AuthPassword string
|
||
|
ContentType string
|
||
|
}
|
||
|
|
||
|
// GogsConfig ...
|
||
|
type GogsConfig struct {
|
||
|
UID int
|
||
|
Username string
|
||
|
DestUsername string
|
||
|
RepoURLTmpl string
|
||
|
OrgsURLTmpl string
|
||
|
MigrateURL string
|
||
|
AuthToken string
|
||
|
ContentType string
|
||
|
Mirror bool
|
||
|
}
|