1. Basic Gateway (No Auth)
Section titled “1. Basic Gateway (No Auth)”qql-go serve --qdrant-url http://localhost:6334Transparent QQL proxy. Any query passes through.
Test it:
curl -X POST http://localhost:50051/qql.QQL/Exec-H "Content-Type: application/json"-d '{"query": "SHOW COLLECTIONS"}'Health check:
curl http://localhost:50051/health{"ok":true,"version":"X.Y.Z"}Section titled “{"ok":true,"version":"X.Y.Z"}”2. With JWT Auth (No Policy)
Section titled “2. With JWT Auth (No Policy)”qql-go serve--qdrant-url http://localhost:6334--jwks-url https://idp.example.com/.well-known/jwks.json--jwt-issuer https://idp.example.com--jwt-audience my-app--tenant-claim org_id--role-claim role3. Full Gateway (Auth + Policy + Audit)
Section titled “3. Full Gateway (Auth + Policy + Audit)”qql-go serve--qdrant-url http://localhost:6334--jwks-url https://idp.example.com/.well-known/jwks.json--jwt-issuer https://idp.example.com--jwt-audience my-app--tenant-claim org_id--role-claim role--policy-file policies.yaml--policy-reload--audit--audit-file audit.jsonl--rate-limit 100--rate-limit-capacity 204. With Embeddings (Local Inference)
Section titled “4. With Embeddings (Local Inference)”qql-go serve--qdrant-url http://localhost:6334--inference-mode local--embedding-endpoint http://127.0.0.1:1234/v1/embeddings--embedding-model text-embedding-all-minilm-l6-v2-embedding--embedding-dimension 3845. From Go
Section titled “5. From Go”import ( "github.com/srimon12/qql-go/server" "github.com/srimon12/qql-go/internal/config")
server.Run(server.Config{ ListenAddr: ":50051", QdrantURL: "http://localhost:6334", QQLConfig: &config.Config{InferenceMode: "cloud"}, Gateway: &server.GatewayConfig{ JWTValidator: server.NewJWTValidator(server.JWKSConfig{ JWKSURL: "https://idp.example.com/.well-known/jwks.json", }), PolicyEngine: pe, Audit: server.NewAuditLogger(nil, true), },})Default Port
Section titled “Default Port”The gateway listens on :50051 by default. Change with --listen:
qql-go serve --listen :8080 --qdrant-url http://localhost:6334