builder

package
v0.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder[T any] interface {
	Build() (T, error)
	AddModifier(...Modifier[T]) Builder[T]
}

type GenericBuilder added in v0.10.0

type GenericBuilder[T any] struct {
	// contains filtered or unexported fields
}

func NewBuilder added in v0.10.0

func NewBuilder[T any](data T) GenericBuilder[T]

func (*GenericBuilder[T]) AddModifier added in v0.10.0

func (b *GenericBuilder[T]) AddModifier(modifiers ...Modifier[T]) Builder[T]

func (GenericBuilder[T]) Build added in v0.10.0

func (b GenericBuilder[T]) Build() (T, error)

type Modifier added in v0.10.0

type Modifier[T any] interface {
	Enabled() bool
	Modify(*T) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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