{"modulePath":"github.com/IceWhaleTech/CasaOS-MessageBus","version":"v0.4.17-alpha1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package codegen\n\nPackage codegen provides primitives to interact with the openapi HTTP API.\n\nCode generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.\n\n## Constants\n\n```go\nconst (\n\tAccess_tokenScopes = \"access_token.Scopes\"\n)\n```\n\n## Functions\n\n```go\nfunc GetSwagger() (swagger *openapi3.T, err error)\n```\nGetSwagger 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.\n\n```go\nfunc PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)\n```\nConstructs a synthetic filesystem for resolving external references when loading openapi specifications.\n\n```go\nfunc RegisterHandlers(router EchoRouter, si ServerInterface)\n```\nRegisterHandlers adds each server route to the EchoRouter.\n\n```go\nfunc RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)\n```\nRegisters handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.\n\n## Types\n\n```go\ntype Action struct {\n\t// Name action name\n\tName string `json:\"name\"`\n\n\t// Properties event properties\n\tProperties map[string]string `json:\"properties\"`\n\n\t// SourceID associated source id\n\tSourceID string `json:\"sourceID\"`\n\n\t// Timestamp timestamp this action took place\n\tTimestamp *time.Time `json:\"timestamp,omitempty\"`\n}\n```\nAction defines model for Action.\n\n```go\ntype ActionName = string\n```\nActionName defines model for ActionName.\n\n```go\ntype ActionNames = []string\n```\nActionNames defines model for ActionNames.\n\n```go\ntype ActionType struct {\n\t// Name action name\n\t//\n\t// (there is no naming convention for action names, but it is recommended to name each as structural and descriptive as possible)\n\tName             string         `json:\"name\"`\n\tPropertyTypeList []PropertyType `json:\"propertyTypeList\"`\n\n\t// SourceID action source id to identify where the action will take\n\tSourceID string `json:\"sourceID\"`\n}\n```\nActionType defines model for ActionType.\n\n```go\ntype BaseResponse struct {\n\t// Message message returned by server side if there is any\n\tMessage *string `json:\"message,omitempty\"`\n}\n```\nBaseResponse defines model for BaseResponse.\n\n```go\ntype EchoRouter interface {\n\tCONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n\tDELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n\tGET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n\tHEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n\tOPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n\tPATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n\tPOST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n\tPUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n\tTRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route\n}\n```\nThis 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\n\n```go\ntype Event struct {\n\t// Name event name\n\tName string `json:\"name\"`\n\n\t// Properties event properties\n\tProperties map[string]string `json:\"properties\"`\n\n\t// SourceID associated source id\n\tSourceID string `json:\"sourceID\"`\n\n\t// Timestamp timestamp this event took place\n\tTimestamp *time.Time `json:\"timestamp,omitempty\"`\n\n\t// Uuid event uuid\n\tUuid *string `json:\"uuid,omitempty\"`\n}\n```\nEvent defines model for Event.\n\n```go\ntype EventName = string\n```\nEventName defines model for EventName.\n\n```go\ntype EventNames = []string\n```\nEventNames defines model for EventNames.\n\n```go\ntype EventType struct {\n\t// Name event name\n\t//\n\t// (there is no naming convention for event names, but it is recommended to name each as structural and descriptive as possible)\n\tName             string         `json:\"name\"`\n\tPropertyTypeList []PropertyType `json:\"propertyTypeList\"`\n\n\t// SourceID event source id to identify where the event comes from\n\tSourceID string `json:\"sourceID\"`\n}\n```\nEventType defines model for EventType.\n\n```go\ntype GetActionTypeOK = ActionType\n```\nGetActionTypeOK defines model for GetActionTypeOK.\n\n```go\ntype GetActionTypesOK = []ActionType\n```\nGetActionTypesOK defines model for GetActionTypesOK.\n\n```go\ntype GetEventTypeOK = EventType\n```\nGetEventTypeOK defines model for GetEventTypeOK.\n\n```go\ntype GetEventTypesOK = []EventType\n```\nGetEventTypesOK defines model for GetEventTypesOK.\n\n```go\ntype PropertyType struct {\n\tDescription *string `json:\"description,omitempty\"`\n\tExample     *string `json:\"example,omitempty\"`\n\n\t// Name property name\n\t//\n\t// \u003e It is recommended for a property name to be as descriptive as possible. One option is to prefix with a namespace.\n\t// \u003e - If the property is source specific, prefix with source ID. For example, `local-storage:vendor`\n\t// \u003e - Otherwise, prefix with `common:`. For example, `common:email`\n\t// \u003e\n\t// \u003e Some bad examples are `id`, `avail`, `blk`...which can be ambiguous and confusing.\n\tName string `json:\"name\"`\n}\n```\nPropertyType defines model for PropertyType.\n\n```go\ntype PublishEvent map[string]string\n```\nPublishEvent event properties\n\n```go\ntype PublishEventJSONBody map[string]string\n```\nPublishEventJSONBody defines parameters for PublishEvent.\n\n```go\ntype PublishEventJSONRequestBody PublishEventJSONBody\n```\nPublishEventJSONRequestBody defines body for PublishEvent for application/json ContentType.\n\n```go\ntype PublishEventOK = Event\n```\nPublishEventOK defines model for PublishEventOK.\n\n```go\ntype RegisterActionTypes = []ActionType\n```\nRegisterActionTypes defines model for RegisterActionTypes.\n\n```go\ntype RegisterActionTypesJSONBody = []ActionType\n```\nRegisterActionTypesJSONBody defines parameters for RegisterActionTypes.\n\n```go\ntype RegisterActionTypesJSONRequestBody = RegisterActionTypesJSONBody\n```\nRegisterActionTypesJSONRequestBody defines body for RegisterActionTypes for application/json ContentType.\n\n```go\ntype RegisterEventTypes = []EventType\n```\nRegisterEventTypes defines model for RegisterEventTypes.\n\n```go\ntype RegisterEventTypesJSONBody = []EventType\n```\nRegisterEventTypesJSONBody defines parameters for RegisterEventTypes.\n\n```go\ntype RegisterEventTypesJSONRequestBody = RegisterEventTypesJSONBody\n```\nRegisterEventTypesJSONRequestBody defines body for RegisterEventTypes for application/json ContentType.\n\n```go\ntype ResponseBadRequest = BaseResponse\n```\nResponseBadRequest defines model for ResponseBadRequest.\n\n```go\ntype ResponseConflict = BaseResponse\n```\nResponseConflict defines model for ResponseConflict.\n\n```go\ntype ResponseGetYSKCardListOK struct {\n\tData *YSKCardList `json:\"data,omitempty\"`\n\n\t// Message message returned by server side if there is any\n\tMessage *string `json:\"message,omitempty\"`\n}\n```\nResponseGetYSKCardListOK defines model for ResponseGetYSKCardListOK.\n\n```go\ntype ResponseInternalServerError = BaseResponse\n```\nResponseInternalServerError defines model for ResponseInternalServerError.\n\n```go\ntype ResponseNotFound = BaseResponse\n```\nResponseNotFound defines model for ResponseNotFound.\n\n```go\ntype ResponseOK = BaseResponse\n```\nResponseOK defines model for ResponseOK.\n\n```go\ntype ServerInterface interface {\n\t// Subscribe to actions by source ID (WebSocket)\n\t// (GET /action/{source_id})\n\tSubscribeActionWS(ctx echo.Context, sourceId SourceID, params SubscribeActionWSParams) error\n\t// Trigger an action\n\t// (POST /action/{source_id}/{name})\n\tTriggerAction(ctx echo.Context, sourceId SourceID, name ActionName) error\n\t// List action types\n\t// (GET /action_type)\n\tGetActionTypes(ctx echo.Context) error\n\t// Register one or more action types\n\t// (POST /action_type)\n\tRegisterActionTypes(ctx echo.Context) error\n\t// Get action types by source ID\n\t// (GET /action_type/{source_id})\n\tGetActionTypesBySourceID(ctx echo.Context, sourceId SourceID) error\n\t// Get an action type by source ID and name\n\t// (GET /action_type/{source_id}/{name})\n\tGetActionType(ctx echo.Context, sourceId SourceID, name ActionName) error\n\t// Subscribe to events by source ID (WebSocket)\n\t// (GET /event/{source_id})\n\tSubscribeEventWS(ctx echo.Context, sourceId SourceID, params SubscribeEventWSParams) error\n\t// Publish an event\n\t// (POST /event/{source_id}/{name})\n\tPublishEvent(ctx echo.Context, sourceId SourceID, name EventName) error\n\t// List event types\n\t// (GET /event_type)\n\tGetEventTypes(ctx echo.Context) error\n\t// Register one or more event types\n\t// (POST /event_type)\n\tRegisterEventTypes(ctx echo.Context) error\n\t// Get event types by source ID\n\t// (GET /event_type/{source_id})\n\tGetEventTypesBySourceID(ctx echo.Context, sourceId SourceID) error\n\t// Get an event type by source ID and name\n\t// (GET /event_type/{source_id}/{name})\n\tGetEventType(ctx echo.Context, sourceId SourceID, name EventName) error\n\t// Subscribe to events and actions (SocketIO)\n\t// (GET /socket.io)\n\tSubscribeSIO(ctx echo.Context) error\n\t// Poll events and actions (SocketIO)\n\t// (POST /socket.io)\n\tPollSIO(ctx echo.Context) error\n\t// Subscribe to events and actions (SocketIO)\n\t// (GET /socket.io/)\n\tSubscribeSIO2(ctx echo.Context) error\n\t// Poll events and actions (SocketIO)\n\t// (POST /socket.io/)\n\tPollSIO2(ctx echo.Context) error\n\n\t// (GET /ysk)\n\tGetYskCard(ctx echo.Context) error\n\n\t// (DELETE /ysk/{id})\n\tDeleteYskCard(ctx echo.Context, id string) error\n}\n```\nServerInterface represents all server handlers.\n\n```go\ntype ServerInterfaceWrapper struct {\n\tHandler ServerInterface\n}\n```\nServerInterfaceWrapper converts echo contexts to parameters.\n\n```go\nfunc (w *ServerInterfaceWrapper) DeleteYskCard(ctx echo.Context) error\n```\nDeleteYskCard converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetActionType(ctx echo.Context) error\n```\nGetActionType converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetActionTypes(ctx echo.Context) error\n```\nGetActionTypes converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetActionTypesBySourceID(ctx echo.Context) error\n```\nGetActionTypesBySourceID converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetEventType(ctx echo.Context) error\n```\nGetEventType converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetEventTypes(ctx echo.Context) error\n```\nGetEventTypes converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetEventTypesBySourceID(ctx echo.Context) error\n```\nGetEventTypesBySourceID converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) GetYskCard(ctx echo.Context) error\n```\nGetYskCard converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PollSIO(ctx echo.Context) error\n```\nPollSIO converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PollSIO2(ctx echo.Context) error\n```\nPollSIO2 converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) PublishEvent(ctx echo.Context) error\n```\nPublishEvent converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) RegisterActionTypes(ctx echo.Context) error\n```\nRegisterActionTypes converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) RegisterEventTypes(ctx echo.Context) error\n```\nRegisterEventTypes converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) SubscribeActionWS(ctx echo.Context) error\n```\nSubscribeActionWS converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) SubscribeEventWS(ctx echo.Context) error\n```\nSubscribeEventWS converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) SubscribeSIO(ctx echo.Context) error\n```\nSubscribeSIO converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) SubscribeSIO2(ctx echo.Context) error\n```\nSubscribeSIO2 converts echo context to params.\n\n```go\nfunc (w *ServerInterfaceWrapper) TriggerAction(ctx echo.Context) error\n```\nTriggerAction converts echo context to params.\n\n```go\ntype SourceID = string\n```\nSourceID defines model for SourceID.\n\n```go\ntype SubscribeActionWSParams struct {\n\tNames *ActionNames `form:\"names,omitempty\" json:\"names,omitempty\"`\n}\n```\nSubscribeActionWSParams defines parameters for SubscribeActionWS.\n\n```go\ntype SubscribeEventWSParams struct {\n\tNames *EventNames `form:\"names,omitempty\" json:\"names,omitempty\"`\n}\n```\nSubscribeEventWSParams defines parameters for SubscribeEventWS.\n\n```go\ntype TriggerAction map[string]string\n```\nTriggerAction action properties\n\n```go\ntype TriggerActionJSONBody map[string]string\n```\nTriggerActionJSONBody defines parameters for TriggerAction.\n\n```go\ntype TriggerActionJSONRequestBody TriggerActionJSONBody\n```\nTriggerActionJSONRequestBody defines body for TriggerAction for application/json ContentType.\n\n```go\ntype TriggerActionOK = Action\n```\nTriggerActionOK defines model for TriggerActionOK.\n\n```go\ntype YSKCard struct {\n\tCardType   YSKCardCardType   `json:\"cardType\"`\n\tContent    YSKCardContent    `json:\"content\"`\n\tId         string            `json:\"id\"`\n\tRenderType YSKCardRenderType `json:\"renderType\"`\n}\n```\nYSKCard defines model for YSKCard.\n\n```go\ntype YSKCardCardType string\n```\nYSKCardCardType defines model for YSKCard.CardType.\n\n```go\nconst (\n\tYSKCardCardTypeLongNotice  YSKCardCardType = \"long-notice\"\n\tYSKCardCardTypeShortNotice YSKCardCardType = \"short-notice\"\n\tYSKCardCardTypeTask        YSKCardCardType = \"task\"\n)\n```\nDefines values for YSKCardCardType.\n\n```go\ntype YSKCardContent struct {\n\tBodyIconWithText *YSKCardIconWithText   `json:\"bodyIconWithText,omitempty\"`\n\tBodyList         *[]YSKCardListItem     `json:\"bodyList,omitempty\"`\n\tBodyProgress     *YSKCardProgress       `json:\"bodyProgress,omitempty\"`\n\tFooterActions    *[]YSKCardFooterAction `json:\"footerActions,omitempty\"`\n\tTitleIcon        YSKCardIcon            `json:\"titleIcon\"`\n\tTitleText        string                 `json:\"titleText\"`\n}\n```\nYSKCardContent defines model for YSKCardContent.\n\n```go\ntype YSKCardFooterAction struct {\n\tMessageBus YSKCardMessageBusAction `json:\"messageBus\"`\n\tSide       string                  `json:\"side\"`\n\tStyle      string                  `json:\"style\"`\n\tText       string                  `json:\"text\"`\n}\n```\nYSKCardFooterAction defines model for YSKCardFooterAction.\n\n```go\ntype YSKCardIcon = string\n```\nYSKCardIcon defines model for YSKCardIcon.\n\n```go\ntype YSKCardIconWithText struct {\n\tDescription string      `json:\"description\"`\n\tIcon        YSKCardIcon `json:\"icon\"`\n}\n```\nYSKCardIconWithText defines model for YSKCardIconWithText.\n\n```go\ntype YSKCardList = []YSKCard\n```\nYSKCardList defines model for YSKCardList.\n\n```go\ntype YSKCardListItem struct {\n\tDescription string      `json:\"description\"`\n\tIcon        YSKCardIcon `json:\"icon\"`\n\tRightText   string      `json:\"rightText\"`\n}\n```\nYSKCardListItem defines model for YSKCardListItem.\n\n```go\ntype YSKCardMessageBusAction struct {\n\tKey     string `json:\"key\"`\n\tPayload string `json:\"payload\"`\n}\n```\nYSKCardMessageBusAction defines model for YSKCardMessageBusAction.\n\n```go\ntype YSKCardProgress struct {\n\tLabel    string `json:\"label\"`\n\tProgress int    `json:\"progress\"`\n}\n```\nYSKCardProgress defines model for YSKCardProgress.\n\n```go\ntype YSKCardRenderType string\n```\nYSKCardRenderType defines model for YSKCard.RenderType.\n\n```go\nconst (\n\tYSKCardRenderTypeIconTextNotice YSKCardRenderType = \"icon-text-notice\"\n\tYSKCardRenderTypeListNotice     YSKCardRenderType = \"list-notice\"\n\tYSKCardRenderTypeMarkdownNotice YSKCardRenderType = \"markdown-notice\"\n\tYSKCardRenderTypeTask           YSKCardRenderType = \"task\"\n)\n```\nDefines values for YSKCardRenderType.\n\n","path":"github.com/IceWhaleTech/CasaOS-MessageBus/codegen","name":"codegen","synopsis":"Package codegen provides primitives to interact with the openapi HTTP API.","isRedistributable":true}
