data

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bytes

type Bytes []byte

func (Bytes) Checksum

func (b Bytes) Checksum() uint32

type Constraint

type Constraint[T any] interface {
	Evaluate(T) error
}

type Property

type Property[T any] interface {
	Change(value T) (error, bool)
	Value() (T, error)
}

func Complex

func Complex[T interface{ Checksum() uint32 }](
	value *T,
	checksum uint32,
	constraint Constraint[T],
	source Source2[T],
) Property[T]

func Simple

func Simple[T comparable](
	value *T,
	constraint Constraint[T],
	source Source1[T],
) Property[T]

type Source1

type Source1[T any] interface {
	Change(value T) error
	Value() (T, error)
}

type Source2

type Source2[T any] interface {
	Change(value T, checksum uint32) error
	Value() (T, error)
}

type String

type String string

func (String) Checksum

func (s String) Checksum() uint32

type Strings

type Strings []string

func (Strings) Checksum

func (s Strings) Checksum() uint32

Jump to

Keyboard shortcuts

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