record

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: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolGetter

type BoolGetter[R Record] Getter[R, bool]

func (BoolGetter[R]) GetForRecord added in v0.2.0

func (getter BoolGetter[R]) GetForRecord(item R) bool

func (BoolGetter[R]) Less added in v0.1.0

func (getter BoolGetter[R]) Less(a, b R) bool

type ComparableGetter added in v0.2.0

type ComparableGetter[R Record, T LessComparable] Getter[R, T]

func NewIDGetter added in v0.2.0

func NewIDGetter[R Record]() ComparableGetter[R, int64]

NewIDGetter create ID getter.

func (ComparableGetter[R, T]) GetForRecord added in v0.2.0

func (getter ComparableGetter[R, T]) GetForRecord(item R) T

func (ComparableGetter[R, T]) Less added in v0.2.0

func (getter ComparableGetter[R, T]) Less(a, b R) bool

type Field added in v0.1.0

type Field interface {
	Index() uint8
	String() string
}

type FieldsConstructor added in v0.1.0

type FieldsConstructor uint8

func NewFields added in v0.1.0

func NewFields() *FieldsConstructor

func (*FieldsConstructor) New added in v0.1.0

func (fc *FieldsConstructor) New(name string) Field

type Getter added in v0.2.0

type Getter[R Record, T any] struct {
	Field
	Get func(item R) T
}

func (Getter[R, T]) GetForRecord added in v0.2.0

func (getter Getter[R, T]) GetForRecord(item R) T

type GetterInterface added in v0.2.0

type GetterInterface[R Record, T any] interface {
	Field
	GetForRecord(item R) T
}

type LessComparable added in v0.2.0

type LessComparable interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 |
		~float32 | ~float64 |
		~string
}

type Map

type Map[K comparable, V any] interface {
	HasKey(key K) bool
	HasValue(check MapValueComparator[V]) (bool, error)
}

type MapGetter

type MapGetter[R Record, K comparable, V any] Getter[R, Map[K, V]]

func (MapGetter[R, K, V]) GetForRecord added in v0.2.0

func (getter MapGetter[R, K, V]) GetForRecord(item R) Map[K, V]

type MapValueComparator added in v0.0.3

type MapValueComparator[V any] interface {
	Compare(value V) (bool, error)
}

type Record

type Record interface {
	GetID() int64
}

type Set

type Set[T comparable] interface {
	Has(item T) bool
}

type SetGetter

type SetGetter[R Record, T comparable] Getter[R, Set[T]]

func (SetGetter[R, T]) GetForRecord added in v0.2.0

func (getter SetGetter[R, T]) GetForRecord(item R) Set[T]

Jump to

Keyboard shortcuts

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