Skip to content

Commit 7ac2968

Browse files
committed
Format
1 parent 5fc57d9 commit 7ac2968

File tree

8 files changed

+109
-133
lines changed

8 files changed

+109
-133
lines changed

.github/workflows/lint.yaml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,25 @@ on:
88
pull_request:
99
branches:
1010
- "*"
11+
types:
12+
# This makes the buf checks run again when attributes of the PRs change.
13+
- "ready_for_review"
14+
- "labeled"
15+
- "unlabeled"
16+
# These are the defaults
17+
- "opened"
18+
- "synchronize"
19+
- "reopened"
20+
21+
1122
jobs:
1223
lint:
1324
name: "Lint & Publish Draft/Branch"
1425
runs-on: "ubuntu-latest"
1526
steps:
1627
- uses: "actions/checkout@v4"
1728
- uses: "authzed/actions/yaml-lint@main"
18-
- uses: "bufbuild/buf-setup-action@v1.47.2"
29+
- uses: "bufbuild/buf-action@v1"
1930
with:
20-
github_token: "${{ github.token }}"
21-
- uses: "bufbuild/buf-lint-action@v1"
22-
- uses: "bufbuild/buf-breaking-action@v1"
23-
if: "github.event_name == 'pull_request'"
24-
env:
25-
BUF_INPUT_HTTPS_USERNAME: "${{ github.actor }}"
26-
BUF_INPUT_HTTPS_PASSWORD: "${{ github.token }}"
27-
with:
28-
against: "https://github.com/authzed/api.git#branch=main"
29-
buf_token: "${{ secrets.BUF_REGISTRY_TOKEN }}"
30-
- name: "Push to BSR a Draft"
31-
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'"
32-
shell: "bash"
33-
env:
34-
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
35-
run: "buf push --draft ${{ github.sha }}"
36-
- name: "Push to BSR a Branch"
37-
if: "github.event_name == 'push' && github.ref != 'refs/heads/main'"
38-
shell: "bash"
39-
env:
40-
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
41-
run: "buf push --branch ${{ github.sha }}"
31+
token: "${{ secrets.BUF_REGISTRY_TOKEN }}"
32+
breaking_against: "https://github.com/authzed/api.git#branch=main"

.github/workflows/release.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ jobs:
1010
runs-on: "ubuntu-latest"
1111
steps:
1212
- uses: "actions/checkout@v4"
13-
- uses: "bufbuild/buf-setup-action@v1.47.2"
13+
- uses: "bufbuild/buf-action@v1"
1414
with:
15-
github_token: "${{ github.token }}"
16-
- name: "push release name to BSR"
17-
run:
18-
"buf push --tag ${{ github.ref_name }}"
19-
env:
20-
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
15+
token: "${{ secrets.BUF_REGISTRY_TOKEN }}"
16+
breaking_against: "https://github.com/authzed/api.git#branch=main"

authzed/api/v1/core.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
syntax = "proto3";
22
package authzed.api.v1;
33

4-
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
5-
option java_package = "com.authzed.api.v1";
6-
option java_multiple_files = true;
7-
84
import "buf/validate/validate.proto";
95
import "google/protobuf/struct.proto";
106
import "google/protobuf/timestamp.proto";
117
import "validate/validate.proto";
128

9+
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
10+
option java_multiple_files = true;
11+
option java_package = "com.authzed.api.v1";
12+
1313
// Relationship specifies how a resource relates to a subject. Relationships
1414
// form the data for the graph over which all permissions questions are
1515
// answered.

authzed/api/v1/debug.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ package authzed.api.v1;
33

44
import "authzed/api/v1/core.proto";
55
import "buf/validate/validate.proto";
6-
import "validate/validate.proto";
7-
import "google/protobuf/struct.proto";
86
import "google/protobuf/duration.proto";
7+
import "google/protobuf/struct.proto";
98
import "google/protobuf/timestamp.proto";
9+
import "validate/validate.proto";
1010

1111
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
12-
option java_package = "com.authzed.api.v1";
1312
option java_multiple_files = true;
13+
option java_package = "com.authzed.api.v1";
1414

1515
// DebugInformation defines debug information returned by an API call in a footer when
1616
// requested with a specific debugging header.

authzed/api/v1/experimental_service.proto

Lines changed: 36 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
syntax = "proto3";
22
package authzed.api.v1;
33

4-
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
5-
option java_package = "com.authzed.api.v1";
6-
option java_multiple_files = true;
7-
8-
import "google/api/annotations.proto";
9-
import "validate/validate.proto";
4+
import "authzed/api/v1/core.proto";
5+
import "authzed/api/v1/permission_service.proto";
106
import "buf/validate/validate.proto";
7+
import "google/api/annotations.proto";
118
import "google/protobuf/struct.proto";
129
import "google/rpc/status.proto";
10+
import "validate/validate.proto";
1311

