Documentation ¶
Overview ¶
watches the file system for new messages --> sends them communicates with the server --> receive new messages
Index ¶
- func AllRatchets(d *Daemon, fillAuth func(tag, data []byte, theirAuthPublic *[32]byte), ...) ([]*ratchet.Ratchet, error)
- func Copy(source string, dest string, perm os.FileMode) error
- func GeneratePrekeys(numKeys int) ([]*[32]byte, []*[32]byte, error)
- func Init(rootDir, dename, serverAddr string, serverPort int, serverPK *[32]byte, ...) error
- func InitFs(d *Daemon) error
- func LoadPrekeys(d *Daemon) ([]*[32]byte, []*[32]byte, error)
- func LoadRatchet(d *Daemon, name string, ...) (*ratchet.Ratchet, error)
- func StoreLocalAccountConfig(d *Daemon, localAccountConfig *proto.LocalAccountConfig) error
- func StorePrekeys(d *Daemon, prekeyPublics, prekeySecrets []*[32]byte) error
- func StoreRatchet(d *Daemon, name string, ratch *ratchet.Ratchet) error
- func ValidateName(name string) error
- func WatchDir(watcher *fsnotify.Watcher, dir string, initFn filepath.WalkFunc) error
- type Daemon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllRatchets ¶
func GeneratePrekeys ¶
returns public, secret, error
func Init ¶
func Init(rootDir, dename, serverAddr string, serverPort int, serverPK *[32]byte, torAddr string) error
Init creates a new account locally and at the server
func LoadRatchet ¶
func StoreLocalAccountConfig ¶
func StoreLocalAccountConfig(d *Daemon, localAccountConfig *proto.LocalAccountConfig) error
func StorePrekeys ¶
func ValidateName ¶
Types ¶
type Daemon ¶
type Daemon struct { persistence.Paths // Gets the current time Now func() time.Time proto.LocalAccountConfig proto.LocalAccount // contains filtered or unexported fields }
Daemon encapsulates long-running client-side chatterbox functionality
func (*Daemon) LatestProfile ¶
func (*Daemon) OurChatterboxProfilePath ¶
TODO: move to persistence and point somewhere other than daemon directory?
func (*Daemon) ProfileRatchet ¶
Click to show internal directories.
Click to hide internal directories.