datastore

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: BSD-2-Clause Imports: 3 Imported by: 0

README

Datastore

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckVersion

func CheckVersion(previous, new uint64) (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 Test added in v0.1.1

type Test struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Test) Descriptor added in v0.1.1

func (*Test) Descriptor() ([]byte, []int)

func (*Test) GetName added in v0.1.1

func (m *Test) GetName() string

func (*Test) ProtoMessage added in v0.1.1

func (*Test) ProtoMessage()

func (*Test) Reset added in v0.1.1

func (m *Test) Reset()

func (*Test) String added in v0.1.1

func (m *Test) String() string

func (*Test) XXX_DiscardUnknown added in v0.1.1

func (m *Test) XXX_DiscardUnknown()

func (*Test) XXX_Marshal added in v0.1.1

func (m *Test) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Test) XXX_Merge added in v0.1.1

func (dst *Test) XXX_Merge(src proto.Message)

func (*Test) XXX_Size added in v0.1.1

func (m *Test) XXX_Size() int

func (*Test) XXX_Unmarshal added in v0.1.1

func (m *Test) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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