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 MessageTypeName(msg *asyncapi.Message) string
- func OpToChannelTypeName(op asyncapi.Operation) string
- func OpToMsgTypeName(op asyncapi.Operation) (string, error)
- func OperationMessageCount(op *asyncapi.Operation) int
- func ReceivedFuncName(op *asyncapi.Operation) string
- func ReplyFuncName(op *asyncapi.Operation) string
- func RequestFuncName(op *asyncapi.Operation, prefix string) string
- func SendFuncName(op *asyncapi.Operation, prefix string) string
- func SendFuncNameForMessage(op *asyncapi.Operation, prefix string, msg *asyncapi.Message) string
- func SubscribeFuncName(op *asyncapi.Operation) string
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 MessageTypeName ¶ added in v0.61.0
MessageTypeName returns the generated Go type name of a message.
func OpToChannelTypeName ¶
OpToChannelTypeName will convert an operation to a channel type name in the form of golang conventional type names.
func OpToMsgTypeName ¶
OpToMsgTypeName will convert an operation to a message type name in the form of golang conventional type names.
func OperationMessageCount ¶ added in v0.61.0
OperationMessageCount returns the number of messages of an operation.
func ReceivedFuncName ¶ added in v0.57.0
ReceivedFuncName returns the Go name of the subscriber callback generated for the given operation, honoring the x-go-received-func override.
func ReplyFuncName ¶ added in v0.57.0
ReplyFuncName returns the Go name of the ReplyTo function generated for the given operation, honoring the x-go-reply-func override.
func RequestFuncName ¶ added in v0.57.0
RequestFuncName returns the Go name of the Request function generated for the given operation, honoring the x-go-request-func override. The prefix is the controller side ("App" or "User"), which selects the default "RequestAs"/"RequestTo" verb.
func SendFuncName ¶ added in v0.57.0
SendFuncName returns the Go name of the Send function generated for the given operation, honoring the x-go-send-func override. The prefix is the controller side ("App" or "User"), which selects the default "SendAs"/"SendTo" verb.
func SendFuncNameForMessage ¶ added in v0.61.0
SendFuncNameForMessage returns the name of the per-message send function generated when an operation carries more than one message (issue #140). It is the operation send function name suffixed with "For" and the message name.
func SubscribeFuncName ¶ added in v0.57.0
SubscribeFuncName returns the Go name of the SubscribeTo function generated for the given operation, honoring the x-go-subscribe-func override.
Types ¶
This section is empty.