Zanzibar-dag is a DAG(directed acyclic graph) based with Google's Zanzibar format, which can be the infrastructure below permission app.
- Get all edges
- Create edge
- Delete edge
- Delete edges by conditions
- Batch create or delete operations
- Get all namespaces
- Check relation
- Get shortest path
- Get all paths
- Get all object relations
- Get all subject relations
- Get tree
The Relation
struct represents a relationship like edge in DAG between objects and subjects. It is defined as follows:
// This means: Subject has a relation on Object
type Relation struct {
ObjectNamespace string
ObjectName string
Relation string
SubjectNamespace string
SubjectName string
SubjectRelation string
}
-
Run postgres on docker(without docker, see ./docker-compose.yaml to get config)
docker compose up -d postgres
-
Run the main server
go run .
%