Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository( logger logrus.FieldLogger, config RepositoryConfig, ) *Repository
func (*Repository) Commit ¶
func (i *Repository) Commit(files map[string][]byte, message string) error
func (*Repository) ForceReload ¶
func (i *Repository) ForceReload() error
func (*Repository) Path ¶
func (i *Repository) Path(args ...string) string
func (*Repository) Reload ¶
func (i *Repository) Reload() error
func (*Repository) WarmCache ¶
func (i *Repository) WarmCache() bool
type RepositoryConfig ¶
type RepositoryConfig struct { // URI must define a git remote origin where the repository lives. URI string `yaml:"uri"` // Branch may define a specific branch to use. Branch must be configured if // push operations will be used. Branch string `yaml:"branch"` // LocalPath may LocalPath string `yaml:"local_path"` // PrivateKey is an SSH key when using private or push-enabled repositories. PrivateKey string `yaml:"private_key"` // PullInterval may define a specific interval at which the repository is // pulled for new data. PullInterval *marshaltypes.Duration `yaml:"pull_interval"` // SkipPull may be enabled to prevent all pull operations. This is typically // useful for debugging when also configuring LocalPath. SkipPull bool `yaml:"skip_pull"` // SkipPush may be enabled to prevent all push operations. SkipPush bool `yaml:"skip_push"` // AuthorName may define a custom author name for use in commits. AuthorName string `yaml:"author_name"` // AuthorEmail may define a custom author email for use in commits. AuthorEmail string `yaml:"author_email"` }
RepositoryConfig defines pull and push operations of a git repository.
func (*RepositoryConfig) ApplyDefaults ¶
func (c *RepositoryConfig) ApplyDefaults()
Click to show internal directories.
Click to hide internal directories.