Documentation
¶
Index ¶
- func Args(vs ...any) []any
- func ChannelToMessageTypeName(ch asyncapi.Channel) string
- func DescribeStruct(st any) string
- func GenerateChannelPath(ch asyncapi.Channel) string
- func HasField(v any, name string) bool
- func IsRequired(schema asyncapi.Schema, field string) bool
- func MultiLineComment(comment string) string
- func Namify(sentence string) string
- func ReferenceToStructAttributePath(ref string) string
- func ReferenceToTypeName(ref string) string
- func SnakeCase(sentence string) 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 DescribeStruct ¶ added in v0.10.1
DescribeStruct will describe a struct in a human readable way using `%+v` format from the standard library.
func GenerateChannelPath ¶ added in v0.9.0
GenerateChannelPath will generate a channel path with the given channel.
func IsRequired ¶ added in v0.4.0
IsRequired will check if a field is required in a asyncapi struct.
func MultiLineComment ¶ added in v0.10.1
MultiLineComment will prefix each line of a comment with "// " in order to make it a valid multiline golang comment.
func ReferenceToStructAttributePath ¶
ReferenceToStructAttributePath will convert a reference to a struct attribute path in the form of "a.b.c" where a, b and c are struct attributes in the form of golang conventional type names.
func ReferenceToTypeName ¶
ReferenceToTypeName will convert a reference to a type name in the form of golang conventional type names.
Types ¶
This section is empty.