Documentation ¶
Index ¶
- type Storage
- func (ms *Storage) DeleteApplication(ctx context.Context, id string) error
- func (ms *Storage) DeleteManifest(ctx context.Context, id string) error
- func (ms *Storage) DeleteResponse(ctx context.Context, id string) error
- func (ms *Storage) GetApplication(ctx context.Context, id string) (*StoredApplication, error)
- func (ms *Storage) GetManifest(ctx context.Context, id string) (*StoredManifest, error)
- func (ms *Storage) GetResponse(ctx context.Context, id string) (*StoredResponse, error)
- func (ms *Storage) ListApplications(ctx context.Context) ([]StoredApplication, error)
- func (ms *Storage) ListManifests(ctx context.Context) ([]StoredManifest, error)
- func (ms *Storage) ListResponses(ctx context.Context) ([]StoredResponse, error)
- func (ms *Storage) StoreApplication(ctx context.Context, application StoredApplication) error
- func (ms *Storage) StoreManifest(ctx context.Context, manifest StoredManifest) error
- func (ms *Storage) StoreResponse(ctx context.Context, response StoredResponse) error
- func (ms *Storage) StoreReviewApplication(ctx context.Context, applicationID string, approved bool, reason string, ...) (*StoredResponse, *opstorage.StoredOperation, error)
- type StoredApplication
- type StoredManifest
- type StoredResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewManifestStorage ¶
func NewManifestStorage(db storage.ServiceStorage) (*Storage, error)
func (*Storage) DeleteApplication ¶
func (*Storage) DeleteManifest ¶
func (*Storage) DeleteResponse ¶
func (*Storage) GetApplication ¶
func (*Storage) GetManifest ¶
func (*Storage) GetResponse ¶
func (*Storage) ListApplications ¶
func (ms *Storage) ListApplications(ctx context.Context) ([]StoredApplication, error)
ListApplications attempts to get all stored applications. It will return those it can even if it has trouble with some.
func (*Storage) ListManifests ¶
func (ms *Storage) ListManifests(ctx context.Context) ([]StoredManifest, error)
ListManifests attempts to get all stored manifests. It will return those it can even if it has trouble with some.
func (*Storage) ListResponses ¶
func (ms *Storage) ListResponses(ctx context.Context) ([]StoredResponse, error)
ListResponses attempts to get all stored responses. It will return those it can even if it has trouble with some.
func (*Storage) StoreApplication ¶
func (ms *Storage) StoreApplication(ctx context.Context, application StoredApplication) error
func (*Storage) StoreManifest ¶
func (ms *Storage) StoreManifest(ctx context.Context, manifest StoredManifest) error
func (*Storage) StoreResponse ¶
func (ms *Storage) StoreResponse(ctx context.Context, response StoredResponse) error
func (*Storage) StoreReviewApplication ¶
func (ms *Storage) StoreReviewApplication(ctx context.Context, applicationID string, approved bool, reason string, opID string, response StoredResponse) (*StoredResponse, *opstorage.StoredOperation, error)
StoreReviewApplication does the following:
- Updates the application status according to the approved parameter.
- Creates a Credential Response corresponding to the approved parameter and with the given reason.
- Marks the operation with id == opID as done, and sets operation.Response to the StoredResponse from the object creates in step 2.
The operation and it's response (from 3) are returned.
type StoredApplication ¶
type StoredApplication struct { ID string `json:"id"` Status credential.Status `json:"status"` Reason string `json:"reason"` ManifestID string `json:"manifestId"` ApplicantDID string `json:"applicantDid"` Application manifest.CredentialApplication `json:"application"` Credentials []cred.Container `json:"credentials"` ApplicationJWT keyaccess.JWT `json:"applicationJwt"` }
type StoredManifest ¶
type StoredManifest struct { ID string `json:"id"` IssuerDID string `json:"issuerDid"` FullyQualifiedVerificationMethodID string `json:"fullyQualifiedVerificationMethodId"` Manifest manifest.CredentialManifest `json:"manifest"` }
type StoredResponse ¶
Click to show internal directories.
Click to hide internal directories.