authzed 0.5.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/authzed/api/v1/client.rb +8 -1
- data/lib/authzed/api/v1/core_pb.rb +27 -53
- data/lib/authzed/api/v1/debug_pb.rb +31 -29
- data/lib/authzed/api/v1/error_reason_pb.rb +24 -17
- data/lib/authzed/api/v1/experimental_service_pb.rb +61 -0
- data/lib/authzed/api/v1/experimental_service_services_pb.rb +43 -0
- data/lib/authzed/api/v1/openapi_pb.rb +25 -2
- data/lib/authzed/api/v1/permission_service_pb.rb +28 -125
- data/lib/authzed/api/v1/schema_service_pb.rb +26 -11
- data/lib/authzed/api/v1/watch_service_pb.rb +25 -9
- data/lib/authzed.rb +2 -1
- data/lib/validate/README.md +31 -0
- data/lib/validate/buf.gen.yaml +5 -0
- data/lib/validate/buf.lock +2 -0
- data/lib/validate/buf.yaml +3 -0
- data/lib/validate/validate.proto +862 -0
- data/lib/validate/validate_pb.rb +63 -2
- metadata +13 -15
- data/lib/authzed/api/v0/client.rb +0 -61
- data/lib/authzed/api/v0/core_pb.rb +0 -40
- data/lib/authzed/api/v0/developer_pb.rb +0 -132
- data/lib/authzed/api/v0/developer_services_pb.rb +0 -31
- data/lib/authzed/api/v1alpha1/client.rb +0 -25
- data/lib/authzed/api/v1alpha1/schema_pb.rb +0 -37
- data/lib/authzed/api/v1alpha1/schema_services_pb.rb +0 -36
- data/lib/authzed/api/v1alpha1/watchresources_service_pb.rb +0 -46
- data/lib/authzed/api/v1alpha1/watchresources_service_services_pb.rb +0 -30
data/lib/validate/validate_pb.rb
CHANGED
@@ -1,4 +1,65 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: validate/validate.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/protobuf/descriptor_pb'
|
8
|
+
require 'google/protobuf/duration_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
|
11
|
+
|
12
|
+
descriptor_data = "\n\x17validate/validate.proto\x12\x08validate\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x08\n\nFieldRules\x12\x30\n\x07message\x18\x11 \x01(\x0b\x32\x16.validate.MessageRulesR\x07message\x12,\n\x05\x66loat\x18\x01 \x01(\x0b\x32\x14.validate.FloatRulesH\x00R\x05\x66loat\x12/\n\x06\x64ouble\x18\x02 \x01(\x0b\x32\x15.validate.DoubleRulesH\x00R\x06\x64ouble\x12,\n\x05int32\x18\x03 \x01(\x0b\x32\x14.validate.Int32RulesH\x00R\x05int32\x12,\n\x05int64\x18\x04 \x01(\x0b\x32\x14.validate.Int64RulesH\x00R\x05int64\x12/\n\x06uint32\x18\x05 \x01(\x0b\x32\x15.validate.UInt32RulesH\x00R\x06uint32\x12/\n\x06uint64\x18\x06 \x01(\x0b\x32\x15.validate.UInt64RulesH\x00R\x06uint64\x12/\n\x06sint32\x18\x07 \x01(\x0b\x32\x15.validate.SInt32RulesH\x00R\x06sint32\x12/\n\x06sint64\x18\x08 \x01(\x0b\x32\x15.validate.SInt64RulesH\x00R\x06sint64\x12\x32\n\x07\x66ixed32\x18\t \x01(\x0b\x32\x16.validate.Fixed32RulesH\x00R\x07\x66ixed32\x12\x32\n\x07\x66ixed64\x18\n \x01(\x0b\x32\x16.validate.Fixed64RulesH\x00R\x07\x66ixed64\x12\x35\n\x08sfixed32\x18\x0b \x01(\x0b\x32\x17.validate.SFixed32RulesH\x00R\x08sfixed32\x12\x35\n\x08sfixed64\x18\x0c \x01(\x0b\x32\x17.validate.SFixed64RulesH\x00R\x08sfixed64\x12)\n\x04\x62ool\x18\r \x01(\x0b\x32\x13.validate.BoolRulesH\x00R\x04\x62ool\x12/\n\x06string\x18\x0e \x01(\x0b\x32\x15.validate.StringRulesH\x00R\x06string\x12,\n\x05\x62ytes\x18\x0f \x01(\x0b\x32\x14.validate.BytesRulesH\x00R\x05\x62ytes\x12)\n\x04\x65num\x18\x10 \x01(\x0b\x32\x13.validate.EnumRulesH\x00R\x04\x65num\x12\x35\n\x08repeated\x18\x12 \x01(\x0b\x32\x17.validate.RepeatedRulesH\x00R\x08repeated\x12&\n\x03map\x18\x13 \x01(\x0b\x32\x12.validate.MapRulesH\x00R\x03map\x12&\n\x03\x61ny\x18\x14 \x01(\x0b\x32\x12.validate.AnyRulesH\x00R\x03\x61ny\x12\x35\n\x08\x64uration\x18\x15 \x01(\x0b\x32\x17.validate.DurationRulesH\x00R\x08\x64uration\x12\x38\n\ttimestamp\x18\x16 \x01(\x0b\x32\x18.validate.TimestampRulesH\x00R\ttimestampB\x06\n\x04type\"\xb0\x01\n\nFloatRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x02R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x02R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x02R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x02R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x02R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x02R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x02R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0b\x44oubleRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x01R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x01R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x01R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x01R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x01R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x01R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x01R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb0\x01\n\nInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x05R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x05R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x05R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x05R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x05R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x05R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x05R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb0\x01\n\nInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x03R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x03R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x03R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x03R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x03R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x03R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x03R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bUInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\rR\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\rR\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\rR\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\rR\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\rR\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\rR\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\rR\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bUInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x04R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x04R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x04R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x04R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x04R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x04R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x04R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bSInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x11R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x11R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x11R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x11R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x11R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x11R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x11R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bSInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x12R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x12R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x12R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x12R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x12R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x12R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x12R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb2\x01\n\x0c\x46ixed32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x07R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x07R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x07R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x07R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x07R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x07R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x07R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb2\x01\n\x0c\x46ixed64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x06R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x06R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x06R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x06R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x06R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x06R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x06R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb3\x01\n\rSFixed32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x0fR\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x0fR\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x0fR\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x0fR\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x0fR\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x0fR\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x0fR\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb3\x01\n\rSFixed64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x10R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x10R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x10R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x10R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x10R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x10R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x10R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"!\n\tBoolRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x08R\x05\x63onst\"\xd4\x05\n\x0bStringRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\tR\x05\x63onst\x12\x10\n\x03len\x18\x13 \x01(\x04R\x03len\x12\x17\n\x07min_len\x18\x02 \x01(\x04R\x06minLen\x12\x17\n\x07max_len\x18\x03 \x01(\x04R\x06maxLen\x12\x1b\n\tlen_bytes\x18\x14 \x01(\x04R\x08lenBytes\x12\x1b\n\tmin_bytes\x18\x04 \x01(\x04R\x08minBytes\x12\x1b\n\tmax_bytes\x18\x05 \x01(\x04R\x08maxBytes\x12\x18\n\x07pattern\x18\x06 \x01(\tR\x07pattern\x12\x16\n\x06prefix\x18\x07 \x01(\tR\x06prefix\x12\x16\n\x06suffix\x18\x08 \x01(\tR\x06suffix\x12\x1a\n\x08\x63ontains\x18\t \x01(\tR\x08\x63ontains\x12!\n\x0cnot_contains\x18\x17 \x01(\tR\x0bnotContains\x12\x0e\n\x02in\x18\n \x03(\tR\x02in\x12\x15\n\x06not_in\x18\x0b \x03(\tR\x05notIn\x12\x16\n\x05\x65mail\x18\x0c \x01(\x08H\x00R\x05\x65mail\x12\x1c\n\x08hostname\x18\r \x01(\x08H\x00R\x08hostname\x12\x10\n\x02ip\x18\x0e \x01(\x08H\x00R\x02ip\x12\x14\n\x04ipv4\x18\x0f \x01(\x08H\x00R\x04ipv4\x12\x14\n\x04ipv6\x18\x10 \x01(\x08H\x00R\x04ipv6\x12\x12\n\x03uri\x18\x11 \x01(\x08H\x00R\x03uri\x12\x19\n\x07uri_ref\x18\x12 \x01(\x08H\x00R\x06uriRef\x12\x1a\n\x07\x61\x64\x64ress\x18\x15 \x01(\x08H\x00R\x07\x61\x64\x64ress\x12\x14\n\x04uuid\x18\x16 \x01(\x08H\x00R\x04uuid\x12@\n\x10well_known_regex\x18\x18 \x01(\x0e\x32\x14.validate.KnownRegexH\x00R\x0ewellKnownRegex\x12\x1c\n\x06strict\x18\x19 \x01(\x08:\x04trueR\x06strict\x12!\n\x0cignore_empty\x18\x1a \x01(\x08R\x0bignoreEmptyB\x0c\n\nwell_known\"\xe2\x02\n\nBytesRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x0cR\x05\x63onst\x12\x10\n\x03len\x18\r \x01(\x04R\x03len\x12\x17\n\x07min_len\x18\x02 \x01(\x04R\x06minLen\x12\x17\n\x07max_len\x18\x03 \x01(\x04R\x06maxLen\x12\x18\n\x07pattern\x18\x04 \x01(\tR\x07pattern\x12\x16\n\x06prefix\x18\x05 \x01(\x0cR\x06prefix\x12\x16\n\x06suffix\x18\x06 \x01(\x0cR\x06suffix\x12\x1a\n\x08\x63ontains\x18\x07 \x01(\x0cR\x08\x63ontains\x12\x0e\n\x02in\x18\x08 \x03(\x0cR\x02in\x12\x15\n\x06not_in\x18\t \x03(\x0cR\x05notIn\x12\x10\n\x02ip\x18\n \x01(\x08H\x00R\x02ip\x12\x14\n\x04ipv4\x18\x0b \x01(\x08H\x00R\x04ipv4\x12\x14\n\x04ipv6\x18\x0c \x01(\x08H\x00R\x04ipv6\x12!\n\x0cignore_empty\x18\x0e \x01(\x08R\x0bignoreEmptyB\x0c\n\nwell_known\"k\n\tEnumRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x05R\x05\x63onst\x12!\n\x0c\x64\x65\x66ined_only\x18\x02 \x01(\x08R\x0b\x64\x65\x66inedOnly\x12\x0e\n\x02in\x18\x03 \x03(\x05R\x02in\x12\x15\n\x06not_in\x18\x04 \x03(\x05R\x05notIn\">\n\x0cMessageRules\x12\x12\n\x04skip\x18\x01 \x01(\x08R\x04skip\x12\x1a\n\x08required\x18\x02 \x01(\x08R\x08required\"\xb0\x01\n\rRepeatedRules\x12\x1b\n\tmin_items\x18\x01 \x01(\x04R\x08minItems\x12\x1b\n\tmax_items\x18\x02 \x01(\x04R\x08maxItems\x12\x16\n\x06unique\x18\x03 \x01(\x08R\x06unique\x12*\n\x05items\x18\x04 \x01(\x0b\x32\x14.validate.FieldRulesR\x05items\x12!\n\x0cignore_empty\x18\x05 \x01(\x08R\x0bignoreEmpty\"\xdc\x01\n\x08MapRules\x12\x1b\n\tmin_pairs\x18\x01 \x01(\x04R\x08minPairs\x12\x1b\n\tmax_pairs\x18\x02 \x01(\x04R\x08maxPairs\x12\x1b\n\tno_sparse\x18\x03 \x01(\x08R\x08noSparse\x12(\n\x04keys\x18\x04 \x01(\x0b\x32\x14.validate.FieldRulesR\x04keys\x12,\n\x06values\x18\x05 \x01(\x0b\x32\x14.validate.FieldRulesR\x06values\x12!\n\x0cignore_empty\x18\x06 \x01(\x08R\x0bignoreEmpty\"M\n\x08\x41nyRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12\x0e\n\x02in\x18\x02 \x03(\tR\x02in\x12\x15\n\x06not_in\x18\x03 \x03(\tR\x05notIn\"\xe9\x02\n\rDurationRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12/\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\x05\x63onst\x12)\n\x02lt\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x02lt\x12+\n\x03lte\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\x03lte\x12)\n\x02gt\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationR\x02gt\x12+\n\x03gte\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x03gte\x12)\n\x02in\x18\x07 \x03(\x0b\x32\x19.google.protobuf.DurationR\x02in\x12\x30\n\x06not_in\x18\x08 \x03(\x0b\x32\x19.google.protobuf.DurationR\x05notIn\"\xf3\x02\n\x0eTimestampRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12\x30\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x63onst\x12*\n\x02lt\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x02lt\x12,\n\x03lte\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x03lte\x12*\n\x02gt\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x02gt\x12,\n\x03gte\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x03gte\x12\x15\n\x06lt_now\x18\x07 \x01(\x08R\x05ltNow\x12\x15\n\x06gt_now\x18\x08 \x01(\x08R\x05gtNow\x12\x31\n\x06within\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationR\x06within*F\n\nKnownRegex\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10HTTP_HEADER_NAME\x10\x01\x12\x15\n\x11HTTP_HEADER_VALUE\x10\x02:<\n\x08\x64isabled\x12\x1f.google.protobuf.MessageOptions\x18\xaf\x08 \x01(\x08R\x08\x64isabled::\n\x07ignored\x12\x1f.google.protobuf.MessageOptions\x18\xb0\x08 \x01(\x08R\x07ignored::\n\x08required\x12\x1d.google.protobuf.OneofOptions\x18\xaf\x08 \x01(\x08R\x08required:J\n\x05rules\x12\x1d.google.protobuf.FieldOptions\x18\xaf\x08 \x01(\x0b\x32\x14.validate.FieldRulesR\x05rulesBP\n\x1aio.envoyproxy.pgv.validateZ2github.com/envoyproxy/protoc-gen-validate/validate"
|
13
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.protobuf.Duration", "google/protobuf/duration.proto"],
|
28
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
29
|
+
]
|
30
|
+
imports.each do |type_name, expected_filename|
|
31
|
+
import_file = pool.lookup(type_name).file_descriptor
|
32
|
+
if import_file.name != expected_filename
|
33
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
34
|
+
end
|
3
35
|
end
|
36
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
37
|
+
warn "This will become an error in the next major version."
|
38
|
+
end
|
39
|
+
|
40
|
+
module Validate
|
41
|
+
FieldRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.FieldRules").msgclass
|
42
|
+
FloatRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.FloatRules").msgclass
|
43
|
+
DoubleRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.DoubleRules").msgclass
|
44
|
+
Int32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.Int32Rules").msgclass
|
45
|
+
Int64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.Int64Rules").msgclass
|
46
|
+
UInt32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.UInt32Rules").msgclass
|
47
|
+
UInt64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.UInt64Rules").msgclass
|
48
|
+
SInt32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.SInt32Rules").msgclass
|
49
|
+
SInt64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.SInt64Rules").msgclass
|
50
|
+
Fixed32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.Fixed32Rules").msgclass
|
51
|
+
Fixed64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.Fixed64Rules").msgclass
|
52
|
+
SFixed32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.SFixed32Rules").msgclass
|
53
|
+
SFixed64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.SFixed64Rules").msgclass
|
54
|
+
BoolRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.BoolRules").msgclass
|
55
|
+
StringRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.StringRules").msgclass
|
56
|
+
BytesRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.BytesRules").msgclass
|
57
|
+
EnumRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.EnumRules").msgclass
|
58
|
+
MessageRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.MessageRules").msgclass
|
59
|
+
RepeatedRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.RepeatedRules").msgclass
|
60
|
+
MapRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.MapRules").msgclass
|
61
|
+
AnyRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.AnyRules").msgclass
|
62
|
+
DurationRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.DurationRules").msgclass
|
63
|
+
TimestampRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.TimestampRules").msgclass
|
64
|
+
KnownRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.KnownRegex").enummodule
|
4
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authzed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Authzed
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -62,14 +62,12 @@ files:
|
|
62
62
|
- LICENSE
|
63
63
|
- README.md
|
64
64
|
- lib/authzed.rb
|
65
|
-
- lib/authzed/api/v0/client.rb
|
66
|
-
- lib/authzed/api/v0/core_pb.rb
|
67
|
-
- lib/authzed/api/v0/developer_pb.rb
|
68
|
-
- lib/authzed/api/v0/developer_services_pb.rb
|
69
65
|
- lib/authzed/api/v1/client.rb
|
70
66
|
- lib/authzed/api/v1/core_pb.rb
|
71
67
|
- lib/authzed/api/v1/debug_pb.rb
|
72
68
|
- lib/authzed/api/v1/error_reason_pb.rb
|
69
|
+
- lib/authzed/api/v1/experimental_service_pb.rb
|
70
|
+
- lib/authzed/api/v1/experimental_service_services_pb.rb
|
73
71
|
- lib/authzed/api/v1/openapi_pb.rb
|
74
72
|
- lib/authzed/api/v1/permission_service_pb.rb
|
75
73
|
- lib/authzed/api/v1/permission_service_services_pb.rb
|
@@ -77,12 +75,12 @@ files:
|
|
77
75
|
- lib/authzed/api/v1/schema_service_services_pb.rb
|
78
76
|
- lib/authzed/api/v1/watch_service_pb.rb
|
79
77
|
- lib/authzed/api/v1/watch_service_services_pb.rb
|
80
|
-
- lib/authzed/api/v1alpha1/client.rb
|
81
|
-
- lib/authzed/api/v1alpha1/schema_pb.rb
|
82
|
-
- lib/authzed/api/v1alpha1/schema_services_pb.rb
|
83
|
-
- lib/authzed/api/v1alpha1/watchresources_service_pb.rb
|
84
|
-
- lib/authzed/api/v1alpha1/watchresources_service_services_pb.rb
|
85
78
|
- lib/grpcutil/bearer_token.rb
|
79
|
+
- lib/validate/README.md
|
80
|
+
- lib/validate/buf.gen.yaml
|
81
|
+
- lib/validate/buf.lock
|
82
|
+
- lib/validate/buf.yaml
|
83
|
+
- lib/validate/validate.proto
|
86
84
|
- lib/validate/validate_pb.rb
|
87
85
|
homepage: https://authzed.com
|
88
86
|
licenses:
|
@@ -92,7 +90,7 @@ metadata:
|
|
92
90
|
github_repo: ssh://github.com/authzed/authzed-rb
|
93
91
|
homepage_uri: https://authzed.com
|
94
92
|
source_code_uri: https://github.com/authzed/authzed-rb
|
95
|
-
post_install_message:
|
93
|
+
post_install_message:
|
96
94
|
rdoc_options: []
|
97
95
|
require_paths:
|
98
96
|
- lib
|
@@ -107,8 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
105
|
- !ruby/object:Gem::Version
|
108
106
|
version: '0'
|
109
107
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
111
|
-
signing_key:
|
108
|
+
rubygems_version: 3.0.1
|
109
|
+
signing_key:
|
112
110
|
specification_version: 4
|
113
111
|
summary: Ruby bindings for Authzed API
|
114
112
|
test_files: []
|
@@ -1,61 +0,0 @@
|
|
1
|
-
require 'grpc'
|
2
|
-
|
3
|
-
module Authzed
|
4
|
-
module Api
|
5
|
-
module V0
|
6
|
-
class Client
|
7
|
-
attr_reader :acl_service, :developer_service, :namespace_service, :watch_service
|
8
|
-
|
9
|
-
def initialize(target:, credentials: nil, interceptors: [], options: {}, timeout: nil)
|
10
|
-
creds = credentials || GRPC::Core::ChannelCredentials.new
|
11
|
-
|
12
|
-
@acl_service = ACLService::Stub.new(
|
13
|
-
target,
|
14
|
-
creds,
|
15
|
-
timeout: timeout,
|
16
|
-
interceptors: interceptors,
|
17
|
-
channel_args: options,
|
18
|
-
)
|
19
|
-
@developer_service = DeveloperService::Stub.new(
|
20
|
-
target,
|
21
|
-
creds,
|
22
|
-
timeout: timeout,
|
23
|
-
interceptors: interceptors,
|
24
|
-
channel_args: options,
|
25
|
-
)
|
26
|
-
@namespace_service = NamespaceService::Stub.new(
|
27
|
-
target,
|
28
|
-
creds,
|
29
|
-
timeout: timeout,
|
30
|
-
interceptors: interceptors,
|
31
|
-
channel_args: options,
|
32
|
-
)
|
33
|
-
@watch_service = WatchService::Stub.new(
|
34
|
-
target,
|
35
|
-
creds,
|
36
|
-
timeout: timeout,
|
37
|
-
interceptors: interceptors,
|
38
|
-
channel_args: options,
|
39
|
-
)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
# Utility method for creating usersets
|
44
|
-
module UserPatch
|
45
|
-
def self.included(base)
|
46
|
-
def base.for(namespace:, object_id:)
|
47
|
-
Authzed::Api::V0::User.new(
|
48
|
-
userset: Authzed::Api::V0::ObjectAndRelation.new(
|
49
|
-
namespace: namespace,
|
50
|
-
object_id: object_id,
|
51
|
-
relation: '...',
|
52
|
-
)
|
53
|
-
)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
User.include(UserPatch)
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: authzed/api/v0/core.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
require 'validate/validate_pb'
|
7
|
-
|
8
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
-
add_file("authzed/api/v0/core.proto", :syntax => :proto3) do
|
10
|
-
add_message "authzed.api.v0.RelationTuple" do
|
11
|
-
optional :object_and_relation, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "objectAndRelation"
|
12
|
-
optional :user, :message, 2, "authzed.api.v0.User", json_name: "user"
|
13
|
-
end
|
14
|
-
add_message "authzed.api.v0.ObjectAndRelation" do
|
15
|
-
optional :namespace, :string, 1, json_name: "namespace"
|
16
|
-
optional :object_id, :string, 2, json_name: "objectId"
|
17
|
-
optional :relation, :string, 3, json_name: "relation"
|
18
|
-
end
|
19
|
-
add_message "authzed.api.v0.RelationReference" do
|
20
|
-
optional :namespace, :string, 1, json_name: "namespace"
|
21
|
-
optional :relation, :string, 3, json_name: "relation"
|
22
|
-
end
|
23
|
-
add_message "authzed.api.v0.User" do
|
24
|
-
oneof :user_oneof do
|
25
|
-
optional :userset, :message, 2, "authzed.api.v0.ObjectAndRelation", json_name: "userset"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
module Authzed
|
32
|
-
module Api
|
33
|
-
module V0
|
34
|
-
RelationTuple = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTuple").msgclass
|
35
|
-
ObjectAndRelation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ObjectAndRelation").msgclass
|
36
|
-
RelationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationReference").msgclass
|
37
|
-
User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.User").msgclass
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,132 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: authzed/api/v0/developer.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
require 'authzed/api/v0/core_pb'
|
7
|
-
|
8
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
-
add_file("authzed/api/v0/developer.proto", :syntax => :proto3) do
|
10
|
-
add_message "authzed.api.v0.FormatSchemaRequest" do
|
11
|
-
optional :schema, :string, 1, json_name: "schema"
|
12
|
-
end
|
13
|
-
add_message "authzed.api.v0.FormatSchemaResponse" do
|
14
|
-
optional :error, :message, 1, "authzed.api.v0.DeveloperError", json_name: "error"
|
15
|
-
optional :formatted_schema, :string, 2, json_name: "formattedSchema"
|
16
|
-
end
|
17
|
-
add_message "authzed.api.v0.UpgradeSchemaRequest" do
|
18
|
-
repeated :namespace_configs, :string, 1, json_name: "namespaceConfigs"
|
19
|
-
end
|
20
|
-
add_message "authzed.api.v0.UpgradeSchemaResponse" do
|
21
|
-
optional :error, :message, 1, "authzed.api.v0.DeveloperError", json_name: "error"
|
22
|
-
optional :upgraded_schema, :string, 2, json_name: "upgradedSchema"
|
23
|
-
end
|
24
|
-
add_message "authzed.api.v0.ShareRequest" do
|
25
|
-
optional :schema, :string, 1, json_name: "schema"
|
26
|
-
optional :relationships_yaml, :string, 2, json_name: "relationshipsYaml"
|
27
|
-
optional :validation_yaml, :string, 3, json_name: "validationYaml"
|
28
|
-
optional :assertions_yaml, :string, 4, json_name: "assertionsYaml"
|
29
|
-
end
|
30
|
-
add_message "authzed.api.v0.ShareResponse" do
|
31
|
-
optional :share_reference, :string, 1, json_name: "shareReference"
|
32
|
-
end
|
33
|
-
add_message "authzed.api.v0.LookupShareRequest" do
|
34
|
-
optional :share_reference, :string, 1, json_name: "shareReference"
|
35
|
-
end
|
36
|
-
add_message "authzed.api.v0.LookupShareResponse" do
|
37
|
-
optional :status, :enum, 1, "authzed.api.v0.LookupShareResponse.LookupStatus", json_name: "status"
|
38
|
-
optional :schema, :string, 2, json_name: "schema"
|
39
|
-
optional :relationships_yaml, :string, 3, json_name: "relationshipsYaml"
|
40
|
-
optional :validation_yaml, :string, 4, json_name: "validationYaml"
|
41
|
-
optional :assertions_yaml, :string, 5, json_name: "assertionsYaml"
|
42
|
-
end
|
43
|
-
add_enum "authzed.api.v0.LookupShareResponse.LookupStatus" do
|
44
|
-
value :UNKNOWN_REFERENCE, 0
|
45
|
-
value :FAILED_TO_LOOKUP, 1
|
46
|
-
value :VALID_REFERENCE, 2
|
47
|
-
value :UPGRADED_REFERENCE, 3
|
48
|
-
end
|
49
|
-
add_message "authzed.api.v0.RequestContext" do
|
50
|
-
optional :schema, :string, 1, json_name: "schema"
|
51
|
-
repeated :relationships, :message, 2, "authzed.api.v0.RelationTuple", json_name: "relationships"
|
52
|
-
end
|
53
|
-
add_message "authzed.api.v0.EditCheckRequest" do
|
54
|
-
optional :context, :message, 1, "authzed.api.v0.RequestContext", json_name: "context"
|
55
|
-
repeated :check_relationships, :message, 2, "authzed.api.v0.RelationTuple", json_name: "checkRelationships"
|
56
|
-
end
|
57
|
-
add_message "authzed.api.v0.EditCheckResult" do
|
58
|
-
optional :relationship, :message, 1, "authzed.api.v0.RelationTuple", json_name: "relationship"
|
59
|
-
optional :is_member, :bool, 2, json_name: "isMember"
|
60
|
-
optional :error, :message, 3, "authzed.api.v0.DeveloperError", json_name: "error"
|
61
|
-
end
|
62
|
-
add_message "authzed.api.v0.EditCheckResponse" do
|
63
|
-
repeated :request_errors, :message, 1, "authzed.api.v0.DeveloperError", json_name: "requestErrors"
|
64
|
-
repeated :check_results, :message, 2, "authzed.api.v0.EditCheckResult", json_name: "checkResults"
|
65
|
-
end
|
66
|
-
add_message "authzed.api.v0.ValidateRequest" do
|
67
|
-
optional :context, :message, 1, "authzed.api.v0.RequestContext", json_name: "context"
|
68
|
-
optional :validation_yaml, :string, 3, json_name: "validationYaml"
|
69
|
-
optional :update_validation_yaml, :bool, 4, json_name: "updateValidationYaml"
|
70
|
-
optional :assertions_yaml, :string, 5, json_name: "assertionsYaml"
|
71
|
-
end
|
72
|
-
add_message "authzed.api.v0.ValidateResponse" do
|
73
|
-
repeated :request_errors, :message, 1, "authzed.api.v0.DeveloperError", json_name: "requestErrors"
|
74
|
-
repeated :validation_errors, :message, 2, "authzed.api.v0.DeveloperError", json_name: "validationErrors"
|
75
|
-
optional :updated_validation_yaml, :string, 3, json_name: "updatedValidationYaml"
|
76
|
-
end
|
77
|
-
add_message "authzed.api.v0.DeveloperError" do
|
78
|
-
optional :message, :string, 1, json_name: "message"
|
79
|
-
optional :line, :uint32, 2, json_name: "line"
|
80
|
-
optional :column, :uint32, 3, json_name: "column"
|
81
|
-
optional :source, :enum, 4, "authzed.api.v0.DeveloperError.Source", json_name: "source"
|
82
|
-
optional :kind, :enum, 5, "authzed.api.v0.DeveloperError.ErrorKind", json_name: "kind"
|
83
|
-
repeated :path, :string, 6, json_name: "path"
|
84
|
-
optional :context, :string, 7, json_name: "context"
|
85
|
-
end
|
86
|
-
add_enum "authzed.api.v0.DeveloperError.Source" do
|
87
|
-
value :UNKNOWN_SOURCE, 0
|
88
|
-
value :SCHEMA, 1
|
89
|
-
value :RELATIONSHIP, 2
|
90
|
-
value :VALIDATION_YAML, 3
|
91
|
-
value :CHECK_WATCH, 4
|
92
|
-
value :ASSERTION, 5
|
93
|
-
end
|
94
|
-
add_enum "authzed.api.v0.DeveloperError.ErrorKind" do
|
95
|
-
value :UNKNOWN_KIND, 0
|
96
|
-
value :PARSE_ERROR, 1
|
97
|
-
value :SCHEMA_ISSUE, 2
|
98
|
-
value :DUPLICATE_RELATIONSHIP, 3
|
99
|
-
value :MISSING_EXPECTED_RELATIONSHIP, 4
|
100
|
-
value :EXTRA_RELATIONSHIP_FOUND, 5
|
101
|
-
value :UNKNOWN_OBJECT_TYPE, 6
|
102
|
-
value :UNKNOWN_RELATION, 7
|
103
|
-
value :MAXIMUM_RECURSION, 8
|
104
|
-
value :ASSERTION_FAILED, 9
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
module Authzed
|
110
|
-
module Api
|
111
|
-
module V0
|
112
|
-
FormatSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.FormatSchemaRequest").msgclass
|
113
|
-
FormatSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.FormatSchemaResponse").msgclass
|
114
|
-
UpgradeSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.UpgradeSchemaRequest").msgclass
|
115
|
-
UpgradeSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.UpgradeSchemaResponse").msgclass
|
116
|
-
ShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ShareRequest").msgclass
|
117
|
-
ShareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ShareResponse").msgclass
|
118
|
-
LookupShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareRequest").msgclass
|
119
|
-
LookupShareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareResponse").msgclass
|
120
|
-
LookupShareResponse::LookupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareResponse.LookupStatus").enummodule
|
121
|
-
RequestContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RequestContext").msgclass
|
122
|
-
EditCheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckRequest").msgclass
|
123
|
-
EditCheckResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckResult").msgclass
|
124
|
-
EditCheckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckResponse").msgclass
|
125
|
-
ValidateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ValidateRequest").msgclass
|
126
|
-
ValidateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ValidateResponse").msgclass
|
127
|
-
DeveloperError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError").msgclass
|
128
|
-
DeveloperError::Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError.Source").enummodule
|
129
|
-
DeveloperError::ErrorKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError.ErrorKind").enummodule
|
130
|
-
end
|
131
|
-
end
|
132
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# Source: authzed/api/v0/developer.proto for package 'authzed.api.v0'
|
3
|
-
|
4
|
-
require 'grpc'
|
5
|
-
require 'authzed/api/v0/developer_pb'
|
6
|
-
|
7
|
-
module Authzed
|
8
|
-
module Api
|
9
|
-
module V0
|
10
|
-
module DeveloperService
|
11
|
-
class Service
|
12
|
-
|
13
|
-
include ::GRPC::GenericService
|
14
|
-
|
15
|
-
self.marshal_class_method = :encode
|
16
|
-
self.unmarshal_class_method = :decode
|
17
|
-
self.service_name = 'authzed.api.v0.DeveloperService'
|
18
|
-
|
19
|
-
rpc :EditCheck, ::Authzed::Api::V0::EditCheckRequest, ::Authzed::Api::V0::EditCheckResponse
|
20
|
-
rpc :Validate, ::Authzed::Api::V0::ValidateRequest, ::Authzed::Api::V0::ValidateResponse
|
21
|
-
rpc :Share, ::Authzed::Api::V0::ShareRequest, ::Authzed::Api::V0::ShareResponse
|
22
|
-
rpc :LookupShared, ::Authzed::Api::V0::LookupShareRequest, ::Authzed::Api::V0::LookupShareResponse
|
23
|
-
rpc :UpgradeSchema, ::Authzed::Api::V0::UpgradeSchemaRequest, ::Authzed::Api::V0::UpgradeSchemaResponse
|
24
|
-
rpc :FormatSchema, ::Authzed::Api::V0::FormatSchemaRequest, ::Authzed::Api::V0::FormatSchemaResponse
|
25
|
-
end
|
26
|
-
|
27
|
-
Stub = Service.rpc_stub_class
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'grpc'
|
2
|
-
|
3
|
-
module Authzed
|
4
|
-
module Api
|
5
|
-
module V1alpha1
|
6
|
-
class Client
|
7
|
-
|
8
|
-
attr_reader :schema_service
|
9
|
-
|
10
|
-
def initialize(target:, credentials: nil, interceptors: [], options: {}, timeout: nil)
|
11
|
-
creds = credentials || GRPC::Core::ChannelCredentials.new
|
12
|
-
|
13
|
-
@schema_service = Authzed::Api::V1alpha1::SchemaService::Stub.new(
|
14
|
-
target,
|
15
|
-
creds,
|
16
|
-
timeout: timeout,
|
17
|
-
interceptors: interceptors,
|
18
|
-
channel_args: options,
|
19
|
-
)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: authzed/api/v1alpha1/schema.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
require 'validate/validate_pb'
|
7
|
-
|
8
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
-
add_file("authzed/api/v1alpha1/schema.proto", :syntax => :proto3) do
|
10
|
-
add_message "authzed.api.v1alpha1.ReadSchemaRequest" do
|
11
|
-
repeated :object_definitions_names, :string, 1, json_name: "objectDefinitionsNames"
|
12
|
-
end
|
13
|
-
add_message "authzed.api.v1alpha1.ReadSchemaResponse" do
|
14
|
-
repeated :object_definitions, :string, 1, json_name: "objectDefinitions"
|
15
|
-
optional :computed_definitions_revision, :string, 2, json_name: "computedDefinitionsRevision"
|
16
|
-
end
|
17
|
-
add_message "authzed.api.v1alpha1.WriteSchemaRequest" do
|
18
|
-
optional :schema, :string, 1, json_name: "schema"
|
19
|
-
optional :optional_definitions_revision_precondition, :string, 2, json_name: "optionalDefinitionsRevisionPrecondition"
|
20
|
-
end
|
21
|
-
add_message "authzed.api.v1alpha1.WriteSchemaResponse" do
|
22
|
-
repeated :object_definitions_names, :string, 1, json_name: "objectDefinitionsNames"
|
23
|
-
optional :computed_definitions_revision, :string, 2, json_name: "computedDefinitionsRevision"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
module Authzed
|
29
|
-
module Api
|
30
|
-
module V1alpha1
|
31
|
-
ReadSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.ReadSchemaRequest").msgclass
|
32
|
-
ReadSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.ReadSchemaResponse").msgclass
|
33
|
-
WriteSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WriteSchemaRequest").msgclass
|
34
|
-
WriteSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WriteSchemaResponse").msgclass
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# Source: authzed/api/v1alpha1/schema.proto for package 'authzed.api.v1alpha1'
|
3
|
-
|
4
|
-
require 'grpc'
|
5
|
-
require 'authzed/api/v1alpha1/schema_pb'
|
6
|
-
|
7
|
-
module Authzed
|
8
|
-
module Api
|
9
|
-
module V1alpha1
|
10
|
-
module SchemaService
|
11
|
-
# SchemaService implements operations on a Permissions System's Schema.
|
12
|
-
class Service
|
13
|
-
|
14
|
-
include ::GRPC::GenericService
|
15
|
-
|
16
|
-
self.marshal_class_method = :encode
|
17
|
-
self.unmarshal_class_method = :decode
|
18
|
-
self.service_name = 'authzed.api.v1alpha1.SchemaService'
|
19
|
-
|
20
|
-
# Read returns the current Object Definitions for a Permissions System.
|
21
|
-
#
|
22
|
-
# Errors include:
|
23
|
-
# - INVALID_ARGUMENT: a provided value has failed to semantically validate
|
24
|
-
# - NOT_FOUND: one of the Object Definitions being requested does not exist
|
25
|
-
rpc :ReadSchema, ::Authzed::Api::V1alpha1::ReadSchemaRequest, ::Authzed::Api::V1alpha1::ReadSchemaResponse
|
26
|
-
# Write overwrites the current Object Definitions for a Permissions System.
|
27
|
-
#
|
28
|
-
# Any Object Definitions that exist, but are not included will be deleted.
|
29
|
-
rpc :WriteSchema, ::Authzed::Api::V1alpha1::WriteSchemaRequest, ::Authzed::Api::V1alpha1::WriteSchemaResponse
|
30
|
-
end
|
31
|
-
|
32
|
-
Stub = Service.rpc_stub_class
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# source: authzed/api/v1alpha1/watchresources_service.proto
|
3
|
-
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
|
-
require 'google/api/annotations_pb'
|
7
|
-
require 'validate/validate_pb'
|
8
|
-
require 'authzed/api/v1/core_pb'
|
9
|
-
|
10
|
-
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
-
add_file("authzed/api/v1alpha1/watchresources_service.proto", :syntax => :proto3) do
|
12
|
-
add_message "authzed.api.v1alpha1.WatchResourcesRequest" do
|
13
|
-
optional :resource_object_type, :string, 1, json_name: "resourceObjectType"
|
14
|
-
optional :permission, :string, 2, json_name: "permission"
|
15
|
-
optional :subject_object_type, :string, 3, json_name: "subjectObjectType"
|
16
|
-
optional :optional_subject_relation, :string, 4, json_name: "optionalSubjectRelation"
|
17
|
-
optional :optional_start_cursor, :message, 5, "authzed.api.v1.ZedToken", json_name: "optionalStartCursor"
|
18
|
-
end
|
19
|
-
add_message "authzed.api.v1alpha1.PermissionUpdate" do
|
20
|
-
optional :subject, :message, 1, "authzed.api.v1.SubjectReference", json_name: "subject"
|
21
|
-
optional :resource, :message, 2, "authzed.api.v1.ObjectReference", json_name: "resource"
|
22
|
-
optional :relation, :string, 3, json_name: "relation"
|
23
|
-
optional :updated_permission, :enum, 4, "authzed.api.v1alpha1.PermissionUpdate.Permissionship", json_name: "updatedPermission"
|
24
|
-
end
|
25
|
-
add_enum "authzed.api.v1alpha1.PermissionUpdate.Permissionship" do
|
26
|
-
value :PERMISSIONSHIP_UNSPECIFIED, 0
|
27
|
-
value :PERMISSIONSHIP_NO_PERMISSION, 1
|
28
|
-
value :PERMISSIONSHIP_HAS_PERMISSION, 2
|
29
|
-
end
|
30
|
-
add_message "authzed.api.v1alpha1.WatchResourcesResponse" do
|
31
|
-
repeated :updates, :message, 1, "authzed.api.v1alpha1.PermissionUpdate", json_name: "updates"
|
32
|
-
optional :changes_through, :message, 2, "authzed.api.v1.ZedToken", json_name: "changesThrough"
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
module Authzed
|
38
|
-
module Api
|
39
|
-
module V1alpha1
|
40
|
-
WatchResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WatchResourcesRequest").msgclass
|
41
|
-
PermissionUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.PermissionUpdate").msgclass
|
42
|
-
PermissionUpdate::Permissionship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.PermissionUpdate.Permissionship").enummodule
|
43
|
-
WatchResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WatchResourcesResponse").msgclass
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
-
# Source: authzed/api/v1alpha1/watchresources_service.proto for package 'authzed.api.v1alpha1'
|
3
|
-
|
4
|
-
require 'grpc'
|
5
|
-
require 'authzed/api/v1alpha1/watchresources_service_pb'
|
6
|
-
|
7
|
-
module Authzed
|
8
|
-
module Api
|
9
|
-
module V1alpha1
|
10
|
-
module WatchResourcesService
|
11
|
-
# WatchResourcesService is used to receive a stream of updates for resources of a
|
12
|
-
# specific (resource type, permission, subject) combination.
|
13
|
-
class Service
|
14
|
-
|
15
|
-
include ::GRPC::GenericService
|
16
|
-
|
17
|
-
self.marshal_class_method = :encode
|
18
|
-
self.unmarshal_class_method = :decode
|
19
|
-
self.service_name = 'authzed.api.v1alpha1.WatchResourcesService'
|
20
|
-
|
21
|
-
# WatchResources initiates a watch for permission changes for the provided
|
22
|
-
# (resource type, permission, subject) pair.
|
23
|
-
rpc :WatchResources, ::Authzed::Api::V1alpha1::WatchResourcesRequest, stream(::Authzed::Api::V1alpha1::WatchResourcesResponse)
|
24
|
-
end
|
25
|
-
|
26
|
-
Stub = Service.rpc_stub_class
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|