gitops

package
v0.0.0-...-9a43622 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Trigger

func Trigger()

Trigger is reposible for setting off the go routine for git-op

Types

type GitConfig

type GitConfig struct {
	RepositoryName string
	RepositoryURL  string
	RemoteName     string
	LocalCommit    string
	RemoteCommit   string
}

func (GitConfig) CompareLocalandRemoteCommit

func (c GitConfig) CompareLocalandRemoteCommit(version string) (bool, error)

CompareLocalandRemoteCommit compares local and remote latest commit

func (GitConfig) GitGetStatus

func (c GitConfig) GitGetStatus(version string) (bool, error)

GitGetStatus excutes "git get status --porcelain" for the provided Repository Path, returns false if the repository is clean and true if the repository is dirtygitConfig

func (GitConfig) GitHardReset

func (c GitConfig) GitHardReset(version string) error

GitHardReset executes "git reset --hard HEAD" in provided Repository Path

func (GitConfig) GitPull

func (c GitConfig) GitPull(version string) error

GitPull updates the repository in provided Path

func (GitConfig) HandlerForCleanStatus

func (c GitConfig) HandlerForCleanStatus(version string) error

HandlerForCleanStatus calls relative functions if the GitGetStatus gives a clean status as a result

func (GitConfig) HandlerForDirtyStatus

func (c GitConfig) HandlerForDirtyStatus(version string) error

HandlerForDirtyStatus calls relative functions if the GitGetStatus gives a clean status as a result

func (GitConfig) HandlerForExistingRepository

func (c GitConfig) HandlerForExistingRepository(version string) error

HandlerForExistingRepository relative functions if the isRepositoryExists fails

func (GitConfig) HandlerForMismatchCommits

func (c GitConfig) HandlerForMismatchCommits(version string) error

HandlerForMismatchCommits calls relative functions if the Local and Remote Commits do not match

func (GitConfig) HandlerForNonExistingRepository

func (c GitConfig) HandlerForNonExistingRepository(version string) error

HandlerForNonExistingRepository calls function GitPlainClone, which is called only when the repository exists

Jump to

Keyboard shortcuts

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