Versions in this module Expand all Collapse all v0 v0.2.1 Oct 7, 2014 Changes in this version + func CheckLocalDns(resolvConf []byte) bool + func CopyDirectory(source, dest string) error + func CopyEscapable(dst io.Writer, src io.ReadCloser) (written int64, err error) + func CopyFile(src, dst string) (int64, error) + func CreatePidFile(pidfile string) error + func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool) error + func DockerInitPath(localCopy string) string + func Download(url string) (resp *http.Response, err error) + func GenerateRandomID() string + func GetCallerName(depth int) string + func GetLines(input []byte, commentMarker []byte) [][]byte + func GetTotalUsedFds() int + func Go(f func() error) chan error + func HashData(src io.Reader) (string, error) + func IsGIT(str string) bool + func IsURL(str string) bool + func Matches(relFilePath string, patterns []string) (bool, error) + func NewHTTPRequestError(msg string, res *http.Response) error + func NewTimeoutConn(conn net.Conn, timeout time.Duration) net.Conn + func ProgressReader(r io.ReadCloser, size int, output io.Writer, sf *StreamFormatter, newline bool, ...) *progressReader + func RandomString() string + func ReadSymlinkedDirectory(path string) (string, error) + func RemovePidFile(pidfile string) + func ReplaceOrAppendEnvValues(defaults, overrides []string) []string + func SelfPath() string + func ShellQuoteArguments(args []string) string + func StringsContainsNoCase(slice []string, s string) bool + func TempDir(rootDir string) (string, error) — darwin/amd64, linux/amd64 + func TempDir(rootdir string) (string error) — js/wasm, windows/amd64 + func TestDirectory(templateDir string) (dir string, err error) + func TreeSize(dir string) (size int64, err error) + func Trunc(s string, maxlen int) string + func TruncateID(id string) string + func ValidateContextDirectory(srcPath string, excludes []string) error + func ValidateID(id string) error + type HTTPAuthDecorator struct + func (self *HTTPAuthDecorator) ChangeRequest(req *http.Request) (*http.Request, error) + type HTTPMetaHeadersDecorator struct + Headers map[string][]string + func (h *HTTPMetaHeadersDecorator) ChangeRequest(req *http.Request) (newReq *http.Request, err error) + type HTTPRequestDecorator interface + ChangeRequest func(req *http.Request) (newReq *http.Request, err error) + func NewHTTPAuthDecorator(login, password string) HTTPRequestDecorator + func NewHTTPUserAgentDecorator(versions ...VersionInfo) HTTPRequestDecorator + type HTTPRequestFactory struct + func NewHTTPRequestFactory(d ...HTTPRequestDecorator) *HTTPRequestFactory + func (h *HTTPRequestFactory) NewRequest(method, urlStr string, body io.Reader, d ...HTTPRequestDecorator) (*http.Request, error) + func (self *HTTPRequestFactory) AddDecorator(d ...HTTPRequestDecorator) + type HTTPUserAgentDecorator struct + func (h *HTTPUserAgentDecorator) ChangeRequest(req *http.Request) (newReq *http.Request, err error) + type JSONError struct + Code int + Message string + func (e *JSONError) Error() string + type JSONMessage struct + Error *JSONError + ErrorMessage string + From string + ID string + Progress *JSONProgress + ProgressMessage string + Status string + Stream string + Time int64 + func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error + type JSONProgress struct + Current int + Start int64 + Total int + func (p *JSONProgress) String() string + type KeyValuePair struct + Key string + Value string + type StatusError struct + Status string + StatusCode int + func (e *StatusError) Error() string + type StderrFormater struct + func (sf *StderrFormater) Write(buf []byte) (int, error) + type StdoutFormater struct + func (sf *StdoutFormater) Write(buf []byte) (int, error) + type StreamFormatter struct + func NewStreamFormatter(json bool) *StreamFormatter + func (sf *StreamFormatter) FormatError(err error) []byte + func (sf *StreamFormatter) FormatProgress(id, action string, progress *JSONProgress) []byte + func (sf *StreamFormatter) FormatStatus(id, format string, a ...interface{}) []byte + func (sf *StreamFormatter) FormatStream(str string) []byte + func (sf *StreamFormatter) Json() bool + type TimeoutConn struct + func (c *TimeoutConn) Read(b []byte) (int, error) + type VersionInfo interface + Name func() string + Version func() string + type WriteFlusher struct + func NewWriteFlusher(w io.Writer) *WriteFlusher + func (wf *WriteFlusher) Flush() + func (wf *WriteFlusher) Write(b []byte) (n int, err error)