raw draft of policy-manager
This commit is contained in:
27
main.go
Normal file
27
main.go
Normal 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))
|
||||
}
|
||||
Reference in New Issue
Block a user