Documentation ¶
Index ¶
- Variables
- func CheckAllValuesOrNone(parent string, theMap map[string]string) bool
- func GetHost(url string) string
- func GetMap(excludes []string) map[string]bool
- func ParseCronSpec(spec string) (cron.Schedule, error)
- func StatRemote(remoteURL, sshURL string, repo GenRepo) bool
- type Conf
- type Destination
- type FileLogging
- type Filter
- type GenRepo
- type GithubDestination
- type HeartbeatConfig
- type Local
- type Logging
- type Metrics
- type Mirror
- type PrometheusConfig
- type PushConfig
- type PushConfigs
- type Repo
- type S3Repo
- type Site
- type Source
- type Visibility
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Red Render message with Red color. Red = color.FgRed.Render // Green Render message with Green color. Green = color.FgGreen.Render // Blue Render message with Blue color. Blue = color.FgBlue.Render // DotGitRx .git regexp. DotGitRx = regexp.MustCompile(`\.git$`) )
Functions ¶
func CheckAllValuesOrNone ¶
CheckAllValuesOrNone TODO.
Types ¶
type Conf ¶
type Conf struct { Source Source `yaml:"source"` Destination Destination `yaml:"destination"` Cron string `yaml:"cron"` Log Logging `yaml:"log"` Metrics Metrics `yaml:"metrics"` }
Conf TODO.
func (Conf) HasAllPrometheusConf ¶
HasAllPrometheusConf TODO.
type Destination ¶
type Destination struct { Gitlab []GenRepo `yaml:"gitlab"` Local []Local `yaml:"local"` Github []GenRepo `yaml:"github"` Gitea []GenRepo `yaml:"gitea"` Gogs []GenRepo `yaml:"gogs"` OneDev []GenRepo `yaml:"onedev"` Sourcehut []GenRepo `yaml:"sourcehut"` S3 []S3Repo `yaml:"s3"` }
Destination TODO.
type FileLogging ¶
type FileLogging struct { Dir string `yaml:"dir"` File string `yaml:"file"` MaxAge int `yaml:"maxage"` }
FileLogging TODO.
type Filter ¶ added in v0.10.14
type Filter struct { LastActivityString string `yaml:"lastactivity"` LastActivityDuration time.Duration Stars int `yaml:"stars"` Languages []string `yaml:"languages"` ExcludeArchived bool `yaml:"excludearchived"` ExcludeForks bool `yaml:"excludeforks"` }
Filter struct
func (*Filter) ParseDuration ¶ added in v0.10.14
type GenRepo ¶
type GenRepo struct { Token string `yaml:"token"` TokenFile string `yaml:"token_file"` User string `yaml:"user"` Organization string `yaml:"organization"` SSH bool `yaml:"ssh"` SSHKey string `yaml:"sshkey"` Username string `yaml:"username"` Password string `yaml:"password"` URL string `yaml:"url"` Exclude []string `yaml:"exclude"` ExcludeOrgs []string `yaml:"excludeorgs"` Include []string `yaml:"include"` IncludeOrgs []string `yaml:"includeorgs"` Issues bool `yaml:"issues"` Wiki bool `yaml:"wiki"` Starred bool `yaml:"starred"` CreateOrg bool `yaml:"createorg"` Visibility Visibility `yaml:"visibility"` Filter Filter `yaml:"filter"` Force bool `yaml:"force"` Contributed bool `yaml:"contributed"` MirrorInterval string `yaml:"mirrorinterval"` LFS bool `yaml:"lfs"` Mirror Mirror `yaml:"mirror"` }
GenRepo Generell Repo.
type GithubDestination ¶ added in v0.10.19
type GithubDestination struct { User *github.User Organization *github.Organization }
GithubDestination TODO
type HeartbeatConfig ¶
type HeartbeatConfig struct {
URLs []string `yaml:"urls"`
}
HeartbeatConfig TODO.
type Local ¶
type Local struct { Bare bool `yaml:"bare"` Path string `yaml:"path"` Structured bool `yaml:"structured"` Zip bool `yaml:"zip"` Keep int `yaml:"keep"` LFS bool `yaml:"lfs"` }
Local TODO.
type Logging ¶
type Logging struct { Timeformat string `yaml:"timeformat"` FileLogging FileLogging `yaml:"file-logging"` }
Logging TODO.
type Metrics ¶
type Metrics struct { Prometheus PrometheusConfig `yaml:"prometheus"` Heartbeat HeartbeatConfig `yaml:"heartbeat"` PushConfigs PushConfigs `yaml:"push"` }
Metrics TODO.
type PrometheusConfig ¶
type PrometheusConfig struct { ListenAddr string `yaml:"listen_addr"` Endpoint string `yaml:"endpoint"` }
PrometheusConfig TODO.
type PushConfig ¶ added in v0.10.15
type PushConfig struct { User string `yaml:"user"` Password string `yaml:"password"` Token string `yaml:"token"` Url string `yaml:"url"` }
PushConfig TODO.
func (*PushConfig) ResolveToken ¶ added in v0.10.15
func (p *PushConfig) ResolveToken()
type PushConfigs ¶ added in v0.10.15
type PushConfigs struct { Ntfy []*PushConfig `yaml:"ntfy"` Gotify []*PushConfig `yaml:"gotify"` }
PushConfigs TODO.
type Repo ¶
type Repo struct { Name string URL string SSHURL string Token string Defaultbranch string Origin GenRepo Owner string Hoster string Description string Issues map[string]interface{} Private bool NoTokenUser bool }
Repo TODO.
type S3Repo ¶ added in v0.10.32
type Source ¶
type Source struct { Gogs []GenRepo `yaml:"gogs"` Gitlab []GenRepo `yaml:"gitlab"` Github []GenRepo `yaml:"github"` Gitea []GenRepo `yaml:"gitea"` BitBucket []GenRepo `yaml:"bitbucket"` OneDev []GenRepo `yaml:"onedev"` Sourcehut []GenRepo `yaml:"sourcehut"` Any []GenRepo `yaml:"any"` }
Source TODO.
type Visibility ¶ added in v0.10.9
type Visibility struct { Repositories string `yaml:"repositories"` Organizations string `yaml:"organizations"` }
Visibility struct
Click to show internal directories.
Click to hide internal directories.