asyncapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Any

type Any struct {
	Type        string         `json:"type"`
	Description string         `json:"description"`
	Format      string         `json:"format"`
	Properties  map[string]Any `json:"properties"`
	Items       Items          `json:"items"`
	Reference   string         `json:"$ref"`

	// Non AsyncAPI fields
	Name string `json:"-"`
}

type Channel

type Channel struct {
	Subscribe *Operation `json:"subscribe"`
	Publish   *Operation `json:"publish"`

	// Non AsyncAPI fields
	Name string `json:"-"`
}

func (Channel) CorrelationIdLocation

func (c Channel) CorrelationIdLocation(spec Specification) string

func (Channel) GetMessageWithoutReferenceRedirect

func (c Channel) GetMessageWithoutReferenceRedirect() Message

type Components

type Components struct {
	Messages map[string]Message `json:"messages"`
	Schemas  map[string]Any     `json:"schemas"`
}

type CorrelationId

type CorrelationId struct {
	Description string `json:"description"`
	Location    string `json:"location"`
}

type Info

type Info struct {
	Title       string `json:"title"`
	Version     string `json:"version"`
	Description string `json:"description"`
}

type Items

type Items struct {
	Type string `json:"type"`

	Reference string `json:"$ref"`
}

type Message

type Message struct {
	Description   string         `json:"description"`
	Headers       *Any           `json:"headers"`
	Payload       *Any           `json:"payload"`
	CorrelationId *CorrelationId `json:"correlationId"`
	Reference     string         `json:"$ref"`

	// Non AsyncAPI fields
	Name string `json:"-"`
}

type Operation

type Operation struct {
	Message Message `json:"message"`
}

type Specification

type Specification struct {
	Version    string             `json:"asyncapi"`
	Info       Info               `json:"info"`
	Channels   map[string]Channel `json:"channels"`
	Components Components         `json:"components"`
}

func (*Specification) Process

func (s *Specification) Process()

func (Specification) ReferenceMessage

func (s Specification) ReferenceMessage(ref string) Message

Jump to

Keyboard shortcuts

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