dnmgr

package
v0.0.0-...-efbb1c2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExist = os.ErrExist

ErrExists that the file/profile being created already exists

Functions

func ClearProfileField

func ClearProfileField(name string, field int32, configDir string, client *dnmc.Client) error

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

func IncreaseExpirationTime(name string, configDir string, client *dnmc.Client) error

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

func LoadLocalProfile(name, configDir string) (sk *[64]byte, profile *Profile, err error)

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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