storage

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	AccessKeyID     string `yaml:"access-key-id"`
	SecretAccessKey string `yaml:"secret-access-key"`
	Vault           struct {
		Server string `yaml:"server"`
		Secret string `yaml:"secret"`
		Token  string `yaml:"token"`
	} `yaml:"vault"`
}

type Filesystem

type Filesystem struct {
	Path string `yaml:"path"`
}

type S3

type S3 struct {
	Region      string      `yaml:"region"`
	EndpointURL string      `yaml:"endpointUrl"`
	Bucket      string      `yaml:"bucket"`
	Credentials Credentials `yaml:"credentials"`
}

type Storage

type Storage struct {
	Type       string     `yaml:"type"`
	S3         S3         `yaml:"s3,omitempty"`
	Filesystem Filesystem `yaml:"filesystem"`
}

func (Storage) Info

func (s Storage) Info() StorageInfo

type StorageInfo

type StorageInfo struct {
	Type       string
	S3         S3
	Filesystem Filesystem
}

type Storages

type Storages struct {
	Storages map[string]Storage
	// contains filtered or unexported fields
}

func NewStorageBackends

func NewStorageBackends(buf []byte) (*Storages, error)

func NewStorageBackendsFromYaml

func NewStorageBackendsFromYaml(filename string) (*Storages, error)

func (Storages) Exists

func (s Storages) Exists(name string) bool

func (Storages) Get

func (s Storages) Get(name string) (Storage, error)

func (*Storages) Reload

func (s *Storages) Reload() error

func (Storages) StorageInfo

func (s Storages) StorageInfo(name string) (StorageInfo, error)

func (Storages) StoragesInfo

func (s Storages) StoragesInfo() map[string]StorageInfo

Jump to

Keyboard shortcuts

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