git

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAccessMode = errors.New("invalid mode")
View Source
var ErrInvalidRefType = errors.New("invalid reftype")

Functions

This section is empty.

Types

type AccessMode

type AccessMode string
const (
	AccessModeNo          AccessMode = "no"
	AccessModeIfUndefined AccessMode = "if_undefined"
	AccessModeAlways      AccessMode = "always"
)

func GetAccessMode

func GetAccessMode(value string) (AccessMode, error)

func (AccessMode) String

func (a AccessMode) String() string

func (AccessMode) Valid

func (a AccessMode) Valid() bool

type RefType

type RefType string
const (
	RefTypeTag    RefType = "tag"
	RefTypeBranch RefType = "branch"
	RefTypeRemote RefType = "remote"
	RefTypeNote   RefType = "note"
	RefTypeCommit RefType = "commit"
)

func GetRefType

func GetRefType(value string) (RefType, error)

func (RefType) String

func (r RefType) String() string

func (RefType) Valid

func (r RefType) Valid() bool

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func Get

func Get() (*Repo, error)

func New

func New() (*Repo, error)

func (*Repo) HasBranch

func (r *Repo) HasBranch(name string) (bool, error)

func (*Repo) HasCommit

func (r *Repo) HasCommit(rev string) (bool, error)

func (*Repo) HasNote

func (r *Repo) HasNote(name string) (bool, error)

func (*Repo) HasRemote

func (r *Repo) HasRemote(name string) (bool, error)

func (*Repo) HasRevision

func (r *Repo) HasRevision(rev string) (bool, error)

func (*Repo) HasTag

func (r *Repo) HasTag(name string) (bool, error)

func (*Repo) Head

func (r *Repo) Head() (*plumbing.Reference, error)

func (*Repo) IsDirty

func (r *Repo) IsDirty() (bool, error)

Jump to

Keyboard shortcuts

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