Documentation ¶
Index ¶
- func CopyImage(dest, endpoint, accessKey, secKey string) error
- func ParseEndpoint(endpt string) (*url.URL, error)
- func ParseEnvVar(envVarName string, decode bool) (string, error)
- func SaveStream(stream io.ReadCloser, dest string) (int64, error)
- func StreamDataToFile(dataReader io.Reader, filePath string) error
- type DataStream
- type DataStreamInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseEndpoint ¶
ParseEndpoint parses the required endpoint and return the url struct.
func ParseEnvVar ¶
ParseEnvVar provides a wrapper to attempt to fetch the specified env var
func SaveStream ¶
func SaveStream(stream io.ReadCloser, dest string) (int64, error)
SaveStream reads from a stream and saves data to dest
Types ¶
type DataStream ¶
type DataStream struct { Readers []reader Size int64 // contains filtered or unexported fields }
DataStream implements the ReadCloser interface
func NewDataStream ¶
func NewDataStream(endpt, accKey, secKey string) (*DataStream, error)
NewDataStream returns a DataStream object after validating the endpoint and constructing the reader/closer chain. Note: the caller must close the `Readers` in reverse order. See Close().
Click to show internal directories.
Click to hide internal directories.