datastore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: BSD-2-Clause Imports: 4 Imported by: 0

README

Datastore

標準メソッドとカスタムメソッドのデータの永続化に関する共通部分を抽象化するものである。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion(previous, new HavingMetadata) (uint64, error)

CheckVersion check whether version is valid or not return next version and error if version is invalid

TODO: protoファイルに依存するのは綺麗ではないため、変えたい

Types

type Datastore

type Datastore interface {
	List(f func(length int) []proto.Message) error

	// if result is empty, set pb as nil.
	Get(name string, pb proto.Message) error

	Apply(name string, pb proto.Message) error

	// Delete returns how many query was deleted and error
	Delete(name string) error // TODO: returnをerrorのみにする
}

type HavingMetadata

type HavingMetadata interface {
	GetMetadata() *pn0stack.Metadata
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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