storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDIterator

type IDIterator interface {
	Iterate(func(id int64))
}

type IDStorage

type IDStorage interface {
	IDIterator
	Count() int
	Add(id int64)
	Delete(id int64)
}

func CreateSetIDStorage

func CreateSetIDStorage() IDStorage

type MapIDStorage

type MapIDStorage map[int64]struct{}

func CreateMapIDStorage

func CreateMapIDStorage() MapIDStorage

func (MapIDStorage) Iterate

func (s MapIDStorage) Iterate(f func(id int64))

type RecordsByID

type RecordsByID interface {
	GetIDStorage() IDIterator
	Get(id int64) record.Record
	Set(id int64, item record.Record)
	Delete(id int64)
	Count() int
	GetData(stores []IDIterator, totalCount int, idsUnique bool) []record.Record
	GetAllData() []record.Record
}

func CreateRecordsByID

func CreateRecordsByID() RecordsByID

type UniqueIDStorage

type UniqueIDStorage interface {
	IDStorage
	ID() int64
}

func CreateUniqueIDStorage

func CreateUniqueIDStorage() UniqueIDStorage

Jump to

Keyboard shortcuts

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