Documentation
¶
Overview ¶
Package "issue185" provides primitives to interact with the AsyncAPI specification.
Code generated by github.com/lerenn/asyncapi-codegen version (devel) DO NOT EDIT.
Index ¶
Constants ¶
const AsyncAPIVersion = ""
AsyncAPIVersion is the version of the used AsyncAPI document
Variables ¶
This section is empty.
Functions ¶
func CheckGeneration ¶
func CheckGeneration()
CheckGeneration is just to test that the generation is correct.
Types ¶
type BaseEventInfoSchema ¶
type BaseEventInfoSchema struct {
Data ContentDataSchema `json:"data" validate:"required"`
}
BaseEventInfoSchema is a schema from the AsyncAPI specification required in messages
type BaseEventSchema ¶
BaseEventSchema is a schema from the AsyncAPI specification required in messages
type ContentDataSchema ¶
type ContentDataSchema struct {
ContentId string `json:"contentId" validate:"required"`
}
ContentDataSchema 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 WithErrorHandler ¶
func WithErrorHandler(handler extensions.ErrorHandler) ControllerOption
WithErrorHandler attaches a errorhandler to handle errors from subscriber functions
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 EventPayloadSchema ¶
type EventPayloadSchema struct { Data ContentDataSchema `json:"data" validate:"required"` Id string `json:"id" validate:"required"` Time time.Time `json:"time" validate:"required"` }
EventPayloadSchema is a schema from the AsyncAPI specification required in messages