Documentation ¶
Index ¶
- func NewGitConfigRepo(localPath string, cloneOpts *git.CloneOptions) (configrepo.Repo, error)
- type ErrorHandlerFn
- type GitConfigRepo
- func (cr *GitConfigRepo) AddErrorListener(fn ErrorHandlerFn)
- func (cr *GitConfigRepo) AddOnChangeHandler(handler configrepo.OnChangeHandler)
- func (cr *GitConfigRepo) Fetch() error
- func (cr *GitConfigRepo) GetAppsVersions() map[string][]*version.Version
- func (cr *GitConfigRepo) GetFile(targetApp *configrepo.ApplicationVersion, path string) (*configrepo.RepoFile, error)
- func (cr *GitConfigRepo) GetLastFetch() *time.Time
- func (cr *GitConfigRepo) GetNearestBranch(targetApp *configrepo.ApplicationVersion) (*plumbing.Reference, error)
- func (cr *GitConfigRepo) Init() (err error)
- func (cr *GitConfigRepo) StartFetchingEvery(period time.Duration) error
- func (cr *GitConfigRepo) StopFetching()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGitConfigRepo ¶
func NewGitConfigRepo(localPath string, cloneOpts *git.CloneOptions) (configrepo.Repo, error)
NewGitConfigRepo instantiate a new GIT configuration repository
Types ¶
type ErrorHandlerFn ¶
type ErrorHandlerFn func(err error)
ErrorHandlerFn represent an error handler function
type GitConfigRepo ¶
type GitConfigRepo struct { Apps map[string]*app // contains filtered or unexported fields }
GitConfigRepo represent a git configuration repository
func (*GitConfigRepo) AddErrorListener ¶
func (cr *GitConfigRepo) AddErrorListener(fn ErrorHandlerFn)
AddErrorListener add an error handler to the git repo
func (*GitConfigRepo) AddOnChangeHandler ¶
func (cr *GitConfigRepo) AddOnChangeHandler(handler configrepo.OnChangeHandler)
AddOnChangeHandler add a new change handler to the git repo
func (*GitConfigRepo) Fetch ¶
func (cr *GitConfigRepo) Fetch() error
Fetch fetch from the remote git repo
func (*GitConfigRepo) GetAppsVersions ¶
func (cr *GitConfigRepo) GetAppsVersions() map[string][]*version.Version
GetAppsVersions returns a appName-> list of version
func (*GitConfigRepo) GetFile ¶
func (cr *GitConfigRepo) GetFile(targetApp *configrepo.ApplicationVersion, path string) (*configrepo.RepoFile, error)
GetFile retrieve a file from the git repo
func (*GitConfigRepo) GetLastFetch ¶
func (cr *GitConfigRepo) GetLastFetch() *time.Time
GetLastFetch return the last fetch date
func (*GitConfigRepo) GetNearestBranch ¶
func (cr *GitConfigRepo) GetNearestBranch(targetApp *configrepo.ApplicationVersion) (*plumbing.Reference, error)
GetNearestBranch retrieve the nearest (<=) application version available on the git repo
func (*GitConfigRepo) Init ¶
func (cr *GitConfigRepo) Init() (err error)
Init initialize the git repository
func (*GitConfigRepo) StartFetchingEvery ¶
func (cr *GitConfigRepo) StartFetchingEvery(period time.Duration) error
StartFetchingEvery start auto fetch
func (*GitConfigRepo) StopFetching ¶
func (cr *GitConfigRepo) StopFetching()
StopFetching stop auto fetch
Click to show internal directories.
Click to hide internal directories.