Documentation ¶
Overview ¶
Package api 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 ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router *gin.Engine, si ServerInterface) *gin.Engine
- func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine
- type GinServerOptions
- type MiddlewareFunc
- type PostAzureJSONBody
- type PostAzureJSONRequestBody
- type PostBitbucketJSONBody
- type PostBitbucketJSONRequestBody
- type PostGiteaJSONBody
- type PostGiteaJSONRequestBody
- type PostGithubJSONBody
- type PostGithubJSONRequestBody
- type PostGitlabJSONBody
- type PostGitlabJSONRequestBody
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) GetApiDocs(c *gin.Context)
- func (siw *ServerInterfaceWrapper) GetLiveness(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostAzure(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostBitbucket(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostGitea(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostGithub(c *gin.Context)
- func (siw *ServerInterfaceWrapper) PostGitlab(c *gin.Context)
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.Engine, si ServerInterface) *gin.Engine
RegisterHandlers creates http.Handler with routing matching OpenAPI spec.
func RegisterHandlersWithOptions ¶
func RegisterHandlersWithOptions(router *gin.Engine, si ServerInterface, options GinServerOptions) *gin.Engine
RegisterHandlersWithOptions creates http.Handler with additional options
Types ¶
type GinServerOptions ¶
type GinServerOptions struct { BaseURL string Middlewares []MiddlewareFunc ErrorHandler func(*gin.Context, error, int) }
GinServerOptions provides options for the Gin server.
type MiddlewareFunc ¶
type PostAzureJSONBody ¶
type PostAzureJSONBody = map[string]interface{}
PostAzureJSONBody defines parameters for PostAzure.
type PostAzureJSONRequestBody ¶
type PostAzureJSONRequestBody = PostAzureJSONBody
PostAzureJSONRequestBody defines body for PostAzure for application/json ContentType.
type PostBitbucketJSONBody ¶
type PostBitbucketJSONBody = map[string]interface{}
PostBitbucketJSONBody defines parameters for PostBitbucket.
type PostBitbucketJSONRequestBody ¶
type PostBitbucketJSONRequestBody = PostBitbucketJSONBody
PostBitbucketJSONRequestBody defines body for PostBitbucket for application/json ContentType.
type PostGiteaJSONBody ¶
type PostGiteaJSONBody = map[string]interface{}
PostGiteaJSONBody defines parameters for PostGitea.
type PostGiteaJSONRequestBody ¶
type PostGiteaJSONRequestBody = PostGiteaJSONBody
PostGiteaJSONRequestBody defines body for PostGitea for application/json ContentType.
type PostGithubJSONBody ¶
type PostGithubJSONBody = map[string]interface{}
PostGithubJSONBody defines parameters for PostGithub.
type PostGithubJSONRequestBody ¶
type PostGithubJSONRequestBody = PostGithubJSONBody
PostGithubJSONRequestBody defines body for PostGithub for application/json ContentType.
type PostGitlabJSONBody ¶
type PostGitlabJSONBody = map[string]interface{}
PostGitlabJSONBody defines parameters for PostGitlab.
type PostGitlabJSONRequestBody ¶
type PostGitlabJSONRequestBody = PostGitlabJSONBody
PostGitlabJSONRequestBody defines body for PostGitlab for application/json ContentType.
type ServerInterface ¶
type ServerInterface interface { // List of APIs provided by the service // (GET /api-docs) GetApiDocs(c *gin.Context) // Handle Azure webhooks post requests // (POST /azure) PostAzure(c *gin.Context) // Handle Bitbucket webhooks post requests // (POST /bitbucket) PostBitbucket(c *gin.Context) // Handle Gitea webhooks post requests // (POST /gitea) PostGitea(c *gin.Context) // Handle Github webhooks post requests // (POST /github) PostGithub(c *gin.Context) // Handle Gitlab webhooks post requests // (POST /gitlab) PostGitlab(c *gin.Context) // Kubernetes readiness and liveness probe endpoint // (GET /liveness) GetLiveness(c *gin.Context) }
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) GetLiveness ¶
func (siw *ServerInterfaceWrapper) GetLiveness(c *gin.Context)
GetLiveness operation middleware
func (*ServerInterfaceWrapper) PostAzure ¶
func (siw *ServerInterfaceWrapper) PostAzure(c *gin.Context)
PostAzure operation middleware
func (*ServerInterfaceWrapper) PostBitbucket ¶
func (siw *ServerInterfaceWrapper) PostBitbucket(c *gin.Context)
PostBitbucket operation middleware
func (*ServerInterfaceWrapper) PostGitea ¶
func (siw *ServerInterfaceWrapper) PostGitea(c *gin.Context)
PostGitea operation middleware
func (*ServerInterfaceWrapper) PostGithub ¶
func (siw *ServerInterfaceWrapper) PostGithub(c *gin.Context)
PostGithub operation middleware
func (*ServerInterfaceWrapper) PostGitlab ¶
func (siw *ServerInterfaceWrapper) PostGitlab(c *gin.Context)
PostGitlab operation middleware