s3

package
v0.9.310 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CredentialsModeStatic         = "static"
	CredentialsModeEKSPodIdentity = "eksPodIdentity"
	CredentialsModeAmbient        = "ambient"
)
View Source
const MULTIPART_SIZE = 5 * utils.MEBIBYTE
View Source
const PATH_PREFIX = "s3://"

Variables

This section is empty.

Functions

func CheckConfig added in v0.9.265

func CheckConfig() types.Check

func LoadAWSConfig added in v0.9.302

func LoadAWSConfig(ctx context.Context, settings cedanaconfig.AWS) (cfg aws.Config, err error)

LoadAWSConfig validates the selected authentication mode and creates the AWS configuration shared by S3 storage and its health check.

func NewStorage

func NewStorage(ctx context.Context) (cedana_io.Storage, error)

Types

type File

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

func NewFile

func NewFile(ctx context.Context, client *s3.Client, bucket, key string) *File

func (*File) Close

func (c *File) Close() error

func (*File) Read

func (c *File) Read(p []byte) (int, error)

func (*File) Write

func (c *File) Write(p []byte) (int, error)

type Storage

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

S3 storage

func (*Storage) Create

func (s *Storage) Create(ctx context.Context, path string) (io.WriteCloser, error)

func (*Storage) CreatePath added in v0.9.303

func (s *Storage) CreatePath(ctx context.Context, dir, name string) (path string, cleanup func(cancel bool) error, err error)

func (*Storage) Delete

func (s *Storage) Delete(_ context.Context, path string) error

func (*Storage) IsDir

func (s *Storage) IsDir(_ context.Context, path string) (bool, error)

func (*Storage) IsRemote

func (s *Storage) IsRemote() bool

func (*Storage) Open

func (s *Storage) Open(ctx context.Context, path string) (io.ReadCloser, error)

func (*Storage) ReadDir

func (s *Storage) ReadDir(ctx context.Context, path string) ([]string, error)

func (*Storage) ReadPath added in v0.9.303

func (s *Storage) ReadPath(ctx context.Context, path string) (string, func() error, error)

Jump to

Keyboard shortcuts

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