git

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoChanges indicates that there were no changes to commit
	ErrNoChanges = errors.New("no changes to commit")
)

Functions

This section is empty.

Types

type FakeGitProvider

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

func (*FakeGitProvider) Commit

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

func (*FakeGitProvider) Push

func (fake *FakeGitProvider) Push() error

func (*FakeGitProvider) ResetHardRemote

func (fake *FakeGitProvider) ResetHardRemote() error

type GitRepoProvider

type GitRepoProvider interface {
	Commit(message string, files []core.ResourceFile) (string, error)
	Push() error
	ResetHardRemote() error
}

func NewGitRepoProvider

func NewGitRepoProvider(repoSettings RepoSettings) (GitRepoProvider, error)

type RepoSettings

type RepoSettings struct {
	URL         string
	Branch      string
	Username    string
	Password    string
	LocalGitDir string
}

Jump to

Keyboard shortcuts

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