s3

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(cfg *config.Config) (*storage.Repository, error)

Types

type S3DummyRepo

type S3DummyRepo struct {
}

S3DummyRepo is used to disable the S3 service by configuration

func NewS3DummyRepo

func NewS3DummyRepo() *S3DummyRepo

func (*S3DummyRepo) BucketExists

func (s *S3DummyRepo) BucketExists(_ context.Context) (bool, error)

func (*S3DummyRepo) GetObject

func (s *S3DummyRepo) GetObject(_ context.Context, _ string) (io.ReadSeekCloser, error)

func (*S3DummyRepo) PutObject

func (s *S3DummyRepo) PutObject(_ context.Context, _, _ string, _ int64, _ io.Reader) error

type S3RepoCfg

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

type S3Repository

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

func NewS3Repository

func NewS3Repository(cfg *S3RepoCfg) (*S3Repository, error)

func (*S3Repository) BucketExists

func (s *S3Repository) BucketExists(ctx context.Context) (bool, error)

func (*S3Repository) GetObject

func (s *S3Repository) GetObject(ctx context.Context, objName string) (io.ReadSeekCloser, error)

func (*S3Repository) PutObject

func (s *S3Repository) PutObject(ctx context.Context, objName, contentType string, contentLength int64, r io.Reader) error

Jump to

Keyboard shortcuts

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