storage

package
v0.0.0-...-0fe6a70 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

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

func (*FileStorage) List

func (f *FileStorage) List() ([]StorageEntry, error)

func (*FileStorage) Load

func (f *FileStorage) Load(title string) (StorageEntry, error)

func (*FileStorage) Store

func (f *FileStorage) Store(e StorageEntry) error

type Storage

type Storage interface {
	Store(e StorageEntry) error
	Load(title string) (StorageEntry, error)
	List() ([]StorageEntry, error)
}

func NewFileStorage

func NewFileStorage(folder string) Storage

type StorageEntry

type StorageEntry struct {
	Title string
	Body  []byte
}

Jump to

Keyboard shortcuts

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