v1

package
v6.2.12 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	JwtBearerAuthScopes = "jwtBearerAuth.Scopes"
)

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 ActivateServiceForSubject200Response

type ActivateServiceForSubject200Response struct {
}

func (ActivateServiceForSubject200Response) VisitActivateServiceForSubjectResponse

func (response ActivateServiceForSubject200Response) VisitActivateServiceForSubjectResponse(w http.ResponseWriter) error

type ActivateServiceForSubjectJSONRequestBody

type ActivateServiceForSubjectJSONRequestBody = ServiceActivationRequest

ActivateServiceForSubjectJSONRequestBody defines body for ActivateServiceForSubject for application/json ContentType.

type ActivateServiceForSubjectRequestObject

type ActivateServiceForSubjectRequestObject struct {
	ServiceID string `json:"serviceID"`
	SubjectID string `json:"subjectID"`
	Body      *ActivateServiceForSubjectJSONRequestBody
}

type ActivateServiceForSubjectResponseObject

type ActivateServiceForSubjectResponseObject interface {
	VisitActivateServiceForSubjectResponse(w http.ResponseWriter) error
}

type ActivateServiceForSubjectdefaultApplicationProblemPlusJSONResponse

type ActivateServiceForSubjectdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (ActivateServiceForSubjectdefaultApplicationProblemPlusJSONResponse) VisitActivateServiceForSubjectResponse

func (response ActivateServiceForSubjectdefaultApplicationProblemPlusJSONResponse) VisitActivateServiceForSubjectResponse(w http.ResponseWriter) error

type DeactivateServiceForSubject200Response

type DeactivateServiceForSubject200Response struct {
}

func (DeactivateServiceForSubject200Response) VisitDeactivateServiceForSubjectResponse

func (response DeactivateServiceForSubject200Response) VisitDeactivateServiceForSubjectResponse(w http.ResponseWriter) error

type DeactivateServiceForSubject202JSONResponse

type DeactivateServiceForSubject202JSONResponse struct {
	// Reason Description of why removal of the registration failed.
	Reason string `json:"reason"`
}

func (DeactivateServiceForSubject202JSONResponse) VisitDeactivateServiceForSubjectResponse

func (response DeactivateServiceForSubject202JSONResponse) VisitDeactivateServiceForSubjectResponse(w http.ResponseWriter) error

type DeactivateServiceForSubjectRequestObject

type DeactivateServiceForSubjectRequestObject struct {
	ServiceID string `json:"serviceID"`
	SubjectID string `json:"subjectID"`
}

type DeactivateServiceForSubjectResponseObject

type DeactivateServiceForSubjectResponseObject interface {
	VisitDeactivateServiceForSubjectResponse(w http.ResponseWriter) error
}

type DeactivateServiceForSubjectdefaultApplicationProblemPlusJSONResponse

type DeactivateServiceForSubjectdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (DeactivateServiceForSubjectdefaultApplicationProblemPlusJSONResponse) VisitDeactivateServiceForSubjectResponse

