db

package
v0.0.0-...-b5bf693 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

func AuditLog

func AuditLog(from, to, limit, offset int64, reverse bool) ([]*proto.ChangeLog, error)

func Create

func Create(ch *proto.Change) error

func Delete

func Delete(ch *proto.Change) error

func Init

func Init() error

func Read

func Read(id string) (*proto.Change, error)

func Register

func Register(backend DB)
func Search(id, author string, limit, offset int64) ([]*proto.Change, error)

func Update

func Update(ch *proto.Change) error

Types

type DB

type DB interface {
	Init() error
	Create(*proto.Change) error
	Read(id string) (*proto.Change, error)
	Update(*proto.Change) error
	Delete(*proto.Change) error
	Search(id, author string, limit, offset int64) ([]*proto.Change, error)
	AuditLog(from, to int64, limit, offset int64, reverse bool) ([]*proto.ChangeLog, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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