Documentation ¶
Index ¶
- func NewPresentationStorage(db storage.ServiceStorage) (prestorage.Storage, error)
- type Service
- func (s Service) CreatePresentationDefinition(ctx context.Context, request model.CreatePresentationDefinitionRequest) (*model.CreatePresentationDefinitionResponse, error)
- func (s Service) CreateRequest(ctx context.Context, req model.CreateRequestRequest) (*model.Request, error)
- func (s Service) CreateSubmission(ctx context.Context, request model.CreateSubmissionRequest) (*operation.Operation, error)
- func (s Service) DeletePresentationDefinition(ctx context.Context, request model.DeletePresentationDefinitionRequest) error
- func (s Service) DeleteRequest(ctx context.Context, request model.DeleteRequestRequest) error
- func (s Service) GetPresentationDefinition(ctx context.Context, request model.GetPresentationDefinitionRequest) (*model.GetPresentationDefinitionResponse, error)
- func (s Service) GetRequest(ctx context.Context, request *model.GetRequestRequest) (*model.Request, error)
- func (s Service) GetSubmission(ctx context.Context, request model.GetSubmissionRequest) (*model.GetSubmissionResponse, error)
- func (s Service) ListDefinitions(ctx context.Context) (*model.ListDefinitionsResponse, error)
- func (s Service) ListRequests(ctx context.Context) (*model.ListRequestsResponse, error)
- func (s Service) ListSubmissions(ctx context.Context, request model.ListSubmissionRequest) (*model.ListSubmissionResponse, error)
- func (s Service) ReviewSubmission(ctx context.Context, request model.ReviewSubmissionRequest) (*model.Submission, error)
- func (s Service) Status() framework.Status
- func (s Service) Type() framework.Type
- func (s Service) VerifyPresentation(ctx context.Context, request VerifyPresentationRequest) (*VerifyPresentationResponse, error)
- type Storage
- func (ps *Storage) DeleteDefinition(ctx context.Context, id string) error
- func (ps *Storage) GetDefinition(ctx context.Context, id string) (*prestorage.StoredDefinition, error)
- func (ps *Storage) GetSubmission(ctx context.Context, id string) (*prestorage.StoredSubmission, error)
- func (ps *Storage) ListDefinitions(ctx context.Context) ([]prestorage.StoredDefinition, error)
- func (ps *Storage) ListSubmissions(ctx context.Context, filter filtering.Filter, page common.Page) (*prestorage.StoredSubmissions, error)
- func (ps *Storage) StoreDefinition(ctx context.Context, presentation prestorage.StoredDefinition) error
- func (ps *Storage) StoreSubmission(ctx context.Context, s prestorage.StoredSubmission) error
- func (ps *Storage) UpdateSubmission(ctx context.Context, id string, approved bool, reason string, opID string) (prestorage.StoredSubmission, opstorage.StoredOperation, error)
- type VerifyPresentationRequest
- type VerifyPresentationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPresentationStorage ¶
func NewPresentationStorage(db storage.ServiceStorage) (prestorage.Storage, error)
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewPresentationService ¶
func NewPresentationService(s storage.ServiceStorage, resolver resolution.Resolver, schema *schema.Service, keystore *keystore.Service) (*Service, error)
func (Service) CreatePresentationDefinition ¶
func (s Service) CreatePresentationDefinition(ctx context.Context, request model.CreatePresentationDefinitionRequest) (*model.CreatePresentationDefinitionResponse, error)
CreatePresentationDefinition houses the main service logic for presentation definition creation. It validates the input, and produces a presentation definition value that conforms with the PresentationDefinition specification.
func (Service) CreateRequest ¶
func (Service) CreateSubmission ¶
func (s Service) CreateSubmission(ctx context.Context, request model.CreateSubmissionRequest) (*operation.Operation, error)
CreateSubmission houses the main service logic for presentation submission creation. It validates the input, and produces a presentation submission value that conforms with the Submission specification.
func (Service) DeletePresentationDefinition ¶
func (Service) DeleteRequest ¶
func (Service) GetPresentationDefinition ¶
func (s Service) GetPresentationDefinition(ctx context.Context, request model.GetPresentationDefinitionRequest) (*model.GetPresentationDefinitionResponse, error)
func (Service) GetRequest ¶
func (Service) GetSubmission ¶
func (s Service) GetSubmission(ctx context.Context, request model.GetSubmissionRequest) (*model.GetSubmissionResponse, error)
func (Service) ListDefinitions ¶
func (Service) ListRequests ¶
func (Service) ListSubmissions ¶
func (s Service) ListSubmissions(ctx context.Context, request model.ListSubmissionRequest) (*model.ListSubmissionResponse, error)
func (Service) ReviewSubmission ¶
func (s Service) ReviewSubmission(ctx context.Context, request model.ReviewSubmissionRequest) (*model.Submission, error)
func (Service) VerifyPresentation ¶
func (s Service) VerifyPresentation(ctx context.Context, request VerifyPresentationRequest) (*VerifyPresentationResponse, error)
VerifyPresentation does a series of verification on a presentation:
- Makes sure the presentation has a valid signature
- Makes sure the presentation is not expired
- Makes sure the presentation complies with the VC Data Model v1.1
- For each verification in the presentation, makes sure: a. Makes sure the verification has a valid signature b. Makes sure the verification is not expired c. Makes sure the verification complies with the VC Data Model
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) DeleteDefinition ¶
func (*Storage) GetDefinition ¶
func (ps *Storage) GetDefinition(ctx context.Context, id string) (*prestorage.StoredDefinition, error)
func (*Storage) GetSubmission ¶
func (ps *Storage) GetSubmission(ctx context.Context, id string) (*prestorage.StoredSubmission, error)
func (*Storage) ListDefinitions ¶
func (ps *Storage) ListDefinitions(ctx context.Context) ([]prestorage.StoredDefinition, error)
func (*Storage) ListSubmissions ¶
func (ps *Storage) ListSubmissions(ctx context.Context, filter filtering.Filter, page common.Page) (*prestorage.StoredSubmissions, error)
func (*Storage) StoreDefinition ¶
func (ps *Storage) StoreDefinition(ctx context.Context, presentation prestorage.StoredDefinition) error
func (*Storage) StoreSubmission ¶
func (ps *Storage) StoreSubmission(ctx context.Context, s prestorage.StoredSubmission) error
func (*Storage) UpdateSubmission ¶
func (ps *Storage) UpdateSubmission(ctx context.Context, id string, approved bool, reason string, opID string) (prestorage.StoredSubmission, opstorage.StoredOperation, error)
Click to show internal directories.
Click to hide internal directories.