testcase

package
v1.0.0-alpha4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestElastic_non_addressable

func TestElastic_non_addressable[T Ela[U], U comparable](
	t *testing.T,
	firstNull, defined, null, undefined T,
	values []option.Option[U], marshaled string,
)

func TestUnd_non_addressable

func TestUnd_non_addressable[T Und[U], U any](t *testing.T, defined, null, undefined T, value U, marshaled string)

Types

type Ela

type Ela[T any] interface {
	// Equal(other Elastic[T]) bool
	IsDefined() bool
	IsNull() bool
	IsUndefined() bool
	IsZero() bool
	Len() int
	// Map(f func(und.Und[option.Options[T]]) und.Und[option.Options[T]]) Elastic[T]
	MarshalJSON() ([]byte, error)
	MarshalJSONV2(enc *jsontext.Encoder, opts jsonv2.Options) error
	Pointer() *T
	Pointers() []*T
	// UnmarshalJSON(data []byte) error
	// Unwrap() und.Und[option.Options[T]]
	Value() T
	Values() []T
}

type Und

type Und[T any] interface {
	DoublePointer() **T
	IsDefined() bool
	IsNull() bool
	IsUndefined() bool
	IsZero() bool
	MarshalJSON() ([]byte, error)
	MarshalJSONV2(enc *jsontext.Encoder, opts jsonv2.Options) error
	Pointer() *T
	Unwrap() option.Option[option.Option[T]]
	Value() T
}

Jump to

Keyboard shortcuts

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