template.go 570 字节
Newer Older
J
Jason 已提交
1
package models
J
Jason 已提交
2

3 4 5 6 7
type Template struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Version     string `json:"version"`

J
Jason 已提交
8
	Elements   []TemplateElement  `json:"elements"`
9 10
	Jobs       []TemplateJob      `json:"jobs"`
	Strategies []TemplateStrategy `json:"strategies"`
J
Jason 已提交
11 12
}

13
type TemplateJob struct {
J
优化  
Jason 已提交
14
	Name   string `json:"name"`
J
Jason 已提交
15 16
	Cron   string `json:"cron"`
	Script string `json:"script"` //javascript
J
Jason 已提交
17 18
}

19
type TemplateStrategy struct {
J
优化  
Jason 已提交
20
	Name   string `json:"name"`
J
Jason 已提交
21
	Script string `json:"script"` //javascript
J
Jason 已提交
22
}
J
Jason 已提交
23 24 25

type TemplateElement struct {
}