cloudstorages

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GcsBucketUploadfiles = os.Getenv("GCS_BUKET")

GcsBucketUploadfiles is bucket to upload

View Source
var GcsProjectID = os.Getenv("GcsProjectID")

GcsProjectID is GCS Project ID

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 NewGCS

func NewGCS(ctx context.Context) *GCSInstance

NewGCS creates a new GCSInstance

func (*GCSInstance) Delete

func (gcsinstance *GCSInstance) Delete(bucket string, key string) error

Delete deletes from storage

func (*GCSInstance) Get

func (gcsinstance *GCSInstance) Get(bucket string, key string) (string, []byte, error)

Get gets from storage

func (*GCSInstance) Put

func (gcsinstance *GCSInstance) Put(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 NewS3

func NewS3(ctx context.Context) *S3Instance

NewS3 creates a new S3Instance

func (*S3Instance) Delete

func (s3instance *S3Instance) Delete(bucket string, key string) error

Delete deletes from storage

func (*S3Instance) Get

func (s3instance *S3Instance) Get(bucket string, key string) (string, []byte, error)

Get gets from storage

func (*S3Instance) Put

func (s3instance *S3Instance) Put(bucket string, path string, file io.ReadSeeker) error

Put puts to storage

type StorageInstance

type StorageInstance interface {
	Put(bucket string, path string, file io.ReadSeeker) error
	Get(bucket string, key string) (string, []byte, error)
	Delete(bucket string, key string) error
}

StorageInstance interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL