-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrequest.go
55 lines (43 loc) · 1.21 KB
/
request.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
package main
type ScanS3Object struct {
BucketName string `json:"bucketname"`
Key string `json:"key"`
CleanFilesBucket string `json:"clean_files_bucket,omitempty"`
QurantineFilesBucket string `json:"qurantine_files_bucket,omitempty"`
}
type HealthCheckRequest struct {
ResponseChan chan *HealthCheckResponse
}
type ScanStreamRequest struct {
data [] byte
ResponseChan chan *ScanResponse
}
func NewHealthCheckRequest() *HealthCheckRequest {
healthcheckreq := new(HealthCheckRequest)
healthcheckreq.ResponseChan = make(chan *HealthCheckResponse)
return healthcheckreq
}
func NewScanStreamRequest(data []byte) *ScanStreamRequest {
scan := new(ScanStreamRequest)
scan.data = data
scan.ResponseChan = make(chan *ScanResponse)
return scan
}
type RuleSetRequest struct {
ResponseChan chan *RuleSetResponse
}
func NewRuleSetRequest() *RuleSetRequest {
rule := new(RuleSetRequest)
rule.ResponseChan = make(chan *RuleSetResponse)
return rule
}
type RuleListRequest struct {
RuleSet string
ResponseChan chan *RuleListResponse
}
func NewRuleListRequest(ruleset string) *RuleListRequest {
rule := new(RuleListRequest)
rule.RuleSet = ruleset
rule.ResponseChan = make(chan *RuleListResponse)
return rule
}