Documentation
¶
Index ¶
- func ChannelToMessageTypeName(ch asyncapi.Channel) (string, error)
- func DefaultLiteral(s *asyncapi.Schema) string
- func GenerateChannelAddr(ch *asyncapi.Channel) string
- func GenerateChannelAddrFromOp(op asyncapi.Operation) string
- func HasScalarDefault(s *asyncapi.Schema) bool
- func HelpersFunctions() template.FuncMap
- func OpToChannelTypeName(op asyncapi.Operation) string
- func OpToMsgTypeName(op asyncapi.Operation) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelToMessageTypeName ¶
ChannelToMessageTypeName will convert a channel to a message type name in the form of golang conventional type names.
func DefaultLiteral ¶ added in v0.56.0
DefaultLiteral returns the Go literal for the schema's default value, typed to match the field type produced by the "schema-name" template. It assumes HasScalarDefault returned true for the schema.
func GenerateChannelAddr ¶
GenerateChannelAddr will generate a channel path with the given channel.
func GenerateChannelAddrFromOp ¶
GenerateChannelAddrFromOp will generate a channel path with the given operation.
func HasScalarDefault ¶ added in v0.56.0
HasScalarDefault reports whether the schema declares a default value that can be rendered as a Go scalar literal (string, boolean, integer or number). Date/time strings, objects, arrays and other complex defaults are not supported and return false.
func HelpersFunctions ¶
HelpersFunctions returns the functions that can be used as helpers in a golang template.
func OpToChannelTypeName ¶
OpToChannelTypeName will convert an operation to a channel type name in the form of golang conventional type names.
Types ¶
This section is empty.