Documentation ¶
Index ¶
Constants ¶
const DefactoPasswordForUnencryptedProfiles = "be gay do crime"
DefactoPasswordForUnencryptedProfiles is used to offer "un-passworded" profiles. Our storage encrypts everything with a password. We need an agreed upon password to use in that case, that the app case use behind the scenes to password and unlock with https://docs.openprivacy.ca/cwtch-security-handbook/profile_encryption_and_storage.html
Variables ¶
This section is empty.
Functions ¶
func LoadAppSettings ¶ added in v0.19.0
func LoadAppSettings(appDirectory string) *settings.GlobalSettingsFile
func WaitGetPeer ¶ added in v0.17.0
func WaitGetPeer(app Application, name string) peer.CwtchPeer
WaitGetPeer is a helper function for utility apps not written using the event bus Proper use of an App is to call CreatePeer and then process the NewPeer event however for small utility use, this function which polls the app until the peer is created may fill that usecase better
Types ¶
type Application ¶
type Application interface { LoadProfiles(password string) CreateProfile(name string, password string, autostart bool) InstallEngineHooks(engineHooks connections.EngineHooks) ImportProfile(exportedCwtchFile string, password string) (peer.CwtchPeer, error) EnhancedImportProfile(exportedCwtchFile string, password string) string DeleteProfile(onion string, currentPassword string) AddPeerPlugin(onion string, pluginID plugins.PluginID) GetPrimaryBus() event.Manager GetEventBus(onion string) event.Manager QueryACNStatus() QueryACNVersion() ActivateEngines(doListn, doPeers, doServers bool) ActivatePeerEngine(onion string) DeactivatePeerEngine(onion string) ReadSettings() settings.GlobalSettings UpdateSettings(settings settings.GlobalSettings) IsFeatureEnabled(experiment string) bool ShutdownPeer(string) Shutdown() GetPeer(onion string) peer.CwtchPeer ListProfiles() []string }
Application is a full cwtch peer application. It allows management, usage and storage of multiple peers
func NewApp ¶
func NewApp(acn connectivity.ACN, appDirectory string, settings *settings.GlobalSettingsFile) Application
NewApp creates a new app with some environment awareness and initializes a Tor Manager
type LoadProfileFn ¶
LoadProfileFn is the function signature for a function in an app that loads a profile