Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerGenerator ¶
type ControllerGenerator struct { MethodCount uint SubscribeChannels map[string]*asyncapi.Channel PublishChannels map[string]*asyncapi.Channel Prefix string Version string }
ControllerGenerator is a code generator for controllers that will turn an asyncapi specification into controller golang code.
func NewControllerGenerator ¶
func NewControllerGenerator(side generators.Side, spec asyncapi.Specification) ControllerGenerator
NewControllerGenerator will create a new controller code generator.
func (ControllerGenerator) Generate ¶
func (asg ControllerGenerator) Generate() (string, error)
Generate will generate the controller code.
type Generator ¶
type Generator struct { Options options.Options Specification asyncapiv2.Specification ModulePath string ModuleVersion string }
Generator is the structure that contains information to generate the code from the specification.
type ImportsGenerator ¶
type ImportsGenerator struct { PackageName string ModuleVersion string ModuleName string CustomImports []string }
ImportsGenerator is a code generator for imports that will add needed imports to the code, being asyncapi-codegen packages, standard library packages or custom packages.
func (ImportsGenerator) Generate ¶
func (ig ImportsGenerator) Generate() (string, error)
Generate will generate the imports code.
type SubscriberGenerator ¶
type SubscriberGenerator struct { MethodCount uint Channels map[string]*asyncapi.Channel Prefix string }
SubscriberGenerator is a code generator for subscribers that will turn an asyncapi specification into subscriber golang code.
func NewSubscriberGenerator ¶
func NewSubscriberGenerator(side generators.Side, spec asyncapi.Specification) SubscriberGenerator
NewSubscriberGenerator will create a new subscriber code generator.
func (SubscriberGenerator) Generate ¶
func (asg SubscriberGenerator) Generate() (string, error)
Generate will generate the subscriber code.
type TypesGenerator ¶
type TypesGenerator struct {
asyncapi.Specification
}
TypesGenerator is a code generator for types that will generate all schemas contained in an asyncapi specification to golang structures code.
func (TypesGenerator) Generate ¶
func (tg TypesGenerator) Generate() (string, error)
Generate will create a new types code generator.