Documentation ¶
Index ¶
- Variables
- type GCSInstance
- func (gcsinstance *GCSInstance) Delete(ctx context.Context, bucket string, key string) error
- func (gcsinstance *GCSInstance) Get(ctx context.Context, bucket string, key string) (string, []byte, error)
- func (gcsinstance *GCSInstance) GetByStreaming(ctx context.Context, bucket string, key string) (string, io.ReadCloser, error)
- func (gcsinstance *GCSInstance) GetObjectInfo(ctx context.Context, bucket string, key string) (entity.StorageObjectInfo, error)
- func (gcsinstance *GCSInstance) List(ctx context.Context, bucket string, key string) ([]string, error)
- func (gcsinstance *GCSInstance) Put(ctx context.Context, bucket string, path string, file io.ReadSeeker) error
- type S3Instance
- func (s3instance *S3Instance) Delete(ctx context.Context, bucket string, key string) error
- func (s3instance *S3Instance) Get(ctx context.Context, bucket string, key string) (string, []byte, error)
- func (s3instance *S3Instance) GetByStreaming(ctx context.Context, bucket string, key string) (string, io.ReadCloser, error)
- func (s3instance *S3Instance) GetObjectInfo(ctx context.Context, bucket string, key string) (entity.StorageObjectInfo, error)
- func (s3instance *S3Instance) List(ctx context.Context, bucket string, key string) ([]string, error)
- func (s3instance *S3Instance) Put(ctx context.Context, bucket string, path string, file io.ReadSeeker) error
- type StorageInstance
Constants ¶
This section is empty.
Variables ¶
View Source
var GcsBucketUploadfiles = os.Getenv("GCS_BUKET")
GcsBucketUploadfiles is bucket to upload.
View Source
var S3BucketUploadfiles = os.Getenv("AWS_S3_BUKET")
S3BucketUploadfiles is bucket to upload.
Functions ¶
This section is empty.
Types ¶
type GCSInstance ¶
type GCSInstance struct {
// contains filtered or unexported fields
}
GCSInstance struct.
func (*GCSInstance) Get ¶
func (gcsinstance *GCSInstance) Get(ctx context.Context, bucket string, key string) (string, []byte, error)
Get gets from storage.
func (*GCSInstance) GetByStreaming ¶ added in v1.5.0
func (gcsinstance *GCSInstance) GetByStreaming(ctx context.Context, bucket string, key string) (string, io.ReadCloser, error)
GetByStreaming gets from storage by streaming.
func (*GCSInstance) GetObjectInfo ¶ added in v1.6.0
func (gcsinstance *GCSInstance) GetObjectInfo(ctx context.Context, bucket string, key string) (entity.StorageObjectInfo, error)
GetObjectInfo gets from storage.
func (*GCSInstance) List ¶ added in v1.3.4
func (gcsinstance *GCSInstance) List(ctx context.Context, bucket string, key string) ([]string, error)
List get list from storage.
func (*GCSInstance) Put ¶
func (gcsinstance *GCSInstance) Put(ctx context.Context, bucket string, path string, file io.ReadSeeker) error
Put puts to storage.
type S3Instance ¶
type S3Instance struct {
// contains filtered or unexported fields
}
S3Instance struct.
func (*S3Instance) Get ¶
func (s3instance *S3Instance) Get(ctx context.Context, bucket string, key string) (string, []byte, error)
Get gets from storage.
func (*S3Instance) GetByStreaming ¶ added in v1.5.0
func (s3instance *S3Instance) GetByStreaming(ctx context.Context, bucket string, key string) (string, io.ReadCloser, error)
GetByStreaming gets from storage by streaming.
func (*S3Instance) GetObjectInfo ¶ added in v1.6.0
func (s3instance *S3Instance) GetObjectInfo(ctx context.Context, bucket string, key string) (entity.StorageObjectInfo, error)
GetObjectInfo gets from storage.
func (*S3Instance) List ¶ added in v1.3.4
func (s3instance *S3Instance) List(ctx context.Context, bucket string, key string) ([]string, error)
List get list from storage.
func (*S3Instance) Put ¶
func (s3instance *S3Instance) Put(ctx context.Context, bucket string, path string, file io.ReadSeeker) error
Put puts to storage.
type StorageInstance ¶
type StorageInstance interface { Put(ctx context.Context, bucket string, path string, file io.ReadSeeker) error Get(ctx context.Context, bucket string, key string) (string, []byte, error) GetByStreaming(ctx context.Context, bucket string, key string) (string, io.ReadCloser, error) GetObjectInfo(ctx context.Context, bucket string, key string) (entity.StorageObjectInfo, error) List(ctx context.Context, bucket string, key string) ([]string, error) Delete(ctx context.Context, bucket string, key string) error }
StorageInstance interface.
Click to show internal directories.
Click to hide internal directories.