git

package
v0.3.0-prep Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoChanges = errors.New("no changes made in repo")
)
View Source
var KeySize = 4096

KeySize is the size of generated private keys.

View Source
var NoRepoError = flux.UserConfigProblem{&flux.BaseError{
	Err: errors.New("no repo in user config"),
	Help: `No Git repository URL in your config

We need to clone a git repo to proceed, and you haven't supplied
one. Please upload a config file, including a git repository URL, as
described in

    https://github.com/weaveworks/flux/blob/master/site/using.md

`,
}}

Functions

func CloningError

func CloningError(url string, actual error) error

func PushError

func PushError(url string, actual error) error

Types

type KeyGenerator

type KeyGenerator interface {
	Generate() (privateKey []byte, err error)
}

func NewKeyGenerator

func NewKeyGenerator() KeyGenerator

type Repo

type Repo struct {
	// The URL to the config repo that holds the resource definition files. For
	// example, "https://github.com/myorg/conf.git", "git@foo.com:myorg/conf".
	URL string

	// The branch of the config repo that holds the resource definition files.
	Branch string

	// The private key (e.g., the contents of an id_rsa file) with
	// permissions to clone and push to the config repo.
	Key string

	// The path within the config repo where files are stored.
	Path string
}

Repo represents a remote git repo

func (Repo) Clone

func (r Repo) Clone() (path string, err error)

func (Repo) CommitAndPush

func (r Repo) CommitAndPush(path, commitMessage string) error

Jump to

Keyboard shortcuts

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