Documentation
¶
Overview ¶
Package pip provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.
Index ¶
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type CreateData204Response
- type CreateDataJSONRequestBody
- type CreateDataRequestObject
- type CreateDataResponseObject
- type Data
- type DeleteData204Response
- type DeleteDataRequestObject
- type DeleteDataResponseObject
- type EchoRouter
- type GetData200JSONResponse
- type GetDataRequestObject
- type GetDataResponseObject
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type Wrapper
- func (w Wrapper) CreateData(_ context.Context, request CreateDataRequestObject) (CreateDataResponseObject, error)
- func (w Wrapper) DeleteData(ctx context.Context, request DeleteDataRequestObject) (DeleteDataResponseObject, error)
- func (w Wrapper) GetData(ctx context.Context, request GetDataRequestObject) (GetDataResponseObject, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 CreateData204Response ¶
type CreateData204Response struct {
}
func (CreateData204Response) VisitCreateDataResponse ¶
func (response CreateData204Response) VisitCreateDataResponse(w http.ResponseWriter) error
type CreateDataJSONRequestBody ¶
type CreateDataJSONRequestBody = Data
CreateDataJSONRequestBody defines body for CreateData for application/json ContentType.
type CreateDataRequestObject ¶
type CreateDataRequestObject struct {
Id string `json:"id"`
Body *CreateDataJSONRequestBody
}
type CreateDataResponseObject ¶
type CreateDataResponseObject interface {
VisitCreateDataResponse(w http.ResponseWriter) error
}
type Data ¶
type Data struct {
// AuthInput Data used in OPA script
AuthInput map[string]interface{} `json:"auth_input"`
// ClientId client DID (for now)
ClientId string `json:"client_id"`
// Scope The scope. Corresponds to the auth scopes
Scope string `json:"scope"`
// VerifierId verifier DID (for now)
VerifierId string `json:"verifier_id"`
}
Data defines model for Data.
type DeleteData204Response ¶
type DeleteData204Response struct {
}
func (DeleteData204Response) VisitDeleteDataResponse ¶
func (response DeleteData204Response) VisitDeleteDataResponse(w http.ResponseWriter) error
type DeleteDataRequestObject ¶
type DeleteDataRequestObject struct {
Id string `json:"id"`
}
type DeleteDataResponseObject ¶
type DeleteDataResponseObject interface {
VisitDeleteDataResponse(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 GetData200JSONResponse ¶
type GetData200JSONResponse Data
func (GetData200JSONResponse) VisitGetDataResponse ¶
func (response GetData200JSONResponse) VisitGetDataResponse(w http.ResponseWriter) error
type GetDataRequestObject ¶
type GetDataRequestObject struct {
Id string `json:"id"`
}
type GetDataResponseObject ¶
type GetDataResponseObject interface {
VisitGetDataResponse(w http.ResponseWriter) error
}
type ServerInterface ¶
type ServerInterface interface {
// Delete data for given id
// (DELETE /pip/{id})
DeleteData(ctx echo.Context, id string) error
// Get pip data for given ide
// (GET /pip/{id})
GetData(ctx echo.Context, id string) error
// Add authorization data used for OPA evaluation
// (POST /pip/{id})
CreateData(ctx echo.Context, id string) 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) CreateData ¶
func (w *ServerInterfaceWrapper) CreateData(ctx echo.Context) error
CreateData converts echo context to params.
func (*ServerInterfaceWrapper) DeleteData ¶
func (w *ServerInterfaceWrapper) DeleteData(ctx echo.Context) error
DeleteData converts echo context to params.
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Delete data for given id
// (DELETE /pip/{id})
DeleteData(ctx context.Context, request DeleteDataRequestObject) (DeleteDataResponseObject, error)
// Get pip data for given ide
// (GET /pip/{id})
GetData(ctx context.Context, request GetDataRequestObject) (GetDataResponseObject, error)
// Add authorization data used for OPA evaluation
// (POST /pip/{id})
CreateData(ctx context.Context, request CreateDataRequestObject) (CreateDataResponseObject, error)
}
StrictServerInterface represents all server handlers.
type Wrapper ¶
func (Wrapper) CreateData ¶
func (w Wrapper) CreateData(_ context.Context, request CreateDataRequestObject) (CreateDataResponseObject, error)
func (Wrapper) DeleteData ¶
func (w Wrapper) DeleteData(ctx context.Context, request DeleteDataRequestObject) (DeleteDataResponseObject, error)
func (Wrapper) GetData ¶
func (w Wrapper) GetData(ctx context.Context, request GetDataRequestObject) (GetDataResponseObject, error)