Documentation
¶
Index ¶
- Variables
- type BucketProperties
- type DigitalOceanSpaceConfig
- type Metadata
- type SpaceStore
- func (s *SpaceStore) Delete(ctx context.Context, id string) error
- func (s *SpaceStore) Retrieve(ctx context.Context, id string) ([]byte, error)
- func (s *SpaceStore) RetrieveObjectMetadata(context context.Context, id string) (*Metadata, error)
- func (s *SpaceStore) Store(ctx context.Context, id string, data []byte) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BucketProperties ¶
type DigitalOceanSpaceConfig ¶
type SpaceStore ¶
type SpaceStore struct { *s3.S3 BucketProperties }
func NewSpaceStore ¶
func NewSpaceStore(ctx context.Context, endpoint string, key string, secret string, bucket BucketProperties) (*SpaceStore, error)
func (*SpaceStore) RetrieveObjectMetadata ¶
type Storage ¶
type Storage interface { Store(ctx context.Context, id string, data []byte) error Retrieve(context context.Context, id string) (data []byte, err error) RetrieveObjectMetadata(context context.Context, id string) (metadata *Metadata, err error) Delete(context context.Context, id string) error }
func NewInmemoryStore ¶
func NewInmemoryStore() Storage
Click to show internal directories.
Click to hide internal directories.