Documentation ¶
Index ¶
- Variables
- type FilesystemClient
- func (c *FilesystemClient) Get(ctx context.Context, key string) ([]byte, error)
- func (c *FilesystemClient) Put(ctx context.Context, key string, raw []byte, tags map[string]string) (*ObjectInfo, error)
- func (c *FilesystemClient) Stat(ctx context.Context, key string) (*ObjectInfo, error)
- func (c *FilesystemClient) Type() ObjectStoreType
- type FilesystemClientOptions
- type MinioClient
- func (c *MinioClient) Get(ctx context.Context, key string) ([]byte, error)
- func (c *MinioClient) Put(ctx context.Context, key string, raw []byte, tags map[string]string) (*ObjectInfo, error)
- func (c *MinioClient) Stat(ctx context.Context, key string) (*ObjectInfo, error)
- func (c *MinioClient) Type() ObjectStoreType
- type MinioClientOptions
- type ObjectInfo
- type ObjectStore
- type ObjectStoreOptions
- type ObjectStoreType
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrObjectNotFound = errors.New("object not found")
)
Functions ¶
This section is empty.
Types ¶
type FilesystemClient ¶
type FilesystemClient struct {
// contains filtered or unexported fields
}
func NewFilesystemClient ¶
func NewFilesystemClient(opts FilesystemClientOptions) *FilesystemClient
func (*FilesystemClient) Put ¶
func (c *FilesystemClient) Put(ctx context.Context, key string, raw []byte, tags map[string]string) (*ObjectInfo, error)
func (*FilesystemClient) Stat ¶
func (c *FilesystemClient) Stat(ctx context.Context, key string) (*ObjectInfo, error)
func (*FilesystemClient) Type ¶
func (c *FilesystemClient) Type() ObjectStoreType
type FilesystemClientOptions ¶
type FilesystemClientOptions struct {
BaseDir string
}
type MinioClient ¶
type MinioClient struct {
// contains filtered or unexported fields
}
func NewMinioClient ¶
func NewMinioClient(opts MinioClientOptions) (*MinioClient, error)
func (*MinioClient) Put ¶
func (c *MinioClient) Put(ctx context.Context, key string, raw []byte, tags map[string]string) (*ObjectInfo, error)
func (*MinioClient) Stat ¶
func (c *MinioClient) Stat(ctx context.Context, key string) (*ObjectInfo, error)
func (*MinioClient) Type ¶
func (c *MinioClient) Type() ObjectStoreType
type MinioClientOptions ¶
type ObjectInfo ¶
type ObjectStore ¶
type ObjectStore interface { Type() ObjectStoreType Get(context.Context, string) ([]byte, error) Put(context.Context, string, []byte, map[string]string) (*ObjectInfo, error) Stat(context.Context, string) (*ObjectInfo, error) }
func NewObjectStore ¶
func NewObjectStore(opts ObjectStoreOptions) (ObjectStore, error)
type ObjectStoreOptions ¶
type ObjectStoreOptions struct {
// contains filtered or unexported fields
}
func (*ObjectStoreOptions) SetFilesystem ¶
func (o *ObjectStoreOptions) SetFilesystem(baseDir string) *ObjectStoreOptions
func (*ObjectStoreOptions) SetMinio ¶
func (o *ObjectStoreOptions) SetMinio(endpoint, bucket, accessKeyID, secretAccessKey string) *ObjectStoreOptions
type ObjectStoreType ¶
type ObjectStoreType string
const ( MinioObjectStore ObjectStoreType = "minio" FilesystemObjectStore ObjectStoreType = "filesystem" )
func (ObjectStoreType) String ¶
func (t ObjectStoreType) String() string
Click to show internal directories.
Click to hide internal directories.