Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶ added in v1.0.3
type AuthConfig struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` KeyPath string `json:"key_path,omitempty"` KeyPassphrase string `json:"key_passphrase,omitempty"` StrictHostKeyCheckingDisabled bool `json:"strict_host_key_checking_disabled,omitempty"` }
AuthConfig is authentication configuration in RepositoryConfig.
type Config ¶
type Config struct { Repositories []*RepositoryConfig `json:"repositories,omitempty"` // contains filtered or unexported fields }
Config is a configuration of Manager.
func (*Config) AddRepository ¶
func (cfg *Config) AddRepository(rc *RepositoryConfig) error
AddRepository adds a repository entry to Config.
type Endpoint ¶
type Endpoint struct { Name string `json:"-"` Path string `json:"path,omitempty" xml:"path,omitempty" yaml:"path,omitempty"` RepositoryName string // contains filtered or unexported fields }
Endpoint handles git management requests.
type ExecConfig ¶ added in v1.0.3
type ExecConfig struct { Name string `json:"name,omitempty"` Command string `json:"command,omitempty"` Args []string `json:"args,omitempty"` }
ExecConfig is an execution script configuration in RepositoryConfig.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages git repositories
func NewManager ¶
NewManager parses config and creates Manager instance.
type Repository ¶
type Repository struct { Config *RepositoryConfig `json:"config,omitempty"` // contains filtered or unexported fields }
Repository is a configuration for a command or app.
func NewRepository ¶
func NewRepository(rc *RepositoryConfig) (*Repository, error)
NewRepository returns an instance of Repository.
type RepositoryConfig ¶
type RepositoryConfig struct { // The alias for the Repository. Name string `json:"name,omitempty"` // The address of the Repository. Address string `json:"address,omitempty"` // The directory where the Repository is being stored locally. BaseDir string `json:"base_dir,omitempty"` Branch string `json:"branch,omitempty"` Depth int `json:"depth,omitempty"` // The interval at which repository updates automatically. UpdateInterval int `json:"update_interval,omitempty"` Auth *AuthConfig `json:"auth,omitempty"` Webhooks []*WebhookConfig `json:"webhooks,omitempty"` PostPullExec []*ExecConfig `json:"post_pull_exec,omitempty"` // contains filtered or unexported fields }
RepositoryConfig is a configuration of Repository.
func NewRepositoryConfig ¶
func NewRepositoryConfig() *RepositoryConfig
NewRepositoryConfig returns an instance of RepositoryConfig.
type Status ¶
type Status struct { Repository string `json:"repository,omitempty"` Error error `json:"error,omitempty"` }
Status represent the last recorded status of a git repository.
type WebhookConfig ¶ added in v1.0.3
type WebhookConfig struct { Name string `json:"name,omitempty"` Header string `json:"header,omitempty"` Secret string `json:"secret,omitempty"` }
WebhookConfig is a webhook configuration in RepositoryConfig.