Documentation ¶
Index ¶
- Constants
- Variables
- func AddNonceToDoc(unsignedDoc []byte, nonce string) []byte
- func Base58ToBase64(encodedBase58 string) (string, error)
- func Base64ToBase58(encodedBase64 string) (string, error)
- func DeepCopy(from interface{}, to interface{}) error
- func ExtractPublicKeyFromBase58Der(encodedBase58 string) ([]byte, error)
- func GetNonce() string
- func IsPtrOrSlice(unknown interface{}) bool
- func JSONBytesEqual(a, b []byte) (bool, error)
- func StrToPtr(s string) *string
- func StringSliceContains(slice []string, value string) bool
- type CommonError
- type Emptyable
- type Validateable
Constants ¶
const ( Version_1_0 = "1.0" Version_1_1 = "1.1" SchemaTypeReference_v1_0 = "https://credentials.workday.com/docs/specification/v1.0/schema.json" DIDDocTypeReference_v1_0 = "https://credentials.workday.com/docs/specification/v1.0/did-doc.json" RevocationTypeReference_v1_0 = "https://credentials.workday.com/docs/specification/v1.0/revocation.json" CredentialTypeReference_v1_0 = "https://credentials.workday.com/docs/specification/v1.0/credential.json" ProofRequestTypeReference_v1_0 = "https://credentials.workday.com/docs/specification/v1.0/proof-request.json" ProofResponseTypeReference_v1_0 = "https://credentials.workday.com/docs/specification/v1.0/proof-response.json" )
Variables ¶
var (
UUIDRegExp = regexp.MustCompile(`^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$`)
)
Functions ¶
func AddNonceToDoc ¶
func Base58ToBase64 ¶
Base64ToBase58 converts a base58 encoded string into a base64 encoded string. Returns an error if the original string was not base58 encoded.
func Base64ToBase58 ¶
Base64ToBase58 converts a base64 encoded string into a base58 encoded string. Returns an error if the original string was not base64 encoded.
func DeepCopy ¶
func DeepCopy(from interface{}, to interface{}) error
DeepCopy makes a deep copy from "from" into "to". Unlike a shallow copy, a deep copy will follow pointers. The caller should be mindful of the objects that will be created.
func ExtractPublicKeyFromBase58Der ¶
ExtractPublicKeyFromBase58Der extracts a public key from a base58 encoded Distinguished Encoding Rules (DER) formatted string.
func IsPtrOrSlice ¶
func IsPtrOrSlice(unknown interface{}) bool
IsPtrOrSlice returns true if the object is either a pointer or a slice.
func JSONBytesEqual ¶
JSONBytesEqual compares the JSON in two byte slices for deep equality, ignoring whitespace and other non-semantically meaningful formatting differences.
func StringSliceContains ¶
Types ¶
type CommonError ¶
type CommonError string
func (CommonError) Error ¶
func (err CommonError) Error() string
type Validateable ¶
type Validateable interface {
ValidateStatic() error
}