core

package
v0.0.0-...-1c8b040 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey() string

Types

type Item

type Item struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

func (Item) Less

func (i Item) Less(than btree.Item) bool

type Store

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

func NewStore

func NewStore(degree int) *Store

func (*Store) Delete

func (s *Store) Delete(Key string)

func (*Store) Get

func (s *Store) Get(Key string) (Value interface{}, ok bool)

func (*Store) GetAll

func (s *Store) GetAll() []Item

func (*Store) Has

func (s *Store) Has(Key string) bool

func (*Store) Insert

func (s *Store) Insert(Key string, Value interface{})

func (*Store) LoadFromDisk

func (s *Store) LoadFromDisk(filename string) error

Custom deserialization function

func (*Store) SaveToDisk

func (s *Store) SaveToDisk(filename string) error

func (*Store) Update

func (s *Store) Update(Key string, Value interface{})

Jump to

Keyboard shortcuts

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