Documentation ¶
Index ¶
- Variables
- func ClearProfileField(name string, field int32, configDir string, client *dnmc.Client) error
- func IncreaseExpirationTime(name string, configDir string, client *dnmc.Client) error
- func LoadLocalProfile(name, configDir string) (sk *[64]byte, profile *Profile, err error)
- func Register(sk *[64]byte, profile *Profile, name string, invite []byte, configDir string, ...) error
- func SetProfileField(name string, field int32, value []byte, configDir string, client *dnmc.Client) error
Constants ¶
This section is empty.
Variables ¶
var ErrExist = os.ErrExist
ErrExists that the file/profile being created already exists
Functions ¶
func ClearProfileField ¶
ClearProfileField downloads the profile for name, clears the given field and uses sk to remap the name to the old profile. The local copy of the profile is ignored and overwritten. The version number is incremented by one and the expiration time is set to 364 days into the future if it is earlier.
func IncreaseExpirationTime ¶
IncreaseExpirationTime downloads the profile for name and uses sk to remap the name to the same profile with the version number incremented by one and the expiration time set to 364 days into the future if it is earlier. The local copy of the profile is ignored and overwritten.
func LoadLocalProfile ¶
LoadLocalProfile returns the secret key and the profile that are locally known to be correspond to name. This information is not guaranteed to be current -- if a fresh profile is needed, use client.Lookup instead.
func Register ¶
func Register(sk *[64]byte, profile *Profile, name string, invite []byte, configDir string, client *dnmc.Client) error
Register registers associates name with profile and persists the secret key and the profile on disk.
func SetProfileField ¶
func SetProfileField(name string, field int32, value []byte, configDir string, client *dnmc.Client) error
SetProfileField downloads the profile for name, sets the value of a field and uses sk to remap the name to the old profile. The local copy of the profile is ignored and overwritten. The version number is incremented by one and the expiration time is set to 364 days into the future if it is earlier.
Types ¶
This section is empty.