controller

package
Version: v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2022 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WindowMap  = make(map[string]*walk.MainWindow)
	MenuConfig *walk.MainWindow
)

Functions

func AddConfig

func AddConfig()

func CalcDpiScaledSize

func CalcDpiScaledSize(SizeW int32, SizeH int32) (int32, int32)

func CheckConfig

func CheckConfig() (config, controllerPort string)

func CronTask

func CronTask()

func Dashboard

func Dashboard()

func EditConfig

func EditConfig(configName, configUrl string)

func FileExist

func FileExist(path string) bool

func GetMMDB

func GetMMDB(value mmdb.Type)
func MenuConfigInit()

func RegCmd

func RegCmd(value cmd.GeneralType) error

RegCmd 注册命令

func RegCompare

func RegCompare(command cmd.CommandType) (b bool)

func ShowMenuConfig

func ShowMenuConfig()

func StyleMenuRun

func StyleMenuRun(w *walk.MainWindow, SizeW int32, SizeH int32)

func TaskBuild

func TaskBuild() (xml []byte, err error)

TaskBuild 生成任务计划XML

func TaskCommand

func TaskCommand(taskType task.Type) (err error)

func TaskCommandCall

func TaskCommandCall(taskType task.Type, callback func(err error))

TaskCommandCall 执行任务计划并回调

Types

type ConfigInfo

type ConfigInfo struct {
	Index int
	Name  string
	Size  string
	Time  time.Time
	Url   string
	// contains filtered or unexported fields
}

type ConfigInfoModel

type ConfigInfoModel struct {
	walk.TableModelBase
	// contains filtered or unexported fields
}

func NewConfigInfoModel

func NewConfigInfoModel() *ConfigInfoModel

func (*ConfigInfoModel) Checked

func (m *ConfigInfoModel) Checked(row int) bool

func (*ConfigInfoModel) ResetRows

func (m *ConfigInfoModel) ResetRows()

func (*ConfigInfoModel) RowCount

func (m *ConfigInfoModel) RowCount() int

func (*ConfigInfoModel) TaskCron

func (m *ConfigInfoModel) TaskCron()

func (*ConfigInfoModel) Value

func (m *ConfigInfoModel) Value(row, col int) interface{}

type SubscriptionUserInfo

type SubscriptionUserInfo struct {
	Upload     int64 `query:"upload"`
	Download   int64 `query:"download"`
	Total      int64 `query:"total"`
	Unused     int64
	Used       int64
	ExpireUnix int64 `query:"expire"`

	UsedInfo   string
	UnusedInfo string
	ExpireInfo string
}

func UpdateSubscriptionUserInfo

func UpdateSubscriptionUserInfo() (userInfo SubscriptionUserInfo)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL