Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router gin.IRouter, si ServerInterface)
- func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
- type Attributes
- type ContainerRegistry
- type ContainerRegistryResponse
- type GinServerOptions
- type GitProject
- type GitProjectResponse
- type MiddlewareFunc
- type ServerInterface
- type ServerInterfaceWrapper
- type Status
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 gin.IRouter, si ServerInterface)
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type ContainerRegistry ¶
type ContainerRegistry struct { Id string `json:"id"` RegistryAttributes Attributes `json:"registryAttributes"` RegistryType string `json:"registryType"` RegistryUrl string `json:"registryUrl"` }
ContainerRegistry defines model for ContainerRegistry.
type ContainerRegistryResponse ¶
type ContainerRegistryResponse struct { Registry *ContainerRegistry `json:"registry,omitempty"` Status Status `json:"status"` StatusMessage string `json:"statusMessage"` }
ContainerRegistryResponse defines model for ContainerRegistryResponse.
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type GitProject ¶
type GitProject struct { AccessToken string `json:"accessToken"` Id string `json:"id"` ProjectUrl string `json:"projectUrl"` Username string `json:"username"` }
GitProject defines model for GitProject.
type GitProjectResponse ¶
type GitProjectResponse struct { Project GitProject `json:"project"` Status Status `json:"status"` StatusMessage string `json:"statusMessage"` }
GitProjectResponse defines model for GitProjectResponse.
type MiddlewareFunc ¶
type ServerInterface ¶
type ServerInterface interface { // List of APIs provided by the service // (GET /api-docs) GetApiDocs(c *gin.Context) // Get container Registry by ID // (GET /containerregistry/{id}) GetContainerRegistryById(c *gin.Context, id string) // Get git project details by ID // (GET /gitproject/{id}) GetGitProjectById(c *gin.Context, id string) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) GetApiDocs ¶
func (siw *ServerInterfaceWrapper) GetApiDocs(c *gin.Context)
GetApiDocs operation middleware
func (*ServerInterfaceWrapper) GetContainerRegistryById ¶
func (siw *ServerInterfaceWrapper) GetContainerRegistryById(c *gin.Context)
GetContainerRegistryById operation middleware
func (*ServerInterfaceWrapper) GetGitProjectById ¶
func (siw *ServerInterfaceWrapper) GetGitProjectById(c *gin.Context)
GetGitProjectById operation middleware