configuration

package
v0.0.0-...-3896d7e Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: ISC Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNetwork = "testing"
)

Variables

This section is empty.

Functions

func Save

func Save(filename string, configuration *Configuration) error

Types

type Configuration

type Configuration struct {
	Default_identity string         `libucl:"default_identity"`
	Network          string         `libucl:"network"`
	Connect          string         `libucl:"connect"`
	Identity         []IdentityType `libucl:"identity"`
}

func GetConfiguration

func GetConfiguration(configurationFileName string) (*Configuration, error)

full access to data (includes private data)

type IdentityType

type IdentityType struct {
	Name               string           `libucl:"name"`
	Description        string           `libucl:"description"`
	Public_key         string           `libucl:"public_key"`
	Private_key        string           `libucl:"private_key"`
	Seed               string           `libucl:"seed"`
	Private_key_config PrivateKeyConfig `libucl:"private_key_config"`
}

type InfoConfiguration

type InfoConfiguration struct {
	Default_identity string             `libucl:"default_identity"`
	Network          string             `libucl:"network"`
	Connect          string             `libucl:"connect"`
	Identity         []InfoIdentityType `libucl:"identity"`
}

func GetInfoConfiguration

func GetInfoConfiguration(configurationFileName string) (*InfoConfiguration, error)

restricted access to data (excludes private items)

type InfoIdentityType

type InfoIdentityType struct {
	Name        string `libucl:"name"`
	Description string `libucl:"description"`
	Public_key  string `libucl:"public_key"`
	Account     string
}

type PrivateKeyConfig

type PrivateKeyConfig struct {
	Salt string `libucl:"salt"`
}

type Salt

type Salt [saltSize]byte

func MakeSalt

func MakeSalt() (*Salt, error)

func (Salt) Bytes

func (salt Salt) Bytes() []byte

convert a binary salt to byte slice

func (*Salt) MarshalText

func (salt *Salt) MarshalText() []byte

convert salt to little endian hex text

***** possibly use NewEncoder and byte buffer to save copy

func (Salt) String

func (salt Salt) String() string

convert a binary salt to little endian hex string for use by the fmt package (for %s)

func (*Salt) UnmarshalText

func (salt *Salt) UnmarshalText(s []byte) error

convert little endian hex text into a salt

Jump to

Keyboard shortcuts

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