authzed-go
authzed-go copied to clipboard
Add API usage examples and documentation references
Summary
Add comprehensive examples demonstrating common authzed-go operations and link to external documentation resources in the README.
Fixes #142
Changes
- Add
examples/example_test.gowith 12 runnable examples covering:- Connecting to Authzed and SpiceDB
- Writing schemas and relationships
- Checking permissions (single and bulk)
- Looking up resources and subjects
- Reading and deleting relationships
- Using caveats (conditional permissions)
- Watching for changes
- Update README with examples table and external documentation links
Testing
# Build examples
go build ./examples/...
# Run examples (requires local SpiceDB)
docker run --rm -p 50051:50051 authzed/spicedb serve --grpc-preshared-key "somerandomkeyhere"
go test -v ./examples/...