Documentation ¶
Overview ¶
Package app implements the desktop application functionality of flashlight
Index ¶
- type App
- type Settings
- func (s *Settings) GetDeviceID() string
- func (s *Settings) GetProxyAll() bool
- func (s *Settings) GetSystemProxy() bool
- func (s *Settings) GetToken() string
- func (s *Settings) GetUserID() int64
- func (s *Settings) IsAutoReport() bool
- func (s *Settings) SetAutoLaunch(auto bool)
- func (s *Settings) SetAutoReport(auto bool)
- func (s *Settings) SetDeviceID(deviceID string)
- func (s *Settings) SetProxyAll(proxyAll bool)
- func (s *Settings) SetSystemProxy(enable bool)
- func (s *Settings) SetToken(token string)
- func (s *Settings) SetUserID(id int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { ShowUI bool Flags map[string]interface{} // contains filtered or unexported fields }
App is the core of the Lantern desktop application, in the form of a library.
func (*App) AddExitFunc ¶
func (app *App) AddExitFunc(exitFunc func())
AddExitFunc adds a function to be called before the application exits.
func (*App) Exit ¶
Exit tells the application to exit, optionally supplying an error that caused the exit.
func (*App) LogPanicAndExit ¶
LogPanicAndExit logs a panic and then exits the application.
type Settings ¶
type Settings struct { DeviceID string `json:"deviceID,omitempty"` UserID int64 `json:"userID,omitempty"` UserToken string `json:"userToken,omitempty"` AutoReport bool `json:"autoReport"` AutoLaunch bool `json:"autoLaunch"` ProxyAll bool `json:"proxyAll"` SystemProxy bool `json:"systemProxy"` Version string `json:"version" yaml:"-"` BuildDate string `json:"buildDate" yaml:"-"` RevisionDate string `json:"revisionDate" yaml:"-"` sync.RWMutex `json:"-" yaml:"-"` }
Settings is a struct of all settings unique to this particular Lantern instance.
func (*Settings) GetDeviceID ¶
GetDeviceID returns the unique ID of this device.
func (*Settings) GetProxyAll ¶
GetProxyAll returns whether or not to proxy all traffic.
func (*Settings) GetSystemProxy ¶
GetSystemProxy returns whether or not to set system proxy when lantern starts
func (*Settings) IsAutoReport ¶
IsAutoReport returns whether or not to auto-report debugging and analytics data.
func (*Settings) SetAutoLaunch ¶
SetAutoLaunch sets whether or not to auto-launch Lantern on system startup.
func (*Settings) SetAutoReport ¶
SetAutoReport sets whether or not to auto-report debugging and analytics data.
func (*Settings) SetDeviceID ¶
SetDeviceID sets the device ID
func (*Settings) SetProxyAll ¶
SetProxyAll sets whether or not to proxy all traffic.
func (*Settings) SetSystemProxy ¶
SetSystemProxy sets whether or not to set system proxy when lantern starts