verifiable

package
v0.0.0-...-57c6170 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// roots.
	VerifiableOperationID = "/verifiable"

	// credential paths.
	ValidateCredentialPath     = verifiableCredentialPath + "/validate"
	SaveCredentialPath         = verifiableCredentialPath
	GetCredentialPath          = verifiableCredentialPath + "/{id}"
	GetCredentialByNamePath    = verifiableCredentialPath + "/name" + "/{name}"
	GetCredentialsPath         = VerifiableOperationID + "/credentials"
	SignCredentialsPath        = VerifiableOperationID + "/signcredential"
	DeriveCredentialPath       = VerifiableOperationID + "/derivecredential"
	RemoveCredentialByNamePath = verifiableCredentialPath + "/remove/name" + "/{name}"

	// presentation paths.
	GeneratePresentationPath     = verifiablePresentationPath + "/generate"
	GeneratePresentationByIDPath = verifiablePresentationPath + "/generatebyid"
	SavePresentationPath         = verifiablePresentationPath
	GetPresentationPath          = verifiablePresentationPath + "/{id}"
	GetPresentationsPath         = VerifiableOperationID + "/presentations"
	RemovePresentationByNamePath = verifiablePresentationPath + "/remove/name" + "/{name}"
)

constants for the Verifiable protocol.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation struct {
	// contains filtered or unexported fields
}

Operation contains basic common operations provided by controller REST API.

func New

func New(p provider) (*Operation, error)

New returns new common operations rest client instance.

func (*Operation) DeriveCredential

func (o *Operation) DeriveCredential(rw http.ResponseWriter, req *http.Request)

DeriveCredential swagger:route POST /verifiable/derivecredential verifiable deriveCredentialReq

Derives a given verifiable credential for selective disclosure.

Responses:

default: genericError
    200: deriveCredentialRes

func (*Operation) GeneratePresentation

func (o *Operation) GeneratePresentation(rw http.ResponseWriter, req *http.Request)

GeneratePresentation swagger:route POST /verifiable/presentation/generate verifiable generatePresentationReq

Generates the verifiable presentation from a verifiable credential.

Responses:

default: genericError
    200: presentationRes

func (*Operation) GeneratePresentationByID

func (o *Operation) GeneratePresentationByID(rw http.ResponseWriter, req *http.Request)

GeneratePresentationByID swagger:route POST /verifiable/presentation/generatebyid verifiable generatePresentationByIDReq

Generates the verifiable presentation from a stored verifiable credential.

Responses:

default: genericError
    200: presentationRes

func (*Operation) GetCredential

func (o *Operation) GetCredential(rw http.ResponseWriter, req *http.Request)

GetCredential swagger:route GET /verifiable/credential/{id} verifiable getCredentialReq

Retrieves the verifiable credential.

Responses:

default: genericError
    200: credentialRes

func (*Operation) GetCredentialByName

func (o *Operation) GetCredentialByName(rw http.ResponseWriter, req *http.Request)

GetCredentialByName swagger:route GET /verifiable/credential/name/{name} verifiable getCredentialByNameReq

Retrieves the verifiable credential by name.

Responses:

default: genericError
    200: credentialRecord

func (*Operation) GetCredentials

func (o *Operation) GetCredentials(rw http.ResponseWriter, req *http.Request)

GetCredentials swagger:route GET /verifiable/credentials verifiable getCredentials

Retrieves the verifiable credentials.

Responses:

default: genericError
    200: credentialRecordResult

func (*Operation) GetPresentation

func (o *Operation) GetPresentation(rw http.ResponseWriter, req *http.Request)

GetPresentation swagger:route GET /verifiable/presentation/{id} verifiable getPresentationReq

Retrieves the verifiable presentation.

Responses:

default: genericError
    200: presentationRes

func (*Operation) GetPresentations

func (o *Operation) GetPresentations(rw http.ResponseWriter, req *http.Request)

GetPresentations swagger:route GET /verifiable/presentations verifiable

Retrieves the verifiable credentials.

Responses:

default: genericError
    200: presentationRecordResult

func (*Operation) GetRESTHandlers

func (o *Operation) GetRESTHandlers() []rest.Handler

GetRESTHandlers get all controller API handler available for this service.

func (*Operation) RemoveCredentialByName

func (o *Operation) RemoveCredentialByName(rw http.ResponseWriter, req *http.Request)

RemoveCredentialByName swagger:route POST /verifiable/credential/remove/name/{name} verifiable removeCredentialByNameReq

Removes a verifiable credential by name.

Responses:

default: genericError
    200: emptyResponse

func (*Operation) RemovePresentationByName

func (o *Operation) RemovePresentationByName(rw http.ResponseWriter, req *http.Request)

RemovePresentationByName swagger:route POST /verifiable/presentation/remove/name/{name} verifiable removePresentationByNameReq

Removes a verifiable presentation by name.

Responses:

default: genericError
    200: emptyResponse

func (*Operation) SaveCredential

func (o *Operation) SaveCredential(rw http.ResponseWriter, req *http.Request)

SaveCredential swagger:route POST /verifiable/credential verifiable saveCredentialReq

Saves the verifiable credential.

Responses:

default: genericError
    200: emptyRes

func (*Operation) SavePresentation

func (o *Operation) SavePresentation(rw http.ResponseWriter, req *http.Request)

SavePresentation swagger:route POST /verifiable/presentation verifiable savePresentationReq

Saves the verifiable presentation.

Responses:

default: genericError
    200: emptyRes

func (*Operation) SignCredential

func (o *Operation) SignCredential(rw http.ResponseWriter, req *http.Request)

SignCredential swagger:route POST /verifiable/signcredential verifiable signCredentialReq

Signs given credential.

Responses:

default: genericError
    200: signCredentialRes

func (*Operation) ValidateCredential

func (o *Operation) ValidateCredential(rw http.ResponseWriter, req *http.Request)

ValidateCredential swagger:route POST /verifiable/credential/validate verifiable validateCredentialReq

Validates the verifiable credential.

Responses:

default: genericError
    200: emptyRes

Jump to

Keyboard shortcuts

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