Documentation
¶
Overview ¶
Package api 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 ConfigureProxy(logger zerolog.Logger, e *echo.Echo, nodeAddress *url.URL)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type CreateIdentityJSONBody
- type CreateIdentityJSONRequestBody
- type EchoRouter
- type GetIssuedCredentialsParams
- type Identity
- type IdentityDetails
- type ServerInterface
- type ServerInterfaceWrapper
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureProxy ¶
ConfigureProxy configures the proxy middleware for the given Nuts node address. It allows the web application to call a curated list of endpoints on the Nuts node.
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 CreateIdentityJSONBody ¶
type CreateIdentityJSONBody struct {
Subject *string `json:"subject,omitempty"`
}
CreateIdentityJSONBody defines parameters for CreateIdentity.
type CreateIdentityJSONRequestBody ¶
type CreateIdentityJSONRequestBody CreateIdentityJSONBody
CreateIdentityJSONRequestBody defines body for CreateIdentity for application/json ContentType.
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 GetIssuedCredentialsParams ¶
type GetIssuedCredentialsParams struct {
// CredentialTypes A comma-separated list of credential types which are returned.
CredentialTypes string `form:"credentialTypes" json:"credentialTypes"`
}
GetIssuedCredentialsParams defines parameters for GetIssuedCredentials.
type Identity ¶
type Identity struct {
// Did The DID associated with this identity
Did []string `json:"did"`
// Subject Identifier the Nuts node uses to refer to this identity.
Subject string `json:"subject"`
}
Identity An identity object
type IdentityDetails ¶
type IdentityDetails struct {
Did string `json:"did"`
DiscoveryServices []struct {
Active bool `json:"active"`
Id string `json:"id"`
Vp *map[string]interface{} `json:"vp,omitempty"`
} `json:"discovery_services"`
Name string `json:"name"`
WalletCredentials []map[string]interface{} `json:"wallet_credentials"`
}
IdentityDetails An identity object with additional details
type ServerInterface ¶
type ServerInterface interface {
// (GET /api/id)
GetIdentities(ctx echo.Context) error
// (POST /api/id)
CreateIdentity(ctx echo.Context) error
// (GET /api/id/{did})
GetIdentity(ctx echo.Context, did string) error
// (GET /api/issuer/vc)
GetIssuedCredentials(ctx echo.Context, params GetIssuedCredentialsParams) error
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) CreateIdentity ¶
func (w *ServerInterfaceWrapper) CreateIdentity(ctx echo.Context) error
CreateIdentity converts echo context to params.
func (*ServerInterfaceWrapper) GetIdentities ¶
func (w *ServerInterfaceWrapper) GetIdentities(ctx echo.Context) error
GetIdentities converts echo context to params.
func (*ServerInterfaceWrapper) GetIdentity ¶
func (w *ServerInterfaceWrapper) GetIdentity(ctx echo.Context) error
GetIdentity converts echo context to params.
func (*ServerInterfaceWrapper) GetIssuedCredentials ¶
func (w *ServerInterfaceWrapper) GetIssuedCredentials(ctx echo.Context) error
GetIssuedCredentials converts echo context to params.