jsonstorage

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data map[string]string

Data represents a data

type Storage

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

Storage represents a JSON storage

func New

func New(gzipped bool) *Storage

New creates and returns a storage

func (Storage) Get

func (s Storage) Get(key []byte) ([]byte, error)

Get finds a given key in data, and returns its value

func (*Storage) Load

func (s *Storage) Load(file string) error

Load loads data into storage

func (*Storage) LoadAndIterate added in v0.1.1

func (s *Storage) LoadAndIterate(file string, fn storage.IterationFunc) error

LoadAndIterate loads data into storage, and iterate through newly loaded data

Jump to

Keyboard shortcuts

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