codecommit

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegionRe *regexp.Regexp

Functions

func IsCodeCommitURL

func IsCodeCommitURL(url string) bool

IsCodeCommitURL return true if the url is for a CodeCommit Git repo.

func ParseRegion added in v0.2.3

func ParseRegion(host string) (string, error)

Types

type CloneURL

type CloneURL struct {
	RawURL     string
	CredValues credentials.Value
	// contains filtered or unexported fields
}

func NewCloneURL

func NewCloneURL(sess *session.Session, url string) (*CloneURL, error)

NewCloneURL return CloneURL object for CodeCommit

func (*CloneURL) GetCodeCommitCredentials

func (c *CloneURL) GetCodeCommitCredentials() (*CodeCommitCredentials, error)

GetCodeCommitCredentials return CodeCommitCredentials for URL

func (*CloneURL) String

func (c *CloneURL) String() string

type CodeCommitCredentials

type CodeCommitCredentials struct {
	Username string
	Password string
}

type RepoWrapper

type RepoWrapper struct {
}

RepoWrapper wraps basic go-git comands

func (*RepoWrapper) AddAll added in v0.2.4

func (r *RepoWrapper) AddAll(repo *git.Repository, dir string) error

AddAll stages all the files within the provided dir for a commit

func (*RepoWrapper) Clone

func (r *RepoWrapper) Clone(cloneURL string, destDir string) (*git.Repository, bool, error)

Clone a Git repo, return true if the repo is up to date or was from an empty clone.

func (*RepoWrapper) Commit

func (r *RepoWrapper) Commit(w *git.Worktree, name, email, message string, force bool) (*plumbing.Hash, error)

Commit to a Git repo

func (*RepoWrapper) GetDestPath

func (r *RepoWrapper) GetDestPath(path string) string

GetDestPath returns get the dest from either last element of args or the basename of the url (with the .git suffix stripped).

func (*RepoWrapper) Pull

func (r *RepoWrapper) Pull(path string) error

Pull a Git repo from path

func (*RepoWrapper) PullR

func (r *RepoWrapper) PullR(repo *git.Repository) error

PullR a Git repo.

func (*RepoWrapper) Push

func (r *RepoWrapper) Push(path string) error

Push a Git repo from path

func (*RepoWrapper) PushR

func (r *RepoWrapper) PushR(repo *git.Repository) error

PushR a Git repo.

type SigningCtx

type SigningCtx struct {
	ServiceName string
	Region      string
	Time        time.Time
	CredValues  credentials.Value
	// contains filtered or unexported fields
}

func NewSigningContext

func NewSigningContext(u *nurl.URL, region, serviceName string, credValues credentials.Value, signTime time.Time) SigningCtx

Jump to

Keyboard shortcuts

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