Versions in this module Expand all Collapse all v0 v0.11.0 Aug 22, 2014 v0.10.0 Jul 24, 2014 Changes in this version + const StdWriterFdIndex + const StdWriterPrefixLen + const StdWriterSizeIndex + var ErrInvalidStdHeader = errors.New("Unrecognized input header") + func CheckLocalDns(resolvConf []byte) bool + func CompareKernelVersion(a, b *KernelVersionInfo) int + 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 Debugf(format string, a ...interface{}) + 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 Errorf(format string, a ...interface{}) + 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 NewBufReader(r io.Reader) *bufReader + func NewHTTPRequestError(msg string, res *http.Response) error + func NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser + func NewTimeoutConn(conn net.Conn, timeout time.Duration) net.Conn + func NopWriteCloser(w io.Writer) io.WriteCloser + func ParseHost(defaultHost string, defaultUnix, addr string) (string, error) + func ParseKeyValueOpt(opt string) (string, string, error) + func ParseRepositoryTag(repos string) (string, string) + func PartParser(template, data string) (map[string]string, error) + 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 ReplaceOrAppendEnvValues(defaults, overrides []string) []string + func ResumableRequestReader(c *http.Client, r *http.Request, maxfail uint32, totalsize int64) io.ReadCloser + func SelfPath() string + func ShellQuoteArguments(args []string) string + func StdCopy(dstout, dsterr io.Writer, src io.Reader) (written int64, err error) + 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) error + func ValidateID(id string) error + func WriteLog(src io.Reader, dst io.WriteCloser, format string) error + type CheckSum struct + Hash hash.Hash + func (cs *CheckSum) Read(buf []byte) (int, error) + func (cs *CheckSum) Sum() string + type Fataler interface + Fatal func(args ...interface{}) + 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 JSONLog struct + Created time.Time + Log string + Stream string + func (jl *JSONLog) Format(format string) (string, error) + 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 KernelVersionInfo struct + Flavor string + Kernel int + Major int + Minor int + func GetKernelVersion() (*KernelVersionInfo, error) + func ParseRelease(release string) (*KernelVersionInfo, error) + func (k *KernelVersionInfo) String() string + type KeyValuePair struct + Key string + Value string + type LogFormatter struct + type NopFlusher struct + func (f *NopFlusher) Flush() + type NopWriter struct + func (*NopWriter) Write(buf []byte) (int, error) + type StatusError struct + Status string + StatusCode int + func (e *StatusError) Error() string + type StdType [StdWriterPrefixLen]byte + var Stderr StdType = StdType{ ... } + var Stdin StdType = StdType{ ... } + var Stdout StdType = StdType{ ... } + type StdWriter struct + func NewStdWriter(w io.Writer, t StdType) *StdWriter + func (w *StdWriter) Write(buf []byte) (n int, err error) + 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 TarSum struct + DisableCompression bool + func (ts *TarSum) GetSums() map[string]string + func (ts *TarSum) Read(buf []byte) (int, error) + func (ts *TarSum) Sum(extra []byte) string + type TimeoutConn struct + func (c *TimeoutConn) Read(b []byte) (int, error) + type Utsname struct — darwin/amd64, js/wasm, windows/amd64 + Release [65]byte + type Utsname syscall.Utsname — linux/amd64 + type VersionInfo interface + Name func() string + Version func() string + type WriteBroadcaster struct + func NewWriteBroadcaster() *WriteBroadcaster + func (w *WriteBroadcaster) AddWriter(writer io.WriteCloser, stream string) + func (w *WriteBroadcaster) CloseWriters() error + func (w *WriteBroadcaster) Write(p []byte) (n int, err error) + type WriteFlusher struct + func NewWriteFlusher(w io.Writer) *WriteFlusher + func (wf *WriteFlusher) Flush() + func (wf *WriteFlusher) Write(b []byte) (n int, err error)