api

package
v6.38.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Union

type Union struct {
	// contains filtered or unexported fields
}

func NewUnionFromFour added in v6.38.0

func NewUnionFromFour(v v21.DifferentPackageEndingInVersion) Union

func NewUnionFromOne

func NewUnionFromOne(v api.Struct1) Union

func NewUnionFromThree added in v6.36.0

func NewUnionFromThree(v v2.ObjectInPackageEndingInVersion) Union

func NewUnionFromTwo

func NewUnionFromTwo(v api1.Struct2) Union

func (*Union) Accept

func (u *Union) Accept(v UnionVisitor) error

func (*Union) AcceptFuncs

func (u *Union) AcceptFuncs(oneFunc func(api.Struct1) error, twoFunc func(api1.Struct2) error, threeFunc func(v2.ObjectInPackageEndingInVersion) error, fourFunc func(v21.DifferentPackageEndingInVersion) error, unknownFunc func(string) error) error

func (*Union) AcceptWithContext

func (u *Union) AcceptWithContext(ctx context.Context, v UnionVisitorWithContext) error

func (*Union) ErrorOnUnknown

func (u *Union) ErrorOnUnknown(typeName string) error

func (*Union) FourNoopSuccess added in v6.38.0

func (u *Union) FourNoopSuccess(v21.DifferentPackageEndingInVersion) error

func (Union) MarshalJSON

func (u Union) MarshalJSON() ([]byte, error)

func (Union) MarshalYAML

func (u Union) MarshalYAML() (interface{}, error)

func (*Union) OneNoopSuccess

func (u *Union) OneNoopSuccess(api.Struct1) error

func (*Union) ThreeNoopSuccess added in v6.36.0

func (u *Union) ThreeNoopSuccess(v2.ObjectInPackageEndingInVersion) error

func (*Union) TwoNoopSuccess

func (u *Union) TwoNoopSuccess(api1.Struct2) error

func (*Union) UnmarshalJSON

func (u *Union) UnmarshalJSON(data []byte) error

func (*Union) UnmarshalYAML

func (u *Union) UnmarshalYAML(unmarshal func(interface{}) error) error

type UnionVisitor

type UnionVisitor interface {
	VisitOne(v api.Struct1) error
	VisitTwo(v api1.Struct2) error
	VisitThree(v v2.ObjectInPackageEndingInVersion) error
	VisitFour(v v21.DifferentPackageEndingInVersion) error
	VisitUnknown(typeName string) error
}

type UnionVisitorWithContext

type UnionVisitorWithContext interface {
	VisitOneWithContext(ctx context.Context, v api.Struct1) error
	VisitTwoWithContext(ctx context.Context, v api1.Struct2) error
	VisitThreeWithContext(ctx context.Context, v v2.ObjectInPackageEndingInVersion) error
	VisitFourWithContext(ctx context.Context, v v21.DifferentPackageEndingInVersion) error
	VisitUnknownWithContext(ctx context.Context, typeName string) error
}

type UnionVisitorWithT added in v6.18.0

type UnionVisitorWithT[T any] interface {
	VisitOne(ctx context.Context, v api.Struct1) (T, error)
	VisitTwo(ctx context.Context, v api1.Struct2) (T, error)
	VisitThree(ctx context.Context, v v2.ObjectInPackageEndingInVersion) (T, error)
	VisitFour(ctx context.Context, v v21.DifferentPackageEndingInVersion) (T, error)
	VisitUnknown(ctx context.Context, typ string) (T, error)
}

type UnionWithT added in v6.18.0

type UnionWithT[T any] Union

func (*UnionWithT[T]) Accept added in v6.18.0

func (u *UnionWithT[T]) Accept(ctx context.Context, v UnionVisitorWithT[T]) (T, error)

Jump to

Keyboard shortcuts

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