-
Notifications
You must be signed in to change notification settings - Fork 0
/
event_feed.pb.policy-v2.go
48 lines (45 loc) · 1.79 KB
/
event_feed.pb.policy-v2.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
// Code generated by protoc-gen-policy. DO NOT EDIT.
// source: components/automate-gateway/api/event_feed/event_feed.proto
package event_feed
import (
request "github.com/chef/automate/components/automate-gateway/api/event_feed/request"
policyv2 "github.com/chef/automate/components/automate-gateway/authz/policy_v2"
)
func init() {
policyv2.MapMethodTo("/chef.automate.api.event_feed.EventFeed/GetEventFeed", "event:events", "event:events:list", "GET", "/eventfeed", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*request.EventFilter); ok {
return policyv2.ExpandParameterizedResource(unexpandedResource, func(want string) string {
switch want {
case "cursor":
return m.Cursor
default:
return ""
}
})
}
return ""
})
policyv2.MapMethodTo("/chef.automate.api.event_feed.EventFeed/GetEventTypeCounts", "event:events", "event:events:list", "GET", "/event_type_counts", func(unexpandedResource string, input interface{}) string {
return unexpandedResource
})
policyv2.MapMethodTo("/chef.automate.api.event_feed.EventFeed/GetEventTaskCounts", "event:events", "event:events:list", "GET", "/event_task_counts", func(unexpandedResource string, input interface{}) string {
return unexpandedResource
})
policyv2.MapMethodTo("/chef.automate.api.event_feed.EventFeed/GetEventStringBuckets", "event:events", "event:events:list", "GET", "/eventstrings", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*request.EventStrings); ok {
return policyv2.ExpandParameterizedResource(unexpandedResource, func(want string) string {
switch want {
case "start":
return m.Start
case "end":
return m.End
case "timezone":
return m.Timezone
default:
return ""
}
})
}
return ""
})
}