store

package
v0.0.0-...-d5353d4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc

type Doc struct {
	Data        []byte
	ContentType string
	Response    int
	Error       string
}

func (Doc) GetData

func (d Doc) GetData() []byte

func (Doc) GetError

func (d Doc) GetError() error

func (Doc) GetResponse

func (d Doc) GetResponse() int

type DocStore

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

func NewDocStore

func NewDocStore() DocStore

func (DocStore) Close

func (ds DocStore) Close()

func (DocStore) Del

func (ds DocStore) Del(nurl url.Nurl) error

func (DocStore) GetDoc

func (ds DocStore) GetDoc(nurl url.Nurl) (Doc, error)

func (DocStore) Store

func (ds DocStore) Store(nurl url.Nurl, data []byte, contenttype string, response int, err error) error

type KVStore

type KVStore struct {
	DB *badger.DB
}

func NewKVStore

func NewKVStore(dirname string) KVStore

func (*KVStore) Del

func (s *KVStore) Del(key string) error

func (*KVStore) Get

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

func (*KVStore) IterateAll

func (s *KVStore) IterateAll(iter iter) error

func (*KVStore) IterateAllKeys

func (s *KVStore) IterateAllKeys(iter keyIter) error

func (*KVStore) Put

func (s *KVStore) Put(key string, data []byte) error

Jump to

Keyboard shortcuts

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