storage

package
v0.0.0-...-798c9db Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserHead      string = "didchain_user_%s"
	UserListBegin string = "didchain_user_did"
	UserListEnd   string = "didchain_user_didzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStorage

func NewStorage(db *leveldb.DB) *Storage

func (*Storage) AddUser

func (s *Storage) AddUser(did string, v interface{}) error

func (*Storage) Count

func (s *Storage) Count() int

func (*Storage) DelUser

func (s *Storage) DelUser(did string)

func (*Storage) FindUser

func (s *Storage) FindUser(did string) string

func (*Storage) ListAll

func (s *Storage) ListAll() []string

func (*Storage) ListAllValue

func (s *Storage) ListAllValue(convert func(data []byte) interface{}) []interface{}

func (*Storage) ListAllValue2

func (s *Storage) ListAllValue2(convert func(data []byte) interface{}, begin, count int) []interface{}

Jump to

Keyboard shortcuts

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