raw draft of policy-manager

This commit is contained in:
2026-03-26 23:30:07 -04:00
commit 096bf36c2f
8 changed files with 353 additions and 0 deletions

27
main.go Normal file
View File

@@ -0,0 +1,27 @@
package main
import (
"log"
"net/http"
)
// Document represents the expected JSON structure
// You can modify this struct to match your actual data needs
type Policy struct {
PolicyIdentifier string `json:"pid"`
Comment string `json:"comment"`
Effect string `json:"effect"`
Actions []string `json:"actions"`
Resources []string `json:"resources"`
}
func main() {
pool = getDbPool()
log.Println("Policy Manager service started")
http.HandleFunc("/iam/create-policy", CreatePolicy)
http.HandleFunc("/iam/list-policy", ListPolicy)
log.Println("Server running on :8080")
log.Fatal(http.ListenAndServe(":8080", nil))
}