func (response DeactivateServiceForSubjectdefaultApplicationProblemPlusJSONResponse) VisitDeactivateServiceForSubjectResponse(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 GetServiceActivation200JSONResponse

type GetServiceActivation200JSONResponse struct {
	// Activated Whether the Discovery Service is activated for the given subject
	Activated bool `json:"activated"`

	// Error Error message if status is "error".
	Error *string `json:"error,omitempty"`

	// Status Status of the activation. "active" or "error".
	Status *GetServiceActivation200JSONResponseStatus `json:"status,omitempty"`

	// Vp List of VPs on the Discovery Service for the subject. One per DID method registered on the Service.
	// The list is empty when status is "error".
	Vp *[]VerifiablePresentation `json:"vp,omitempty"`
}

func (GetServiceActivation200JSONResponse) VisitGetServiceActivationResponse

func (response GetServiceActivation200JSONResponse) VisitGetServiceActivationResponse(w http.ResponseWriter) error

type GetServiceActivation200JSONResponseStatus

type GetServiceActivation200JSONResponseStatus string

GetServiceActivation200JSONResponseStatus is a type alias for string, generated from an enum.

const (
	// ServiceStatusActive is the status for an active service.
	ServiceStatusActive GetServiceActivation200JSONResponseStatus = "active"
	// ServiceStatusError is the status for an inactive service.
	ServiceStatusError GetServiceActivation200JSONResponseStatus = "error"
)

type GetServiceActivationRequestObject

type GetServiceActivationRequestObject struct {
	ServiceID string `json:"serviceID"`
	SubjectID string `json:"subjectID"`
}

type GetServiceActivationResponseObject

type GetServiceActivationResponseObject interface {
	VisitGetServiceActivationResponse(w http.ResponseWriter) error
}

type GetServiceActivationdefaultApplicationProblemPlusJSONResponse

type GetServiceActivationdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (GetServiceActivationdefaultApplicationProblemPlusJSONResponse) VisitGetServiceActivationResponse

func (response GetServiceActivationdefaultApplicationProblemPlusJSONResponse) VisitGetServiceActivationResponse(w http.ResponseWriter) error

type GetServices200JSONResponse

type GetServices200JSONResponse []ServiceDefinition

func (GetServices200JSONResponse) VisitGetServicesResponse

func (response GetServices200JSONResponse) VisitGetServicesResponse(w http.ResponseWriter) error

type GetServicesRequestObject

type GetServicesRequestObject struct {
}

type GetServicesResponseObject

type GetServicesResponseObject interface {
	VisitGetServicesResponse(w http.ResponseWriter) error
}

type GetServicesdefaultApplicationProblemPlusJSONResponse

type GetServicesdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (GetServicesdefaultApplicationProblemPlusJSONResponse) VisitGetServicesResponse

type SearchPresentations200JSONResponse

type SearchPresentations200JSONResponse []SearchResult

func (SearchPresentations200JSONResponse) VisitSearchPresentationsResponse

func (response SearchPresentations200JSONResponse) VisitSearchPresentationsResponse(w http.ResponseWriter) error

type SearchPresentationsParams

type SearchPresentationsParams struct {
	Query *map[string]string `form:"query,omitempty" json:"query,omitempty"`
}

SearchPresentationsParams defines parameters for SearchPresentations.

type SearchPresentationsRequestObject

type SearchPresentationsRequestObject struct {
	ServiceID string `json:"serviceID"`
	Params    SearchPresentationsParams
}

type SearchPresentationsResponseObject

type SearchPresentationsResponseObject interface {
	VisitSearchPresentationsResponse(w http.ResponseWriter) error
}

type SearchPresentationsdefaultApplicationProblemPlusJSONResponse

type SearchPresentationsdefaultApplicationProblemPlusJSONResponse struct {
	Body struct {
		// Detail A human-readable explanation specific to this occurrence of the problem.
		Detail string `json:"detail"`

		// Status HTTP statuscode
		Status float32 `json:"status"`

		// Title A short, human-readable summary of the problem type.
		Title string `json:"title"`
	}
	StatusCode int
}

func (SearchPresentationsdefaultApplicationProblemPlusJSONResponse) VisitSearchPresentationsResponse

func (response SearchPresentationsdefaultApplicationProblemPlusJSONResponse) VisitSearchPresentationsResponse(w http.ResponseWriter) error

type SearchResult

type SearchResult struct {
	// CredentialSubjectId The ID of the Verifiable Credential subject (holder), typically a DID.
	CredentialSubjectId string `json:"credential_subject_id"`

	// Fields Input descriptor IDs and their mapped values that from the Verifiable Credential.
	Fields map[string]interface{} `json:"fields"`

	// Id The ID of the Verifiable Presentation.
	Id string `json:"id"`

	// RegistrationParameters Additional parameters used when activating the service.
	// The authServerURL parameter is always present.
	RegistrationParameters map[string]interface{} `json:"registrationParameters"`
	Vp                     VerifiablePresentation `json:"vp"`
}

SearchResult defines model for SearchResult.

type ServerInterface

type ServerInterface interface {
	// Retrieves the list of Discovery Services.
	// (GET /internal/discovery/v1)
	GetServices(ctx echo.Context) error
	// Searches for presentations registered on the Discovery Service.
	// (GET /internal/discovery/v1/{serviceID})
	SearchPresentations(ctx echo.Context, serviceID string, params SearchPresentationsParams) error
	// Remove a subject from the Discovery Service.
	// (DELETE /internal/discovery/v1/{serviceID}/{subjectID})
	DeactivateServiceForSubject(ctx echo.Context, serviceID string, subjectID string) error
	// Retrieves the activation status of a subject on a Discovery Service.
	// (GET /internal/discovery/v1/{serviceID}/{subjectID})
	GetServiceActivation(ctx echo.Context, serviceID string, subjectID string) error
	// Activate a Discovery Service for a subject.
	// (POST /internal/discovery/v1/{serviceID}/{subjectID})
	ActivateServiceForSubject(ctx echo.Context, serviceID string, subjectID 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) ActivateServiceForSubject

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

ActivateServiceForSubject converts echo context to params.

func (*ServerInterfaceWrapper) DeactivateServiceForSubject

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

DeactivateServiceForSubject converts echo context to params.

func (*ServerInterfaceWrapper) GetServiceActivation

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

GetServiceActivation converts echo context to params.

func (*ServerInterfaceWrapper) GetServices

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

GetServices converts echo context to params.

func (*ServerInterfaceWrapper) SearchPresentations

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

SearchPresentations converts echo context to params.

type ServiceActivationRequest

type ServiceActivationRequest struct {
	// RegistrationParameters Additional parameters to use when activating a service. The contents of the object will be placed in the credentialSubject field of a DiscoveryRegistrationCredential.
	//
	// This, for example, allows use cases to require and clients to register specific endpoints.
	//
	// The authServerURL parameter is added automatically.
	RegistrationParameters *map[string]interface{} `json:"registrationParameters,omitempty"`
}

ServiceActivationRequest Request for service activation.

type ServiceDefinition

type ServiceDefinition = discovery.ServiceDefinition

ServiceDefinition is a type alias

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Retrieves the list of Discovery Services.
	// (GET /internal/discovery/v1)
	GetServices(ctx context.Context, request GetServicesRequestObject) (GetServicesResponseObject, error)
	// Searches for presentations registered on the Discovery Service.
	// (GET /internal/discovery/v1/{serviceID})
	SearchPresentations(ctx context.Context, request SearchPresentationsRequestObject) (SearchPresentationsResponseObject, error)
	// Remove a subject from the Discovery Service.
	// (DELETE /internal/discovery/v1/{serviceID}/{subjectID})
	DeactivateServiceForSubject(ctx context.Context, request DeactivateServiceForSubjectRequestObject) (DeactivateServiceForSubjectResponseObject, error)
	// Retrieves the activation status of a subject on a Discovery Service.
	// (GET /internal/discovery/v1/{serviceID}/{subjectID})
	GetServiceActivation(ctx context.Context, request GetServiceActivationRequestObject) (GetServiceActivationResponseObject, error)
	// Activate a Discovery Service for a subject.
	// (POST /internal/discovery/v1/{serviceID}/{subjectID})
	ActivateServiceForSubject(ctx context.Context, request ActivateServiceForSubjectRequestObject) (ActivateServiceForSubjectResponseObject, error)
}

StrictServerInterface represents all server handlers.

type VerifiableCredential

type VerifiableCredential = vc.VerifiableCredential

VerifiableCredential is a type alias for the VerifiableCredential from the go-did library.

type VerifiablePresentation

type VerifiablePresentation = vc.VerifiablePresentation

VerifiablePresentation is a type alias for the VerifiablePresentation from the go-did library.

type Wrapper

type Wrapper struct {
	Client discovery.Client
}

func (*Wrapper) ResolveStatusCode

func (w *Wrapper) ResolveStatusCode(err error) int

func (*Wrapper) Routes

func (w *Wrapper) Routes(router core.EchoRouter)

Jump to

Keyboard shortcuts

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