14-
import "authzed/api/v1/core.proto";
15-
import "authzed/api/v1/permission_service.proto";
12+
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
13+
option java_multiple_files = true;
14+
option java_package = "com.authzed.api.v1";
1615

1716
// ExperimentalService exposes a number of APIs that are currently being
1817
// prototyped and tested for future inclusion in the stable API.
@@ -54,44 +53,40 @@ service ExperimentalService {
5453
}
5554

5655
// DEPRECATED: Promoted to ReflectSchema in the stable API.
57-
rpc ExperimentalReflectSchema(ExperimentalReflectSchemaRequest)
58-
returns (ExperimentalReflectSchemaResponse) {
59-
option (google.api.http) = {
60-
post: "/v1/experimental/reflectschema"
61-
body: "*"
62-
};
63-
option deprecated = true;
64-
}
56+
rpc ExperimentalReflectSchema(ExperimentalReflectSchemaRequest) returns (ExperimentalReflectSchemaResponse) {
57+
option (google.api.http) = {
58+
post: "/v1/experimental/reflectschema"
59+
body: "*"
60+
};
61+
option deprecated = true;
62+
}
6563

6664
// DEPRECATED: Promoted to ComputablePermissions in the stable API.
67-
rpc ExperimentalComputablePermissions(ExperimentalComputablePermissionsRequest)
68-
returns (ExperimentalComputablePermissionsResponse) {
69-
option (google.api.http) = {
70-
post: "/v1/experimental/permissions/computable"
71-
body: "*"
72-
};
73-
option deprecated = true;
74-
}
75-
65+
rpc ExperimentalComputablePermissions(ExperimentalComputablePermissionsRequest) returns (ExperimentalComputablePermissionsResponse) {
66+
option (google.api.http) = {
67+
post: "/v1/experimental/permissions/computable"
68+
body: "*"
69+
};
70+
option deprecated = true;
71+
}
72+
7673
// DEPRECATED: Promoted to DependentRelations in the stable API.
77-
rpc ExperimentalDependentRelations(ExperimentalDependentRelationsRequest)
78-
returns (ExperimentalDependentRelationsResponse) {
79-
option (google.api.http) = {
80-
post: "/v1/experimental/permissions/dependent"
81-
body: "*"
82-
};
83-
option deprecated = true;
84-
}
74+
rpc ExperimentalDependentRelations(ExperimentalDependentRelationsRequest) returns (ExperimentalDependentRelationsResponse) {
75+
option (google.api.http) = {
76+
post: "/v1/experimental/permissions/dependent"
77+
body: "*"
78+
};
79+
option deprecated = true;
80+
}
8581

8682
// DEPRECATED: Promoted to DiffSchema in the stable API.
87-
rpc ExperimentalDiffSchema(ExperimentalDiffSchemaRequest)
88-
returns (ExperimentalDiffSchemaResponse) {
89-
option (google.api.http) = {
90-
post: "/v1/experimental/diffschema"
91-
body: "*"
92-
};
93-
option deprecated = true;
94-
}
83+
rpc ExperimentalDiffSchema(ExperimentalDiffSchemaRequest) returns (ExperimentalDiffSchemaResponse) {
84+
option (google.api.http) = {
85+
post: "/v1/experimental/diffschema"
86+
body: "*"
87+
};
88+
option deprecated = true;
89+
}
9590

9691
// EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
9792
// a count can be requested.

authzed/api/v1/permission_service.proto

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
syntax = "proto3";
22
package authzed.api.v1;
33

4-
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
5-
option java_package = "com.authzed.api.v1";
6-
option java_multiple_files = true;
7-
8-
import "google/protobuf/struct.proto";
4+
import "authzed/api/v1/core.proto";
5+
import "authzed/api/v1/debug.proto";
6+
import "buf/validate/validate.proto";
97
import "google/api/annotations.proto";
10-
import "google/rpc/status.proto";
8+
import "google/protobuf/struct.proto";
119
import "google/protobuf/timestamp.proto";
10+
import "google/rpc/status.proto";
1211
import "validate/validate.proto";
13-
import "buf/validate/validate.proto";
1412

15-
import "authzed/api/v1/core.proto";
16-
import "authzed/api/v1/debug.proto";
13+
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
14+
option java_multiple_files = true;
15+
option java_package = "com.authzed.api.v1";
1716

1817
// PermissionsService implements a set of RPCs that perform operations on
1918
// relationships and permissions.

authzed/api/v1/schema_service.proto

Lines changed: 35 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
syntax = "proto3";
22
package authzed.api.v1;
33

