Documentation ¶
Overview ¶
Package codegen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type Action
- type ActionName
- type ActionNames
- type ActionType
- type BaseResponse
- type EchoRouter
- type Event
- type EventName
- type EventNames
- type EventType
- type GetActionTypeOK
- type GetActionTypesOK
- type GetEventTypeOK
- type GetEventTypesOK
- type PropertyType
- type PublishEvent
- type PublishEventJSONBody
- type PublishEventJSONRequestBody
- type PublishEventOK
- type RegisterActionTypes
- type RegisterActionTypesJSONBody
- type RegisterActionTypesJSONRequestBody
- type RegisterEventTypes
- type RegisterEventTypesJSONBody
- type RegisterEventTypesJSONRequestBody
- type ResponseBadRequest
- type ResponseConflict
- type ResponseGetYSKCardListOK
- type ResponseInternalServerError
- type ResponseNotFound
- type ResponseOK
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) DeleteYskCard(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetActionType(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetActionTypes(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetActionTypesBySourceID(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetEventType(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetEventTypes(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetEventTypesBySourceID(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetYskCard(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PollSIO(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PollSIO2(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PublishEvent(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) RegisterActionTypes(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) RegisterEventTypes(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SubscribeActionWS(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SubscribeEventWS(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SubscribeSIO(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SubscribeSIO2(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TriggerAction(ctx echo.Context) error
- type SourceID
- type SubscribeActionWSParams
- type SubscribeEventWSParams
- type TriggerAction
- type TriggerActionJSONBody
- type TriggerActionJSONRequestBody
- type TriggerActionOK
- type YSKCard
- type YSKCardCardType
- type YSKCardContent
- type YSKCardFooterAction
- type YSKCardIcon
- type YSKCardIconWithText
- type YSKCardList
- type YSKCardListItem
- type YSKCardMessageBusAction
- type YSKCardProgress
- type YSKCardRenderType
Constants ¶
const (
Access_tokenScopes = "access_token.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type Action ¶
type Action struct { // Name action name Name string `json:"name"` // Properties event properties Properties map[string]string `json:"properties"` // SourceID associated source id SourceID string `json:"sourceID"` // Timestamp timestamp this action took place Timestamp *time.Time `json:"timestamp,omitempty"` }
Action defines model for Action.
type ActionType ¶
type ActionType struct { // Name action name // // (there is no naming convention for action names, but it is recommended to name each as structural and descriptive as possible) Name string `json:"name"` PropertyTypeList []PropertyType `json:"propertyTypeList"` // SourceID action source id to identify where the action will take SourceID string `json:"sourceID"` }
ActionType defines model for ActionType.
type BaseResponse ¶
type BaseResponse struct { // Message message returned by server side if there is any Message *string `json:"message,omitempty"` }
BaseResponse defines model for BaseResponse.
type EchoRouter ¶
type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route }
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type Event ¶
type Event struct { // Name event name Name string `json:"name"` // Properties event properties Properties map[string]string `json:"properties"` // SourceID associated source id SourceID string `json:"sourceID"` // Timestamp timestamp this event took place Timestamp *time.Time `json:"timestamp,omitempty"` // Uuid event uuid Uuid *string `json:"uuid,omitempty"` }
Event defines model for Event.
type EventType ¶
type EventType struct { // Name event name // // (there is no naming convention for event names, but it is recommended to name each as structural and descriptive as possible) Name string `json:"name"` PropertyTypeList []PropertyType `json:"propertyTypeList"` // SourceID event source id to identify where the event comes from SourceID string `json:"sourceID"` }
EventType defines model for EventType.
type GetActionTypeOK ¶
type GetActionTypeOK = ActionType
GetActionTypeOK defines model for GetActionTypeOK.
type GetActionTypesOK ¶
type GetActionTypesOK = []ActionType
GetActionTypesOK defines model for GetActionTypesOK.
type GetEventTypeOK ¶
type GetEventTypeOK = EventType
GetEventTypeOK defines model for GetEventTypeOK.
type GetEventTypesOK ¶
type GetEventTypesOK = []EventType
GetEventTypesOK defines model for GetEventTypesOK.
type PropertyType ¶
type PropertyType struct { Description *string `json:"description,omitempty"` Example *string `json:"example,omitempty"` // Name property name // // > It is recommended for a property name to be as descriptive as possible. One option is to prefix with a namespace. // > - If the property is source specific, prefix with source ID. For example, `local-storage:vendor` // > - Otherwise, prefix with `common:`. For example, `common:email` // > // > Some bad examples are `id`, `avail`, `blk`...which can be ambiguous and confusing. Name string `json:"name"` }
PropertyType defines model for PropertyType.
type PublishEventJSONBody ¶
PublishEventJSONBody defines parameters for PublishEvent.
type PublishEventJSONRequestBody ¶
type PublishEventJSONRequestBody PublishEventJSONBody
PublishEventJSONRequestBody defines body for PublishEvent for application/json ContentType.
type RegisterActionTypes ¶
type RegisterActionTypes = []ActionType
RegisterActionTypes defines model for RegisterActionTypes.
type RegisterActionTypesJSONBody ¶
type RegisterActionTypesJSONBody = []ActionType
RegisterActionTypesJSONBody defines parameters for RegisterActionTypes.
type RegisterActionTypesJSONRequestBody ¶
type RegisterActionTypesJSONRequestBody = RegisterActionTypesJSONBody
RegisterActionTypesJSONRequestBody defines body for RegisterActionTypes for application/json ContentType.
type RegisterEventTypes ¶
type RegisterEventTypes = []EventType
RegisterEventTypes defines model for RegisterEventTypes.
type RegisterEventTypesJSONBody ¶
type RegisterEventTypesJSONBody = []EventType
RegisterEventTypesJSONBody defines parameters for RegisterEventTypes.
type RegisterEventTypesJSONRequestBody ¶
type RegisterEventTypesJSONRequestBody = RegisterEventTypesJSONBody
RegisterEventTypesJSONRequestBody defines body for RegisterEventTypes for application/json ContentType.
type ResponseBadRequest ¶
type ResponseBadRequest = BaseResponse
ResponseBadRequest defines model for ResponseBadRequest.
type ResponseConflict ¶
type ResponseConflict = BaseResponse
ResponseConflict defines model for ResponseConflict.
type ResponseGetYSKCardListOK ¶
type ResponseGetYSKCardListOK struct { Data *YSKCardList `json:"data,omitempty"` // Message message returned by server side if there is any Message *string `json:"message,omitempty"` }
ResponseGetYSKCardListOK defines model for ResponseGetYSKCardListOK.
type ResponseInternalServerError ¶
type ResponseInternalServerError = BaseResponse
ResponseInternalServerError defines model for ResponseInternalServerError.
type ResponseNotFound ¶
type ResponseNotFound = BaseResponse
ResponseNotFound defines model for ResponseNotFound.
type ServerInterface ¶
type ServerInterface interface { // Subscribe to actions by source ID (WebSocket) // (GET /action/{source_id}) SubscribeActionWS(ctx echo.Context, sourceId SourceID, params SubscribeActionWSParams) error // Trigger an action // (POST /action/{source_id}/{name}) TriggerAction(ctx echo.Context, sourceId SourceID, name ActionName) error // List action types // (GET /action_type) GetActionTypes(ctx echo.Context) error // Register one or more action types // (POST /action_type) RegisterActionTypes(ctx echo.Context) error // Get action types by source ID // (GET /action_type/{source_id}) GetActionTypesBySourceID(ctx echo.Context, sourceId SourceID) error // Get an action type by source ID and name // (GET /action_type/{source_id}/{name}) GetActionType(ctx echo.Context, sourceId SourceID, name ActionName) error // Subscribe to events by source ID (WebSocket) // (GET /event/{source_id}) SubscribeEventWS(ctx echo.Context, sourceId SourceID, params SubscribeEventWSParams) error // Publish an event // (POST /event/{source_id}/{name}) PublishEvent(ctx echo.Context, sourceId SourceID, name EventName) error // List event types // (GET /event_type) GetEventTypes(ctx echo.Context) error // Register one or more event types // (POST /event_type) RegisterEventTypes(ctx echo.Context) error // Get event types by source ID // (GET /event_type/{source_id}) GetEventTypesBySourceID(ctx echo.Context, sourceId SourceID) error // Get an event type by source ID and name // (GET /event_type/{source_id}/{name}) GetEventType(ctx echo.Context, sourceId SourceID, name EventName) error // Subscribe to events and actions (SocketIO) // (GET /socket.io) SubscribeSIO(ctx echo.Context) error // Poll events and actions (SocketIO) // (POST /socket.io) PollSIO(ctx echo.Context) error // Subscribe to events and actions (SocketIO) // (GET /socket.io/) SubscribeSIO2(ctx echo.Context) error // Poll events and actions (SocketIO) // (POST /socket.io/) PollSIO2(ctx echo.Context) error // (GET /ysk) GetYskCard(ctx echo.Context) error // (DELETE /ysk/{id}) DeleteYskCard(ctx echo.Context, id string) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) DeleteYskCard ¶
func (w *ServerInterfaceWrapper) DeleteYskCard(ctx echo.Context) error
DeleteYskCard converts echo context to params.
func (*ServerInterfaceWrapper) GetActionType ¶
func (w *ServerInterfaceWrapper) GetActionType(ctx echo.Context) error
GetActionType converts echo context to params.
func (*ServerInterfaceWrapper) GetActionTypes ¶
func (w *ServerInterfaceWrapper) GetActionTypes(ctx echo.Context) error
GetActionTypes converts echo context to params.
func (*ServerInterfaceWrapper) GetActionTypesBySourceID ¶
func (w *ServerInterfaceWrapper) GetActionTypesBySourceID(ctx echo.Context) error
GetActionTypesBySourceID converts echo context to params.
func (*ServerInterfaceWrapper) GetEventType ¶
func (w *ServerInterfaceWrapper) GetEventType(ctx echo.Context) error
GetEventType converts echo context to params.
func (*ServerInterfaceWrapper) GetEventTypes ¶
func (w *ServerInterfaceWrapper) GetEventTypes(ctx echo.Context) error
GetEventTypes converts echo context to params.
func (*ServerInterfaceWrapper) GetEventTypesBySourceID ¶
func (w *ServerInterfaceWrapper) GetEventTypesBySourceID(ctx echo.Context) error
GetEventTypesBySourceID converts echo context to params.
func (*ServerInterfaceWrapper) GetYskCard ¶
func (w *ServerInterfaceWrapper) GetYskCard(ctx echo.Context) error
GetYskCard converts echo context to params.
func (*ServerInterfaceWrapper) PollSIO ¶
func (w *ServerInterfaceWrapper) PollSIO(ctx echo.Context) error
PollSIO converts echo context to params.
func (*ServerInterfaceWrapper) PollSIO2 ¶
func (w *ServerInterfaceWrapper) PollSIO2(ctx echo.Context) error
PollSIO2 converts echo context to params.
func (*ServerInterfaceWrapper) PublishEvent ¶
func (w *ServerInterfaceWrapper) PublishEvent(ctx echo.Context) error
PublishEvent converts echo context to params.
func (*ServerInterfaceWrapper) RegisterActionTypes ¶
func (w *ServerInterfaceWrapper) RegisterActionTypes(ctx echo.Context) error
RegisterActionTypes converts echo context to params.
func (*ServerInterfaceWrapper) RegisterEventTypes ¶
func (w *ServerInterfaceWrapper) RegisterEventTypes(ctx echo.Context) error
RegisterEventTypes converts echo context to params.
func (*ServerInterfaceWrapper) SubscribeActionWS ¶
func (w *ServerInterfaceWrapper) SubscribeActionWS(ctx echo.Context) error
SubscribeActionWS converts echo context to params.
func (*ServerInterfaceWrapper) SubscribeEventWS ¶
func (w *ServerInterfaceWrapper) SubscribeEventWS(ctx echo.Context) error
SubscribeEventWS converts echo context to params.
func (*ServerInterfaceWrapper) SubscribeSIO ¶
func (w *ServerInterfaceWrapper) SubscribeSIO(ctx echo.Context) error
SubscribeSIO converts echo context to params.
func (*ServerInterfaceWrapper) SubscribeSIO2 ¶
func (w *ServerInterfaceWrapper) SubscribeSIO2(ctx echo.Context) error
SubscribeSIO2 converts echo context to params.
func (*ServerInterfaceWrapper) TriggerAction ¶
func (w *ServerInterfaceWrapper) TriggerAction(ctx echo.Context) error
TriggerAction converts echo context to params.
type SubscribeActionWSParams ¶
type SubscribeActionWSParams struct {
Names *ActionNames `form:"names,omitempty" json:"names,omitempty"`
}
SubscribeActionWSParams defines parameters for SubscribeActionWS.
type SubscribeEventWSParams ¶
type SubscribeEventWSParams struct {
Names *EventNames `form:"names,omitempty" json:"names,omitempty"`
}
SubscribeEventWSParams defines parameters for SubscribeEventWS.
type TriggerActionJSONBody ¶
TriggerActionJSONBody defines parameters for TriggerAction.
type TriggerActionJSONRequestBody ¶
type TriggerActionJSONRequestBody TriggerActionJSONBody
TriggerActionJSONRequestBody defines body for TriggerAction for application/json ContentType.
type TriggerActionOK ¶
type TriggerActionOK = Action
TriggerActionOK defines model for TriggerActionOK.
type YSKCard ¶
type YSKCard struct { CardType YSKCardCardType `json:"cardType"` Content YSKCardContent `json:"content"` Id string `json:"id"` RenderType YSKCardRenderType `json:"renderType"` }
YSKCard defines model for YSKCard.
type YSKCardCardType ¶
type YSKCardCardType string
YSKCardCardType defines model for YSKCard.CardType.
const ( YSKCardCardTypeLongNotice YSKCardCardType = "long-notice" YSKCardCardTypeShortNotice YSKCardCardType = "short-notice" YSKCardCardTypeTask YSKCardCardType = "task" )
Defines values for YSKCardCardType.
type YSKCardContent ¶
type YSKCardContent struct { BodyIconWithText *YSKCardIconWithText `json:"bodyIconWithText,omitempty"` BodyList *[]YSKCardListItem `json:"bodyList,omitempty"` BodyProgress *YSKCardProgress `json:"bodyProgress,omitempty"` TitleIcon YSKCardIcon `json:"titleIcon"` TitleText string `json:"titleText"` }
YSKCardContent defines model for YSKCardContent.
type YSKCardFooterAction ¶
type YSKCardFooterAction struct {}
YSKCardFooterAction defines model for YSKCardFooterAction.
type YSKCardIconWithText ¶
type YSKCardIconWithText struct { Description string `json:"description"` Icon YSKCardIcon `json:"icon"` }
YSKCardIconWithText defines model for YSKCardIconWithText.
type YSKCardListItem ¶
type YSKCardListItem struct { Description string `json:"description"` Icon YSKCardIcon `json:"icon"` RightText string `json:"rightText"` }
YSKCardListItem defines model for YSKCardListItem.
type YSKCardMessageBusAction ¶
YSKCardMessageBusAction defines model for YSKCardMessageBusAction.
type YSKCardProgress ¶
YSKCardProgress defines model for YSKCardProgress.
type YSKCardRenderType ¶
type YSKCardRenderType string
YSKCardRenderType defines model for YSKCard.RenderType.
const ( YSKCardRenderTypeIconTextNotice YSKCardRenderType = "icon-text-notice" YSKCardRenderTypeListNotice YSKCardRenderType = "list-notice" YSKCardRenderTypeMarkdownNotice YSKCardRenderType = "markdown-notice" YSKCardRenderTypeTask YSKCardRenderType = "task" )
Defines values for YSKCardRenderType.