awss3

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBucketNotFound signals that a bucket was not found.
	ErrBucketNotFound = errors.New("bucket not found")

	// ErrObjectNotFound signals that an object was not found.
	ErrObjectNotFound = errors.New("object not found")
)

Functions

This section is empty.

Types

type ChartInfo

type ChartInfo struct {
	Meta     helmutil.ChartMetadata
	Filename string
	Hash     string
}

ChartInfo contains info about particular chart.

type Storage

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

Storage provides an interface to work with AWS S3 objects by s3 protocol.

func New

func New(session *session.Session) *Storage

New returns a new Storage.

func (*Storage) Delete

func (s *Storage) Delete(ctx context.Context, uri string) error

Delete deletes the object by uri. uri must be in the form of s3 protocol: s3://bucket-name/key[...].

func (*Storage) Exists

func (s *Storage) Exists(ctx context.Context, uri string) (bool, error)

Exists returns true if an object exists in the storage.

func (*Storage) FetchRaw

func (s *Storage) FetchRaw(ctx context.Context, uri string) ([]byte, error)

FetchRaw downloads the object from URI and returns it in the form of byte slice. uri must be in the form of s3 protocol: s3://bucket-name/key[...].

func (*Storage) IndexExists added in v0.15.0

func (s *Storage) IndexExists(ctx context.Context, uri string) (bool, error)

IndexExists returns true if index file exists in the storage for repository with the provided uri. uri must be in the form of s3 protocol: s3://bucket-name/key[...].

func (*Storage) PutChart

func (s *Storage) PutChart(ctx context.Context, uri string, r io.Reader, chartMeta, acl string, chartDigest string, contentType string) (string, error)

PutChart puts the chart file to the storage. uri must be in the form of s3 protocol: s3://bucket-name/key[...].

func (*Storage) PutIndex

func (s *Storage) PutIndex(ctx context.Context, uri string, acl string, r io.Reader) error

PutIndex puts the index file to the storage. uri must be in the form of s3 protocol: s3://bucket-name/key[...].

func (*Storage) Traverse

func (s *Storage) Traverse(ctx context.Context, repoURI string) (<-chan ChartInfo, <-chan error)

Traverse traverses all charts in the repository.

Jump to

Keyboard shortcuts

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