v1

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

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 CreateOAuthApplication201JSONResponse

type CreateOAuthApplication201JSONResponse OAuthApplication

func (CreateOAuthApplication201JSONResponse) VisitCreateOAuthApplicationResponse

func (response CreateOAuthApplication201JSONResponse) VisitCreateOAuthApplicationResponse(w http.ResponseWriter) error

type CreateOAuthApplication400JSONResponse

type CreateOAuthApplication400JSONResponse Error

func (CreateOAuthApplication400JSONResponse) VisitCreateOAuthApplicationResponse

func (response CreateOAuthApplication400JSONResponse) VisitCreateOAuthApplicationResponse(w http.ResponseWriter) error

type CreateOAuthApplication500JSONResponse

type CreateOAuthApplication500JSONResponse Error

func (CreateOAuthApplication500JSONResponse) VisitCreateOAuthApplicationResponse

func (response CreateOAuthApplication500JSONResponse) VisitCreateOAuthApplicationResponse(w http.ResponseWriter) error

type CreateOAuthApplicationJSONBody

type CreateOAuthApplicationJSONBody struct {
	Id string `json:"id"`
}

CreateOAuthApplicationJSONBody defines parameters for CreateOAuthApplication.

type CreateOAuthApplicationJSONRequestBody

type CreateOAuthApplicationJSONRequestBody CreateOAuthApplicationJSONBody

CreateOAuthApplicationJSONRequestBody defines body for CreateOAuthApplication for application/json ContentType.

type CreateOAuthApplicationParams

type CreateOAuthApplicationParams struct {
	// Token Token of origin user invoking the request.
	Token *string `json:"token,omitempty"`
}

CreateOAuthApplicationParams defines parameters for CreateOAuthApplication.

type CreateOAuthApplicationRequestObject

type CreateOAuthApplicationRequestObject struct {
	Params CreateOAuthApplicationParams
	Body   *CreateOAuthApplicationJSONRequestBody
}

type CreateOAuthApplicationResponseObject

type CreateOAuthApplicationResponseObject interface {
	VisitCreateOAuthApplicationResponse(w http.ResponseWriter) error
}

type DeleteOAuthApplication204Response

type DeleteOAuthApplication204Response struct {
}

func (DeleteOAuthApplication204Response) VisitDeleteOAuthApplicationResponse

func (response DeleteOAuthApplication204Response) VisitDeleteOAuthApplicationResponse(w http.ResponseWriter) error

type DeleteOAuthApplication404JSONResponse

type DeleteOAuthApplication404JSONResponse Error

func (DeleteOAuthApplication404JSONResponse) VisitDeleteOAuthApplicationResponse

func (response DeleteOAuthApplication404JSONResponse) VisitDeleteOAuthApplicationResponse(w http.ResponseWriter) error

type DeleteOAuthApplication500JSONResponse

type DeleteOAuthApplication500JSONResponse Error

func (DeleteOAuthApplication500JSONResponse) VisitDeleteOAuthApplicationResponse

func (response DeleteOAuthApplication500JSONResponse) VisitDeleteOAuthApplicationResponse(w http.ResponseWriter) error

type DeleteOAuthApplicationParams

type DeleteOAuthApplicationParams struct {
	// Token Token of origin user invoking the request.
	Token *string `json:"token,omitempty"`
}

DeleteOAuthApplicationParams defines parameters for DeleteOAuthApplication.

type DeleteOAuthApplicationRequestObject

type DeleteOAuthApplicationRequestObject struct {
	Id     string `json:"id"`
	Params DeleteOAuthApplicationParams
}

type DeleteOAuthApplicationResponseObject

type DeleteOAuthApplicationResponseObject interface {
	VisitDeleteOAuthApplicationResponse(w http.ResponseWriter) error
}

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 Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Reason  string `json:"reason"`
}

Error defines model for Error.

type OAuthApplication

type OAuthApplication struct {
	ClientId     string  `json:"clientId"`
	ClientName   *string `json:"clientName,omitempty"`
	ClientSecret string  `json:"clientSecret"`
}

OAuthApplication defines model for OAuthApplication.

type ServerInterface

type ServerInterface interface {
	// Creates an application of type oauth2.
	// (POST /applications)
	CreateOAuthApplication(ctx echo.Context, params CreateOAuthApplicationParams) error
	// Deletes an application in the OpenID Connect Provider.
	// (DELETE /applications/{id})
	DeleteOAuthApplication(ctx echo.Context, id string, params DeleteOAuthApplicationParams) 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) CreateOAuthApplication

func (w *ServerInterfaceWrapper) CreateOAuthApplication(ctx echo.Context) error

CreateOAuthApplication converts echo context to params.

func (*ServerInterfaceWrapper) DeleteOAuthApplication

func (w *ServerInterfaceWrapper) DeleteOAuthApplication(ctx echo.Context) error

DeleteOAuthApplication converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Creates an application of type oauth2.
	// (POST /applications)
	CreateOAuthApplication(ctx context.Context, request CreateOAuthApplicationRequestObject) (CreateOAuthApplicationResponseObject, error)
	// Deletes an application in the OpenID Connect Provider.
	// (DELETE /applications/{id})
	DeleteOAuthApplication(ctx context.Context, request DeleteOAuthApplicationRequestObject) (DeleteOAuthApplicationResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL