repository

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 12 Imported by: 0

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL