Documentation

Index

Constants

This section is empty.

Variables

var (
	// ErrNoChanges indicates that there were no changes to commit
	ErrNoChanges       = errors.New("no changes to commit")
	KubeSSHMountPath   = "/etc/riser/kube/ssh/identity"
	KubeSSHTargetPath  = "/etc/riser/ssh/identity"
	KubeSSHKeyFileMode = os.FileMode(0400)
)

Functions

This section is empty.

Types

type FakeRepo

type FakeRepo struct {
	CommitFn                 func(message string, files []core.ResourceFile) error
	CommitCallCount          int
	PushFn                   func() error
	PushCallCount            int
	ResetHardRemoteFn        func() error
	ResetHardRemoteCallCount int
	sync.Mutex
}

func (*FakeRepo) Commit

func (fake *FakeRepo) Commit(message string, files []core.ResourceFile) error

func (*FakeRepo) Push

func (fake *FakeRepo) Push() error

func (*FakeRepo) ResetHardRemote

func (fake *FakeRepo) ResetHardRemote() error

type Repo

type Repo interface {
	Commit(message string, files []core.ResourceFile) error
	Push() error
	ResetHardRemote() error
	// Lock locks the repo. Be sure to call Unlock when your work is completed.
	Lock()
	// Unlock unlocks the repo.
	Unlock()
}

func NewRepo

func NewRepo(repoSettings RepoSettings) (Repo, error)

NewRepo creates a new reference to a repo. There should only be one instance running per git folder. WARNING: any pending changes or local commits will be lost

type RepoSettings

type RepoSettings struct {
	URL         string
	Branch      string
	LocalGitDir string
}