Help us shape the future of Go! Take the 2026 Go Developer Survey

interfaces

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImplementsInterface added in v1.0.0

func ImplementsInterface[T any](t reflect.Type) bool

func TypeImplements added in v1.25.6

func TypeImplements(t, iface reflect.Type) bool

TypeImplements reports whether t implements the interface type iface. It is equivalent to t.Implements(iface) but caches the result per type pair.

Types

type CoreModel

type CoreModel interface {
	Unmarshal(ctx context.Context, parentName string, node *yaml.Node) ([]error, error)
}

type Model

type Model[C any] interface {
	Validate(context.Context, ...validation.Option) []error
	GetCore() *C
}

type SequencedMapInterface added in v1.0.0

type SequencedMapInterface interface {
	Init()
	IsInitialized() bool
	SetUntyped(key, value any) error
	AllUntyped() iter.Seq2[any, any]
	GetKeyType() reflect.Type
	GetValueType() reflect.Type
	Len() int
	GetAny(key any) (any, bool)
	SetAny(key, value any)
	DeleteAny(key any)
	KeysAny() iter.Seq[any]
}

sequencedMapInterface defines the interface that sequenced maps must implement

type Validator

type Validator[T any] interface {
	*T
	Validate(context.Context, ...validation.Option) []error
}

Jump to

Keyboard shortcuts

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