initial commit
This commit is contained in:
25
structures.go
Normal file
25
structures.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package libpolicy
|
||||
|
||||
// Policy represents the top-level structure of your custom policy.json
|
||||
type Policy struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Conditions []Condition `json:"conditions"`
|
||||
}
|
||||
|
||||
// Condition represents each item in the "conditions" array
|
||||
type Condition struct {
|
||||
StatementID string `json:"statementid"`
|
||||
Principal []string `json:"principals"`
|
||||
Actions []string `json:"actions"`
|
||||
Source []string `json:"source"`
|
||||
Effect string `json:"effect"`
|
||||
Operator string `json:"operator"`
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
Principal string `json:"principal"`
|
||||
SourceIPAddress string `json:"source_ipaddress"`
|
||||
Action string `json:"action"`
|
||||
Target string `json:"target"`
|
||||
}
|
||||
Reference in New Issue
Block a user