initial commit

This commit is contained in:
2026-04-02 01:53:56 -04:00
commit e71ff601d7
3 changed files with 220 additions and 0 deletions

25
structures.go Normal file
View 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"`
}