Documentation ¶
Index ¶
- type Engine
- type FileSystem
- type LocalStorage
- func (l *LocalStorage) Copy(ctx context.Context, bucket, key, destBucket, destKey string) error
- func (l *LocalStorage) Delete(ctx context.Context, bucket, key string) error
- func (l *LocalStorage) Get(ctx context.Context, bucket, key string) (io.ReadCloser, error)
- func (l *LocalStorage) Init() error
- func (l *LocalStorage) IsExist(ctx context.Context, bucket, key string) (bool, error)
- func (l *LocalStorage) OnInit(e *harukap.HarukaAppEngine) error
- func (l *LocalStorage) Upload(ctx context.Context, body io.Reader, bucket string, key string) error
- type LocalStorageConfig
- type S3Client
- func (c *S3Client) Copy(ctx context.Context, bucket, key, destBucket, destKey string) error
- func (c *S3Client) Delete(ctx context.Context, bucket, key string) error
- func (c *S3Client) Get(ctx context.Context, bucket, key string) (io.ReadCloser, error)
- func (c *S3Client) Init() error
- func (c *S3Client) IsExist(ctx context.Context, bucket, key string) (bool, error)
- func (c *S3Client) OnInit(e *harukap.HarukaAppEngine) error
- func (c *S3Client) Upload(ctx context.Context, body io.Reader, bucket string, key string) error
- type S3ClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) GetStorage ¶
func (e *Engine) GetStorage(name string) FileSystem
type FileSystem ¶
type FileSystem interface { Upload(ctx context.Context, body io.Reader, bucket string, key string) error Init() error Get(ctx context.Context, bucket, key string) (io.ReadCloser, error) Delete(ctx context.Context, bucket, key string) error IsExist(ctx context.Context, bucket, key string) (bool, error) Copy(ctx context.Context, bucket, key, destBucket, destKey string) error }
type LocalStorage ¶
type LocalStorage struct { Config *LocalStorageConfig ConfigName string // contains filtered or unexported fields }
func (*LocalStorage) Copy ¶
func (l *LocalStorage) Copy(ctx context.Context, bucket, key, destBucket, destKey string) error
func (*LocalStorage) Delete ¶
func (l *LocalStorage) Delete(ctx context.Context, bucket, key string) error
func (*LocalStorage) Get ¶
func (l *LocalStorage) Get(ctx context.Context, bucket, key string) (io.ReadCloser, error)
func (*LocalStorage) Init ¶
func (l *LocalStorage) Init() error
func (*LocalStorage) OnInit ¶
func (l *LocalStorage) OnInit(e *harukap.HarukaAppEngine) error
type LocalStorageConfig ¶
type LocalStorageConfig struct {
Path string `json:"path"`
}
Click to show internal directories.
Click to hide internal directories.