-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update BaseSubjectSet to support caveat expressions
This is the first (massive) step in supporting caveats in LookupSubjects, as this implements all the bookkeeping and tracking associated with each subject added to the subject set First part of #931
- Loading branch information
1 parent
a70f33f
commit b496292
Showing
17 changed files
with
6,171 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,73 @@ | ||
--- | ||
run: | ||
timeout: "5m" | ||
timeout: '5m' | ||
output: | ||
sort-results: true | ||
linters-settings: | ||
goimports: | ||
local-prefixes: "github.com/authzed/spicedb" | ||
local-prefixes: 'github.com/authzed/spicedb' | ||
rowserrcheck: | ||
packages: | ||
- "github.com/jmoiron/sqlx" | ||
- "github.com/jackc/pgx" | ||
- 'github.com/jmoiron/sqlx' | ||
- 'github.com/jackc/pgx' | ||
gosec: | ||
excludes: | ||
- "G404" # Allow the usage of math/rand | ||
- 'G404' # Allow the usage of math/rand | ||
linters: | ||
enable: | ||
- "bidichk" | ||
- "bodyclose" | ||
- "deadcode" | ||
- "errcheck" | ||
- "errname" | ||
- "errorlint" | ||
- "gofumpt" | ||
- "goimports" | ||
- "goprintffuncname" | ||
- "gosec" | ||
- "gosimple" | ||
- "govet" | ||
- "importas" | ||
- "ineffassign" | ||
- "makezero" | ||
- "prealloc" | ||
- "predeclared" | ||
- "promlinter" | ||
- "revive" | ||
- "rowserrcheck" | ||
- "staticcheck" | ||
- "structcheck" | ||
- "stylecheck" | ||
- "tenv" | ||
- "typecheck" | ||
- "unconvert" | ||
- "unused" | ||
- "varcheck" | ||
- "wastedassign" | ||
- "whitespace" | ||
- 'bidichk' | ||
- 'bodyclose' | ||
- 'deadcode' | ||
- 'errcheck' | ||
- 'errname' | ||
- 'errorlint' | ||
- 'gofumpt' | ||
- 'goimports' | ||
- 'goprintffuncname' | ||
- 'gosec' | ||
- 'gosimple' | ||
- 'govet' | ||
- 'importas' | ||
- 'ineffassign' | ||
- 'makezero' | ||
- 'prealloc' | ||
- 'predeclared' | ||
- 'promlinter' | ||
- 'revive' | ||
- 'rowserrcheck' | ||
- 'staticcheck' | ||
- 'structcheck' | ||
- 'stylecheck' | ||
- 'tenv' | ||
- 'typecheck' | ||
- 'unconvert' | ||
- 'unused' | ||
- 'varcheck' | ||
- 'wastedassign' | ||
- 'whitespace' | ||
issues: | ||
exclude-rules: | ||
- text: "tx.Rollback()" | ||
- text: 'tx.Rollback()' | ||
linters: | ||
- "errcheck" | ||
- 'errcheck' | ||
# NOTE: temporarily disable deprecation checks for v0. | ||
- path: "internal/services/" | ||
- path: 'internal/services/' | ||
linters: | ||
- "staticcheck" | ||
text: "SA1019" | ||
- path: "internal/middleware/consistency/" | ||
- 'staticcheck' | ||
text: 'SA1019' | ||
- path: 'internal/middleware/consistency/' | ||
linters: | ||
- "staticcheck" | ||
text: "SA1019" | ||
- path: "pkg/proto/core/v1/core.pb.validate.manual.go" # Ignore manual definition of metadata map | ||
- 'staticcheck' | ||
text: 'SA1019' | ||
- path: 'pkg/proto/core/v1/core.pb.validate.manual.go' # Ignore manual definition of metadata map | ||
linters: | ||
- "stylecheck" | ||
text: "ST1003" | ||
- path: "pkg/proto/core/v1/core.pb.validate.manual.go" # Ignore manual definition of metadata map | ||
- 'stylecheck' | ||
text: 'ST1003' | ||
- path: 'pkg/proto/core/v1/core.pb.validate.manual.go' # Ignore manual definition of metadata map | ||
linters: | ||
- "revive" | ||
text: "var-naming" | ||
- 'revive' | ||
text: 'var-naming' | ||
# Ignore receiver errors for generic types not understood by the linter. | ||
- linters: | ||
- 'revive' | ||
text: 'receiver-naming: receiver name \S+ should be consistent with previous receiver name \S+ for invalid-type' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
#!/usr/bin/env -S buf generate -o pkg/proto proto/internal --template | ||
--- | ||
version: "v1" | ||
version: 'v1' | ||
managed: | ||
enabled: true | ||
go_package_prefix: | ||
default: "github.com/authzed/spicedb/pkg/proto" | ||
default: 'github.com/authzed/spicedb/pkg/proto' | ||
except: | ||
- "buf.build/envoyproxy/protoc-gen-validate" | ||
- "buf.build/authzed/api" | ||
- "buf.build/googleapis/googleapis" | ||
- 'buf.build/envoyproxy/protoc-gen-validate' | ||
- 'buf.build/authzed/api' | ||
- 'buf.build/googleapis/googleapis' | ||
plugins: | ||
- name: "go" | ||
out: "." | ||
opt: "paths=source_relative" | ||
- name: "go-grpc" | ||
out: "." | ||
opt: "paths=source_relative" | ||
- name: "go-vtproto" | ||
out: "." | ||
- name: 'go' | ||
out: '.' | ||
opt: 'paths=source_relative' | ||
- name: 'go-grpc' | ||
out: '.' | ||
opt: 'paths=source_relative' | ||
- name: 'go-vtproto' | ||
out: '.' | ||
# To generate pooling methods, you must add an additional `pool=fully/qualified.ProtoMessageType` | ||
opt: "paths=source_relative,features=marshal+unmarshal+size+clone+pool" | ||
- name: "validate" | ||
out: "." | ||
opt: "paths=source_relative,lang=go" | ||
opt: 'paths=source_relative,features=marshal+unmarshal+size+clone+pool+equal' | ||
- name: 'validate' | ||
out: '.' | ||
opt: 'paths=source_relative,lang=go' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.