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 *Any `json:"items"`
Reference string `json:"$ref"`
Required []string `json:"required"`
// Non AsyncAPI fields
Name string `json:"-"`
ReferenceTo *Any `json:"-"`
}
func (Any) IsFieldRequired ¶ added in v0.4.0
func (*Any) Process ¶ added in v0.5.0
func (a *Any) Process(name string, spec Specification)
type Channel ¶
type Channel struct {
Subscribe *Operation `json:"subscribe"`
Publish *Operation `json:"publish"`
// Non AsyncAPI fields
Name string `json:"-"`
}
func (Channel) GetChannelMessage ¶ added in v0.2.0
GetChannelMessage will return the channel message WARNING: if there is a reference, then it won't be followed.
func (*Channel) Process ¶ added in v0.2.0
func (c *Channel) Process(name string, spec Specification)
type Components ¶
type Components struct {
Messages map[string]*Message `json:"messages"`
Schemas map[string]*Any `json:"schemas"`
}
func (*Components) Process ¶ added in v0.2.0
func (c *Components) Process(spec Specification)
type CorrelationID ¶ added in v0.1.1
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:"-"`
ReferenceTo *Message `json:"-"`
// CorrelationIDLocation will indicate where the correlation id is
// According to: https://www.asyncapi.com/docs/reference/specification/v2.6.0#correlationIDObject
CorrelationIDLocation string `json:"-"`
CorrelationIDRequired bool `json:"-"`
}
func (*Message) Process ¶ added in v0.2.0
func (msg *Message) Process(name string, spec Specification)
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) GetPublishSubscribeCount ¶ added in v0.1.2
func (s Specification) GetPublishSubscribeCount() (publishCount, subscribeCount uint)
func (*Specification) Process ¶
func (s *Specification) Process()
func (Specification) ReferenceAny ¶ added in v0.5.0
func (s Specification) ReferenceAny(ref string) *Any
func (Specification) ReferenceMessage ¶
func (s Specification) ReferenceMessage(ref string) *Message
Click to show internal directories.
Click to hide internal directories.