builder

package
v0.0.0-...-cb39d06 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncAPISpec

type AsyncAPISpec struct {
	AsyncAPI   string           `json:"asyncapi"`
	Info       information      `json:"info"`
	Topics     map[string]topic `json:"topics"`
	Components components       `json:"components"`
}

AsyncAPISpec represent the asyncapi data structure

type SpecBuilder

type SpecBuilder struct {
	Spec AsyncAPISpec
}

SpecBuilder builds a spec using the builder pattern

func (*SpecBuilder) AddMessage

func (b *SpecBuilder) AddMessage(msg spec.MessageSpec) *SpecBuilder

AddMessage inserts the information for a message in the asyncapi spec

func (*SpecBuilder) AddServerInfo

func (b *SpecBuilder) AddServerInfo(info spec.ServerSpec) *SpecBuilder

AddServerInfo adds the server information to the asyncapi spec

func (*SpecBuilder) Build

func (b *SpecBuilder) Build() AsyncAPISpec

Build builds the final asyncapi spec

Jump to

Keyboard shortcuts

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