-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline_file.go
59 lines (48 loc) · 1.56 KB
/
pipeline_file.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"
// PipelineFile model.
type PipelineFile struct {
ID string `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Contents []byte `json:"contents" yaml:"contents"`
Encrypted bool `json:"encrypted" yaml:"encrypted"`
ProcesingRuleID *string `json:"procesingRuleID" yaml:"procesingRuleID"`
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt"`
}
// CreatePipelineFile request payload for creating a new pipeline file.
type CreatePipelineFile struct {
Name string `json:"name"`
Contents []byte `json:"contents"`
Encrypted bool `json:"encrypted"`
internal bool
processingRuleID *string
}
func (in *CreatePipelineFile) SetInternal(internal bool) {
in.internal = internal
}
func (in *CreatePipelineFile) SetProcessingRuleID(processingRuleID string) {
in.processingRuleID = &processingRuleID
}
func (in CreatePipelineFile) Internal() bool {
return in.internal
}
func (in CreatePipelineFile) ProcessingRuleID() *string {
return in.processingRuleID
}
// PipelineFilesParams request payload for querying the pipeline files.
type PipelineFilesParams struct {
Last *uint
Before *string
}
// PipelineFiles paginated list.
type PipelineFiles struct {
Items []PipelineFile
EndCursor *string
}
// UpdatePipelineFile request payload for updating a pipeline file.
type UpdatePipelineFile struct {
Name *string `json:"name"`
Contents *[]byte `json:"contents"`
Encrypted *bool `json:"encrypted"`
}