sqlite

package
v0.2.134 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	ID        uint      `gorm:"primary_key"`
	CreatedAt time.Time `gorm:"index"`

	Type   LogType
	Prefix string `gorm:"index:idx_prefix_key"`
	Key    string `gorm:"index:idx_prefix_key"`
	Value  []byte
}

type LogType

type LogType int
const (
	LOGTYPE_APPLY LogType = iota
	LOGTYPE_DELETE
)

type SqliteStore

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

func NewSqliteStore

func NewSqliteStore(file string) (*SqliteStore, error)

func (*SqliteStore) AddPrefix

func (ds *SqliteStore) AddPrefix(prefix string) *SqliteStore

func (*SqliteStore) Apply

func (ds *SqliteStore) Apply(key string, value []byte) error

func (*SqliteStore) Close

func (ds *SqliteStore) Close() error

func (*SqliteStore) Delete

func (ds *SqliteStore) Delete(key string) error

func (*SqliteStore) Get

func (ds *SqliteStore) Get(key string) ([]byte, error)

func (*SqliteStore) List

func (ds *SqliteStore) List() ([][]byte, error)

Jump to

Keyboard shortcuts

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