Documentation ¶
Index ¶
- Constants
- type Operation
- func (o *Operation) DeriveCredential(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GeneratePresentation(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GeneratePresentationByID(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetCredential(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetCredentialByName(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetCredentials(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetPresentation(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetPresentations(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) GetRESTHandlers() []rest.Handler
- func (o *Operation) RemoveCredentialByName(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) RemovePresentationByName(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) SaveCredential(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) SavePresentation(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) SignCredential(rw http.ResponseWriter, req *http.Request)
- func (o *Operation) ValidateCredential(rw http.ResponseWriter, req *http.Request)
Constants ¶
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 (*Operation) DeriveCredential ¶ added in v0.1.6
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 ¶ added in v0.1.3
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 ¶ added in v0.1.3
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 ¶ added in v0.1.3
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 ¶ added in v0.1.3
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 ¶ added in v0.1.3
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 ¶ added in v0.1.3
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 ¶
GetRESTHandlers get all controller API handler available for this service.
func (*Operation) RemoveCredentialByName ¶ added in v0.1.4
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 ¶ added in v0.1.4
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 ¶ added in v0.1.3
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 ¶ added in v0.1.4
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