Documentation
¶
Index ¶
- Constants
- func EnsureWithinStackPath(path, stackPath string) error
- func ValidateCreateOptions(options []string) error
- func ValidateExtractOptions(options []string) error
- func ValidateExtractPath(destPath, fileName string) (string, error)
- type ArchiveHandler
- type CreateOptions
- type ExtractOptions
- type OperationsProgressWriter
- type ProgressWriter
- type Service
- type StreamMessage
- type TarHandler
- type ZipHandler
Constants ¶
View Source
const ( StreamTypeStdout = "stdout" StreamTypeStderr = "stderr" StreamTypeError = "error" )
Variables ¶
This section is empty.
Functions ¶
func EnsureWithinStackPath ¶
func ValidateCreateOptions ¶
func ValidateExtractOptions ¶
func ValidateExtractPath ¶
Types ¶
type ArchiveHandler ¶
type ArchiveHandler interface {
Create(ctx context.Context, basePath string, opts CreateOptions, writer ProgressWriter) error
Extract(ctx context.Context, opts ExtractOptions, writer ProgressWriter) error
}
type CreateOptions ¶
type ExtractOptions ¶
type OperationsProgressWriter ¶
type OperationsProgressWriter struct {
// contains filtered or unexported fields
}
func NewOperationsProgressWriter ¶
func NewOperationsProgressWriter(writer io.Writer) *OperationsProgressWriter
func (*OperationsProgressWriter) WriteError ¶
func (w *OperationsProgressWriter) WriteError(data string)
func (*OperationsProgressWriter) WriteMessage ¶
func (w *OperationsProgressWriter) WriteMessage(msgType string, data string)
func (*OperationsProgressWriter) WriteStdout ¶
func (w *OperationsProgressWriter) WriteStdout(data string)
type ProgressWriter ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService() *Service
func (*Service) CreateArchive ¶
func (s *Service) CreateArchive(ctx context.Context, basePath string, opts CreateOptions, writer ProgressWriter) error
func (*Service) ExtractArchive ¶
func (s *Service) ExtractArchive(ctx context.Context, basePath string, opts ExtractOptions, writer ProgressWriter) error
type StreamMessage ¶
type TarHandler ¶
type TarHandler struct{}
func NewTarHandler ¶
func NewTarHandler() *TarHandler
func (*TarHandler) Create ¶
func (h *TarHandler) Create(ctx context.Context, basePath string, opts CreateOptions, writer ProgressWriter) error
func (*TarHandler) Extract ¶
func (h *TarHandler) Extract(ctx context.Context, opts ExtractOptions, writer ProgressWriter) error
type ZipHandler ¶
type ZipHandler struct{}
func NewZipHandler ¶
func NewZipHandler() *ZipHandler
func (*ZipHandler) Create ¶
func (h *ZipHandler) Create(ctx context.Context, basePath string, opts CreateOptions, writer ProgressWriter) error
func (*ZipHandler) Extract ¶
func (h *ZipHandler) Extract(ctx context.Context, opts ExtractOptions, writer ProgressWriter) error
Click to show internal directories.
Click to hide internal directories.