file_storage

package
v0.0.0-...-153da20 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GOOGLE_CLOUD = "google_cloud"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleCloudStorage

type GoogleCloudStorage struct {
	// contains filtered or unexported fields
}

func NewGoogleCloudClient

func NewGoogleCloudClient(projectID, bucketName, uploadPath string) (*GoogleCloudStorage, error)

func (GoogleCloudStorage) Read

func (gcp GoogleCloudStorage) Read(ctx context.Context, src string) ([]byte, error)

func (GoogleCloudStorage) Write

func (gcp GoogleCloudStorage) Write(ctx context.Context, filename string, data []byte) error

type IFile

type IFile interface {
	Write(context.Context, string, []byte) error
	Read(context.Context, string) ([]byte, error)
}

func GetStorage

func GetStorage() (IFile, error)

Jump to

Keyboard shortcuts

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