Documentation
¶
Overview ¶
Package "issue97" provides primitives to interact with the AsyncAPI specification.
Code generated by github.com/lerenn/asyncapi-codegen version (devel) DO NOT EDIT.
Index ¶
- Constants
- Variables
- type AppController
- func (c *AppController) Close(ctx context.Context)
- func (c *AppController) PublishIssue97ReferencePayloadArray(ctx context.Context, msg ReferencePayloadArrayMessage) error
- func (c *AppController) PublishIssue97ReferencePayloadObject(ctx context.Context, msg ReferencePayloadObjectMessage) error
- func (c *AppController) PublishIssue97ReferencePayloadString(ctx context.Context, msg ReferencePayloadStringMessage) error
- type ArraySchema
- type ControllerOption
- type Error
- type MessageWithCorrelationID
- type ObjectSchema
- type ReferencePayloadArrayMessage
- type ReferencePayloadObjectMessage
- type ReferencePayloadStringMessage
- type StringSchema
- type UserController
- func (c *UserController) Close(ctx context.Context)
- func (c *UserController) SubscribeAll(ctx context.Context, as UserSubscriber) error
- func (c *UserController) SubscribeIssue97ReferencePayloadArray(ctx context.Context, ...) error
- func (c *UserController) SubscribeIssue97ReferencePayloadObject(ctx context.Context, ...) error
- func (c *UserController) SubscribeIssue97ReferencePayloadString(ctx context.Context, ...) error
- func (c *UserController) UnsubscribeAll(ctx context.Context)
- func (c *UserController) UnsubscribeIssue97ReferencePayloadArray(ctx context.Context)
- func (c *UserController) UnsubscribeIssue97ReferencePayloadObject(ctx context.Context)
- func (c *UserController) UnsubscribeIssue97ReferencePayloadString(ctx context.Context)
- type UserSubscriber
Constants ¶
const ( // Issue97ReferencePayloadArrayPath is the constant representing the 'Issue97.referencePayloadArray' channel path. Issue97ReferencePayloadArrayPath = "issue97.referencePayloadArray" // Issue97ReferencePayloadObjectPath is the constant representing the 'Issue97.referencePayloadObject' channel path. Issue97ReferencePayloadObjectPath = "issue97.referencePayloadObject" // Issue97ReferencePayloadStringPath is the constant representing the 'Issue97.referencePayloadString' channel path. Issue97ReferencePayloadStringPath = "issue97.referencePayloadString" )
const AsyncAPIVersion = "1.0.0"
AsyncAPIVersion is the version of the used AsyncAPI document
Variables ¶
var ChannelsPaths = []string{ Issue97ReferencePayloadArrayPath, Issue97ReferencePayloadObjectPath, Issue97ReferencePayloadStringPath, }
ChannelsPaths is an array of all channels paths
Functions ¶
This section is empty.
Types ¶
type AppController ¶
type AppController struct {
// contains filtered or unexported fields
}
AppController is the structure that provides publishing capabilities to the developer and and connect the broker with the App
func NewAppController ¶
func NewAppController(bc extensions.BrokerController, options ...ControllerOption) (*AppController, error)
NewAppController links the App to the broker
func (*AppController) Close ¶
func (c *AppController) Close(ctx context.Context)
Close will clean up any existing resources on the controller
func (*AppController) PublishIssue97ReferencePayloadArray ¶
func (c *AppController) PublishIssue97ReferencePayloadArray(ctx context.Context, msg ReferencePayloadArrayMessage) error
PublishIssue97ReferencePayloadArray will publish messages to 'issue97.referencePayloadArray' channel
func (*AppController) PublishIssue97ReferencePayloadObject ¶
func (c *AppController) PublishIssue97ReferencePayloadObject(ctx context.Context, msg ReferencePayloadObjectMessage) error
PublishIssue97ReferencePayloadObject will publish messages to 'issue97.referencePayloadObject' channel
func (*AppController) PublishIssue97ReferencePayloadString ¶
func (c *AppController) PublishIssue97ReferencePayloadString(ctx context.Context, msg ReferencePayloadStringMessage) error
PublishIssue97ReferencePayloadString will publish messages to 'issue97.referencePayloadString' channel
type ArraySchema ¶
type ArraySchema []struct{}
ArraySchema is a schema from the AsyncAPI specification required in messages
type ControllerOption ¶
type ControllerOption func(controller *controller)
ControllerOption is the type of the options that can be passed when creating a new Controller
func WithLogger ¶
func WithLogger(logger extensions.Logger) ControllerOption
WithLogger attaches a logger to the controller
func WithMiddlewares ¶
func WithMiddlewares(middlewares ...extensions.Middleware) ControllerOption
WithMiddlewares attaches middlewares that will be executed when sending or receiving messages
type ObjectSchema ¶
type ObjectSchema struct {
Text *string `json:"text"`
}
ObjectSchema is a schema from the AsyncAPI specification required in messages
type ReferencePayloadArrayMessage ¶
type ReferencePayloadArrayMessage struct { // Payload will be inserted in the message payload Payload ArraySchema }
ReferencePayloadArrayMessage is the message expected for 'ReferencePayloadArray' channel
func NewReferencePayloadArrayMessage ¶
func NewReferencePayloadArrayMessage() ReferencePayloadArrayMessage
type ReferencePayloadObjectMessage ¶
type ReferencePayloadObjectMessage struct { // Payload will be inserted in the message payload Payload ObjectSchema }
ReferencePayloadObjectMessage is the message expected for 'ReferencePayloadObject' channel
func NewReferencePayloadObjectMessage ¶
func NewReferencePayloadObjectMessage() ReferencePayloadObjectMessage
type ReferencePayloadStringMessage ¶
type ReferencePayloadStringMessage struct { // Payload will be inserted in the message payload Payload StringSchema }
ReferencePayloadStringMessage is the message expected for 'ReferencePayloadString' channel
func NewReferencePayloadStringMessage ¶
func NewReferencePayloadStringMessage() ReferencePayloadStringMessage
type StringSchema ¶
type StringSchema string
StringSchema is a schema from the AsyncAPI specification required in messages
type UserController ¶
type UserController struct {
// contains filtered or unexported fields
}
UserController is the structure that provides publishing capabilities to the developer and and connect the broker with the User
func NewUserController ¶
func NewUserController(bc extensions.BrokerController, options ...ControllerOption) (*UserController, error)
NewUserController links the User to the broker
func (*UserController) Close ¶
func (c *UserController) Close(ctx context.Context)
Close will clean up any existing resources on the controller
func (*UserController) SubscribeAll ¶
func (c *UserController) SubscribeAll(ctx context.Context, as UserSubscriber) error
SubscribeAll will subscribe to channels without parameters on which the app is expecting messages. For channels with parameters, they should be subscribed independently.
func (*UserController) SubscribeIssue97ReferencePayloadArray ¶
func (c *UserController) SubscribeIssue97ReferencePayloadArray(ctx context.Context, fn func(ctx context.Context, msg ReferencePayloadArrayMessage)) error
SubscribeIssue97ReferencePayloadArray will subscribe to new messages from 'issue97.referencePayloadArray' channel.
Callback function 'fn' will be called each time a new message is received.
func (*UserController) SubscribeIssue97ReferencePayloadObject ¶
func (c *UserController) SubscribeIssue97ReferencePayloadObject(ctx context.Context, fn func(ctx context.Context, msg ReferencePayloadObjectMessage)) error
Callback function 'fn' will be called each time a new message is received.
func (*UserController) SubscribeIssue97ReferencePayloadString ¶
func (c *UserController) SubscribeIssue97ReferencePayloadString(ctx context.Context, fn func(ctx context.Context, msg ReferencePayloadStringMessage)) error
Callback function 'fn' will be called each time a new message is received.
func (*UserController) UnsubscribeAll ¶
func (c *UserController) UnsubscribeAll(ctx context.Context)
UnsubscribeAll will unsubscribe all remaining subscribed channels
func (*UserController) UnsubscribeIssue97ReferencePayloadArray ¶
func (c *UserController) UnsubscribeIssue97ReferencePayloadArray(ctx context.Context)
UnsubscribeIssue97ReferencePayloadArray will unsubscribe messages from 'issue97.referencePayloadArray' channel. A timeout can be set in context to avoid blocking operation, if needed.
func (*UserController) UnsubscribeIssue97ReferencePayloadObject ¶
func (c *UserController) UnsubscribeIssue97ReferencePayloadObject(ctx context.Context)
UnsubscribeIssue97ReferencePayloadObject will unsubscribe messages from 'issue97.referencePayloadObject' channel. A timeout can be set in context to avoid blocking operation, if needed.
func (*UserController) UnsubscribeIssue97ReferencePayloadString ¶
func (c *UserController) UnsubscribeIssue97ReferencePayloadString(ctx context.Context)
UnsubscribeIssue97ReferencePayloadString will unsubscribe messages from 'issue97.referencePayloadString' channel. A timeout can be set in context to avoid blocking operation, if needed.
type UserSubscriber ¶
type UserSubscriber interface { // Issue97ReferencePayloadArray subscribes to messages placed on the 'issue97.referencePayloadArray' channel Issue97ReferencePayloadArray(ctx context.Context, msg ReferencePayloadArrayMessage) // Issue97ReferencePayloadObject subscribes to messages placed on the 'issue97.referencePayloadObject' channel Issue97ReferencePayloadObject(ctx context.Context, msg ReferencePayloadObjectMessage) // Issue97ReferencePayloadString subscribes to messages placed on the 'issue97.referencePayloadString' channel Issue97ReferencePayloadString(ctx context.Context, msg ReferencePayloadStringMessage) }
UserSubscriber represents all handlers that are expecting messages for User