Documentation ¶
Index ¶
- type Union
- func (u *Union) Accept(v UnionVisitor) error
- func (u *Union) AcceptFuncs(oneFunc func(api.Struct1) error, twoFunc func(api1.Struct2) error, ...) error
- func (u *Union) AcceptWithContext(ctx context.Context, v UnionVisitorWithContext) error
- func (u *Union) ErrorOnUnknown(typeName string) error
- func (u *Union) FourNoopSuccess(v21.DifferentPackageEndingInVersion) error
- func (u Union) MarshalJSON() ([]byte, error)
- func (u Union) MarshalYAML() (interface{}, error)
- func (u *Union) OneNoopSuccess(api.Struct1) error
- func (u *Union) ThreeNoopSuccess(v2.ObjectInPackageEndingInVersion) error
- func (u *Union) TwoNoopSuccess(api1.Struct2) error
- func (u *Union) UnmarshalJSON(data []byte) error
- func (u *Union) UnmarshalYAML(unmarshal func(interface{}) error) error
- type UnionVisitor
- type UnionVisitorWithContext
- type UnionVisitorWithT
- type UnionWithT
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 NewUnionFromThree ¶ added in v6.36.0
func NewUnionFromThree(v v2.ObjectInPackageEndingInVersion) Union
func NewUnionFromTwo ¶
func (*Union) Accept ¶
func (u *Union) Accept(v UnionVisitor) error
func (*Union) AcceptFuncs ¶
func (*Union) AcceptWithContext ¶
func (u *Union) AcceptWithContext(ctx context.Context, v UnionVisitorWithContext) error
func (*Union) ErrorOnUnknown ¶
func (*Union) FourNoopSuccess ¶ added in v6.38.0
func (u *Union) FourNoopSuccess(v21.DifferentPackageEndingInVersion) error
func (Union) MarshalJSON ¶
func (Union) MarshalYAML ¶
func (*Union) ThreeNoopSuccess ¶ added in v6.36.0
func (u *Union) ThreeNoopSuccess(v2.ObjectInPackageEndingInVersion) error
func (*Union) UnmarshalJSON ¶
func (*Union) UnmarshalYAML ¶
type UnionVisitor ¶
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
func (*UnionWithT[T]) Accept ¶ added in v6.18.0
func (u *UnionWithT[T]) Accept(ctx context.Context, v UnionVisitorWithT[T]) (T, error)
Click to show internal directories.
Click to hide internal directories.