Documentation ¶
Index ¶
- type Collection
- func (c *Collection) Ascend(start, end int) ([][]byte, error)
- func (c *Collection) Delete(k string) error
- func (c *Collection) Descend(start, end int) ([][]byte, error)
- func (c *Collection) Get(k string) ([]byte, error)
- func (c *Collection) GetStatistics() ([]byte, error)
- func (c *Collection) Has(k string) (bool, error)
- func (c *Collection) Reset() error
- func (c *Collection) Set(k string, v []byte) error
- func (c *Collection) Update(k string, v []byte) error
- type CollectionConfigs
- type Counter
- func (c *Counter) Decrement(k string) error
- func (c *Counter) DecrementBy(k string, delta uint) error
- func (c *Counter) Delete(k string) error
- func (c *Counter) Get(k string) (int, error)
- func (c *Counter) Increment(k string) error
- func (c *Counter) IncrementBy(k string, delta uint) error
- func (c *Counter) Max() (int, error)
- func (c *Counter) Median() (float64, error)
- func (c *Counter) Min() (int, error)
- func (c *Counter) Percents(k string, v float64) (float64, error)
- func (c *Counter) Rating() ([]int, error)
- func (c *Counter) Reset() error
- func (c *Counter) Set(k string, v int) error
- func (c *Counter) Total() (int, error)
- type CounterConfigs
- type Model
- type Statistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { File *os.File // файл коллекции Keys []string // срез ключей Data map[string]Model // хеш-таблица Core *core.Core // операционное ядро AES *aes.AES // шифрование Configs *CollectionConfigs // конфигурация Statistics *Statistics // статистика }
func (*Collection) Ascend ¶
func (c *Collection) Ascend(start, end int) ([][]byte, error)
Итерация данных с начала.
func (*Collection) Delete ¶
func (c *Collection) Delete(k string) error
Удаление данных из коллекции.
func (*Collection) Descend ¶
func (c *Collection) Descend(start, end int) ([][]byte, error)
Итерация данных с конца.
func (*Collection) Get ¶
func (c *Collection) Get(k string) ([]byte, error)
Запрос данных из коллекции.
func (*Collection) GetStatistics ¶
func (c *Collection) GetStatistics() ([]byte, error)
Статистика коллекции.
func (*Collection) Has ¶
func (c *Collection) Has(k string) (bool, error)
Проверка наличия значения по ключу.
func (*Collection) Reset ¶
func (c *Collection) Reset() error
Удаление всех значений и закрытие файла.
type CollectionConfigs ¶
type Counter ¶
type Counter struct { File *os.File // файл Keys []string // срез ключей Data map[string]int // хеш-таблица Core *core.Core // операционное ядро Configs *CounterConfigs // конфигурация }
func (*Counter) DecrementBy ¶
Декрементация.
func (*Counter) IncrementBy ¶
Инкрементация.
type CounterConfigs ¶
type Statistics ¶
type Statistics struct { Entries int // количество элементов Sets uint64 // счётчик записей Gets uint64 // счётчик запросов Has uint64 // счётчик проверок Deletes uint64 // счётчик удалений Updates uint64 // счётчик обновлений Iterations uint64 // счётчик итераций Collisions uint64 // счётчик повреждений }
Click to show internal directories.
Click to hide internal directories.