generators

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerControllerGenerator

type BrokerControllerGenerator struct {
}

func (BrokerControllerGenerator) Generate

func (bcg BrokerControllerGenerator) Generate() (string, error)

type BrokerNATSGenerator

type BrokerNATSGenerator struct {
}

func (BrokerNATSGenerator) Generate

func (bng BrokerNATSGenerator) Generate() (string, error)

type ControllerGenerator

type ControllerGenerator struct {
	MethodCount       uint
	SubscribeChannels map[string]*asyncapi.Channel
	PublishChannels   map[string]*asyncapi.Channel
	Prefix            string
}

func NewControllerGenerator

func NewControllerGenerator(side Side, spec asyncapi.Specification) ControllerGenerator

func (ControllerGenerator) Generate

func (asg ControllerGenerator) Generate() (string, error)

type ImportsGenerator

type ImportsGenerator struct {
	PackageName   string
	ModuleVersion string
	ModuleName    string
}

func (ImportsGenerator) Generate

func (ig ImportsGenerator) Generate() (string, error)

type Options

type Options struct {
	Application bool
	Client      bool
	Types       bool

	Broker bool
	NATS   bool
}

type Side

type Side string
const (
	SideIsApplication Side = "app"
	SideIsClient      Side = "client"
)

type SubscriberGenerator

type SubscriberGenerator struct {
	MethodCount uint
	Channels    map[string]*asyncapi.Channel
	Prefix      string
}

func NewSubscriberGenerator

func NewSubscriberGenerator(side Side, spec asyncapi.Specification) SubscriberGenerator

func (SubscriberGenerator) Generate

func (asg SubscriberGenerator) Generate() (string, error)

type TypesGenerator

type TypesGenerator struct {
	asyncapi.Specification
}

func (TypesGenerator) Generate

func (tg TypesGenerator) Generate() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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