71 lines
1.6 KiB
Go
71 lines
1.6 KiB
Go
package main
|
|
|
|
import (
|
|
"cwtch.im/cwtch/app"
|
|
"git.openprivacy.ca/openprivacy/connectivity"
|
|
)
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// ACN messages
|
|
// ---------------------------------------------------------------------------
|
|
type turnAcnOnMsg struct{}
|
|
|
|
type acnOnMsg struct {
|
|
app app.Application
|
|
acn connectivity.ACN
|
|
}
|
|
|
|
type turnAcnOffMsg struct {
|
|
quitProgram bool
|
|
}
|
|
|
|
type acnOffMsg struct {
|
|
quitProgram bool
|
|
}
|
|
|
|
type acnAlreadyOnlineMsg struct{}
|
|
|
|
type acnOfflineMsg struct{}
|
|
|
|
type acnConnectingMsg struct{}
|
|
|
|
type acnErrMsg struct {
|
|
err error
|
|
}
|
|
|
|
func (e acnErrMsg) Error() string {
|
|
return e.err.Error()
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// help messages
|
|
// ---------------------------------------------------------------------------
|
|
type showGettingStartedGuideMsg struct{}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// profile messages
|
|
// ---------------------------------------------------------------------------
|
|
type profileInfoMsg struct{}
|
|
|
|
type startProfileQueuePollMsg struct{ onion string }
|
|
|
|
type createProfileMsg struct {
|
|
name string
|
|
password string
|
|
}
|
|
|
|
type profileUnlockMsg struct {
|
|
password string
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// TODO: categorize messages below
|
|
// ---------------------------------------------------------------------------
|
|
type sendStatusMsg struct{ lines []string }
|
|
|
|
type renderStatusMsg struct{ line string }
|
|
|
|
type cmdMsg struct{ output []string }
|
|
|
|
type clearScreenMsg struct{}
|