Skip to content

Conversation

@ivanauth
Copy link

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.go with 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/...

@ivanauth ivanauth requested a review from a team as a code owner November 25, 2025 19:26
@ivanauth ivanauth force-pushed the fix/issue-142-add-api-examples branch from 3f26214 to aa873b3 Compare November 25, 2025 19:33
@ivanauth ivanauth force-pushed the fix/issue-142-add-api-examples branch 2 times, most recently from 6c336fa to 6dcff86 Compare December 13, 2025 02:08
@ivanauth ivanauth force-pushed the fix/issue-142-add-api-examples branch from 6dcff86 to 7442bd4 Compare January 8, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add / reference authzed-go API usage examples

1 participant