generator

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoSpecFromApiSpec

func NewGoSpecFromApiSpec(api asyncApiSpec) *goSpec

func NewJavaSpecFromApiSpec

func NewJavaSpecFromApiSpec(api asyncApiSpec) *javaSpec

Types

type AdditionalProperty

type AdditionalProperty struct {
	Type   string `yaml:"type"`
	Format string `yaml:"format"`
}

type Channel

type Channel struct {
	Name      string `yaml:"-"`
	Subscribe *Subscribe
	Publish   *Publish
}

type Components

type Components struct {
	Messages map[string]Message
	Schemas  map[string]Payload
}

type Generator

type Generator interface {
	Generate(asyncApiSpecPath string, out string) (string, error)
}

type Item

type Item struct {
	Type   string  `yaml:"type"`
	Format *string `yaml:"format"`
	Ref    *string `yaml:"$ref"`
	Object *Payload
}

type Message

type Message struct {
	Name        string  `yaml:"name"`
	Description string  `yaml:"description"`
	Ref         *string `yaml:"$ref"`
	Schema      Payload `yaml:"payload"`
}

type MosaicKafkaGoCodeGenerator

type MosaicKafkaGoCodeGenerator struct {
	// contains filtered or unexported fields
}

func NewMosaicKafkaGoCodeGenerator

func NewMosaicKafkaGoCodeGenerator(asyncApiSpecPath string) MosaicKafkaGoCodeGenerator

func (MosaicKafkaGoCodeGenerator) Generate

func (c MosaicKafkaGoCodeGenerator) Generate(out string) (string, error)

type MosaicKafkaJavaCodeGenerator

type MosaicKafkaJavaCodeGenerator struct {
	// contains filtered or unexported fields
}

func NewMosaicKafkaJavaCodeGenerator

func NewMosaicKafkaJavaCodeGenerator(asyncApiSpecPath string) MosaicKafkaJavaCodeGenerator

func (MosaicKafkaJavaCodeGenerator) Generate

func (c MosaicKafkaJavaCodeGenerator) Generate(out string) (string, error)

type Payload

type Payload struct {
	Name                 *string `yaml:"title"`
	Type                 string  `yaml:"type"`
	AdditionalProperties *bool   `yaml:"additionalProperties"`
	Properties           map[string]Property
	Ref                  *string   `yaml:"$ref"`
	Required             *[]string `yaml:"required"`
}

type Property

type Property struct {
	Type                 string              `yaml:"type"`
	Format               *string             `yaml:"format"`
	Minimum              *int                `yaml:"minimum"`
	AdditionalProperties *AdditionalProperty `yaml:"additionalProperties"`
	Ref                  *string             `yaml:"$ref"`
	Object               *Payload
	Items                *Item `yaml:"items"`
}

type Publish

type Publish struct {
	Message     Message
	OperationId *string `yaml:"operationId"`
}

type Server

type Server struct {
	Url         string `yaml:"url"`
	Protocol    string `yaml:"protocol"`
	Description string `yaml:"description"`
}

type Subscribe

type Subscribe struct {
	Message     Message
	OperationId *string `yaml:"operationId"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL