afero

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	afero.Fs `json:"-"`

	Prefix string `json:"prefix"`
	Cache  int64  `json:"cache"` // in seconds
}

Storage defines a storage service based on your filesystem

func (*Storage) GetObject

func (s *Storage) GetObject(_ context.Context, n string) (io.ReadCloser, error)

GetObject returns the specified object if found

func (*Storage) Init

func (s *Storage) Init() error

Init configures the underlying storage engine

func (*Storage) WithPrefix

func (s *Storage) WithPrefix(prefix string) storage.Service

WithPrefix returns a new storage service with the new prefixed appended to the current one

Jump to

Keyboard shortcuts

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