Documentation ¶
Index ¶
- type Storage
- func (s *Storage) AddKeygroupTrigger(kg string, id string, host string) error
- func (s *Storage) Append(kg, val string, expiry int) (string, error)
- func (s *Storage) Close() error
- func (s *Storage) CreateKeygroup(kg string) error
- func (s *Storage) Delete(kg string, id string) error
- func (s *Storage) DeleteKeygroup(kg string) error
- func (s *Storage) DeleteKeygroupTrigger(kg string, id string) error
- func (s *Storage) Exists(kg string, id string) bool
- func (s *Storage) ExistsKeygroup(kg string) bool
- func (s *Storage) GetKeygroupTrigger(kg string) (map[string]string, error)
- func (s *Storage) IDs(kg string) ([]string, error)
- func (s *Storage) Read(kg string, id string) (string, error)
- func (s *Storage) ReadAll(kg string) (map[string]string, error)
- func (s *Storage) ReadSome(kg, id string, count uint64) (map[string]string, error)
- func (s *Storage) Update(kg, id, val string, append bool, expiry int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a struct that saves all necessary information to access the database, in this case just a pointer to the BadgerDB database.
func (*Storage) AddKeygroupTrigger ¶
AddKeygroupTrigger adds a trigger node to the given keygroup in the badgerdb database.
func (*Storage) Append ¶
Append appends the item to the specified keygroup by incrementing the latest key by one.
func (*Storage) CreateKeygroup ¶
CreateKeygroup creates the given keygroup in the badgerdb database.
func (*Storage) DeleteKeygroup ¶
DeleteKeygroup deletes the given keygroup from the badgerdb database.
func (*Storage) DeleteKeygroupTrigger ¶
DeleteKeygroupTrigger removes a trigger node from the given keygroup in the badgerdb database.
func (*Storage) ExistsKeygroup ¶
ExistsKeygroup checks if the given keygroup exists in the badgerdb database.
func (*Storage) GetKeygroupTrigger ¶
GetKeygroupTrigger returns a list of all trigger nodes for the given keygroup in the badgerdb database.