Documentation
¶
Index ¶
- Constants
- func Compress(writer *io.PipeWriter, targetPath string, errChan chan error)
- func CreateSession(region string) *session.Session
- func CreateSessionForLocalstack(region string, endpoint string) *session.Session
- func CreateSessionWithRole(rolearn string, region string) *session.Session
- func Decompress(dest string, reader *io.PipeReader) error
- type Artifact
- type DeployConfig
- type DeployManager
- type Downloader
- type MetaData
- type S3Manager
- type Uploader
- type Walker
Constants ¶
const ( BCATFILE = "bcat.tar.zst" METADATA_FILE = "bcat_info.json" )
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
func Compress(writer *io.PipeWriter, targetPath string, errChan chan error)
Compress compress the file with the specified path.
func CreateSession ¶
CreateSession Create a session for aws s3.
func CreateSessionForLocalstack ¶
CreateSessionForLocalstack Create a session for localstack
func CreateSessionWithRole ¶ added in v0.8.3
CreateSessionWithRole Create a session for aws s3 with role.
func Decompress ¶
func Decompress(dest string, reader *io.PipeReader) error
Decompress output the extracted files to the specified directory
Types ¶
type Artifact ¶
type Artifact struct { Name string `yaml:"name"` Path string `yaml:"path"` Dest string `yaml:"dest"` }
Artifact used in Deploy-Cmd
type DeployConfig ¶
type DeployConfig struct {
Artifacts []Artifact `yaml:"artifacts"`
}
DeployConfig Deploy-Cmd configuration struct
type DeployManager ¶
type DeployManager struct { Downloader Downloader Config DeployConfig }
DeployManager manage deploy struct
func (*DeployManager) Deploy ¶
func (dm *DeployManager) Deploy() error
Deploy download multiple objects from s3 based on DeployConfig values.
type S3Manager ¶
S3Manager A struct with the session and target bucket name. Data is transferred to s3 via this.
func (*S3Manager) GetS3ObjectBody ¶ added in v0.8.3
func (manager *S3Manager) GetS3ObjectBody(downloadPath string) (io.ReadCloser, error)
GetS3ObjectBody returns the object body of s3 as io.ReadCloser
func (*S3Manager) UploadMetaData ¶ added in v0.9.0
UploadMetaData methed
func (*S3Manager) UploadS3 ¶
func (manager *S3Manager) UploadS3(reader *io.PipeReader, uploadPath string, outputChan chan *s3manager.UploadOutput, errChan chan error)
UploadS3 Upload the file to s3 based on the [] byte passed as an argument.