Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Index ¶
- 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 CreateOrganizationJSONBody
- type CreateOrganizationJSONRequestBody
- type CreateProjectJSONBody
- type CreateProjectJSONRequestBody
- type EchoRouter
- type Error
- type ErrorResponse
- type Organization
- type Project
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) CreateOrganization(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) CreateProject(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteOrganization(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeleteProject(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) FindOrganization(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) FindOrganizations(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) FindProject(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) FindProjects(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateOrganization(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdateProject(ctx echo.Context) error
- type UpdateOrganizationJSONBody
- type UpdateOrganizationJSONRequestBody
- type UpdateProjectJSONBody
- type UpdateProjectJSONRequestBody
Constants ¶
This section is empty.
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 CreateOrganizationJSONBody ¶
type CreateOrganizationJSONBody struct { Description *string `json:"description,omitempty"` Name string `json:"name"` }
CreateOrganizationJSONBody defines parameters for CreateOrganization.
type CreateOrganizationJSONRequestBody ¶
type CreateOrganizationJSONRequestBody CreateOrganizationJSONBody
CreateOrganizationJSONRequestBody defines body for CreateOrganization for application/json ContentType.
type CreateProjectJSONBody ¶
type CreateProjectJSONBody struct { Description *string `json:"description,omitempty"` Name string `json:"name"` }
CreateProjectJSONBody defines parameters for CreateProject.
type CreateProjectJSONRequestBody ¶
type CreateProjectJSONRequestBody CreateProjectJSONBody
CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType.
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 Organization ¶
type Organization struct { CreatedOn openapi_types.Date `json:"created_on"` Description *string `json:"description,omitempty"` Id string `json:"id"` Name string `json:"name"` UpdatedOn openapi_types.Date `json:"updated_on"` }
Organization defines model for Organization.
type Project ¶
type Project struct { CreatedOn openapi_types.Date `json:"created_on"` Description *string `json:"description,omitempty"` Id string `json:"id"` Name string `json:"name"` UpdatedOn openapi_types.Date `json:"updated_on"` }
Project defines model for Project.
type ServerInterface ¶
type ServerInterface interface { // (GET /v1/organizations) FindOrganizations(ctx echo.Context) error // (POST /v1/organizations) CreateOrganization(ctx echo.Context) error // (DELETE /v1/organizations/{name}) DeleteOrganization(ctx echo.Context, name string) error // (GET /v1/organizations/{name}) FindOrganization(ctx echo.Context, name string) error // (PUT /v1/organizations/{name}) UpdateOrganization(ctx echo.Context, name string) error // (DELETE /v1/organizations/{organization}/project/{name}) DeleteProject(ctx echo.Context, organization string, name string) error // (GET /v1/organizations/{organization}/project/{name}) FindProject(ctx echo.Context, organization string, name string) error // (PUT /v1/organizations/{organization}/project/{name}) UpdateProject(ctx echo.Context, organization string, name string) error // (GET /v1/organizations/{organization}/projects) FindProjects(ctx echo.Context, organization string) error // (POST /v1/organizations/{organization}/projects) CreateProject(ctx echo.Context, organization string) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CreateOrganization ¶
func (w *ServerInterfaceWrapper) CreateOrganization(ctx echo.Context) error
CreateOrganization converts echo context to params.
func (*ServerInterfaceWrapper) CreateProject ¶
func (w *ServerInterfaceWrapper) CreateProject(ctx echo.Context) error
CreateProject converts echo context to params.
func (*ServerInterfaceWrapper) DeleteOrganization ¶
func (w *ServerInterfaceWrapper) DeleteOrganization(ctx echo.Context) error
DeleteOrganization converts echo context to params.
func (*ServerInterfaceWrapper) DeleteProject ¶
func (w *ServerInterfaceWrapper) DeleteProject(ctx echo.Context) error
DeleteProject converts echo context to params.
func (*ServerInterfaceWrapper) FindOrganization ¶
func (w *ServerInterfaceWrapper) FindOrganization(ctx echo.Context) error
FindOrganization converts echo context to params.
func (*ServerInterfaceWrapper) FindOrganizations ¶
func (w *ServerInterfaceWrapper) FindOrganizations(ctx echo.Context) error
FindOrganizations converts echo context to params.
func (*ServerInterfaceWrapper) FindProject ¶
func (w *ServerInterfaceWrapper) FindProject(ctx echo.Context) error
FindProject converts echo context to params.
func (*ServerInterfaceWrapper) FindProjects ¶
func (w *ServerInterfaceWrapper) FindProjects(ctx echo.Context) error
FindProjects converts echo context to params.
func (*ServerInterfaceWrapper) UpdateOrganization ¶
func (w *ServerInterfaceWrapper) UpdateOrganization(ctx echo.Context) error
UpdateOrganization converts echo context to params.
func (*ServerInterfaceWrapper) UpdateProject ¶
func (w *ServerInterfaceWrapper) UpdateProject(ctx echo.Context) error
UpdateProject converts echo context to params.
type UpdateOrganizationJSONBody ¶
type UpdateOrganizationJSONBody struct {
Description *string `json:"description,omitempty"`
}
UpdateOrganizationJSONBody defines parameters for UpdateOrganization.
type UpdateOrganizationJSONRequestBody ¶
type UpdateOrganizationJSONRequestBody UpdateOrganizationJSONBody
UpdateOrganizationJSONRequestBody defines body for UpdateOrganization for application/json ContentType.
type UpdateProjectJSONBody ¶
type UpdateProjectJSONBody struct {
Description *string `json:"description,omitempty"`
}
UpdateProjectJSONBody defines parameters for UpdateProject.
type UpdateProjectJSONRequestBody ¶
type UpdateProjectJSONRequestBody UpdateProjectJSONBody
UpdateProjectJSONRequestBody defines body for UpdateProject for application/json ContentType.