Documentation ¶
Index ¶
- Variables
- func TempS3Bucket() (name string, clean func(), err error)
- type S3Store
- func (store *S3Store) Del(ctx context.Context, k string) error
- func (store *S3Store) Get(ctx context.Context, k string, w io.WriterAt) (err error)
- func (store *S3Store) Head(ctx context.Context, k string) (size int64, err error)
- func (store *S3Store) Put(ctx context.Context, k string, r io.ReadSeeker) (err error)
- type StoreOptions
- type StoreType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrObjectNotExists is returned when a object does not exist ErrObjectNotExists = errors.New("object does not exist") )
Functions ¶
func TempS3Bucket ¶
TempS3Bucket creates a temporary s3 bucket that can be removed again by calling clean(). This is mainly usefull for testing purposes throughout the codebase of this project. The name will be a randomly generated name prefixed with 'nerd-tests-'
Types ¶
type S3Store ¶
type S3Store struct {
// contains filtered or unexported fields
}
S3Store provides an S3 Backed store
func NewS3Store ¶
func NewS3Store(cfg StoreOptions) (store *S3Store, err error)
NewS3Store creates an s3 implementation of the object store
type StoreOptions ¶
type StoreOptions struct { Type StoreType `json:"type"` S3StoreBucket string `json:"s3StoreBucket"` S3StorePrefix string `json:"s3StorePrefix"` S3StoreAWSRegion string `json:"s3StoreAWSRegion"` S3StoreAccessKey string `json:"s3StoreAccessKey"` S3StoreSecretKey string `json:"s3StoreSecretKey"` S3SessionToken string `json:"s3SessionToken"` }
StoreOptions contain options for all stores
Click to show internal directories.
Click to hide internal directories.