Documentation ¶
Index ¶
- func GenerateRandom(size int) ([]byte, error)
- func InitCrypto(password string, salt []byte) *crypto
- type KVod
- type KVodContainer
- func (m *KVodContainer[T]) Delete(key string) error
- func (m *KVodContainer[T]) Get(key string) (*T, error)
- func (m *KVodContainer[T]) GetAll() (map[string]T, error)
- func (m *KVodContainer[T]) GetData() ([]T, error)
- func (m *KVodContainer[T]) GetKeys() ([]string, error)
- func (m *KVodContainer[T]) Put(key string, value T) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandom ¶
GenerateRandom generates a random of size provided
func InitCrypto ¶
InitCrypto inizialize the crypto struct using password and salt to generate the main key
Types ¶
type KVodContainer ¶
type KVodContainer[T any] struct { // contains filtered or unexported fields }
func CreateContainer ¶
func CreateContainer[T any](kvod *KVod, containerPath string) *KVodContainer[T]
func (*KVodContainer[T]) Delete ¶
func (m *KVodContainer[T]) Delete(key string) error
Delete a value by key
func (*KVodContainer[T]) Get ¶
func (m *KVodContainer[T]) Get(key string) (*T, error)
Get a struct with key
func (*KVodContainer[T]) GetAll ¶
func (m *KVodContainer[T]) GetAll() (map[string]T, error)
GetAll returns a slice of all data available
func (*KVodContainer[T]) GetData ¶
func (m *KVodContainer[T]) GetData() ([]T, error)
GetAll returns a slice of all data available
func (*KVodContainer[T]) GetKeys ¶
func (m *KVodContainer[T]) GetKeys() ([]string, error)
GetKeys returns a slice of all keys available
func (*KVodContainer[T]) Put ¶
func (m *KVodContainer[T]) Put(key string, value T) error
Put a struct using a string as key
Click to show internal directories.
Click to hide internal directories.