storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 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(f 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[R record.Record] interface {
	GetIDStorage() IDIterator
	Get(id int64) (R, bool)
	Set(id int64, item R)
	Delete(id int64)
	Count() int
	GetData(stores []IDIterator, totalCount int, idsUnique bool) []R
	GetAllData() []R
}

func CreateRecordsByID

func CreateRecordsByID[R record.Record]() RecordsByID[R]

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