ricochet-go/core/ricochet.go

22 lines
362 B
Go
Raw Normal View History

2016-07-01 03:18:55 +00:00
package core
2016-09-11 04:57:54 +00:00
type Ricochet struct {
Config *Config
Network *Network
Protocol *Protocol
2016-09-11 04:57:54 +00:00
Identity *Identity
}
func (core *Ricochet) Init(conf *Config) error {
var err error
core.Config = conf
core.Network = CreateNetwork()
core.Protocol = CreateProtocol(core)
2016-09-11 04:57:54 +00:00
core.Identity, err = CreateIdentity(core)
if err != nil {
return err
}
return nil
2016-07-01 03:18:55 +00:00
}