db

package
v0.0.0-...-32f009b Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltStorage

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

func NewBoltStorage

func NewBoltStorage(db *storm.DB, signingKey ed25519.PublicKey) (*BoltStorage, error)

func (*BoltStorage) Delete

func (s *BoltStorage) Delete(key []byte) error

func (*BoltStorage) Get

func (s *BoltStorage) Get(key []byte) ([]byte, error)

func (*BoltStorage) Has

func (s *BoltStorage) Has(key []byte) (bool, error)

func (*BoltStorage) Put

func (s *BoltStorage) Put(key, value []byte) error

type Module

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

func New

func New(s Storage, l *opLogger.Logger) *Module

func (*Module) Close

func (m *Module) Close() error

func (*Module) Register

func (m *Module) Register(vm *otto.Otto) error

type Record

type Record struct {
	ID             int               `storm:"id,increment"`
	DAppSigningKey ed25519.PublicKey `storm:"index"`
	Key            []byte            `storm:"index"`
	Value          []byte
}

type Storage

type Storage interface {
	Put(key, value []byte) error
	Get(key []byte) ([]byte, error)
	Has(key []byte) (bool, error)
	Delete(key []byte) error
}

Jump to

Keyboard shortcuts

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