data_store

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MinIOStorage = "minio"
	LocalStorage = "local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStoreClient

type DataStoreClient struct {
	Client IDataStoreClient
}

func NewDataStoreClient

func NewDataStoreClient(config DataStoreConfig) (DataStoreClient, error)

type DataStoreConfig

type DataStoreConfig struct {
	Url      string
	User     string
	Password string
	Service  string
	DataPath string
}

type IDataStoreClient

type IDataStoreClient interface {
	GetFile(name string, location string) (*[]byte, error)
	UploadFile(name string, dest string) error
	List(dir string, prefix string) *[]string
	StorageType() string
}

type LocalClient

type LocalClient struct {
	DataPath string
}

func (LocalClient) GetFile

func (c LocalClient) GetFile(object string, bucket string) (*[]byte, error)

func (LocalClient) List

func (c LocalClient) List(bucket string, prefix string) *[]string

func (LocalClient) StorageType

func (c LocalClient) StorageType() string

func (LocalClient) UploadFile

func (c LocalClient) UploadFile(name string, dest string) error

type MinioClient

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

func (MinioClient) GetClient

func (c MinioClient) GetClient() *minio.Client

func (MinioClient) GetFile

func (c MinioClient) GetFile(object string, bucket string) (*[]byte, error)

func (MinioClient) List

func (c MinioClient) List(bucket string, prefix string) *[]string

func (MinioClient) StorageType

func (c MinioClient) StorageType() string

func (MinioClient) UploadFile

func (c MinioClient) UploadFile(name string, dest string) error

Jump to

Keyboard shortcuts

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