Documentation
¶
Index ¶
- func AuthToPlatformConfig(serverType string, serverUrl string, auth RepoSyncAuth) (vcsapp.PlatformConfig, error)
- func SaveState(file string, state *SyncState) error
- func StateFile() string
- type CloneMethod
- type MirrorOpts
- type MirrorRule
- type RepoBundle
- type RepoBundleOptions
- type RepoSource
- type RepoSyncAuth
- type RepoSyncConfig
- type RepositoryState
- type RuleAction
- type Server
- type SyncState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthToPlatformConfig ¶ added in v0.4.0
func AuthToPlatformConfig(serverType string, serverUrl string, auth RepoSyncAuth) (vcsapp.PlatformConfig, error)
Types ¶
type CloneMethod ¶ added in v0.4.0
type CloneMethod string
const ( CloneMethodHTTPS CloneMethod = "https" CloneMethodSSH CloneMethod = "ssh" )
type MirrorOpts ¶ added in v0.4.0
type MirrorOpts struct {
LocalDir string `yaml:"dir"`
CloneMethod CloneMethod `yaml:"clone-method"`
Rules []MirrorRule `yaml:"rules"`
DefaultAction RuleAction `yaml:"default-action"`
}
type MirrorRule ¶ added in v0.4.0
type MirrorRule struct {
Rule string `yaml:"rule"`
Action RuleAction `yaml:"action"`
}
type RepoBundle ¶
type RepoBundle struct {
TargetDir string `yaml:"target"`
Sources []RepoSource `yaml:"sources"`
}
type RepoBundleOptions ¶
type RepoSource ¶ added in v0.4.0
type RepoSource struct {
Url string `yaml:"url"`
Ref string `yaml:"ref"`
Group []string `yaml:"group"`
TargetDir string `yaml:"target"`
Bundle RepoBundleOptions `yaml:"bundle"`
Auth RepoSyncAuth `yaml:"auth"`
}
type RepoSyncAuth ¶ added in v0.2.0
type RepoSyncConfig ¶
type RepoSyncConfig struct {
Version int `yaml:"version"`
Servers []Server `yaml:"servers"`
Sources []RepoSource `yaml:"sources"`
Bundle map[string]RepoBundle `yaml:"bundle"`
}
func Load ¶ added in v0.4.0
func Load() (*RepoSyncConfig, error)
type RepositoryState ¶ added in v0.4.0
type RuleAction ¶ added in v0.4.0
type RuleAction string
const ( RuleActionInclude RuleAction = "include" RuleActionExclude RuleAction = "exclude" )
func EvaluateRules ¶ added in v0.4.0
func EvaluateRules(rules []MirrorRule, defaultAction RuleAction, repo api.Repository) RuleAction
type Server ¶ added in v0.4.0
type Server struct {
Server string `yaml:"url"`
Type string `yaml:"type"`
TargetDir string `yaml:"target"`
Auth RepoSyncAuth `yaml:"auth"`
Mirror MirrorOpts `yaml:"mirror"`
}
Click to show internal directories.
Click to hide internal directories.