config

package
v0.0.0-...-53feb6c Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2016 License: GPL-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadGroupDescToml

func ReadGroupDescToml(f io.Reader) (*sda.EntityList, []string, error)

ReadGroupDescToml reads a group.toml file and returns the list of Entities and descriptions in the file.

func ReadGroupToml

func ReadGroupToml(f io.Reader) (*sda.EntityList, error)

ReadGroupToml reads a group.toml file and returns the list of Entity described in the file.

Types

type CothoritydConfig

type CothoritydConfig struct {
	Public    string
	Private   string
	Addresses []string
}

CothoritydConfig is the Cothority daemon config

func CreateCothoritydConfig

func CreateCothoritydConfig(defaultFile string) (*CothoritydConfig, string, error)

CreateCothoritydConfig will ask through the command line to create a Private / Public key, what is the listening address

func ParseCothorityd

func ParseCothorityd(file string) (*CothoritydConfig, *sda.Host, error)

ParseCothorityd will try to parse the config file into a CothoritydConfig. It returns the CothoritydConfig, the Host so we can already use it and an error if occured.

func (*CothoritydConfig) Save

func (hc *CothoritydConfig) Save(file string) error

Save will save this CothoritydConfig to the given file name

type GroupToml

type GroupToml struct {
	Description string
	Servers     []*ServerToml `toml:"servers"`
}

GroupToml represents the structure of the group.toml file given to the cli.

func NewGroupToml

func NewGroupToml(servers ...*ServerToml) *GroupToml

NewGroupToml creates a new GroupToml struct from the given ServerTomls. Currently used together with calling String() on the GroupToml to output a snippet which is needed to define the CoSi group

func (*GroupToml) Save

func (gt *GroupToml) Save(fname string) error

Save writes the grouptoml definition into the file

func (*GroupToml) String

func (gt *GroupToml) String() string

String returns the TOML representation of this GroupToml

type ServerToml

type ServerToml struct {
	Addresses   []string
	Public      string
	Description string
}

ServerToml is one entry in the group.toml file describing one server to use for the cothority system.

func NewServerToml

func NewServerToml(suite abstract.Suite, public abstract.Point, addresses ...string) *ServerToml

NewServerToml returns a ServerToml out of a public key and some addresses => to be printed or written to a file

func (*ServerToml) String

func (s *ServerToml) String() string

Returns its TOML representation

Jump to

Keyboard shortcuts

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