memory

package
v0.0.0-...-50de45b Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct{}

func (Factory) NewStorer

func (f Factory) NewStorer(ctx context.Context) (sup.Storer, error)

func (Factory) TeardownStorers

func (f Factory) TeardownStorers() error

type File

type File struct {
	ID          string
	Size        int64
	ContentType string
	Contents    []byte
	// contains filtered or unexported fields
}

func NewFile

func NewFile(id string, in []byte) *File

func (*File) Close

func (f *File) Close() error

func (*File) Read

func (f *File) Read(p []byte) (int, error)

func (*File) Write

func (f *File) Write(p []byte) (int, error)

type Storer

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

func NewStorer

func NewStorer() (*Storer, error)

func (*Storer) Delete

func (s *Storer) Delete(ctx context.Context, hash string) error

func (*Storer) Download

func (s *Storer) Download(ctx context.Context, hash string) (io.ReadCloser, error)

func (*Storer) Stat

func (s *Storer) Stat(ctx context.Context, hash string) (sup.File, error)

func (*Storer) Upload

func (s *Storer) Upload(ctx context.Context, hash string) (io.WriteCloser, error)

Jump to

Keyboard shortcuts

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