-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats.pb.policy-v1.go
77 lines (74 loc) · 2.43 KB
/
stats.pb.policy-v1.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Code generated by protoc-gen-policy. DO NOT EDIT.
// source: components/automate-gateway/api/compliance/reporting/stats/stats.proto
package stats
import policy "github.com/chef/automate/components/automate-gateway/api/authz/policy"
func init() {
policy.MapMethodTo("/chef.automate.api.compliance.reporting.stats.v1.StatsService/ReadSummary", "compliance:reporting:stats:summary", "read", "POST", "/compliance/reporting/stats/summary", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*Query); ok {
return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
switch want {
case "id":
return m.Id
case "type":
return m.Type
case "sort":
return m.Sort
default:
return ""
}
})
}
return ""
})
policy.MapMethodTo("/chef.automate.api.compliance.reporting.stats.v1.StatsService/ReadTrend", "compliance:reporting:stats:trend", "read", "POST", "/compliance/reporting/stats/trend", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*Query); ok {
return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
switch want {
case "id":
return m.Id
case "type":
return m.Type
case "sort":
return m.Sort
default:
return ""
}
})
}
return ""
})
policy.MapMethodTo("/chef.automate.api.compliance.reporting.stats.v1.StatsService/ReadProfiles", "compliance:reporting:stats:profiles", "read", "POST", "/compliance/reporting/stats/profiles", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*Query); ok {
return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
switch want {
case "id":
return m.Id
case "type":
return m.Type
case "sort":
return m.Sort
default:
return ""
}
})
}
return ""
})
policy.MapMethodTo("/chef.automate.api.compliance.reporting.stats.v1.StatsService/ReadFailures", "compliance:reporting:stats:failures", "read", "POST", "/compliance/reporting/stats/failures", func(unexpandedResource string, input interface{}) string {
if m, ok := input.(*Query); ok {
return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string {
switch want {
case "id":
return m.Id
case "type":
return m.Type
case "sort":
return m.Sort
default:
return ""
}
})
}
return ""
})
}