Documentation
¶
Index ¶
- func AreEqualJSON(b1, b2 []byte) (bool, error)
- func CloseResponseBody(respBody io.Closer)
- func CreateCustomPresentation(vcBytes []byte, vdr vdrapi.Registry, ...) ([]byte, error)
- func DocumentLoader() (*lddocloader.DocumentLoader, error)
- func ExpectedStatusCodeError(expected, actual int, respBytes []byte) error
- func ExpectedStringError(expected, actual string) error
- func GetCredentialKey(user string) string
- func GetDIDDocKey(user string) string
- func GetIssuerHolderCommKey(issuer, holder string) string
- func GetOptionsKey(user string) string
- func GetPresentationKey(user string) string
- func GetProfileNameKey(user string) string
- func GetProofChallengeKey(user string) string
- func GetProofDomainKey(user string) string
- func GetSignatureRepresentation(holder string) verifiable.SignatureRepresentation
- func HTTPDo(method, url, contentType, token string, body io.Reader) (*http.Response, error)
- func HTTPSDo(method, url, contentType, token string, body io.Reader, tlsConfig *tls.Config) (*http.Response, error)
- func IssueAccessToken(ctx context.Context, oidcProviderURL, clientID, secret string, scopes []string) (string, error)
- func ResolveDID(vdrRegistry vdrapi.Registry, did string, maxRetry int) (*docdid.Doc, error)
- type ProofDataOpts
- type Request
- type Response
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreEqualJSON ¶
AreEqualJSON compares if 2 JSON bytes are equal
func CloseResponseBody ¶
CloseResponseBody closes the response body.
func CreateCustomPresentation ¶
func CreateCustomPresentation(vcBytes []byte, vdr vdrapi.Registry, ldpContext *verifiable.LinkedDataProofContext) ([]byte, error)
CreateCustomPresentation creates verifiable presentation from custom linked data proof context
func DocumentLoader ¶
func DocumentLoader() (*lddocloader.DocumentLoader, error)
DocumentLoader returns a JSON-LD document loader with preloaded test contexts.
func ExpectedStatusCodeError ¶
ExpectedStatusCodeError formats the status code error message.
func ExpectedStringError ¶
ExpectedStringError formats the response error message.
func GetCredentialKey ¶
GetCredentialKey key for storing credential.
func GetIssuerHolderCommKey ¶
GetIssuerHolderCommKey key for storing data moving between issuer and holder.
func GetPresentationKey ¶
GetPresentationKey key for storing presentation.
func GetProfileNameKey ¶
GetProfileNameKey key for storing profile name.
func GetProofChallengeKey ¶
GetProofChallengeKey key for storing proof challenge.
func GetProofDomainKey ¶
GetProofDomainKey key for storing proof domain.
func GetSignatureRepresentation ¶
func GetSignatureRepresentation(holder string) verifiable.SignatureRepresentation
GetSignatureRepresentation parse signature representation
func HTTPSDo ¶
func HTTPSDo(method, url, contentType, token string, body io.Reader, tlsConfig *tls.Config) (*http.Response, error)
HTTPSDo send https request
func IssueAccessToken ¶
Types ¶
type ProofDataOpts ¶
ProofDataOpts for storing proof options.
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
WorkerPool manages a pool of workers that processes requests concurrently and, at the end, gathers the responses.
func NewWorkerPool ¶
func NewWorkerPool(num int, logger *log.Log) *WorkerPool
NewWorkerPool returns a new worker pool with the given number of workers.
func (*WorkerPool) Responses ¶
func (p *WorkerPool) Responses() []*Response
Responses contains the responses after the pool is stopped.
func (*WorkerPool) Start ¶
func (p *WorkerPool) Start()
Start starts all the workers and listens for responses.
func (*WorkerPool) Stop ¶
func (p *WorkerPool) Stop()
Stop stops the workers in the pool and stops listening for responses.
func (*WorkerPool) Submit ¶
func (p *WorkerPool) Submit(req Request)
Submit submits a request for processing.