mirror of
https://github.com/putyy/res-downloader.git
synced 2026-01-12 06:04:55 +08:00
26 lines
409 B
Go
26 lines
409 B
Go
package core
|
|
|
|
import (
|
|
"github.com/wailsapp/wails/v2/pkg/runtime"
|
|
)
|
|
|
|
type Bind struct {
|
|
}
|
|
|
|
func NewBind() *Bind {
|
|
return &Bind{}
|
|
}
|
|
|
|
func (b *Bind) Config() *ResponseData {
|
|
return httpServerOnce.buildResp(1, "ok", globalConfig)
|
|
}
|
|
|
|
func (b *Bind) AppInfo() *ResponseData {
|
|
return httpServerOnce.buildResp(1, "ok", appOnce)
|
|
}
|
|
|
|
func (b *Bind) ResetApp() {
|
|
appOnce.IsReset = true
|
|
runtime.Quit(appOnce.ctx)
|
|
}
|