Documentation ¶
Index ¶
- type Env
- type GitRepository
- func (gr *GitRepository) CloneRemoteRepo() error
- func (gr *GitRepository) FetchAndCheckout(tag string) error
- func (gr *GitRepository) PullTagsFromRemoteRepo() ([]string, error)
- func (gr *GitRepository) PullUpdatesFromRemoteRepo() error
- func (gr *GitRepository) RemoveLocalRepo() error
- func (gr *GitRepository) SetEnvLatestVersion(_ context.Context, env string, lastTag string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct { Name string LastTag string SemVer helper.SemanticVersion }
TODO: change name of Env
type GitRepository ¶
type GitRepository struct { URL string Branch string Name string Dir string LastHash string LastTag string Envs map[string]Env Mux sync.RWMutex // contains filtered or unexported fields }
GitRepository represents a Git repository for managing configurations.
func NewGitRepository ¶
func NewGitRepository(repoURL, branch string, envs []string) (*GitRepository, error)
NewGitRepository creates and initializes a new GitRepository instance.
func (*GitRepository) CloneRemoteRepo ¶
func (gr *GitRepository) CloneRemoteRepo() error
CloneRemoteRepo clones the remote repository.
func (*GitRepository) FetchAndCheckout ¶
func (gr *GitRepository) FetchAndCheckout(tag string) error
func (*GitRepository) PullTagsFromRemoteRepo ¶
func (gr *GitRepository) PullTagsFromRemoteRepo() ([]string, error)
func (*GitRepository) PullUpdatesFromRemoteRepo ¶
func (gr *GitRepository) PullUpdatesFromRemoteRepo() error
PullUpdatesFromRemoteRepo pulls updates from the remote repository.
func (*GitRepository) RemoveLocalRepo ¶
func (gr *GitRepository) RemoveLocalRepo() error
RemoveLocalRepo removes the local repository directory.
func (*GitRepository) SetEnvLatestVersion ¶
func (gr *GitRepository) SetEnvLatestVersion(_ context.Context, env string, lastTag string, lastSemVer helper.SemanticVersion) error
Click to show internal directories.
Click to hide internal directories.