Documentation
¶
Index ¶
- func BytesToString(bytes []byte) string
- func CopySSH(host string, username string, key string, reader io.Reader, targetPath string, ...) error
- func ExecSSH(host string, username string, key string, stdin io.Reader, command ...string) (string, error)
- func Exit(code int)
- func Fail(message string)
- func FailOnError(err error)
- func Failf(f string, args ...interface{})
- func FromBase64(b64 string) ([]byte, error)
- func GetFileHash(path string) (string, error)
- func GetLock(pointer interface{}) *sync.RWMutex
- func ParseX509CertPool(bytes []byte) (*x509.CertPool, error)
- func ParseX509Certificates(bytes []byte) ([]*x509.Certificate, error)
- func ReaderSize(reader io.Reader) (int64, error)
- func ResetLocks()
- func SanitizeFilename(name string) string
- func SetFlagsFromEnvironment(prefix string)
- func SetupSignalHandler() <-chan struct{}
- func SortedMapStringStringKeys(map_ map[string]string) []string
- func StringToBytes(string_ string) (bytes []byte)
- func Timestamp(asString bool) interface{}
- func ToBase64(bytes []byte) string
- type BufferedWriter
- type ExitFunctionHandle
- type ForceHTTPSRoundTripper
- type SyncedWriter
- type TarEncoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
This casting *does not* copy data. Note that casting via "string(bytes)" *does* copy data.
func FailOnError ¶
func FailOnError(err error)
func FromBase64 ¶ added in v0.1.4
func GetFileHash ¶
func ParseX509CertPool ¶ added in v0.1.6
func ParseX509Certificates ¶ added in v0.1.6
func ParseX509Certificates(bytes []byte) ([]*x509.Certificate, error)
func ResetLocks ¶
func ResetLocks()
func SanitizeFilename ¶
func SetFlagsFromEnvironment ¶
func SetFlagsFromEnvironment(prefix string)
func SetupSignalHandler ¶
func SetupSignalHandler() <-chan struct{}
SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned which is closed on one of these signals. If a second signal is caught, the program is terminated with exit code 1.
func StringToBytes ¶
Types ¶
type BufferedWriter ¶ added in v0.1.22
type BufferedWriter struct {
// contains filtered or unexported fields
}
func NewBufferedWriter ¶ added in v0.1.22
func NewBufferedWriter(writer io.Writer, n int) BufferedWriter
func (BufferedWriter) Close ¶ added in v0.1.22
func (self BufferedWriter) Close() error
io.Closer interface
type ExitFunctionHandle ¶ added in v0.1.22
type ExitFunctionHandle uint64
func OnExit ¶ added in v0.1.22
func OnExit(exitFunction func()) ExitFunctionHandle
func (ExitFunctionHandle) Cancel ¶ added in v0.1.22
func (self ExitFunctionHandle) Cancel()
type ForceHTTPSRoundTripper ¶ added in v0.1.4
type ForceHTTPSRoundTripper struct {
// contains filtered or unexported fields
}
func NewForceHTTPSRoundTripper ¶ added in v0.1.4
func NewForceHTTPSRoundTripper(roundTripper http.RoundTripper) *ForceHTTPSRoundTripper
type SyncedWriter ¶ added in v0.1.22
func NewSyncedWriter ¶ added in v0.1.22
func NewSyncedWriter(writer io.Writer) *SyncedWriter
func (*SyncedWriter) Close ¶ added in v0.1.22
func (self *SyncedWriter) Close() error
io.Closer interface
type TarEncoder ¶
type TarEncoder struct {
// contains filtered or unexported fields
}
func NewTarEncoder ¶
func NewTarEncoder(reader io.Reader, name string, size int64) *TarEncoder
func (*TarEncoder) Drain ¶
func (self *TarEncoder) Drain()
func (*TarEncoder) Encode ¶
func (self *TarEncoder) Encode() io.Reader
Click to show internal directories.
Click to hide internal directories.