4-
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
5-
option java_package = "com.authzed.api.v1";
6-
option java_multiple_files = true;
7-
4+
import "authzed/api/v1/core.proto";
5+
import "authzed/api/v1/permission_service.proto";
6+
import "buf/validate/validate.proto";
87
import "google/api/annotations.proto";
98
import "validate/validate.proto";
10-
import "buf/validate/validate.proto";
119

12-
import "authzed/api/v1/core.proto";
13-
import "authzed/api/v1/permission_service.proto";
10+
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
11+
option java_multiple_files = true;
12+
option java_package = "com.authzed.api.v1";
1413

1514
// SchemaService implements operations on a Permissions System's Schema.
1615
service SchemaService {
@@ -36,46 +35,42 @@ service SchemaService {
3635

3736
// ReflectSchema reflects the current schema stored in SpiceDB, returning a structural
3837
// form of the schema for use by client tooling.
39-
rpc ReflectSchema(ReflectSchemaRequest)
40-
returns (ReflectSchemaResponse) {
41-
option (google.api.http) = {
42-
post: "/v1/schema/reflectschema"
43-
body: "*"
44-
};
45-
}
38+
rpc ReflectSchema(ReflectSchemaRequest) returns (ReflectSchemaResponse) {
39+
option (google.api.http) = {
40+
post: "/v1/schema/reflectschema"
41+
body: "*"
42+
};
43+
}
4644

4745
// ComputablePermissions returns the set of permissions that compute based off a relation
4846
// in the current schema. For example, if the schema has a relation `viewer` and a permission
4947
// `view` defined as `permission view = viewer + editor`, then the
5048
// computable permissions for the relation `viewer` will include `view`.
51-
rpc ComputablePermissions(ComputablePermissionsRequest)
52-
returns (ComputablePermissionsResponse) {
53-
option (google.api.http) = {
54-
post: "/v1/schema/permissions/computable"
55-
body: "*"
56-
};
57-
}
58-
49+
rpc ComputablePermissions(ComputablePermissionsRequest) returns (ComputablePermissionsResponse) {
50+
option (google.api.http) = {
51+
post: "/v1/schema/permissions/computable"
52+
body: "*"
53+
};
54+
}
55+
5956
// DependentRelations returns the set of relations and permissions that used
6057
// to compute a permission, recursively, in the current schema. It is the
6158
// inverse of the ComputablePermissions API.
62-
rpc DependentRelations(DependentRelationsRequest)
63-
returns (DependentRelationsResponse) {
64-
option (google.api.http) = {
65-
post: "/v1/schema/permissions/dependent"
66-
body: "*"
67-
};
68-
}
59+
rpc DependentRelations(DependentRelationsRequest) returns (DependentRelationsResponse) {
60+
option (google.api.http) = {
61+
post: "/v1/schema/permissions/dependent"
62+
body: "*"
63+
};
64+
}
6965

7066
// DiffSchema returns the difference between the specified schema and the current
7167
// schema stored in SpiceDB.
72-
rpc DiffSchema(DiffSchemaRequest)
73-
returns (DiffSchemaResponse) {
74-
option (google.api.http) = {
75-
post: "/v1/schema/diffschema"
76-
body: "*"
77-
};
78-
}
68+
rpc DiffSchema(DiffSchemaRequest) returns (DiffSchemaResponse) {
69+
option (google.api.http) = {
70+
post: "/v1/schema/diffschema"
71+
body: "*"
72+
};
73+
}
7974
}
8075

8176
// ReadSchemaRequest returns the schema from the database.
@@ -119,7 +114,7 @@ message WriteSchemaResponse {
119114

120115
message ReflectSchemaRequest {
121116
Consistency consistency = 1;
122-
117+
123118
// optional_filters defines optional filters that are applied in
124119
// an OR fashion to the schema, before being returned
125120
repeated ReflectionSchemaFilter optional_filters = 2;
@@ -158,7 +153,7 @@ message ReflectionDefinition {
158153
// comment is a human-readable comments on the definition. Will include
159154
// delimiter characters.
160155
string comment = 2;
161-
156+
162157
repeated ReflectionRelation relations = 3;
163158
repeated ReflectionPermission permissions = 4;
164159
}
@@ -204,12 +199,12 @@ message ReflectionTypeReference {
204199
oneof typeref {
205200
// is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
206201
bool is_terminal_subject = 3;
207-
202+
208203
// optional_relation_name is the name of the relation that is applied to the subject, if any.
209204
string optional_relation_name = 4;
210205

211206
// is_public_wildcard is true if the subject is a public wildcard.
212-
bool is_public_wildcard = 5;
207+
bool is_public_wildcard = 5;
213208
}
214209
}
215210

buf.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)