Documentation ¶
Index ¶
- func Create(config Config, userID string) (*string, error)
- func CreateProvisional(config Config, target string, value string) (*string, error)
- func Decode(b64 string, v interface{}) error
- func Encode(v interface{}) (*string, error)
- func GetPublicIdentity(b64Identity string) (*string, error)
- func UpgradeIdentity(b64Identity string) (*string, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateProvisional ¶
CreateProvisional returns a new provisional identity crafted from config, target and value
func Decode ¶
Decode takes a value typically returned by Encode, that is, a base64-encoded JSON-marshalled value, and applies the reverse operation, first base64-decoding b64, then unmarshalling the resulting JSON representation into v. If an error occurs on the way, it is returned.
func Encode ¶
Encode returns a pointer to the base64 representation of the result of marshalling v in JSON. If an error occurs in the process, it is returned. Under the hood, Encode transforms v into a *orderedmap.OrderedMap so the result will always wrap a key-sorted JSON representation. If v's underlying type is already *orderedmap.OrderedMap, v's wrapped value will be used as is.
func GetPublicIdentity ¶
GetPublicIdentity returns the public identity associated with the provided identity
func UpgradeIdentity ¶
UpgradeIdentity upgrades the provided identity if needed and returns the result of the upgrade