model

package
v0.0.0-...-0fc66b4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatePresentationDefinitionRequest

type CreatePresentationDefinitionRequest struct {
	PresentationDefinition exchange.PresentationDefinition `json:"presentationDefinition" validate:"required"`
}

func (CreatePresentationDefinitionRequest) IsValid

type CreatePresentationDefinitionResponse

type CreatePresentationDefinitionResponse struct {
	PresentationDefinition exchange.PresentationDefinition `json:"presentationDefinition"`
}

type CreateRequestRequest

type CreateRequestRequest struct {
	PresentationRequest Request `json:"presentationRequest"`
}

type CreateRequestResponse

type CreateRequestResponse struct {
	PresentationRequest Request `json:"presentationRequest"`
}

type CreateSubmissionRequest

type CreateSubmissionRequest struct {
	Presentation  credsdk.VerifiablePresentation  `json:"presentation" validate:"required"`
	SubmissionJWT keyaccess.JWT                   `json:"submissionJwt,omitempty" validate:"required"`
	Submission    exchange.PresentationSubmission `json:"submission" validate:"required"`
	Credentials   []credential.Container          `json:"credentials,omitempty"`
}

func (CreateSubmissionRequest) IsValid

func (csr CreateSubmissionRequest) IsValid() bool

type CreateSubmissionResponse

type CreateSubmissionResponse struct {
	Submission exchange.PresentationSubmission `json:"submission"`
}

type DeletePresentationDefinitionRequest

type DeletePresentationDefinitionRequest struct {
	ID string `json:"id" validate:"required"`
}

type DeleteRequestRequest

type DeleteRequestRequest struct {
	ID string `json:"id" validate:"required"`
}

type DeleteSubmissionRequest

type DeleteSubmissionRequest struct {
	ID string `json:"id" validate:"required"`
}

type GetPresentationDefinitionRequest

type GetPresentationDefinitionRequest struct {
	ID string `json:"id" validate:"required"`
}

type GetPresentationDefinitionResponse

type GetPresentationDefinitionResponse struct {
	PresentationDefinition exchange.PresentationDefinition `json:"presentationDefinition"`
}

type GetRequestRequest

type GetRequestRequest struct {
	ID string `json:"id" validate:"required"`
}

type GetRequestResponse

type GetRequestResponse struct {
	ID                  string  `json:"id"`
	PresentationRequest Request `json:"presentationRequest"`
}

type GetSubmissionRequest

type GetSubmissionRequest struct {
	ID string `json:"id" validate:"required"`
}

type GetSubmissionResponse

type GetSubmissionResponse struct {
	Submission Submission `json:"submission"`
}

type ListDefinitionsResponse

type ListDefinitionsResponse struct {
	Definitions []*exchange.PresentationDefinition `json:"definitions"`
}

type ListRequestsResponse

type ListRequestsResponse struct {
	PresentationRequests []Request `json:"presentationRequests"`
}

type ListSubmissionRequest

type ListSubmissionRequest struct {
	Filter      filtering.Filter
	PageRequest *pagination.PageRequest
}

type ListSubmissionResponse

type ListSubmissionResponse struct {
	Submissions   []Submission `json:"submissions"`
	NextPageToken string
}

type Request

type Request struct {
	common.Request

	// ID of the presentation definition used for this request.
	PresentationDefinitionID string `json:"presentationDefinitionId" validate:"required"`

	// PresentationDefinitionJWT is a JWT token with a "presentation_definition" claim and an optional "callbackUrl" claim
	// within it. The value of the field named "presentation_definition.id" matches PresentationDefinitionID.
	// This is an output only field.
	PresentationDefinitionJWT keyaccess.JWT `json:"presentationRequestJwt"`
}

type ReviewSubmissionRequest

type ReviewSubmissionRequest struct {
	ID       string `json:"id" validate:"required"`
	Approved bool   `json:"approved"`
	Reason   string `json:"reason"`
}

func (ReviewSubmissionRequest) Validate

func (r ReviewSubmissionRequest) Validate() error

Validate runs validation on the request struct and returns errors when it's invalid.

type Submission

type Submission struct {
	// One of {`pending`, `approved`, `denied`, `cancelled`}.
	Status string `json:"status" validate:"required"`
	// The reason why the submission was approved or denied.
	Reason string `json:"reason,omitempty"`
	// The verifiable presentation containing the presentation_submission along with the credentials presented.
	VerifiablePresentation *credsdk.VerifiablePresentation `json:"verifiablePresentation,omitempty"`
}

func ServiceModel

func ServiceModel(storedSubmission *storage.StoredSubmission) Submission

ServiceModel creates a Submission from a given StoredSubmission.

func (Submission) GetSubmission

func (r Submission) GetSubmission() *exchange.PresentationSubmission

Jump to

Keyboard shortcuts

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