datastructcontract

package
v0.304.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyValueStore

func KeyValueStore[K comparable, V any](make func(tb testing.TB) datastruct.KeyValueStore[K, V], opts ...KVSOption[K, V]) contract.Contract

func List

func List[T any](make func(tb testing.TB) datastruct.List[T], opts ...ListOption[T]) contract.Contract

func OrderedList

func OrderedList[T any](make func(tb testing.TB) datastruct.List[T], opts ...ListOption[T]) contract.Contract

func Sequence

func Sequence[T any](make contract.Make[datastruct.Sequence[T]], opts ...SequenceOption[T]) contract.Contract

Types

type KVSConfig

type KVSConfig[K comparable, V any] struct {
	MakeK func(testing.TB) K
	MakeV func(testing.TB) V
}

func (KVSConfig[K, V]) Configure

func (c KVSConfig[K, V]) Configure(o *KVSConfig[K, V])

type KVSOption

type KVSOption[K comparable, V any] interface {
	option.Option[KVSConfig[K, V]]
}

type ListConfig

type ListConfig[T any] struct {
	MakeElem func(testing.TB) T
}

func (ListConfig[T]) Configure

func (c ListConfig[T]) Configure(o *ListConfig[T])

type ListOption

type ListOption[T any] interface {
	option.Option[ListConfig[T]]
}

type SequenceConfig

type SequenceConfig[T any] struct {
	MakeElem func(tb testing.TB) T
}

func (SequenceConfig[T]) Configure

func (sc SequenceConfig[T]) Configure(t *SequenceConfig[T])

func (SequenceConfig[T]) ToListConfig

func (sc SequenceConfig[T]) ToListConfig() ListConfig[T]

type SequenceOption

type SequenceOption[T any] option.Option[SequenceConfig[T]]

Jump to

Keyboard shortcuts

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