Files
policy-manager/main.go

28 lines
672 B
Go

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))
}