-
Notifications
You must be signed in to change notification settings - Fork 111
/
event_feed.pb.policy.go
61 lines (58 loc) · 2.26 KB
/
event_feed.pb.policy.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
60
61
// Code generated by protoc-gen-policy. DO NOT EDIT.
// source: external/event_feed/event_feed.proto
package event_feed
import (
request "github.com/chef/automate/api/external/event_feed/request"
policy "github.com/chef/automate/api/external/iam/v2/policy"
)
func init() {
policy.MapMethodTo("/chef.automate.api.event_feed.EventFeedService/GetEventFeed", "event:events", "event:events:list", "GET", "/api/v0/eventfeed", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*request.GetEventFeedRequest); ok {
return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
switch want {
case "cursor":
return m.Cursor
default:
return ""
}
})
}
return ""
})
policy.MapMethodTo("/chef.automate.api.event_feed.EventFeedService/GetEventTypeCounts", "event:events", "event:events:list", "GET", "/api/v0/event_type_counts", func(unexpandedResource string, input interface{}) string {
return unexpandedResource
})
policy.MapMethodTo("/chef.automate.api.event_feed.EventFeedService/GetEventTaskCounts", "event:events", "event:events:list", "GET", "/api/v0/event_task_counts", func(unexpandedResource string, input interface{}) string {
return unexpandedResource
})
policy.MapMethodTo("/chef.automate.api.event_feed.EventFeedService/GetEventStringBuckets", "event:events", "event:events:list", "GET", "/api/v0/eventstrings", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*request.GetEventStringBucketsRequest); ok {
return policy.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 ""
})
policy.MapMethodTo("/chef.automate.api.event_feed.EventFeedService/EventExport", "event:events", "event:events:list", "GET", "/api/v0/eventexport", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*request.EventExportRequest); ok {
return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
switch want {
case "output_type":
return m.OutputType
default:
return ""
}
})
}
return ""
})
}