-
Notifications
You must be signed in to change notification settings - Fork 0
/
processing_rule_template.go
59 lines (51 loc) · 2.31 KB
/
processing_rule_template.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package types
import "time"
type ProcessingRuleTemplate struct {
ID string `json:"id" yaml:"id" db:"id"`
ProjectID string `json:"projectID" yaml:"projectID" db:"project_id"`
Name string `json:"name" yaml:"name" db:"name"`
Definition ProcessingRuleDef `json:"definition" yaml:"definition" db:"definition"`
PipelineVersion string `json:"pipelineVersion" yaml:"pipelineVersion" db:"pipeline_version"`
Input string `json:"input" yaml:"input" db:"input"`
IsRawInput bool `json:"isRawInput" yaml:"isRawInput" db:"is_raw_input"`
CreatedAt time.Time `json:"createdAt" yaml:"createdAt" db:"created_at"`
UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt" db:"updated_at"`
}
type ProcessingRuleDef struct {
Name string `json:"name" yaml:"name"`
Match string `json:"match" yaml:"match"`
Code string `json:"code" yaml:"code"`
Call string `json:"call" yaml:"call"`
}
type StaticProcessingRuleTemplate struct {
Name string `json:"name" yaml:"name"`
Definition ProcessingRuleDef `json:"definition" yaml:"definition"`
}
type CreateProcessingRuleTemplate struct {
ProjectID string `json:"-"`
Name string `json:"name"`
Definition ProcessingRuleDef `json:"definition"`
PipelineVersion string `json:"pipelineVersion"`
Input string `json:"input"`
IsRawInput bool `json:"isRawInput"`
}
type ListProcessingRuleTemplates struct {
ProjectID string
Last *uint
Before *string
Name *string
}
type ProcessingRuleTemplates struct {
Items []ProcessingRuleTemplate `json:"items" yaml:"items"`
EndCursor *string `json:"endCursor" yaml:"endCursor"`
Count uint `json:"count" yaml:"count"`
Static []StaticProcessingRuleTemplate `json:"static" yaml:"static"`
}
type UpdateProcessingRuleTemplate struct {
TemplateID string `json:"-"`
Name *string `json:"name"`
Definition *ProcessingRuleDef `json:"definition"`
PipelineVersion *string `json:"pipelineVersion"`
Input *string `json:"input"`
IsRawInput *bool `json:"isRawInput"`
}