main
1// Code generated by protoc-gen-go. DO NOT EDIT.
2// versions:
3// protoc-gen-go v1.36.6
4// protoc v3.19.6
5// source: ability.proto
6
7package rpc
8
9import (
10 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 reflect "reflect"
13 sync "sync"
14 unsafe "unsafe"
15)
16
17const (
18 // Verify that this generated code is sufficiently up-to-date.
19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
20 // Verify that runtime/protoimpl is sufficiently up-to-date.
21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
22)
23
24type AllowRequest struct {
25 state protoimpl.MessageState `protogen:"open.v1"`
26 Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
27 Permission string `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"`
28 Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
29 unknownFields protoimpl.UnknownFields
30 sizeCache protoimpl.SizeCache
31}
32
33func (x *AllowRequest) Reset() {
34 *x = AllowRequest{}
35 mi := &file_ability_proto_msgTypes[0]
36 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
37 ms.StoreMessageInfo(mi)
38}
39
40func (x *AllowRequest) String() string {
41 return protoimpl.X.MessageStringOf(x)
42}
43
44func (*AllowRequest) ProtoMessage() {}
45
46func (x *AllowRequest) ProtoReflect() protoreflect.Message {
47 mi := &file_ability_proto_msgTypes[0]
48 if x != nil {
49 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
50 if ms.LoadMessageInfo() == nil {
51 ms.StoreMessageInfo(mi)
52 }
53 return ms
54 }
55 return mi.MessageOf(x)
56}
57
58// Deprecated: Use AllowRequest.ProtoReflect.Descriptor instead.
59func (*AllowRequest) Descriptor() ([]byte, []int) {
60 return file_ability_proto_rawDescGZIP(), []int{0}
61}
62
63func (x *AllowRequest) GetSubject() string {
64 if x != nil {
65 return x.Subject
66 }
67 return ""
68}
69
70func (x *AllowRequest) GetPermission() string {
71 if x != nil {
72 return x.Permission
73 }
74 return ""
75}
76
77func (x *AllowRequest) GetResource() string {
78 if x != nil {
79 return x.Resource
80 }
81 return ""
82}
83
84type AllowReply struct {
85 state protoimpl.MessageState `protogen:"open.v1"`
86 Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
87 unknownFields protoimpl.UnknownFields
88 sizeCache protoimpl.SizeCache
89}
90
91func (x *AllowReply) Reset() {
92 *x = AllowReply{}
93 mi := &file_ability_proto_msgTypes[1]
94 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
95 ms.StoreMessageInfo(mi)
96}
97
98func (x *AllowReply) String() string {
99 return protoimpl.X.MessageStringOf(x)
100}
101
102func (*AllowReply) ProtoMessage() {}
103
104func (x *AllowReply) ProtoReflect() protoreflect.Message {
105 mi := &file_ability_proto_msgTypes[1]
106 if x != nil {
107 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
108 if ms.LoadMessageInfo() == nil {
109 ms.StoreMessageInfo(mi)
110 }
111 return ms
112 }
113 return mi.MessageOf(x)
114}
115
116// Deprecated: Use AllowReply.ProtoReflect.Descriptor instead.
117func (*AllowReply) Descriptor() ([]byte, []int) {
118 return file_ability_proto_rawDescGZIP(), []int{1}
119}
120
121func (x *AllowReply) GetResult() bool {
122 if x != nil {
123 return x.Result
124 }
125 return false
126}
127
128var File_ability_proto protoreflect.FileDescriptor
129
130const file_ability_proto_rawDesc = "" +
131 "\n" +
132 "\rability.proto\x12\tauthx.rpc\"d\n" +
133 "\fAllowRequest\x12\x18\n" +
134 "\asubject\x18\x01 \x01(\tR\asubject\x12\x1e\n" +
135 "\n" +
136 "permission\x18\x02 \x01(\tR\n" +
137 "permission\x12\x1a\n" +
138 "\bresource\x18\x03 \x01(\tR\bresource\"$\n" +
139 "\n" +
140 "AllowReply\x12\x16\n" +
141 "\x06result\x18\x01 \x01(\bR\x06result2F\n" +
142 "\aAbility\x12;\n" +
143 "\aAllowed\x12\x17.authx.rpc.AllowRequest\x1a\x15.authx.rpc.AllowReply\"\x00B!Z\x1fgitlab.com/mokhax/spike/pkg/rpcb\x06proto3"
144
145var (
146 file_ability_proto_rawDescOnce sync.Once
147 file_ability_proto_rawDescData []byte
148)
149
150func file_ability_proto_rawDescGZIP() []byte {
151 file_ability_proto_rawDescOnce.Do(func() {
152 file_ability_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ability_proto_rawDesc), len(file_ability_proto_rawDesc)))
153 })
154 return file_ability_proto_rawDescData
155}
156
157var file_ability_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
158var file_ability_proto_goTypes = []any{
159 (*AllowRequest)(nil), // 0: authx.rpc.AllowRequest
160 (*AllowReply)(nil), // 1: authx.rpc.AllowReply
161}
162var file_ability_proto_depIdxs = []int32{
163 0, // 0: authx.rpc.Ability.Allowed:input_type -> authx.rpc.AllowRequest
164 1, // 1: authx.rpc.Ability.Allowed:output_type -> authx.rpc.AllowReply
165 1, // [1:2] is the sub-list for method output_type
166 0, // [0:1] is the sub-list for method input_type
167 0, // [0:0] is the sub-list for extension type_name
168 0, // [0:0] is the sub-list for extension extendee
169 0, // [0:0] is the sub-list for field type_name
170}
171
172func init() { file_ability_proto_init() }
173func file_ability_proto_init() {
174 if File_ability_proto != nil {
175 return
176 }
177 type x struct{}
178 out := protoimpl.TypeBuilder{
179 File: protoimpl.DescBuilder{
180 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
181 RawDescriptor: unsafe.Slice(unsafe.StringData(file_ability_proto_rawDesc), len(file_ability_proto_rawDesc)),
182 NumEnums: 0,
183 NumMessages: 2,
184 NumExtensions: 0,
185 NumServices: 1,
186 },
187 GoTypes: file_ability_proto_goTypes,
188 DependencyIndexes: file_ability_proto_depIdxs,
189 MessageInfos: file_ability_proto_msgTypes,
190 }.Build()
191 File_ability_proto = out.File
192 file_ability_proto_goTypes = nil
193 file_ability_proto_depIdxs = nil
194}