Documentation
¶
Index ¶
- Constants
- func BlobFixtureSetFactory[T any](settings *BlobFixturesSettings, data fixtures.NamedFixtures[T], ...) fixtures.FixtureSetFactory
- func CreateKey() string
- func NewBlobFixtureWriter(ctx context.Context, config cfg.Config, logger log.Logger, ...) (fixtures.FixtureWriter, error)
- func NewBlobFixtureWriterWithInterfaces(logger log.Logger, batchRunner BatchRunner, store Store, basePath string) fixtures.FixtureWriter
- func NewLifecycleManager(settings *Settings) reslife.LifeCycleerFactory
- func ProvideBatchRunner(name string) kernel.ModuleFactory
- func WithNamingStrategy(strategy NamingFactory)
- type Batch
- type BatchRunner
- type BatchRunnerChannels
- type BatchRunnerSettings
- type BlobFixture
- type BlobFixturesSettings
- type CopyBatch
- type CopyObject
- type LifecycleManager
- type NamingFactory
- type Object
- type ReadCloser
- type ReadSeekerCloser
- type Service
- func (l *Service) CreateBucket(ctx context.Context) error
- func (s *Service) DeleteObjects(ctx context.Context, bucket string, objects []*types.Object) error
- func (s *Service) ListObjects(ctx context.Context, bucket string, prefix string) ([]types.Object, error)
- func (l *Service) Purge(ctx context.Context) error
- type Settings
- type Store
- type Stream
- type UrlBuilder
Constants ¶
View Source
const ( PrivateACL = types.ObjectCannedACLPrivate PublicReadACL = types.ObjectCannedACLPublicRead )
Variables ¶
This section is empty.
Functions ¶
func BlobFixtureSetFactory ¶ added in v0.37.0
func BlobFixtureSetFactory[T any](settings *BlobFixturesSettings, data fixtures.NamedFixtures[T], options ...fixtures.FixtureSetOption) fixtures.FixtureSetFactory
func NewBlobFixtureWriter ¶ added in v0.37.0
func NewBlobFixtureWriter(ctx context.Context, config cfg.Config, logger log.Logger, settings *BlobFixturesSettings) (fixtures.FixtureWriter, error)
func NewBlobFixtureWriterWithInterfaces ¶ added in v0.37.0
func NewBlobFixtureWriterWithInterfaces(logger log.Logger, batchRunner BatchRunner, store Store, basePath string) fixtures.FixtureWriter
func NewLifecycleManager ¶ added in v0.37.0
func NewLifecycleManager(settings *Settings) reslife.LifeCycleerFactory
func ProvideBatchRunner ¶
func ProvideBatchRunner(name string) kernel.ModuleFactory
func WithNamingStrategy ¶
func WithNamingStrategy(strategy NamingFactory)
Types ¶
type BatchRunner ¶
type BatchRunnerChannels ¶
type BatchRunnerChannels struct {
// contains filtered or unexported fields
}
func NewBatchRunnerChannels ¶
func NewBatchRunnerChannels(config cfg.Config) *BatchRunnerChannels
func ProvideBatchRunnerChannels ¶
func ProvideBatchRunnerChannels(config cfg.Config) *BatchRunnerChannels
type BatchRunnerSettings ¶
type BatchRunnerSettings struct { ClientName string `cfg:"client_name" default:"default"` CopyRunnerCount int `cfg:"copy_runner_count" default:"10"` DeleteRunnerCount int `cfg:"delete_runner_count" default:"10"` ReaderRunnerCount int `cfg:"reader_runner_count" default:"10"` WriterRunnerCount int `cfg:"writer_runner_count" default:"10"` }
type BlobFixture ¶ added in v0.37.0
type BlobFixture struct{}
BlobFixture is a dummy struct for writing nicely typed fixture sets, even though the blob fixture loader works a bit differently
type BlobFixturesSettings ¶ added in v0.37.0
type CopyBatch ¶
type CopyBatch []*CopyObject
type CopyObject ¶
type CopyObject struct { ACL types.ObjectCannedACL ContentEncoding *string ContentType *string Error error Key *string SourceBucket *string SourceKey *string // contains filtered or unexported fields }
func (*CopyObject) GetFullKey ¶
func (o *CopyObject) GetFullKey() string
type LifecycleManager ¶ added in v0.37.0
type NamingFactory ¶
type NamingFactory func() string
func DefaultNamingStrategy ¶
func DefaultNamingStrategy() NamingFactory
type Object ¶
type Object struct { ACL types.ObjectCannedACL Body Stream ContentEncoding *string ContentType *string Error error Exists bool Key *string // contains filtered or unexported fields }
func (*Object) GetFullKey ¶
type ReadCloser ¶
type ReadCloser interface { io.ReadCloser }
type ReadSeekerCloser ¶
type ReadSeekerCloser interface { io.ReadSeeker io.Closer }
A reader that we can close and that can seek
func CloseOnce ¶
func CloseOnce(reader io.ReadSeeker) ReadSeekerCloser
CloseOnce wraps a reader and provide a closer. Can be called more than once. If the reader does not implement closer, it ignores calls to close.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateBucket ¶ added in v0.37.0
func (*Service) DeleteObjects ¶
func (*Service) ListObjects ¶
type Store ¶
type Store interface { BucketName() string Copy(batch CopyBatch) CopyOne(obj *CopyObject) error Delete(batch Batch) DeleteBucket(ctx context.Context) error DeleteOne(obj *Object) error Read(batch Batch) ReadOne(obj *Object) error Write(batch Batch) error WriteOne(obj *Object) error }
func NewStoreWithInterfaces ¶
type Stream ¶
type Stream interface { // Read all data and close the reader. ReadAll() ([]byte, error) // Extract a reader you have to close yourself. Calling this multiple times might return // the same object. AsReader() ReadSeekerCloser }
A stream is a source of bytes you can either get as a full []byte or stream as a reader.
func StreamReader ¶
func StreamReader(reader ReadCloser) Stream
Use a reader as a stream. If the reader does not implement Seek, we provide a dummy implementation.
type UrlBuilder ¶
func NewUrlBuilder ¶
func NewUrlBuilder(config cfg.Config, name string) (UrlBuilder, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.