filestore

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCheckBucketExists could not verify that bucket directory exists
	ErrCheckBucketExists = &shared.BadRequestError{Message: "could not verify that bucket directory exists"}
	// ErrWriteFile could not write file
	ErrWriteFile = &shared.BadRequestError{Message: "could not write file"}
	// ErrReadFile could not read file
	ErrReadFile = &shared.BadRequestError{Message: "could not read file"}
	// ErrCheckFileExists could not check if file exists
	ErrCheckFileExists = &shared.BadRequestError{Message: "could not check if file exists"}
	// ErrDeleteFile could not delete file
	ErrDeleteFile = &shared.BadRequestError{Message: "could not delete file"}
	// ErrListFiles could not list files
	ErrListFiles = &shared.BadRequestError{Message: "could not list files"}
	// ErrBucketConfigDeserialization bucket config could not be deserialized
	ErrBucketConfigDeserialization = &shared.BadRequestError{Message: "bucket config could not be deserialized"}
)

Functions

func NewClient

func NewClient(cfg *Config) (blobstore.Client, error)

NewClient returns a new Client backed by file system

Types

type BucketConfig

type BucketConfig struct {
	Name          string `yaml:"name"`
	Owner         string `yaml:"owner"`
	RetentionDays int    `yaml:"retentionDays"`
}

BucketConfig describes the config for a bucket

type Config

type Config struct {
	StoreDirectory string         `yaml:"storeDirectory"`
	DefaultBucket  BucketConfig   `yaml:"defaultBucket"`
	CustomBuckets  []BucketConfig `yaml:"customBuckets"`
}

Config describes the configuration needed to construct a blobstore client backed by file system

func (*Config) Validate

func (c *Config) Validate() error

Validate validates config

Jump to

Keyboard shortcuts

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