Documentation
¶
Overview ¶
Code generated by mkunion. DO NOT EDIT.
Index ¶
- func EdgeShape() shape.Shape
- func EdgeToJSON[T1 any](x *Edge[T1]) ([]byte, error)
- func GraphDSLShape() shape.Shape
- func GraphDSLToJSON[T1 any](x GraphDSL[T1]) ([]byte, error)
- func GraphShape() shape.Shape
- func GraphToJSON[T1 any](x *Graph[T1]) ([]byte, error)
- func MatchGraphDSL[T1, TOut any](x GraphDSL[T1], f1 func(x *Graph[T1]) TOut, f2 func(x *Vertex[T1]) TOut, ...) TOut
- func MatchGraphDSLR2[T1, TOut1, TOut2 any](x GraphDSL[T1], f1 func(x *Graph[T1]) (TOut1, TOut2), ...) (TOut1, TOut2)
- func MustMatchGraphDSL[T1, TOut any](x GraphDSL[T1], f1 func(x *Graph[T1]) TOut, f2 func(x *Vertex[T1]) TOut, ...) TOut
- func MustMatchGraphDSLR0[T1 any](x GraphDSL[T1], f1 func(x *Graph[T1]), f2 func(x *Vertex[T1]), ...)
- func MustMatchGraphDSLR2[T1, TOut1, TOut2 any](x GraphDSL[T1], f1 func(x *Graph[T1]) (TOut1, TOut2), ...) (TOut1, TOut2)
- func VertexShape() shape.Shape
- func VertexToJSON[T1 any](x *Vertex[T1]) ([]byte, error)
- type A
- type B
- type C
- type D
- type E
- type Edge
- type Explain
- type F
- type Graph
- type GraphDSL
- type GraphDSLUnionJSON
- type GraphDSLVisitor
- type H
- type I
- type J
- type K
- type L
- type List
- type ListOf
- type ListOf2
- type M
- type N
- type O
- type P
- type Vertex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EdgeToJSON ¶ added in v1.20.1
func GraphShape ¶ added in v1.20.1
func MatchGraphDSL ¶ added in v1.20.1
func MatchGraphDSLR2 ¶ added in v1.20.1
func MustMatchGraphDSL ¶ added in v1.20.1
func MustMatchGraphDSLR0 ¶ added in v1.20.1
func MustMatchGraphDSLR2 ¶ added in v1.20.1
func VertexShape ¶ added in v1.20.1
func VertexToJSON ¶ added in v1.20.1
Types ¶
type Edge ¶ added in v1.20.1
go:generate go run ../../../cmd/mkunion/main.go --name=GraphDSL
func EdgeFromJSON ¶ added in v1.20.1
func (*Edge[T1]) AcceptGraphDSL ¶ added in v1.20.1
func (r *Edge[T1]) AcceptGraphDSL(v GraphDSLVisitor[T1]) any
func (*Edge[T1]) MarshalJSON ¶ added in v1.20.1
func (*Edge[T1]) UnmarshalJSON ¶ added in v1.20.1
type Graph ¶ added in v1.20.1
go:generate go run ../../../cmd/mkunion/main.go --name=GraphDSL
func (*Graph[T1]) AcceptGraphDSL ¶ added in v1.20.1
func (r *Graph[T1]) AcceptGraphDSL(v GraphDSLVisitor[T1]) any
func (*Graph[T1]) MarshalJSON ¶ added in v1.20.1
func (*Graph[T1]) UnmarshalJSON ¶ added in v1.20.1
type GraphDSL ¶ added in v1.20.1
type GraphDSL[T1 any] interface { AcceptGraphDSL(g GraphDSLVisitor[T1]) any }
type GraphDSLUnionJSON ¶ added in v1.20.1
type GraphDSLUnionJSON struct { Type string `json:"$type,omitempty"` Graph json.RawMessage `json:"testasset.Graph,omitempty"` Vertex json.RawMessage `json:"testasset.Vertex,omitempty"` Edge json.RawMessage `json:"testasset.Edge,omitempty"` }
mkunion-extension:json
type GraphDSLVisitor ¶ added in v1.20.1
type L ¶ added in v1.20.2
type L = List
L Example is not allowed, since Example is interface, and interface cannot have methods implemented as Visitor pattern requires
type Vertex ¶ added in v1.20.1
type Vertex[T any] struct { Value T Edges []*Edge[T] }
go:generate go run ../../../cmd/mkunion/main.go --name=GraphDSL
func VertexFromJSON ¶ added in v1.20.1
func (*Vertex[T1]) AcceptGraphDSL ¶ added in v1.20.1
func (r *Vertex[T1]) AcceptGraphDSL(v GraphDSLVisitor[T1]) any
func (*Vertex[T1]) MarshalJSON ¶ added in v1.20.1
func (*Vertex[T1]) UnmarshalJSON ¶ added in v1.20.1
Click to show internal directories.
Click to hide internal directories.