Documentation ¶
Overview ¶
Package common provides utilities, shared variables, and types for both the client and the daemon
Index ¶
- func CheckForDockerCompose(cwd string) bool
- func CheckForDockerfile(cwd string) bool
- func ExtractRepository(URL string) string
- func GenerateRandomString() (string, error)
- func GetBranchFromRef(ref string) string
- func GetFullPath(relPath string) (string, error)
- func GetSSHRemoteURL(url string) string
- func ParseDate(dateString string) *time.Time
- func ParseInt64(value string) (int64, error)
- func RemoveContents(directory string) error
- type DevNull
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForDockerCompose ¶
CheckForDockerCompose returns false if current directory is a not a docker-compose project
func CheckForDockerfile ¶ added in v0.3.0
CheckForDockerfile returns false if current directory is a not a Dockerfile project
func ExtractRepository ¶ added in v0.4.0
ExtractRepository gets the project name from its URL in the form [username]/[project]
func GenerateRandomString ¶ added in v0.4.0
GenerateRandomString creates a rand.Reader-generated string for use with simple secrets and identifiers
func GetBranchFromRef ¶ added in v0.1.1
GetBranchFromRef gets the branch name from a git ref of form refs/...
func GetFullPath ¶ added in v0.4.0
GetFullPath returns the absolute path of the config file.
func GetSSHRemoteURL ¶
GetSSHRemoteURL gets the URL of the given remote in the form "git@github.com:[USER]/[REPOSITORY].git"
func ParseInt64 ¶ added in v0.4.0
ParseInt64 parses a string into an int64 value
func RemoveContents ¶
RemoveContents removes all files within given directory, returns nil if successful