store

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	UpdateAt time.Time `json:"updated_at"`
	Batch    uint64    `json:"batch"`
}

Batch batch

type Property

type Property struct {
	UpdateAt time.Time `json:"updated_at"`
	Key      string    `json:"key"`
	Value    string    `json:"property"`
}

Property property

type Store

type Store struct {
	Path string
	// contains filtered or unexported fields
}

Store store

func NewStore

func NewStore(path string) (*Store, error)

func (*Store) Batch

func (s *Store) Batch() uint64

Batch batch

func (*Store) ReadProperty

func (s *Store) ReadProperty(ctx context.Context, key string) (string, error)

ReadProperty read property

func (*Store) WriteBatch

func (s *Store) WriteBatch(batch uint64) error

func (*Store) WriteProperty

func (s *Store) WriteProperty(ctx context.Context, key, value string) error

WriteProperty write property

Jump to

Keyboard shortcuts

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