Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidBroker is an error raised when using an unknown broker. ErrInvalidBroker = fmt.Errorf("%w: invalid broker", extensions.ErrAsyncAPI) // ErrInvalidFileFormat is returned when using an invalid format for AsyncAPI specification. ErrInvalidFileFormat = fmt.Errorf("%w: invalid file format", extensions.ErrAsyncAPI) )
Functions ¶
This section is empty.
Types ¶
type CodeGen ¶
type CodeGen struct {
Specification asyncapi.Specification
ModulePath string
ModuleVersion string
}
CodeGen is the main structure for the code generation.
func New ¶
func New(spec asyncapi.Specification) CodeGen
New creates a new code generation structure that can be used to generate code.
type Options ¶
type Options struct {
// OutputPath is the path to the generated code file
OutputPath string
// PackageName is the package name of the generated code
PackageName string
// Generate contains options regarding which golang code should be generated
Generate generators.Options
// DisableFormatting states if the formatting should be disabled when
// writing the generated code
DisableFormatting bool
}
Options is the struct that gather configuration of codegen.
Click to show internal directories.
Click to hide internal directories.