storage

package
v0.0.0-...-734ae4b Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalStorage

type ExternalStorage interface {
	// Write file to storage
	WriteFile(name string, data string) error
	// Read storage file
	ReadFile(name string) ([]byte, error)
}

ExternalStorage represents a kind of file system storage.

type LocalStorage

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

LocalStorage represents local file system storage.

export for using in tests.

func NewLocalStorage

func NewLocalStorage(base string) (*LocalStorage, error)

func (*LocalStorage) ReadFile

func (l *LocalStorage) ReadFile(name string) ([]byte, error)

func (*LocalStorage) WriteFile

func (l *LocalStorage) WriteFile(name string, data string) error

Write file to local file system.

type MinioStorage

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

MinioStorage represents minio object storage.

export for using in tests.

func NewMinioStorage

func NewMinioStorage(ctx context.Context, endpoint, bucket, accessKey, secretKey string, useSSL bool) (*MinioStorage, error)

TODO: check validity of arguments.

func (*MinioStorage) ReadFile

func (m *MinioStorage) ReadFile(name string) ([]byte, error)

Read file from minio object storage.

func (*MinioStorage) WriteFile

func (m *MinioStorage) WriteFile(name string, data string) error

Write file to minio object storage.

Jump to

Keyboard shortcuts

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