storage

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageTypeS3  = "S3"
	StorageTypeLFS = "FILE_SYSTEM_STORAGE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystemStorage

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

func NewLocalStorage

func NewLocalStorage(storageFolder string) *FileSystemStorage

func (*FileSystemStorage) Upload

func (storage *FileSystemStorage) Upload(ctx context.Context, data []byte, fileName string) error

type Handler

type Handler interface {
	Upload(context context.Context, data []byte, fileName string) error
}

func NewFromConfig added in v0.0.5

func NewFromConfig(ctx context.Context, c *config.CloudbuildOpts) Handler

type PutObjectToS3

type PutObjectToS3 interface {
	PutObject(
		ctx context.Context,
		params *s3.PutObjectInput,
		optFns ...func(*s3.Options),
	) (*s3.PutObjectOutput, error)
}

type S3ArtifactStorage

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

func NewS3ArtifactStorage

func NewS3ArtifactStorage(bucket string, s3 PutObjectToS3) *S3ArtifactStorage

func NewS3ArtifactStorageFromConfig added in v0.0.5

func NewS3ArtifactStorageFromConfig(
	ctx context.Context, c *config.CloudbuildOpts,
) *S3ArtifactStorage

func (*S3ArtifactStorage) Upload

func (storage *S3ArtifactStorage) Upload(ctx context.Context, data []byte, fileName string) error

Jump to

Keyboard shortcuts

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