file

package
v0.0.0-...-535ab37 Latest Latest
Warning

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

Go to latest
Published: May 23, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileStorage

func NewFileStorage(dirName string) interfaces.Storage

NewFileStorage constructor

Types

type Storage

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

Storage implementation

func (*Storage) Clean

func (s *Storage) Clean() error

Remove all data from storage

func (*Storage) Get

func (s *Storage) Get(hash string) ([]byte, error)

Get stored data for hash key

func (*Storage) Remove

func (s *Storage) Remove(hash string) error

Remove stored data by hash key

func (*Storage) Save

func (s *Storage) Save(hash string, data []byte) error

Save data with hash key

Jump to

Keyboard shortcuts

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