bddutil

package
v0.0.0-...-e237cb8 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseResponseBody

func CloseResponseBody(respBody io.Closer)

CloseResponseBody closes the response body.

func CookieData

func CookieData(url *urllib.URL)

CookieData logs the cookies contained within the bdd shared cookie jar for the given url.

func DecodeJSONMarshaller

func DecodeJSONMarshaller(jm JSONMarshaller, custom interface{}) error

DecodeJSONMarshaller decodes the JSONMarshaller into the given object.

func DocumentLoader

func DocumentLoader() (*ld.DocumentLoader, error)

DocumentLoader returns a JSON-LD document loader with preloaded test contexts.

func ExpectedStatusCodeError

func ExpectedStatusCodeError(expected, actual int, respBytes []byte) error

ExpectedStatusCodeError formats the status code error message.

func GetDIDConnectRequestKey

func GetDIDConnectRequestKey(issuerID, agentID string) string

GetDIDConnectRequestKey key for storing DID Connect request.

func GetDIDConnectResponseKey

func GetDIDConnectResponseKey(issuerID, agentID string) string

GetDIDConnectResponseKey key for storing DID Connect response.

func GetDIDConnectV2RequestKey

func GetDIDConnectV2RequestKey(issuerID, agentID string) string

GetDIDConnectV2RequestKey key for storing DID Connect request.

func GetDeepLinkWalletInvitationKey

func GetDeepLinkWalletInvitationKey(userID string) string

GetDeepLinkWalletInvitationKey key for wallet bridge invitation URLs.

func GetRemoteWalletAppInfo

func GetRemoteWalletAppInfo(userID string) string

GetRemoteWalletAppInfo key for wallet info of remote wallet app.

func HTTPDo

func HTTPDo(method, url, contentType, token string, body io.Reader, tlsConfig *tls.Config) (*http.Response, error)

HTTPDo util to send http requests.

func JSONBytesEqual

func JSONBytesEqual(a, b []byte) (bool, error)

JSONBytesEqual compares 2 JSON bytes

func ResolveDID

func ResolveDID(vdriRegistry vdriapi.Registry, did string, maxRetry int) (*docdid.Doc, error)

ResolveDID waits for the DID to become available for resolution.

func SendHTTP

func SendHTTP(method, destination string, message []byte, result interface{}) error

SendHTTP util to send http requests.

func StringsContains

func StringsContains(val string, slice []string) bool

StringsContains check if the string is present in the string array.

Types

type JSONMarshaller

type JSONMarshaller interface {
	MarshalJSON() ([]byte, error)
}

JSONMarshaller can marshal itself to JSON bytes.

Jump to

Keyboard shortcuts

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