filesystem

package
v0.0.0-...-e15abb3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorage

func NewStorage(path string) (resources.Storage, error)

NewStorage creates the storage.

Types

type Storage

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

Storage defines an filesystem resources storage.

func (*Storage) Add

func (s *Storage) Add(ctx context.Context, filename string, mimetype string, reader io.Reader) error

Add saves the resource into the resources system.

func (*Storage) Get

func (s *Storage) Get(ctx context.Context, filename string) ([]byte, string, error)

Get returns the resource.

func (*Storage) Has

func (s *Storage) Has(ctx context.Context, filename string) (bool, error)

Has checks if a resource already exists.

Jump to

Keyboard shortcuts

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