Documentation
¶
Overview ¶
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.4 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 BranchPreview
- type CommitPreview
- type EchoRouter
- type Error
- type ErrorJSONResponse
- type FileDiff
- type GetRepoBranches200JSONResponse
- type GetRepoBranches400JSONResponse
- type GetRepoBranchesBranchCommits200JSONResponse
- type GetRepoBranchesBranchCommitsRequestObject
- type GetRepoBranchesBranchCommitsResponseObject
- type GetRepoBranchesRequestObject
- type GetRepoBranchesResponseObject
- type GetRepoDiffMap200JSONResponse
- type GetRepoDiffMap400JSONResponse
- type GetRepoDiffMapParams
- type GetRepoDiffMapRequestObject
- type GetRepoDiffMapResponseObject
- type GetRepoDiffPart200JSONResponse
- type GetRepoDiffPart400JSONResponse
- type GetRepoDiffPartParams
- type GetRepoDiffPartRequestObject
- type GetRepoDiffPartResponseObject
- type GetRepoFile200JSONResponse
- type GetRepoFile400JSONResponse
- type GetRepoFileParams
- type GetRepoFileRequestObject
- type GetRepoFileResponseObject
- type LineDiff
- type LineDiffOperation
- type LineState
- type Range
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) GetRepoBranches(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetRepoBranchesBranchCommits(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetRepoDiffMap(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetRepoDiffPart(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetRepoFile(ctx echo.Context) error
- type State
- type Status
- type StatusType
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
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 BranchPreview ¶
type BranchPreview struct {
Name string `json:"name"`
}
BranchPreview defines model for BranchPreview.
type CommitPreview ¶
CommitPreview defines model for CommitPreview.
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 ErrorJSONResponse ¶
type ErrorJSONResponse Error
type FileDiff ¶
type FileDiff struct { Dst State `json:"dst"` IsBinary bool `json:"isBinary"` Lines Range `json:"lines"` Src State `json:"src"` Status Status `json:"status"` }
FileDiff defines model for FileDiff.
type GetRepoBranches200JSONResponse ¶
type GetRepoBranches200JSONResponse []BranchPreview
func (GetRepoBranches200JSONResponse) VisitGetRepoBranchesResponse ¶
func (response GetRepoBranches200JSONResponse) VisitGetRepoBranchesResponse(w http.ResponseWriter) error
type GetRepoBranches400JSONResponse ¶
type GetRepoBranches400JSONResponse struct{ ErrorJSONResponse }
func (GetRepoBranches400JSONResponse) VisitGetRepoBranchesResponse ¶
func (response GetRepoBranches400JSONResponse) VisitGetRepoBranchesResponse(w http.ResponseWriter) error
type GetRepoBranchesBranchCommits200JSONResponse ¶
type GetRepoBranchesBranchCommits200JSONResponse []CommitPreview
func (GetRepoBranchesBranchCommits200JSONResponse) VisitGetRepoBranchesBranchCommitsResponse ¶
func (response GetRepoBranchesBranchCommits200JSONResponse) VisitGetRepoBranchesBranchCommitsResponse(w http.ResponseWriter) error
type GetRepoBranchesBranchCommitsRequestObject ¶
type GetRepoBranchesBranchCommitsRequestObject struct {
Branch string `json:"branch"`
}
type GetRepoBranchesBranchCommitsResponseObject ¶
type GetRepoBranchesBranchCommitsResponseObject interface {
VisitGetRepoBranchesBranchCommitsResponse(w http.ResponseWriter) error
}
type GetRepoBranchesRequestObject ¶
type GetRepoBranchesRequestObject struct { }
type GetRepoBranchesResponseObject ¶
type GetRepoBranchesResponseObject interface {
VisitGetRepoBranchesResponse(w http.ResponseWriter) error
}
type GetRepoDiffMap200JSONResponse ¶
type GetRepoDiffMap200JSONResponse struct { Files []FileDiff `json:"files"` LinesTotal int `json:"linesTotal"` }
func (GetRepoDiffMap200JSONResponse) VisitGetRepoDiffMapResponse ¶
func (response GetRepoDiffMap200JSONResponse) VisitGetRepoDiffMapResponse(w http.ResponseWriter) error
type GetRepoDiffMap400JSONResponse ¶
type GetRepoDiffMap400JSONResponse struct{ ErrorJSONResponse }
func (GetRepoDiffMap400JSONResponse) VisitGetRepoDiffMapResponse ¶
func (response GetRepoDiffMap400JSONResponse) VisitGetRepoDiffMapResponse(w http.ResponseWriter) error
type GetRepoDiffMapParams ¶
type GetRepoDiffMapParams struct { // A First commit A string `form:"a" json:"a"` // B Second commit B string `form:"b" json:"b"` }
GetRepoDiffMapParams defines parameters for GetRepoDiffMap.
type GetRepoDiffMapRequestObject ¶
type GetRepoDiffMapRequestObject struct {
Params GetRepoDiffMapParams
}
type GetRepoDiffMapResponseObject ¶
type GetRepoDiffMapResponseObject interface {
VisitGetRepoDiffMapResponse(w http.ResponseWriter) error
}
type GetRepoDiffPart200JSONResponse ¶
type GetRepoDiffPart200JSONResponse []LineDiff
func (GetRepoDiffPart200JSONResponse) VisitGetRepoDiffPartResponse ¶
func (response GetRepoDiffPart200JSONResponse) VisitGetRepoDiffPartResponse(w http.ResponseWriter) error
type GetRepoDiffPart400JSONResponse ¶
type GetRepoDiffPart400JSONResponse struct{ ErrorJSONResponse }
func (GetRepoDiffPart400JSONResponse) VisitGetRepoDiffPartResponse ¶
func (response GetRepoDiffPart400JSONResponse) VisitGetRepoDiffPartResponse(w http.ResponseWriter) error
type GetRepoDiffPartParams ¶
type GetRepoDiffPartParams struct { // A First commit A string `form:"a" json:"a"` // B Second commit B string `form:"b" json:"b"` // Start Start line of the diff Start int `form:"start" json:"start"` // End End line for the diff End int `form:"end" json:"end"` }
GetRepoDiffPartParams defines parameters for GetRepoDiffPart.
type GetRepoDiffPartRequestObject ¶
type GetRepoDiffPartRequestObject struct {
Params GetRepoDiffPartParams
}
type GetRepoDiffPartResponseObject ¶
type GetRepoDiffPartResponseObject interface {
VisitGetRepoDiffPartResponse(w http.ResponseWriter) error
}
type GetRepoFile200JSONResponse ¶
type GetRepoFile200JSONResponse []string
func (GetRepoFile200JSONResponse) VisitGetRepoFileResponse ¶
func (response GetRepoFile200JSONResponse) VisitGetRepoFileResponse(w http.ResponseWriter) error
type GetRepoFile400JSONResponse ¶
type GetRepoFile400JSONResponse struct{ ErrorJSONResponse }
func (GetRepoFile400JSONResponse) VisitGetRepoFileResponse ¶
func (response GetRepoFile400JSONResponse) VisitGetRepoFileResponse(w http.ResponseWriter) error
type GetRepoFileParams ¶
type GetRepoFileParams struct { // Revision Revision of the file Revision *string `form:"revision,omitempty" json:"revision,omitempty"` // Path Path to the file Path string `form:"path" json:"path"` // Start Start line number. Defaults to 0 if omitted. Using a value that is out of bounds will be rounded to the closest bound. Start *int `form:"start,omitempty" json:"start,omitempty"` // End End line number. Defaults to the last line of the file if omitted. Using a value that is out of bounds will be rounded to the closest bound. End *int `form:"end,omitempty" json:"end,omitempty"` }
GetRepoFileParams defines parameters for GetRepoFile.
type GetRepoFileRequestObject ¶
type GetRepoFileRequestObject struct {
Params GetRepoFileParams
}
type GetRepoFileResponseObject ¶
type GetRepoFileResponseObject interface {
VisitGetRepoFileResponse(w http.ResponseWriter) error
}
type LineDiff ¶
type LineDiff struct { Dst LineState `json:"dst"` Operation LineDiffOperation `json:"operation"` Src LineState `json:"src"` }
LineDiff defines model for LineDiff.
type LineDiffOperation ¶
type LineDiffOperation string
LineDiffOperation defines model for LineDiff.Operation.
const ( LineDiffOperationA LineDiffOperation = "A" LineDiffOperationD LineDiffOperation = "D" LineDiffOperationM LineDiffOperation = "M" )
Defines values for LineDiffOperation.
type ServerInterface ¶
type ServerInterface interface { // Get repo branches // (GET /repo/branches) GetRepoBranches(ctx echo.Context) error // Get branch commits // (GET /repo/branches/{branch}/commits) GetRepoBranchesBranchCommits(ctx echo.Context, branch string) error // Calculate the difference between 'a' and 'b' for mapping. // (GET /repo/diff/map) GetRepoDiffMap(ctx echo.Context, params GetRepoDiffMapParams) error // Get information about partial diff between a and b for given startline and endline // (GET /repo/diff/part) GetRepoDiffPart(ctx echo.Context, params GetRepoDiffPartParams) error // Get file contents // (GET /repo/file) GetRepoFile(ctx echo.Context, params GetRepoFileParams) error }
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) GetRepoBranches ¶
func (w *ServerInterfaceWrapper) GetRepoBranches(ctx echo.Context) error
GetRepoBranches converts echo context to params.
func (*ServerInterfaceWrapper) GetRepoBranchesBranchCommits ¶
func (w *ServerInterfaceWrapper) GetRepoBranchesBranchCommits(ctx echo.Context) error
GetRepoBranchesBranchCommits converts echo context to params.
func (*ServerInterfaceWrapper) GetRepoDiffMap ¶
func (w *ServerInterfaceWrapper) GetRepoDiffMap(ctx echo.Context) error
GetRepoDiffMap converts echo context to params.
func (*ServerInterfaceWrapper) GetRepoDiffPart ¶
func (w *ServerInterfaceWrapper) GetRepoDiffPart(ctx echo.Context) error
GetRepoDiffPart converts echo context to params.
func (*ServerInterfaceWrapper) GetRepoFile ¶
func (w *ServerInterfaceWrapper) GetRepoFile(ctx echo.Context) error
GetRepoFile converts echo context to params.
type Status ¶
type Status struct { Score *int `json:"score,omitempty"` Type StatusType `json:"type"` }
Status defines model for Status.
type StatusType ¶
type StatusType string
StatusType defines model for Status.Type.
const ( StatusTypeA StatusType = "A" StatusTypeC StatusType = "C" StatusTypeD StatusType = "D" StatusTypeM StatusType = "M" StatusTypeR StatusType = "R" StatusTypeT StatusType = "T" StatusTypeU StatusType = "U" StatusTypeX StatusType = "X" )
Defines values for StatusType.
type StrictHandlerFunc ¶
type StrictHandlerFunc = runtime.StrictEchoHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = runtime.StrictEchoMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface { // Get repo branches // (GET /repo/branches) GetRepoBranches(ctx context.Context, request GetRepoBranchesRequestObject) (GetRepoBranchesResponseObject, error) // Get branch commits // (GET /repo/branches/{branch}/commits) GetRepoBranchesBranchCommits(ctx context.Context, request GetRepoBranchesBranchCommitsRequestObject) (GetRepoBranchesBranchCommitsResponseObject, error) // Calculate the difference between 'a' and 'b' for mapping. // (GET /repo/diff/map) GetRepoDiffMap(ctx context.Context, request GetRepoDiffMapRequestObject) (GetRepoDiffMapResponseObject, error) // Get information about partial diff between a and b for given startline and endline // (GET /repo/diff/part) GetRepoDiffPart(ctx context.Context, request GetRepoDiffPartRequestObject) (GetRepoDiffPartResponseObject, error) // Get file contents // (GET /repo/file) GetRepoFile(ctx context.Context, request GetRepoFileRequestObject) (GetRepoFileResponseObject, error) }
StrictServerInterface represents all server handlers.