s3

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePublishedKey

func ParsePublishedKey(key string, executionID string, job model.Job, archive bool) string

Types

type Params

type Params struct {
	Bucket   string `json:"Bucket"`
	Key      string `json:"Key"`
	Endpoint string `json:"Endpoint"`
	Region   string `json:"Region"`
	Compress bool   `json:"Compress"`
}

func DecodeSpec

func DecodeSpec(spec model.PublisherSpec) (Params, error)

func (Params) ToMap

func (c Params) ToMap() map[string]interface{}

func (Params) Validate

func (c Params) Validate() error

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher(params PublisherParams) *Publisher

func (*Publisher) IsInstalled

func (publisher *Publisher) IsInstalled(_ context.Context) (bool, error)

IsInstalled returns true if the S3 client is installed.

func (*Publisher) PublishResult

func (publisher *Publisher) PublishResult(
	ctx context.Context,
	executionID string,
	j model.Job,
	resultPath string,
) (model.StorageSpec, error)

func (*Publisher) ValidateJob

func (publisher *Publisher) ValidateJob(_ context.Context, j model.Job) error

ValidateJob validates the job spec and returns an error if the job is invalid.

type PublisherParams

type PublisherParams struct {
	LocalDir       string
	ClientProvider *s3helper.ClientProvider
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL