Documentation ¶
Index ¶
- func CopyDir(srcPath, dstPath string) error
- func GenerateUUID(name string) uuid.UUID
- func SameContent(src, dst string) (bool, error)
- func WalkPath(root string, skip []string) ([]string, error)
- type ConcurrentMap
- type ConcurrentMapItem
- type ConcurrentSlice
- type ConcurrentSliceItem
- type FileOwner
- type FileUtil
- func (fu *FileUtil) Abs() (string, error)
- func (fu *FileUtil) Chmod(perm os.FileMode) error
- func (fu *FileUtil) CopyFrom(srcPath string, overwrite bool) error
- func (fu *FileUtil) Exists() bool
- func (fu *FileUtil) Md5() (string, error)
- func (fu *FileUtil) Mode() (os.FileMode, error)
- func (fu *FileUtil) Owner() (*FileOwner, error)
- func (fu *FileUtil) Remove() error
- func (fu *FileUtil) SameContentWith(dst string) (bool, error)
- func (fu *FileUtil) SetOwner(owner, group string) error
- func (fu *FileUtil) Sha1() (string, error)
- func (fu *FileUtil) Sha256() (string, error)
- type GitRepo
- func (gr *GitRepo) Checkout(branch string) ([]byte, error)
- func (gr *GitRepo) CheckoutDetached(branch string) ([]byte, error)
- func (gr *GitRepo) Clone() ([]byte, error)
- func (gr *GitRepo) Fetch(remote string) ([]byte, error)
- func (gr *GitRepo) Head() (string, error)
- func (gr *GitRepo) IsGitRepo() bool
- func (gr *GitRepo) Pull(remote, branch string) ([]byte, error)
- type List
- type String
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateUUID ¶
GenerateUUID generates a new uuid for a minion
func SameContent ¶ added in v0.2.0
SameContent returns a boolean indicating whether two files have the same content
Types ¶
type ConcurrentMap ¶ added in v0.2.0
ConcurrentMap is a map type that can be safely shared between goroutines that require read/write access to a map
func NewConcurrentMap ¶
func NewConcurrentMap() *ConcurrentMap
NewConcurrentMap creates a new concurrent map
func (*ConcurrentMap) Get ¶ added in v0.2.0
func (cm *ConcurrentMap) Get(key string) (interface{}, bool)
Get retrieves the value for a concurrent map item
func (*ConcurrentMap) Iter ¶ added in v0.2.0
func (cm *ConcurrentMap) Iter() <-chan ConcurrentMapItem
Iter iterates over the items in a concurrent map Each item is sent over a channel, so that we can iterate over the map using the builtin range keyword
func (*ConcurrentMap) Set ¶ added in v0.2.0
func (cm *ConcurrentMap) Set(key string, value interface{})
Set adds an item to a concurrent map
type ConcurrentMapItem ¶
type ConcurrentMapItem struct { Key string Value interface{} }
ConcurrentMapItem contains a key/value pair item of a concurrent map
type ConcurrentSlice ¶ added in v0.2.0
ConcurrentSlice type that can be safely shared between goroutines
func NewConcurrentSlice ¶
func NewConcurrentSlice() *ConcurrentSlice
NewConcurrentSlice creates a new concurrent slice
func (*ConcurrentSlice) Append ¶ added in v0.2.0
func (cs *ConcurrentSlice) Append(item interface{})
Append adds an item to the concurrent slice
func (*ConcurrentSlice) Iter ¶ added in v0.2.0
func (cs *ConcurrentSlice) Iter() <-chan ConcurrentSliceItem
Iter iterates over the items in the concurrent slice Each item is sent over a channel, so that we can iterate over the slice using the builin range keyword
type ConcurrentSliceItem ¶
type ConcurrentSliceItem struct { Index int Value interface{} }
ConcurrentSliceItem contains the index/value pair of an item in a concurrent slice
type FileOwner ¶ added in v0.2.0
FileOwner type provides details about the user and group that owns a file
type FileUtil ¶ added in v0.2.0
type FileUtil struct { // Path to the file we manage Path string }
FileUtil type
func NewFileUtil ¶ added in v0.2.0
NewFileUtil creates a file utility from the given path
func (*FileUtil) CopyFrom ¶ added in v0.2.0
CopyFrom copies contents from another source to the current file
func (*FileUtil) Exists ¶ added in v0.2.0
Exists returns a boolean indicating whether the file exists or not
func (*FileUtil) SameContentWith ¶ added in v0.2.0
SameContentWith returns a boolean indicating whether the content of the current file is the same as the destination
type GitRepo ¶ added in v0.3.0
type GitRepo struct { // Local path to the repository Path string // Upstream URL of the Git repository Upstream string // contains filtered or unexported fields }
GitRepo type manages a VCS repository with Git
func NewGitRepo ¶ added in v0.3.0
NewGitRepo creates a new Git repository
func (*GitRepo) CheckoutDetached ¶ added in v0.3.0
CheckoutDetached checks out a given local branch in detached mode
type List ¶ added in v0.4.0
type List []string
List type represents a slice of strings