Documentation ¶
Index ¶
- func ExecPathDir() string
- func Unmarshal(src, dst interface{}) error
- type App
- type Hook
- type Module
- func (m *Module) GetAPPName() string
- func (m *Module) GetAPPVersion() string
- func (m *Module) GetRootUrl() string
- func (m *Module) Notify(str string)
- func (m *Module) RegEvent() chan ghook.Event
- func (m *Module) RemoveTitle()
- func (m *Module) SaveConfig(c interface{})
- func (m *Module) SetTitle(title string)
- func (m *Module) Tip(str string, time time.Duration)
- func (m *Module) UnmarshalConfig(dst interface{}) error
- type ModuleConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecPathDir ¶
func ExecPathDir() string
Types ¶
type Hook ¶ added in v0.0.6
type Hook interface { // WithSignals add more signals into hook WithSignals(signals ...syscall.Signal) Hook // Close register shutdown handles Close(funcs ...func()) }
Hook a graceful shutdown hook, default with signals of SIGINT and SIGTERM
type Module ¶
type Module struct { Config interface{} Port uint16 // contains filtered or unexported fields }
func NewModule ¶
func NewModule(name, itemName, tooltip string, onReady func(item *systray.MenuItem), exit func(), route func(*ghttp.RouterGroup)) *Module
NewModule name是该模块的名字 itemName是显示在任务栏的名字 tooltip是鼠标移动到该模块子项时提示的文字 onReady是初始化完成后执行的函数 exit是退出时执行的函数 route是http录音函数
func (*Module) GetAPPName ¶ added in v0.0.8
func (*Module) GetAPPVersion ¶ added in v0.0.8
func (*Module) GetRootUrl ¶
func (*Module) RemoveTitle ¶
func (m *Module) RemoveTitle()
func (*Module) SaveConfig ¶
func (m *Module) SaveConfig(c interface{})
func (*Module) UnmarshalConfig ¶
type ModuleConfig ¶
type ModuleConfig struct { Enable bool `json:"enable"` Config interface{} `json:"config"` }
Click to show internal directories.
Click to hide internal directories.