storage

package
v0.0.0-...-68bd8a1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path string
}

Config defines the Storage configuration

type FileSystemStorage

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

func NewFileSystemStorage

func NewFileSystemStorage(path string) (*FileSystemStorage, error)

func (*FileSystemStorage) FindByID

func (f *FileSystemStorage) FindByID(_ context.Context, id uuid.UUID) (io.ReadCloser, error)

func (*FileSystemStorage) Store

func (f *FileSystemStorage) Store(_ context.Context, id uuid.UUID, value io.ReadCloser) error

type Storage

type Storage interface {
	Store(ctx context.Context, id uuid.UUID, value io.ReadCloser) error
	FindByID(ctx context.Context, id uuid.UUID) (io.ReadCloser, error)
}

Jump to

Keyboard shortcuts

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