backend

package
v0.0.0-...-ed5d140 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FileSystem type of the corresponding backend represented as string constant.
	FileSystem = "filesystem"
)

Variables

View Source
var ErrUnknownBackendType = errors.New("unknown backend type")

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Put uploads contents of the given reader.
	Put(ctx context.Context, p string, r io.Reader) error
}

Backend implements operations for storage files.

func FromConfig

func FromConfig(logger log.Logger, cfg Config) (Backend, error)

FromConfig creates new Backend by initializing using given configuration.

type Config

type Config struct {
	Type string

	FileSystem fs.Config
}

Config configures behavior of Backend.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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