task

package
v0.0.0-...-b629d69 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ES_POLICY_SILENT = "silent"
	ES_POLICY_MANUAL = "manual"
)

Variables

View Source
var (
	ERR_CANNOT_ACCESS       = errors.New("cannot access the path")
	ERR_INVALID_CATE        = errors.New("invalid category")
	ERR_TASK_NAME_NOT_EQUAL = errors.New("the task name in path is not equal to the task name in config")
)
View Source
var (
	ERR_ES_CFG_NEED_POLICY    = errors.New("need provide externalScraperOptions.policy as external scraper task")
	ERR_ES_CFG_UNKNOWN_POLICY = errors.New("unknown policy")
	ERR_ES_CFG_NEED_BUILD_REQ = errors.New("need provide buildRequirement as external scraper task with make.cmd")
	ERR_ES_CFG_NEED_REL_REQ   = errors.New("need provide releaseRequirement as external scraper task with make.cmd")
)
View Source
var (
	TASK_CATEGORIES = []string{"实用工具", "开发辅助", "配置检测", "资源管理", "办公编辑", "输入法", "集成开发", "录屏看图", "磁盘数据", "安全急救", "网课会议", "即时通讯", "安装备份", "游戏娱乐", "运行环境", "压缩镜像", "美化增强", "驱动管理", "下载上传", "浏览器", "影音播放", "远程连接"}
)

Functions

func CheckExternalScraperOptions

func CheckExternalScraperOptions(task *Task) error

func CheckResolveAllTaskInFolder

func CheckResolveAllTaskInFolder(p string) (*list.List, error)

func CheckResolveAllTaskInTasksFolder

func CheckResolveAllTaskInTasksFolder() (*list.List, error)

Types

type ExternalScraperOptions

type ExternalScraperOptions struct {
	Policy             *string `json:"policy"`
	ReleaseInstaller   *bool   `json:"releaseInstaller"`
	SilentArg          *string `json:"silentArg"`
	CompressLevel      *uint8  `json:"compressLevel"`
	SlientDelete       *bool   `json:"slientDelete"`
	ManualShortcutName *string `json:"manualShortcutName"`
}

type Task

type Task struct {
	Name     string `json:"name"`
	Category string `json:"category"`
	Author   string `json:"author"`

	AutoMake        bool    `json:"autoMake"`
	LaunchArgs      *string `json:"launchArgs"`
	ExternalScraper *bool   `json:"externalScraper"`
	PAUrl           *string `json:"paUrl"`
	PreProcess      *bool   `json:"preprocess"`

	BuildRequirement       *[]string               `json:"buildRequirement"`
	ReleaseRequirement     *[]string               `json:"releaseRequirement"`
	ExternalScraperOptions *ExternalScraperOptions `json:"externalScraperOptions"`
}

func CheckResolveTaskFromPath

func CheckResolveTaskFromPath(p string) (*Task, error)

func CheckResolveTaskFromTasksFolder

func CheckResolveTaskFromTasksFolder(name string) (*Task, error)

func ResolveTaskFromPath

func ResolveTaskFromPath(path string) (*Task, error)

Jump to

Keyboard shortcuts

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