diff --git a/api/health/v1/health.pb.go b/api/health/v1/health.pb.go deleted file mode 100644 index 690f4a1..0000000 --- a/api/health/v1/health.pb.go +++ /dev/null @@ -1,355 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v4.25.1 -// source: health/v1/health.proto - -package v1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetLivezRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetLivezRequest) Reset() { - *x = GetLivezRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_health_v1_health_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLivezRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLivezRequest) ProtoMessage() {} - -func (x *GetLivezRequest) ProtoReflect() protoreflect.Message { - mi := &file_health_v1_health_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetLivezRequest.ProtoReflect.Descriptor instead. -func (*GetLivezRequest) Descriptor() ([]byte, []int) { - return file_health_v1_health_proto_rawDescGZIP(), []int{0} -} - -type GetLivezReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` -} - -func (x *GetLivezReply) Reset() { - *x = GetLivezReply{} - if protoimpl.UnsafeEnabled { - mi := &file_health_v1_health_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLivezReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLivezReply) ProtoMessage() {} - -func (x *GetLivezReply) ProtoReflect() protoreflect.Message { - mi := &file_health_v1_health_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetLivezReply.ProtoReflect.Descriptor instead. -func (*GetLivezReply) Descriptor() ([]byte, []int) { - return file_health_v1_health_proto_rawDescGZIP(), []int{1} -} - -func (x *GetLivezReply) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *GetLivezReply) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -type GetReadyzRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetReadyzRequest) Reset() { - *x = GetReadyzRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_health_v1_health_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetReadyzRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetReadyzRequest) ProtoMessage() {} - -func (x *GetReadyzRequest) ProtoReflect() protoreflect.Message { - mi := &file_health_v1_health_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetReadyzRequest.ProtoReflect.Descriptor instead. -func (*GetReadyzRequest) Descriptor() ([]byte, []int) { - return file_health_v1_health_proto_rawDescGZIP(), []int{2} -} - -type GetReadyzReply struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` -} - -func (x *GetReadyzReply) Reset() { - *x = GetReadyzReply{} - if protoimpl.UnsafeEnabled { - mi := &file_health_v1_health_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetReadyzReply) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetReadyzReply) ProtoMessage() {} - -func (x *GetReadyzReply) ProtoReflect() protoreflect.Message { - mi := &file_health_v1_health_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetReadyzReply.ProtoReflect.Descriptor instead. -func (*GetReadyzReply) Descriptor() ([]byte, []int) { - return file_health_v1_health_proto_rawDescGZIP(), []int{3} -} - -func (x *GetReadyzReply) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *GetReadyzReply) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -var File_health_v1_health_proto protoreflect.FileDescriptor - -var file_health_v1_health_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x3c, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x32, 0xde, 0x01, - 0x0a, 0x0c, 0x4b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x64, - 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x12, 0x24, 0x2e, 0x6b, 0x65, 0x73, - 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x6c, - 0x69, 0x76, 0x65, 0x7a, 0x12, 0x68, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, - 0x7a, 0x12, 0x25, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, - 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, - 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x0f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x42, 0x5e, - 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, - 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, - 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_health_v1_health_proto_rawDescOnce sync.Once - file_health_v1_health_proto_rawDescData = file_health_v1_health_proto_rawDesc -) - -func file_health_v1_health_proto_rawDescGZIP() []byte { - file_health_v1_health_proto_rawDescOnce.Do(func() { - file_health_v1_health_proto_rawDescData = protoimpl.X.CompressGZIP(file_health_v1_health_proto_rawDescData) - }) - return file_health_v1_health_proto_rawDescData -} - -var file_health_v1_health_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_health_v1_health_proto_goTypes = []any{ - (*GetLivezRequest)(nil), // 0: kessel.relations.v1.GetLivezRequest - (*GetLivezReply)(nil), // 1: kessel.relations.v1.GetLivezReply - (*GetReadyzRequest)(nil), // 2: kessel.relations.v1.GetReadyzRequest - (*GetReadyzReply)(nil), // 3: kessel.relations.v1.GetReadyzReply -} -var file_health_v1_health_proto_depIdxs = []int32{ - 0, // 0: kessel.relations.v1.KesselHealth.GetLivez:input_type -> kessel.relations.v1.GetLivezRequest - 2, // 1: kessel.relations.v1.KesselHealth.GetReadyz:input_type -> kessel.relations.v1.GetReadyzRequest - 1, // 2: kessel.relations.v1.KesselHealth.GetLivez:output_type -> kessel.relations.v1.GetLivezReply - 3, // 3: kessel.relations.v1.KesselHealth.GetReadyz:output_type -> kessel.relations.v1.GetReadyzReply - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_health_v1_health_proto_init() } -func file_health_v1_health_proto_init() { - if File_health_v1_health_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_health_v1_health_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetLivezRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_health_v1_health_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetLivezReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_health_v1_health_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetReadyzRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_health_v1_health_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetReadyzReply); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_health_v1_health_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_health_v1_health_proto_goTypes, - DependencyIndexes: file_health_v1_health_proto_depIdxs, - MessageInfos: file_health_v1_health_proto_msgTypes, - }.Build() - File_health_v1_health_proto = out.File - file_health_v1_health_proto_rawDesc = nil - file_health_v1_health_proto_goTypes = nil - file_health_v1_health_proto_depIdxs = nil -} diff --git a/api/health/v1/health_grpc.pb.go b/api/health/v1/health_grpc.pb.go deleted file mode 100644 index 360f1bc..0000000 --- a/api/health/v1/health_grpc.pb.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v4.25.1 -// source: health/v1/health.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 - -const ( - KesselHealth_GetLivez_FullMethodName = "/kessel.relations.v1.KesselHealth/GetLivez" - KesselHealth_GetReadyz_FullMethodName = "/kessel.relations.v1.KesselHealth/GetReadyz" -) - -// KesselHealthClient is the client API for KesselHealth service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type KesselHealthClient interface { - GetLivez(ctx context.Context, in *GetLivezRequest, opts ...grpc.CallOption) (*GetLivezReply, error) - GetReadyz(ctx context.Context, in *GetReadyzRequest, opts ...grpc.CallOption) (*GetReadyzReply, error) -} - -type kesselHealthClient struct { - cc grpc.ClientConnInterface -} - -func NewKesselHealthClient(cc grpc.ClientConnInterface) KesselHealthClient { - return &kesselHealthClient{cc} -} - -func (c *kesselHealthClient) GetLivez(ctx context.Context, in *GetLivezRequest, opts ...grpc.CallOption) (*GetLivezReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetLivezReply) - err := c.cc.Invoke(ctx, KesselHealth_GetLivez_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *kesselHealthClient) GetReadyz(ctx context.Context, in *GetReadyzRequest, opts ...grpc.CallOption) (*GetReadyzReply, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetReadyzReply) - err := c.cc.Invoke(ctx, KesselHealth_GetReadyz_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KesselHealthServer is the server API for KesselHealth service. -// All implementations must embed UnimplementedKesselHealthServer -// for forward compatibility -type KesselHealthServer interface { - GetLivez(context.Context, *GetLivezRequest) (*GetLivezReply, error) - GetReadyz(context.Context, *GetReadyzRequest) (*GetReadyzReply, error) - mustEmbedUnimplementedKesselHealthServer() -} - -// UnimplementedKesselHealthServer must be embedded to have forward compatible implementations. -type UnimplementedKesselHealthServer struct { -} - -func (UnimplementedKesselHealthServer) GetLivez(context.Context, *GetLivezRequest) (*GetLivezReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLivez not implemented") -} -func (UnimplementedKesselHealthServer) GetReadyz(context.Context, *GetReadyzRequest) (*GetReadyzReply, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetReadyz not implemented") -} -func (UnimplementedKesselHealthServer) mustEmbedUnimplementedKesselHealthServer() {} - -// UnsafeKesselHealthServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to KesselHealthServer will -// result in compilation errors. -type UnsafeKesselHealthServer interface { - mustEmbedUnimplementedKesselHealthServer() -} - -func RegisterKesselHealthServer(s grpc.ServiceRegistrar, srv KesselHealthServer) { - s.RegisterService(&KesselHealth_ServiceDesc, srv) -} - -func _KesselHealth_GetLivez_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLivezRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KesselHealthServer).GetLivez(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KesselHealth_GetLivez_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KesselHealthServer).GetLivez(ctx, req.(*GetLivezRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KesselHealth_GetReadyz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetReadyzRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KesselHealthServer).GetReadyz(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KesselHealth_GetReadyz_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KesselHealthServer).GetReadyz(ctx, req.(*GetReadyzRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// KesselHealth_ServiceDesc is the grpc.ServiceDesc for KesselHealth service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var KesselHealth_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "kessel.relations.v1.KesselHealth", - HandlerType: (*KesselHealthServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetLivez", - Handler: _KesselHealth_GetLivez_Handler, - }, - { - MethodName: "GetReadyz", - Handler: _KesselHealth_GetReadyz_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "health/v1/health.proto", -} diff --git a/api/kessel/health/v1/health.pb.go b/api/kessel/health/v1/health.pb.go new file mode 100644 index 0000000..6b728af --- /dev/null +++ b/api/kessel/health/v1/health.pb.go @@ -0,0 +1,356 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: kessel/health/v1/health.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetLivezRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetLivezRequest) Reset() { + *x = GetLivezRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_health_v1_health_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLivezRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLivezRequest) ProtoMessage() {} + +func (x *GetLivezRequest) ProtoReflect() protoreflect.Message { + mi := &file_kessel_health_v1_health_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLivezRequest.ProtoReflect.Descriptor instead. +func (*GetLivezRequest) Descriptor() ([]byte, []int) { + return file_kessel_health_v1_health_proto_rawDescGZIP(), []int{0} +} + +type GetLivezResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *GetLivezResponse) Reset() { + *x = GetLivezResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_health_v1_health_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLivezResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLivezResponse) ProtoMessage() {} + +func (x *GetLivezResponse) ProtoReflect() protoreflect.Message { + mi := &file_kessel_health_v1_health_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLivezResponse.ProtoReflect.Descriptor instead. +func (*GetLivezResponse) Descriptor() ([]byte, []int) { + return file_kessel_health_v1_health_proto_rawDescGZIP(), []int{1} +} + +func (x *GetLivezResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *GetLivezResponse) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +type GetReadyzRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetReadyzRequest) Reset() { + *x = GetReadyzRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_health_v1_health_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReadyzRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReadyzRequest) ProtoMessage() {} + +func (x *GetReadyzRequest) ProtoReflect() protoreflect.Message { + mi := &file_kessel_health_v1_health_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReadyzRequest.ProtoReflect.Descriptor instead. +func (*GetReadyzRequest) Descriptor() ([]byte, []int) { + return file_kessel_health_v1_health_proto_rawDescGZIP(), []int{2} +} + +type GetReadyzResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` +} + +func (x *GetReadyzResponse) Reset() { + *x = GetReadyzResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_health_v1_health_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetReadyzResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReadyzResponse) ProtoMessage() {} + +func (x *GetReadyzResponse) ProtoReflect() protoreflect.Message { + mi := &file_kessel_health_v1_health_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReadyzResponse.ProtoReflect.Descriptor instead. +func (*GetReadyzResponse) Descriptor() ([]byte, []int) { + return file_kessel_health_v1_health_proto_rawDescGZIP(), []int{3} +} + +func (x *GetReadyzResponse) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *GetReadyzResponse) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +var File_kessel_health_v1_health_proto protoreflect.FileDescriptor + +var file_kessel_health_v1_health_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, + 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x10, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, + 0x64, 0x79, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x32, 0xdf, 0x01, 0x0a, 0x13, 0x4b, 0x65, 0x73, 0x73, + 0x65, 0x6c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x61, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x12, 0x21, 0x2e, 0x6b, 0x65, + 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x76, 0x65, 0x7a, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x6c, 0x69, 0x76, + 0x65, 0x7a, 0x12, 0x65, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x12, + 0x22, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x7a, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, + 0x12, 0x07, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x7a, 0x42, 0x65, 0x0a, 0x23, 0x6f, 0x72, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, + 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_kessel_health_v1_health_proto_rawDescOnce sync.Once + file_kessel_health_v1_health_proto_rawDescData = file_kessel_health_v1_health_proto_rawDesc +) + +func file_kessel_health_v1_health_proto_rawDescGZIP() []byte { + file_kessel_health_v1_health_proto_rawDescOnce.Do(func() { + file_kessel_health_v1_health_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_health_v1_health_proto_rawDescData) + }) + return file_kessel_health_v1_health_proto_rawDescData +} + +var file_kessel_health_v1_health_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_kessel_health_v1_health_proto_goTypes = []any{ + (*GetLivezRequest)(nil), // 0: kessel.health.v1.GetLivezRequest + (*GetLivezResponse)(nil), // 1: kessel.health.v1.GetLivezResponse + (*GetReadyzRequest)(nil), // 2: kessel.health.v1.GetReadyzRequest + (*GetReadyzResponse)(nil), // 3: kessel.health.v1.GetReadyzResponse +} +var file_kessel_health_v1_health_proto_depIdxs = []int32{ + 0, // 0: kessel.health.v1.KesselHealthService.GetLivez:input_type -> kessel.health.v1.GetLivezRequest + 2, // 1: kessel.health.v1.KesselHealthService.GetReadyz:input_type -> kessel.health.v1.GetReadyzRequest + 1, // 2: kessel.health.v1.KesselHealthService.GetLivez:output_type -> kessel.health.v1.GetLivezResponse + 3, // 3: kessel.health.v1.KesselHealthService.GetReadyz:output_type -> kessel.health.v1.GetReadyzResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_kessel_health_v1_health_proto_init() } +func file_kessel_health_v1_health_proto_init() { + if File_kessel_health_v1_health_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_kessel_health_v1_health_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetLivezRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_health_v1_health_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetLivezResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_health_v1_health_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetReadyzRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_health_v1_health_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetReadyzResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_kessel_health_v1_health_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_kessel_health_v1_health_proto_goTypes, + DependencyIndexes: file_kessel_health_v1_health_proto_depIdxs, + MessageInfos: file_kessel_health_v1_health_proto_msgTypes, + }.Build() + File_kessel_health_v1_health_proto = out.File + file_kessel_health_v1_health_proto_rawDesc = nil + file_kessel_health_v1_health_proto_goTypes = nil + file_kessel_health_v1_health_proto_depIdxs = nil +} diff --git a/api/health/v1/health.pb.validate.go b/api/kessel/health/v1/health.pb.validate.go similarity index 71% rename from api/health/v1/health.pb.validate.go rename to api/kessel/health/v1/health.pb.validate.go index 67c0015..8235ac7 100644 --- a/api/health/v1/health.pb.validate.go +++ b/api/kessel/health/v1/health.pb.validate.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: health/v1/health.proto +// source: kessel/health/v1/health.proto package v1 @@ -135,22 +135,22 @@ var _ interface { ErrorName() string } = GetLivezRequestValidationError{} -// Validate checks the field values on GetLivezReply with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GetLivezReply) Validate() error { +// Validate checks the field values on GetLivezResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *GetLivezResponse) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on GetLivezReply with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in GetLivezReplyMultiError, or -// nil if none found. -func (m *GetLivezReply) ValidateAll() error { +// ValidateAll checks the field values on GetLivezResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetLivezResponseMultiError, or nil if none found. +func (m *GetLivezResponse) ValidateAll() error { return m.validate(true) } -func (m *GetLivezReply) validate(all bool) error { +func (m *GetLivezResponse) validate(all bool) error { if m == nil { return nil } @@ -162,19 +162,19 @@ func (m *GetLivezReply) validate(all bool) error { // no validation rules for Code if len(errors) > 0 { - return GetLivezReplyMultiError(errors) + return GetLivezResponseMultiError(errors) } return nil } -// GetLivezReplyMultiError is an error wrapping multiple validation errors -// returned by GetLivezReply.ValidateAll() if the designated constraints +// GetLivezResponseMultiError is an error wrapping multiple validation errors +// returned by GetLivezResponse.ValidateAll() if the designated constraints // aren't met. -type GetLivezReplyMultiError []error +type GetLivezResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m GetLivezReplyMultiError) Error() string { +func (m GetLivezResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -183,11 +183,11 @@ func (m GetLivezReplyMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m GetLivezReplyMultiError) AllErrors() []error { return m } +func (m GetLivezResponseMultiError) AllErrors() []error { return m } -// GetLivezReplyValidationError is the validation error returned by -// GetLivezReply.Validate if the designated constraints aren't met. -type GetLivezReplyValidationError struct { +// GetLivezResponseValidationError is the validation error returned by +// GetLivezResponse.Validate if the designated constraints aren't met. +type GetLivezResponseValidationError struct { field string reason string cause error @@ -195,22 +195,22 @@ type GetLivezReplyValidationError struct { } // Field function returns field value. -func (e GetLivezReplyValidationError) Field() string { return e.field } +func (e GetLivezResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e GetLivezReplyValidationError) Reason() string { return e.reason } +func (e GetLivezResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e GetLivezReplyValidationError) Cause() error { return e.cause } +func (e GetLivezResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e GetLivezReplyValidationError) Key() bool { return e.key } +func (e GetLivezResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e GetLivezReplyValidationError) ErrorName() string { return "GetLivezReplyValidationError" } +func (e GetLivezResponseValidationError) ErrorName() string { return "GetLivezResponseValidationError" } // Error satisfies the builtin error interface -func (e GetLivezReplyValidationError) Error() string { +func (e GetLivezResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -222,14 +222,14 @@ func (e GetLivezReplyValidationError) Error() string { } return fmt.Sprintf( - "invalid %sGetLivezReply.%s: %s%s", + "invalid %sGetLivezResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = GetLivezReplyValidationError{} +var _ error = GetLivezResponseValidationError{} var _ interface { Field() string @@ -237,7 +237,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = GetLivezReplyValidationError{} +} = GetLivezResponseValidationError{} // Validate checks the field values on GetReadyzRequest with the rules defined // in the proto definition for this message. If any rules are violated, the @@ -339,22 +339,22 @@ var _ interface { ErrorName() string } = GetReadyzRequestValidationError{} -// Validate checks the field values on GetReadyzReply with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *GetReadyzReply) Validate() error { +// Validate checks the field values on GetReadyzResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *GetReadyzResponse) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on GetReadyzReply with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in GetReadyzReplyMultiError, -// or nil if none found. -func (m *GetReadyzReply) ValidateAll() error { +// ValidateAll checks the field values on GetReadyzResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetReadyzResponseMultiError, or nil if none found. +func (m *GetReadyzResponse) ValidateAll() error { return m.validate(true) } -func (m *GetReadyzReply) validate(all bool) error { +func (m *GetReadyzResponse) validate(all bool) error { if m == nil { return nil } @@ -366,19 +366,19 @@ func (m *GetReadyzReply) validate(all bool) error { // no validation rules for Code if len(errors) > 0 { - return GetReadyzReplyMultiError(errors) + return GetReadyzResponseMultiError(errors) } return nil } -// GetReadyzReplyMultiError is an error wrapping multiple validation errors -// returned by GetReadyzReply.ValidateAll() if the designated constraints +// GetReadyzResponseMultiError is an error wrapping multiple validation errors +// returned by GetReadyzResponse.ValidateAll() if the designated constraints // aren't met. -type GetReadyzReplyMultiError []error +type GetReadyzResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m GetReadyzReplyMultiError) Error() string { +func (m GetReadyzResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -387,11 +387,11 @@ func (m GetReadyzReplyMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m GetReadyzReplyMultiError) AllErrors() []error { return m } +func (m GetReadyzResponseMultiError) AllErrors() []error { return m } -// GetReadyzReplyValidationError is the validation error returned by -// GetReadyzReply.Validate if the designated constraints aren't met. -type GetReadyzReplyValidationError struct { +// GetReadyzResponseValidationError is the validation error returned by +// GetReadyzResponse.Validate if the designated constraints aren't met. +type GetReadyzResponseValidationError struct { field string reason string cause error @@ -399,22 +399,24 @@ type GetReadyzReplyValidationError struct { } // Field function returns field value. -func (e GetReadyzReplyValidationError) Field() string { return e.field } +func (e GetReadyzResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e GetReadyzReplyValidationError) Reason() string { return e.reason } +func (e GetReadyzResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e GetReadyzReplyValidationError) Cause() error { return e.cause } +func (e GetReadyzResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e GetReadyzReplyValidationError) Key() bool { return e.key } +func (e GetReadyzResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e GetReadyzReplyValidationError) ErrorName() string { return "GetReadyzReplyValidationError" } +func (e GetReadyzResponseValidationError) ErrorName() string { + return "GetReadyzResponseValidationError" +} // Error satisfies the builtin error interface -func (e GetReadyzReplyValidationError) Error() string { +func (e GetReadyzResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -426,14 +428,14 @@ func (e GetReadyzReplyValidationError) Error() string { } return fmt.Sprintf( - "invalid %sGetReadyzReply.%s: %s%s", + "invalid %sGetReadyzResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = GetReadyzReplyValidationError{} +var _ error = GetReadyzResponseValidationError{} var _ interface { Field() string @@ -441,4 +443,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = GetReadyzReplyValidationError{} +} = GetReadyzResponseValidationError{} diff --git a/api/health/v1/health.proto b/api/kessel/health/v1/health.proto similarity index 65% rename from api/health/v1/health.proto rename to api/kessel/health/v1/health.proto index 4cac9dd..4a53242 100644 --- a/api/health/v1/health.proto +++ b/api/kessel/health/v1/health.proto @@ -1,20 +1,20 @@ syntax = "proto3"; -package kessel.relations.v1; +package kessel.health.v1; import "google/api/annotations.proto"; -option go_package = "github.com/project-kessel/relations-api/api/health/v1"; +option go_package = "github.com/project-kessel/relations-api/api/kessel/health/v1"; option java_multiple_files = true; option java_package = "org.project_kessel.api.relations.v1"; -service KesselHealth { - rpc GetLivez (GetLivezRequest) returns (GetLivezReply){ +service KesselHealthService { + rpc GetLivez (GetLivezRequest) returns (GetLivezResponse){ option (google.api.http) = { get: "/livez" }; }; - rpc GetReadyz (GetReadyzRequest) returns (GetReadyzReply){ + rpc GetReadyz (GetReadyzRequest) returns (GetReadyzResponse){ option (google.api.http) = { get: "/readyz" }; @@ -22,13 +22,13 @@ service KesselHealth { } message GetLivezRequest {} -message GetLivezReply { +message GetLivezResponse { string status = 1; uint32 code = 2; } message GetReadyzRequest {} -message GetReadyzReply { +message GetReadyzResponse { string status = 1; uint32 code = 2; } diff --git a/api/kessel/health/v1/health_grpc.pb.go b/api/kessel/health/v1/health_grpc.pb.go new file mode 100644 index 0000000..5ec5c40 --- /dev/null +++ b/api/kessel/health/v1/health_grpc.pb.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc v4.25.1 +// source: kessel/health/v1/health.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + KesselHealthService_GetLivez_FullMethodName = "/kessel.health.v1.KesselHealthService/GetLivez" + KesselHealthService_GetReadyz_FullMethodName = "/kessel.health.v1.KesselHealthService/GetReadyz" +) + +// KesselHealthServiceClient is the client API for KesselHealthService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type KesselHealthServiceClient interface { + GetLivez(ctx context.Context, in *GetLivezRequest, opts ...grpc.CallOption) (*GetLivezResponse, error) + GetReadyz(ctx context.Context, in *GetReadyzRequest, opts ...grpc.CallOption) (*GetReadyzResponse, error) +} + +type kesselHealthServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewKesselHealthServiceClient(cc grpc.ClientConnInterface) KesselHealthServiceClient { + return &kesselHealthServiceClient{cc} +} + +func (c *kesselHealthServiceClient) GetLivez(ctx context.Context, in *GetLivezRequest, opts ...grpc.CallOption) (*GetLivezResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetLivezResponse) + err := c.cc.Invoke(ctx, KesselHealthService_GetLivez_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kesselHealthServiceClient) GetReadyz(ctx context.Context, in *GetReadyzRequest, opts ...grpc.CallOption) (*GetReadyzResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetReadyzResponse) + err := c.cc.Invoke(ctx, KesselHealthService_GetReadyz_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KesselHealthServiceServer is the server API for KesselHealthService service. +// All implementations must embed UnimplementedKesselHealthServiceServer +// for forward compatibility +type KesselHealthServiceServer interface { + GetLivez(context.Context, *GetLivezRequest) (*GetLivezResponse, error) + GetReadyz(context.Context, *GetReadyzRequest) (*GetReadyzResponse, error) + mustEmbedUnimplementedKesselHealthServiceServer() +} + +// UnimplementedKesselHealthServiceServer must be embedded to have forward compatible implementations. +type UnimplementedKesselHealthServiceServer struct { +} + +func (UnimplementedKesselHealthServiceServer) GetLivez(context.Context, *GetLivezRequest) (*GetLivezResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLivez not implemented") +} +func (UnimplementedKesselHealthServiceServer) GetReadyz(context.Context, *GetReadyzRequest) (*GetReadyzResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetReadyz not implemented") +} +func (UnimplementedKesselHealthServiceServer) mustEmbedUnimplementedKesselHealthServiceServer() {} + +// UnsafeKesselHealthServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KesselHealthServiceServer will +// result in compilation errors. +type UnsafeKesselHealthServiceServer interface { + mustEmbedUnimplementedKesselHealthServiceServer() +} + +func RegisterKesselHealthServiceServer(s grpc.ServiceRegistrar, srv KesselHealthServiceServer) { + s.RegisterService(&KesselHealthService_ServiceDesc, srv) +} + +func _KesselHealthService_GetLivez_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLivezRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KesselHealthServiceServer).GetLivez(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KesselHealthService_GetLivez_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KesselHealthServiceServer).GetLivez(ctx, req.(*GetLivezRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KesselHealthService_GetReadyz_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReadyzRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KesselHealthServiceServer).GetReadyz(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KesselHealthService_GetReadyz_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KesselHealthServiceServer).GetReadyz(ctx, req.(*GetReadyzRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// KesselHealthService_ServiceDesc is the grpc.ServiceDesc for KesselHealthService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var KesselHealthService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kessel.health.v1.KesselHealthService", + HandlerType: (*KesselHealthServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetLivez", + Handler: _KesselHealthService_GetLivez_Handler, + }, + { + MethodName: "GetReadyz", + Handler: _KesselHealthService_GetReadyz_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "kessel/health/v1/health.proto", +} diff --git a/api/health/v1/health_http.pb.go b/api/kessel/health/v1/health_http.pb.go similarity index 50% rename from api/health/v1/health_http.pb.go rename to api/kessel/health/v1/health_http.pb.go index 4346b3f..7bad9d7 100644 --- a/api/health/v1/health_http.pb.go +++ b/api/kessel/health/v1/health_http.pb.go @@ -2,7 +2,7 @@ // versions: // - protoc-gen-go-http v2.7.3 // - protoc v4.25.1 -// source: health/v1/health.proto +// source: kessel/health/v1/health.proto package v1 @@ -19,27 +19,27 @@ var _ = binding.EncodeURL const _ = http.SupportPackageIsVersion1 -const OperationKesselHealthGetLivez = "/kessel.relations.v1.KesselHealth/GetLivez" -const OperationKesselHealthGetReadyz = "/kessel.relations.v1.KesselHealth/GetReadyz" +const OperationKesselHealthServiceGetLivez = "/kessel.health.v1.KesselHealthService/GetLivez" +const OperationKesselHealthServiceGetReadyz = "/kessel.health.v1.KesselHealthService/GetReadyz" -type KesselHealthHTTPServer interface { - GetLivez(context.Context, *GetLivezRequest) (*GetLivezReply, error) - GetReadyz(context.Context, *GetReadyzRequest) (*GetReadyzReply, error) +type KesselHealthServiceHTTPServer interface { + GetLivez(context.Context, *GetLivezRequest) (*GetLivezResponse, error) + GetReadyz(context.Context, *GetReadyzRequest) (*GetReadyzResponse, error) } -func RegisterKesselHealthHTTPServer(s *http.Server, srv KesselHealthHTTPServer) { +func RegisterKesselHealthServiceHTTPServer(s *http.Server, srv KesselHealthServiceHTTPServer) { r := s.Route("/") - r.GET("/livez", _KesselHealth_GetLivez0_HTTP_Handler(srv)) - r.GET("/readyz", _KesselHealth_GetReadyz0_HTTP_Handler(srv)) + r.GET("/livez", _KesselHealthService_GetLivez0_HTTP_Handler(srv)) + r.GET("/readyz", _KesselHealthService_GetReadyz0_HTTP_Handler(srv)) } -func _KesselHealth_GetLivez0_HTTP_Handler(srv KesselHealthHTTPServer) func(ctx http.Context) error { +func _KesselHealthService_GetLivez0_HTTP_Handler(srv KesselHealthServiceHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in GetLivezRequest if err := ctx.BindQuery(&in); err != nil { return err } - http.SetOperation(ctx, OperationKesselHealthGetLivez) + http.SetOperation(ctx, OperationKesselHealthServiceGetLivez) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.GetLivez(ctx, req.(*GetLivezRequest)) }) @@ -47,18 +47,18 @@ func _KesselHealth_GetLivez0_HTTP_Handler(srv KesselHealthHTTPServer) func(ctx h if err != nil { return err } - reply := out.(*GetLivezReply) + reply := out.(*GetLivezResponse) return ctx.Result(200, reply) } } -func _KesselHealth_GetReadyz0_HTTP_Handler(srv KesselHealthHTTPServer) func(ctx http.Context) error { +func _KesselHealthService_GetReadyz0_HTTP_Handler(srv KesselHealthServiceHTTPServer) func(ctx http.Context) error { return func(ctx http.Context) error { var in GetReadyzRequest if err := ctx.BindQuery(&in); err != nil { return err } - http.SetOperation(ctx, OperationKesselHealthGetReadyz) + http.SetOperation(ctx, OperationKesselHealthServiceGetReadyz) h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { return srv.GetReadyz(ctx, req.(*GetReadyzRequest)) }) @@ -66,29 +66,29 @@ func _KesselHealth_GetReadyz0_HTTP_Handler(srv KesselHealthHTTPServer) func(ctx if err != nil { return err } - reply := out.(*GetReadyzReply) + reply := out.(*GetReadyzResponse) return ctx.Result(200, reply) } } -type KesselHealthHTTPClient interface { - GetLivez(ctx context.Context, req *GetLivezRequest, opts ...http.CallOption) (rsp *GetLivezReply, err error) - GetReadyz(ctx context.Context, req *GetReadyzRequest, opts ...http.CallOption) (rsp *GetReadyzReply, err error) +type KesselHealthServiceHTTPClient interface { + GetLivez(ctx context.Context, req *GetLivezRequest, opts ...http.CallOption) (rsp *GetLivezResponse, err error) + GetReadyz(ctx context.Context, req *GetReadyzRequest, opts ...http.CallOption) (rsp *GetReadyzResponse, err error) } -type KesselHealthHTTPClientImpl struct { +type KesselHealthServiceHTTPClientImpl struct { cc *http.Client } -func NewKesselHealthHTTPClient(client *http.Client) KesselHealthHTTPClient { - return &KesselHealthHTTPClientImpl{client} +func NewKesselHealthServiceHTTPClient(client *http.Client) KesselHealthServiceHTTPClient { + return &KesselHealthServiceHTTPClientImpl{client} } -func (c *KesselHealthHTTPClientImpl) GetLivez(ctx context.Context, in *GetLivezRequest, opts ...http.CallOption) (*GetLivezReply, error) { - var out GetLivezReply +func (c *KesselHealthServiceHTTPClientImpl) GetLivez(ctx context.Context, in *GetLivezRequest, opts ...http.CallOption) (*GetLivezResponse, error) { + var out GetLivezResponse pattern := "/livez" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation(OperationKesselHealthGetLivez)) + opts = append(opts, http.Operation(OperationKesselHealthServiceGetLivez)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { @@ -97,11 +97,11 @@ func (c *KesselHealthHTTPClientImpl) GetLivez(ctx context.Context, in *GetLivezR return &out, nil } -func (c *KesselHealthHTTPClientImpl) GetReadyz(ctx context.Context, in *GetReadyzRequest, opts ...http.CallOption) (*GetReadyzReply, error) { - var out GetReadyzReply +func (c *KesselHealthServiceHTTPClientImpl) GetReadyz(ctx context.Context, in *GetReadyzRequest, opts ...http.CallOption) (*GetReadyzResponse, error) { + var out GetReadyzResponse pattern := "/readyz" path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation(OperationKesselHealthGetReadyz)) + opts = append(opts, http.Operation(OperationKesselHealthServiceGetReadyz)) opts = append(opts, http.PathTemplate(pattern)) err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) if err != nil { diff --git a/api/kessel/relations/v0/check.pb.go b/api/kessel/relations/v0/check.pb.go deleted file mode 100644 index 83f920d..0000000 --- a/api/kessel/relations/v0/check.pb.go +++ /dev/null @@ -1,321 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v4.25.1 -// source: kessel/relations/v0/check.proto - -package v0 - -import ( - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CheckResponse_Allowed int32 - -const ( - CheckResponse_ALLOWED_UNSPECIFIED CheckResponse_Allowed = 0 - CheckResponse_ALLOWED_TRUE CheckResponse_Allowed = 1 - CheckResponse_ALLOWED_FALSE CheckResponse_Allowed = 2 // e.g. ALLOWED_CONDITIONAL = 3; -) - -// Enum value maps for CheckResponse_Allowed. -var ( - CheckResponse_Allowed_name = map[int32]string{ - 0: "ALLOWED_UNSPECIFIED", - 1: "ALLOWED_TRUE", - 2: "ALLOWED_FALSE", - } - CheckResponse_Allowed_value = map[string]int32{ - "ALLOWED_UNSPECIFIED": 0, - "ALLOWED_TRUE": 1, - "ALLOWED_FALSE": 2, - } -) - -func (x CheckResponse_Allowed) Enum() *CheckResponse_Allowed { - p := new(CheckResponse_Allowed) - *p = x - return p -} - -func (x CheckResponse_Allowed) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CheckResponse_Allowed) Descriptor() protoreflect.EnumDescriptor { - return file_kessel_relations_v0_check_proto_enumTypes[0].Descriptor() -} - -func (CheckResponse_Allowed) Type() protoreflect.EnumType { - return &file_kessel_relations_v0_check_proto_enumTypes[0] -} - -func (x CheckResponse_Allowed) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CheckResponse_Allowed.Descriptor instead. -func (CheckResponse_Allowed) EnumDescriptor() ([]byte, []int) { - return file_kessel_relations_v0_check_proto_rawDescGZIP(), []int{1, 0} -} - -type CheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` - Subject *SubjectReference `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` -} - -func (x *CheckRequest) Reset() { - *x = CheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_check_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckRequest) ProtoMessage() {} - -func (x *CheckRequest) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_check_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead. -func (*CheckRequest) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_check_proto_rawDescGZIP(), []int{0} -} - -func (x *CheckRequest) GetResource() *ObjectReference { - if x != nil { - return x.Resource - } - return nil -} - -func (x *CheckRequest) GetRelation() string { - if x != nil { - return x.Relation - } - return "" -} - -func (x *CheckRequest) GetSubject() *SubjectReference { - if x != nil { - return x.Subject - } - return nil -} - -type CheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Allowed CheckResponse_Allowed `protobuf:"varint,1,opt,name=allowed,proto3,enum=kessel.relations.v0.CheckResponse_Allowed" json:"allowed,omitempty"` -} - -func (x *CheckResponse) Reset() { - *x = CheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_check_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckResponse) ProtoMessage() {} - -func (x *CheckResponse) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_check_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead. -func (*CheckResponse) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_check_proto_rawDescGZIP(), []int{1} -} - -func (x *CheckResponse) GetAllowed() CheckResponse_Allowed { - if x != nil { - return x.Allowed - } - return CheckResponse_ALLOWED_UNSPECIFIED -} - -var File_kessel_relations_v0_check_proto protoreflect.FileDescriptor - -var file_kessel_relations_v0_check_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xca, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x4a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x08, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x49, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, - 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x9e, 0x01, 0x0a, - 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, - 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2a, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x07, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x07, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, - 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x4c, 0x4c, 0x4f, - 0x57, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, - 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x02, 0x32, 0x7a, 0x0a, - 0x12, 0x4b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x2e, 0x6b, - 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x22, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, - 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x68, 0x0a, 0x23, 0x6f, 0x72, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, - 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kessel_relations_v0_check_proto_rawDescOnce sync.Once - file_kessel_relations_v0_check_proto_rawDescData = file_kessel_relations_v0_check_proto_rawDesc -) - -func file_kessel_relations_v0_check_proto_rawDescGZIP() []byte { - file_kessel_relations_v0_check_proto_rawDescOnce.Do(func() { - file_kessel_relations_v0_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_relations_v0_check_proto_rawDescData) - }) - return file_kessel_relations_v0_check_proto_rawDescData -} - -var file_kessel_relations_v0_check_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_kessel_relations_v0_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_kessel_relations_v0_check_proto_goTypes = []any{ - (CheckResponse_Allowed)(0), // 0: kessel.relations.v0.CheckResponse.Allowed - (*CheckRequest)(nil), // 1: kessel.relations.v0.CheckRequest - (*CheckResponse)(nil), // 2: kessel.relations.v0.CheckResponse - (*ObjectReference)(nil), // 3: kessel.relations.v0.ObjectReference - (*SubjectReference)(nil), // 4: kessel.relations.v0.SubjectReference -} -var file_kessel_relations_v0_check_proto_depIdxs = []int32{ - 3, // 0: kessel.relations.v0.CheckRequest.resource:type_name -> kessel.relations.v0.ObjectReference - 4, // 1: kessel.relations.v0.CheckRequest.subject:type_name -> kessel.relations.v0.SubjectReference - 0, // 2: kessel.relations.v0.CheckResponse.allowed:type_name -> kessel.relations.v0.CheckResponse.Allowed - 1, // 3: kessel.relations.v0.KesselCheckService.Check:input_type -> kessel.relations.v0.CheckRequest - 2, // 4: kessel.relations.v0.KesselCheckService.Check:output_type -> kessel.relations.v0.CheckResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_kessel_relations_v0_check_proto_init() } -func file_kessel_relations_v0_check_proto_init() { - if File_kessel_relations_v0_check_proto != nil { - return - } - file_kessel_relations_v0_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_kessel_relations_v0_check_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_check_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kessel_relations_v0_check_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_kessel_relations_v0_check_proto_goTypes, - DependencyIndexes: file_kessel_relations_v0_check_proto_depIdxs, - EnumInfos: file_kessel_relations_v0_check_proto_enumTypes, - MessageInfos: file_kessel_relations_v0_check_proto_msgTypes, - }.Build() - File_kessel_relations_v0_check_proto = out.File - file_kessel_relations_v0_check_proto_rawDesc = nil - file_kessel_relations_v0_check_proto_goTypes = nil - file_kessel_relations_v0_check_proto_depIdxs = nil -} diff --git a/api/kessel/relations/v0/lookup.pb.go b/api/kessel/relations/v0/lookup.pb.go deleted file mode 100644 index 980f959..0000000 --- a/api/kessel/relations/v0/lookup.pb.go +++ /dev/null @@ -1,511 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v4.25.1 -// source: kessel/relations/v0/lookup.proto - -package v0 - -import ( - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type LookupResourcesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceType *ObjectType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` - Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` - Subject *SubjectReference `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Pagination *RequestPagination `protobuf:"bytes,4,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` -} - -func (x *LookupResourcesRequest) Reset() { - *x = LookupResourcesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_lookup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LookupResourcesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LookupResourcesRequest) ProtoMessage() {} - -func (x *LookupResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_lookup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LookupResourcesRequest.ProtoReflect.Descriptor instead. -func (*LookupResourcesRequest) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_lookup_proto_rawDescGZIP(), []int{0} -} - -func (x *LookupResourcesRequest) GetResourceType() *ObjectType { - if x != nil { - return x.ResourceType - } - return nil -} - -func (x *LookupResourcesRequest) GetRelation() string { - if x != nil { - return x.Relation - } - return "" -} - -func (x *LookupResourcesRequest) GetSubject() *SubjectReference { - if x != nil { - return x.Subject - } - return nil -} - -func (x *LookupResourcesRequest) GetPagination() *RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type LookupResourcesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Pagination *ResponsePagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *LookupResourcesResponse) Reset() { - *x = LookupResourcesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_lookup_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LookupResourcesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LookupResourcesResponse) ProtoMessage() {} - -func (x *LookupResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_lookup_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LookupResourcesResponse.ProtoReflect.Descriptor instead. -func (*LookupResourcesResponse) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_lookup_proto_rawDescGZIP(), []int{1} -} - -func (x *LookupResourcesResponse) GetResource() *ObjectReference { - if x != nil { - return x.Resource - } - return nil -} - -func (x *LookupResourcesResponse) GetPagination() *ResponsePagination { - if x != nil { - return x.Pagination - } - return nil -} - -type LookupSubjectsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` - Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` - SubjectType *ObjectType `protobuf:"bytes,3,opt,name=subject_type,json=subjectType,proto3" json:"subject_type,omitempty"` - SubjectRelation *string `protobuf:"bytes,4,opt,name=subject_relation,json=subjectRelation,proto3,oneof" json:"subject_relation,omitempty"` - Pagination *RequestPagination `protobuf:"bytes,5,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` -} - -func (x *LookupSubjectsRequest) Reset() { - *x = LookupSubjectsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_lookup_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LookupSubjectsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LookupSubjectsRequest) ProtoMessage() {} - -func (x *LookupSubjectsRequest) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_lookup_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LookupSubjectsRequest.ProtoReflect.Descriptor instead. -func (*LookupSubjectsRequest) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_lookup_proto_rawDescGZIP(), []int{2} -} - -func (x *LookupSubjectsRequest) GetResource() *ObjectReference { - if x != nil { - return x.Resource - } - return nil -} - -func (x *LookupSubjectsRequest) GetRelation() string { - if x != nil { - return x.Relation - } - return "" -} - -func (x *LookupSubjectsRequest) GetSubjectType() *ObjectType { - if x != nil { - return x.SubjectType - } - return nil -} - -func (x *LookupSubjectsRequest) GetSubjectRelation() string { - if x != nil && x.SubjectRelation != nil { - return *x.SubjectRelation - } - return "" -} - -func (x *LookupSubjectsRequest) GetPagination() *RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type LookupSubjectsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Subject *SubjectReference `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - Pagination *ResponsePagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *LookupSubjectsResponse) Reset() { - *x = LookupSubjectsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_lookup_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LookupSubjectsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LookupSubjectsResponse) ProtoMessage() {} - -func (x *LookupSubjectsResponse) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_lookup_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LookupSubjectsResponse.ProtoReflect.Descriptor instead. -func (*LookupSubjectsResponse) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_lookup_proto_rawDescGZIP(), []int{3} -} - -func (x *LookupSubjectsResponse) GetSubject() *SubjectReference { - if x != nil { - return x.Subject - } - return nil -} - -func (x *LookupSubjectsResponse) GetPagination() *ResponsePagination { - if x != nil { - return x.Pagination - } - return nil -} - -var File_kessel_relations_v0_lookup_proto protoreflect.FileDescriptor - -var file_kessel_relations_v0_lookup_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xb4, 0x02, 0x0a, 0x16, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x0d, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x08, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x49, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa4, 0x01, 0x0a, 0x17, 0x4c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6b, 0x65, 0x73, 0x73, - 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf7, - 0x02, 0x0a, 0x15, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x65, 0x73, - 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x0c, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4b, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x65, - 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x01, 0x0a, 0x16, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, - 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xa1, 0x02, - 0x0a, 0x13, 0x4b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2a, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, - 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x30, 0x2f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x30, 0x01, 0x12, 0x85, 0x01, 0x0a, 0x0f, 0x4c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, - 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6b, 0x65, 0x73, - 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, - 0x12, 0x0d, 0x2f, 0x76, 0x30, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x30, - 0x01, 0x42, 0x68, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, - 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, - 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_kessel_relations_v0_lookup_proto_rawDescOnce sync.Once - file_kessel_relations_v0_lookup_proto_rawDescData = file_kessel_relations_v0_lookup_proto_rawDesc -) - -func file_kessel_relations_v0_lookup_proto_rawDescGZIP() []byte { - file_kessel_relations_v0_lookup_proto_rawDescOnce.Do(func() { - file_kessel_relations_v0_lookup_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_relations_v0_lookup_proto_rawDescData) - }) - return file_kessel_relations_v0_lookup_proto_rawDescData -} - -var file_kessel_relations_v0_lookup_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_kessel_relations_v0_lookup_proto_goTypes = []any{ - (*LookupResourcesRequest)(nil), // 0: kessel.relations.v0.LookupResourcesRequest - (*LookupResourcesResponse)(nil), // 1: kessel.relations.v0.LookupResourcesResponse - (*LookupSubjectsRequest)(nil), // 2: kessel.relations.v0.LookupSubjectsRequest - (*LookupSubjectsResponse)(nil), // 3: kessel.relations.v0.LookupSubjectsResponse - (*ObjectType)(nil), // 4: kessel.relations.v0.ObjectType - (*SubjectReference)(nil), // 5: kessel.relations.v0.SubjectReference - (*RequestPagination)(nil), // 6: kessel.relations.v0.RequestPagination - (*ObjectReference)(nil), // 7: kessel.relations.v0.ObjectReference - (*ResponsePagination)(nil), // 8: kessel.relations.v0.ResponsePagination -} -var file_kessel_relations_v0_lookup_proto_depIdxs = []int32{ - 4, // 0: kessel.relations.v0.LookupResourcesRequest.resource_type:type_name -> kessel.relations.v0.ObjectType - 5, // 1: kessel.relations.v0.LookupResourcesRequest.subject:type_name -> kessel.relations.v0.SubjectReference - 6, // 2: kessel.relations.v0.LookupResourcesRequest.pagination:type_name -> kessel.relations.v0.RequestPagination - 7, // 3: kessel.relations.v0.LookupResourcesResponse.resource:type_name -> kessel.relations.v0.ObjectReference - 8, // 4: kessel.relations.v0.LookupResourcesResponse.pagination:type_name -> kessel.relations.v0.ResponsePagination - 7, // 5: kessel.relations.v0.LookupSubjectsRequest.resource:type_name -> kessel.relations.v0.ObjectReference - 4, // 6: kessel.relations.v0.LookupSubjectsRequest.subject_type:type_name -> kessel.relations.v0.ObjectType - 6, // 7: kessel.relations.v0.LookupSubjectsRequest.pagination:type_name -> kessel.relations.v0.RequestPagination - 5, // 8: kessel.relations.v0.LookupSubjectsResponse.subject:type_name -> kessel.relations.v0.SubjectReference - 8, // 9: kessel.relations.v0.LookupSubjectsResponse.pagination:type_name -> kessel.relations.v0.ResponsePagination - 2, // 10: kessel.relations.v0.KesselLookupService.LookupSubjects:input_type -> kessel.relations.v0.LookupSubjectsRequest - 0, // 11: kessel.relations.v0.KesselLookupService.LookupResources:input_type -> kessel.relations.v0.LookupResourcesRequest - 3, // 12: kessel.relations.v0.KesselLookupService.LookupSubjects:output_type -> kessel.relations.v0.LookupSubjectsResponse - 1, // 13: kessel.relations.v0.KesselLookupService.LookupResources:output_type -> kessel.relations.v0.LookupResourcesResponse - 12, // [12:14] is the sub-list for method output_type - 10, // [10:12] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_kessel_relations_v0_lookup_proto_init() } -func file_kessel_relations_v0_lookup_proto_init() { - if File_kessel_relations_v0_lookup_proto != nil { - return - } - file_kessel_relations_v0_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_kessel_relations_v0_lookup_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*LookupResourcesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_lookup_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*LookupResourcesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_lookup_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*LookupSubjectsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_lookup_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*LookupSubjectsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_kessel_relations_v0_lookup_proto_msgTypes[0].OneofWrappers = []any{} - file_kessel_relations_v0_lookup_proto_msgTypes[2].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kessel_relations_v0_lookup_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_kessel_relations_v0_lookup_proto_goTypes, - DependencyIndexes: file_kessel_relations_v0_lookup_proto_depIdxs, - MessageInfos: file_kessel_relations_v0_lookup_proto_msgTypes, - }.Build() - File_kessel_relations_v0_lookup_proto = out.File - file_kessel_relations_v0_lookup_proto_rawDesc = nil - file_kessel_relations_v0_lookup_proto_goTypes = nil - file_kessel_relations_v0_lookup_proto_depIdxs = nil -} diff --git a/api/kessel/relations/v0/lookup_http.pb.go b/api/kessel/relations/v0/lookup_http.pb.go deleted file mode 100644 index 2447805..0000000 --- a/api/kessel/relations/v0/lookup_http.pb.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by protoc-gen-go-http. DO NOT EDIT. -// versions: -// - protoc-gen-go-http v2.7.3 -// - protoc v4.25.1 -// source: relations/v0/lookup.proto - -package v0 - -import ( - context "context" - http "github.com/go-kratos/kratos/v2/transport/http" - binding "github.com/go-kratos/kratos/v2/transport/http/binding" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the kratos package it is being compiled against. -var _ = new(context.Context) -var _ = binding.EncodeURL - -const _ = http.SupportPackageIsVersion1 - -const OperationKesselLookupServiceLookupResources = "/kessel.relations.v0.KesselLookupService/LookupResources" - -type KesselLookupServiceHTTPServer interface { - LookupResources(context.Context, *LookupResourcesRequest) (*LookupResourcesResponse, error) -} - -func RegisterKesselLookupServiceHTTPServer(s *http.Server, srv KesselLookupServiceHTTPServer) { - r := s.Route("/") - r.GET("/v0/resources", _KesselLookupService_LookupResources0_HTTP_Handler(srv)) -} - -func _KesselLookupService_LookupResources0_HTTP_Handler(srv KesselLookupServiceHTTPServer) func(ctx http.Context) error { - return func(ctx http.Context) error { - var in LookupResourcesRequest - if err := ctx.BindQuery(&in); err != nil { - return err - } - http.SetOperation(ctx, OperationKesselLookupServiceLookupResources) - h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.LookupResources(ctx, req.(*LookupResourcesRequest)) - }) - out, err := h(ctx, &in) - if err != nil { - return err - } - reply := out.(*LookupResourcesResponse) - return ctx.Result(200, reply) - } -} - -type KesselLookupServiceHTTPClient interface { - LookupResources(ctx context.Context, req *LookupResourcesRequest, opts ...http.CallOption) (rsp *LookupResourcesResponse, err error) -} - -type KesselLookupServiceHTTPClientImpl struct { - cc *http.Client -} - -func NewKesselLookupServiceHTTPClient(client *http.Client) KesselLookupServiceHTTPClient { - return &KesselLookupServiceHTTPClientImpl{client} -} - -func (c *KesselLookupServiceHTTPClientImpl) LookupResources(ctx context.Context, in *LookupResourcesRequest, opts ...http.CallOption) (*LookupResourcesResponse, error) { - var out LookupResourcesResponse - pattern := "/v0/resources" - path := binding.EncodeURL(pattern, in, true) - opts = append(opts, http.Operation(OperationKesselLookupServiceLookupResources)) - opts = append(opts, http.PathTemplate(pattern)) - err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...) - if err != nil { - return nil, err - } - return &out, nil -} diff --git a/api/kessel/relations/v0/relation_tuples.pb.go b/api/kessel/relations/v0/relation_tuples.pb.go deleted file mode 100644 index 7557679..0000000 --- a/api/kessel/relations/v0/relation_tuples.pb.go +++ /dev/null @@ -1,763 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v4.25.1 -// source: kessel/relations/v0/relation_tuples.proto - -package v0 - -import ( - _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateTuplesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whether or not the request should ignore existing tuples (`true`), - // or if the request should fail if the same tuple already exists (`false`). - // - // Defaults to `false`. - Upsert bool `protobuf:"varint,1,opt,name=upsert,proto3" json:"upsert,omitempty"` - Tuples []*Relationship `protobuf:"bytes,2,rep,name=tuples,proto3" json:"tuples,omitempty"` -} - -func (x *CreateTuplesRequest) Reset() { - *x = CreateTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateTuplesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTuplesRequest) ProtoMessage() {} - -func (x *CreateTuplesRequest) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTuplesRequest.ProtoReflect.Descriptor instead. -func (*CreateTuplesRequest) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateTuplesRequest) GetUpsert() bool { - if x != nil { - return x.Upsert - } - return false -} - -func (x *CreateTuplesRequest) GetTuples() []*Relationship { - if x != nil { - return x.Tuples - } - return nil -} - -type CreateTuplesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreateTuplesResponse) Reset() { - *x = CreateTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateTuplesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateTuplesResponse) ProtoMessage() {} - -func (x *CreateTuplesResponse) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateTuplesResponse.ProtoReflect.Descriptor instead. -func (*CreateTuplesResponse) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP(), []int{1} -} - -type ReadTuplesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filter *RelationTupleFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` - Pagination *RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` -} - -func (x *ReadTuplesRequest) Reset() { - *x = ReadTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReadTuplesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReadTuplesRequest) ProtoMessage() {} - -func (x *ReadTuplesRequest) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReadTuplesRequest.ProtoReflect.Descriptor instead. -func (*ReadTuplesRequest) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP(), []int{2} -} - -func (x *ReadTuplesRequest) GetFilter() *RelationTupleFilter { - if x != nil { - return x.Filter - } - return nil -} - -func (x *ReadTuplesRequest) GetPagination() *RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type ReadTuplesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tuple *Relationship `protobuf:"bytes,1,opt,name=tuple,proto3" json:"tuple,omitempty"` - Pagination *ResponsePagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *ReadTuplesResponse) Reset() { - *x = ReadTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReadTuplesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReadTuplesResponse) ProtoMessage() {} - -func (x *ReadTuplesResponse) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ReadTuplesResponse.ProtoReflect.Descriptor instead. -func (*ReadTuplesResponse) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP(), []int{3} -} - -func (x *ReadTuplesResponse) GetTuple() *Relationship { - if x != nil { - return x.Tuple - } - return nil -} - -func (x *ReadTuplesResponse) GetPagination() *ResponsePagination { - if x != nil { - return x.Pagination - } - return nil -} - -type DeleteTuplesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Filter *RelationTupleFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` -} - -func (x *DeleteTuplesRequest) Reset() { - *x = DeleteTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteTuplesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTuplesRequest) ProtoMessage() {} - -func (x *DeleteTuplesRequest) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTuplesRequest.ProtoReflect.Descriptor instead. -func (*DeleteTuplesRequest) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP(), []int{4} -} - -func (x *DeleteTuplesRequest) GetFilter() *RelationTupleFilter { - if x != nil { - return x.Filter - } - return nil -} - -type DeleteTuplesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteTuplesResponse) Reset() { - *x = DeleteTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteTuplesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteTuplesResponse) ProtoMessage() {} - -func (x *DeleteTuplesResponse) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteTuplesResponse.ProtoReflect.Descriptor instead. -func (*DeleteTuplesResponse) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP(), []int{5} -} - -// RelationTupleFilter is used to filter tuples based on their resource, relation, and subject. -// All fields are optional but capabilities may vary based on the chosen store and its indexes. -// At least one field must be provided. -type RelationTupleFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResourceNamespace *string `protobuf:"bytes,1,opt,name=resource_namespace,json=resourceNamespace,proto3,oneof" json:"resource_namespace,omitempty"` - ResourceType *string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3,oneof" json:"resource_type,omitempty"` - ResourceId *string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3,oneof" json:"resource_id,omitempty"` - Relation *string `protobuf:"bytes,4,opt,name=relation,proto3,oneof" json:"relation,omitempty"` - SubjectFilter *SubjectFilter `protobuf:"bytes,5,opt,name=subject_filter,json=subjectFilter,proto3,oneof" json:"subject_filter,omitempty"` -} - -func (x *RelationTupleFilter) Reset() { - *x = RelationTupleFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RelationTupleFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RelationTupleFilter) ProtoMessage() {} - -func (x *RelationTupleFilter) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RelationTupleFilter.ProtoReflect.Descriptor instead. -func (*RelationTupleFilter) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP(), []int{6} -} - -func (x *RelationTupleFilter) GetResourceNamespace() string { - if x != nil && x.ResourceNamespace != nil { - return *x.ResourceNamespace - } - return "" -} - -func (x *RelationTupleFilter) GetResourceType() string { - if x != nil && x.ResourceType != nil { - return *x.ResourceType - } - return "" -} - -func (x *RelationTupleFilter) GetResourceId() string { - if x != nil && x.ResourceId != nil { - return *x.ResourceId - } - return "" -} - -func (x *RelationTupleFilter) GetRelation() string { - if x != nil && x.Relation != nil { - return *x.Relation - } - return "" -} - -func (x *RelationTupleFilter) GetSubjectFilter() *SubjectFilter { - if x != nil { - return x.SubjectFilter - } - return nil -} - -type SubjectFilter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectNamespace *string `protobuf:"bytes,1,opt,name=subject_namespace,json=subjectNamespace,proto3,oneof" json:"subject_namespace,omitempty"` - SubjectType *string `protobuf:"bytes,2,opt,name=subject_type,json=subjectType,proto3,oneof" json:"subject_type,omitempty"` - SubjectId *string `protobuf:"bytes,3,opt,name=subject_id,json=subjectId,proto3,oneof" json:"subject_id,omitempty"` - Relation *string `protobuf:"bytes,4,opt,name=relation,proto3,oneof" json:"relation,omitempty"` -} - -func (x *SubjectFilter) Reset() { - *x = SubjectFilter{} - if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubjectFilter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubjectFilter) ProtoMessage() {} - -func (x *SubjectFilter) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_relation_tuples_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubjectFilter.ProtoReflect.Descriptor instead. -func (*SubjectFilter) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP(), []int{7} -} - -func (x *SubjectFilter) GetSubjectNamespace() string { - if x != nil && x.SubjectNamespace != nil { - return *x.SubjectNamespace - } - return "" -} - -func (x *SubjectFilter) GetSubjectType() string { - if x != nil && x.SubjectType != nil { - return *x.SubjectType - } - return "" -} - -func (x *SubjectFilter) GetSubjectId() string { - if x != nil && x.SubjectId != nil { - return *x.SubjectId - } - return "" -} - -func (x *SubjectFilter) GetRelation() string { - if x != nil && x.Relation != nil { - return *x.Relation - } - return "" -} - -var File_kessel_relations_v0_relation_tuples_proto protoreflect.FileDescriptor - -var file_kessel_relations_v0_relation_tuples_proto_rawDesc = []byte{ - 0x0a, 0x29, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x6b, 0x65, 0x73, - 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, - 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x68, 0x0a, 0x13, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, - 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x06, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x11, - 0x52, 0x65, 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4b, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x12, 0x52, 0x65, - 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x37, 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, - 0x69, 0x70, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x06, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6b, 0x65, 0x73, 0x73, - 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe3, 0x02, - 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x0e, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x04, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x66, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x22, 0xf1, 0x01, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x22, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, - 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xfe, 0x02, 0x0a, 0x12, 0x4b, 0x65, 0x73, 0x73, - 0x65, 0x6c, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, - 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x28, - 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, - 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, - 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x0a, 0x52, 0x65, - 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, - 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, - 0x65, 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x30, 0x01, 0x12, - 0x77, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, - 0x28, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6b, 0x65, 0x73, 0x73, - 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x2a, 0x0a, 0x2f, 0x76, - 0x30, 0x2f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0x68, 0x0a, 0x23, 0x6f, 0x72, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x50, - 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6b, - 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_kessel_relations_v0_relation_tuples_proto_rawDescOnce sync.Once - file_kessel_relations_v0_relation_tuples_proto_rawDescData = file_kessel_relations_v0_relation_tuples_proto_rawDesc -) - -func file_kessel_relations_v0_relation_tuples_proto_rawDescGZIP() []byte { - file_kessel_relations_v0_relation_tuples_proto_rawDescOnce.Do(func() { - file_kessel_relations_v0_relation_tuples_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_relations_v0_relation_tuples_proto_rawDescData) - }) - return file_kessel_relations_v0_relation_tuples_proto_rawDescData -} - -var file_kessel_relations_v0_relation_tuples_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_kessel_relations_v0_relation_tuples_proto_goTypes = []any{ - (*CreateTuplesRequest)(nil), // 0: kessel.relations.v0.CreateTuplesRequest - (*CreateTuplesResponse)(nil), // 1: kessel.relations.v0.CreateTuplesResponse - (*ReadTuplesRequest)(nil), // 2: kessel.relations.v0.ReadTuplesRequest - (*ReadTuplesResponse)(nil), // 3: kessel.relations.v0.ReadTuplesResponse - (*DeleteTuplesRequest)(nil), // 4: kessel.relations.v0.DeleteTuplesRequest - (*DeleteTuplesResponse)(nil), // 5: kessel.relations.v0.DeleteTuplesResponse - (*RelationTupleFilter)(nil), // 6: kessel.relations.v0.RelationTupleFilter - (*SubjectFilter)(nil), // 7: kessel.relations.v0.SubjectFilter - (*Relationship)(nil), // 8: kessel.relations.v0.Relationship - (*RequestPagination)(nil), // 9: kessel.relations.v0.RequestPagination - (*ResponsePagination)(nil), // 10: kessel.relations.v0.ResponsePagination -} -var file_kessel_relations_v0_relation_tuples_proto_depIdxs = []int32{ - 8, // 0: kessel.relations.v0.CreateTuplesRequest.tuples:type_name -> kessel.relations.v0.Relationship - 6, // 1: kessel.relations.v0.ReadTuplesRequest.filter:type_name -> kessel.relations.v0.RelationTupleFilter - 9, // 2: kessel.relations.v0.ReadTuplesRequest.pagination:type_name -> kessel.relations.v0.RequestPagination - 8, // 3: kessel.relations.v0.ReadTuplesResponse.tuple:type_name -> kessel.relations.v0.Relationship - 10, // 4: kessel.relations.v0.ReadTuplesResponse.pagination:type_name -> kessel.relations.v0.ResponsePagination - 6, // 5: kessel.relations.v0.DeleteTuplesRequest.filter:type_name -> kessel.relations.v0.RelationTupleFilter - 7, // 6: kessel.relations.v0.RelationTupleFilter.subject_filter:type_name -> kessel.relations.v0.SubjectFilter - 0, // 7: kessel.relations.v0.KesselTupleService.CreateTuples:input_type -> kessel.relations.v0.CreateTuplesRequest - 2, // 8: kessel.relations.v0.KesselTupleService.ReadTuples:input_type -> kessel.relations.v0.ReadTuplesRequest - 4, // 9: kessel.relations.v0.KesselTupleService.DeleteTuples:input_type -> kessel.relations.v0.DeleteTuplesRequest - 1, // 10: kessel.relations.v0.KesselTupleService.CreateTuples:output_type -> kessel.relations.v0.CreateTuplesResponse - 3, // 11: kessel.relations.v0.KesselTupleService.ReadTuples:output_type -> kessel.relations.v0.ReadTuplesResponse - 5, // 12: kessel.relations.v0.KesselTupleService.DeleteTuples:output_type -> kessel.relations.v0.DeleteTuplesResponse - 10, // [10:13] is the sub-list for method output_type - 7, // [7:10] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_kessel_relations_v0_relation_tuples_proto_init() } -func file_kessel_relations_v0_relation_tuples_proto_init() { - if File_kessel_relations_v0_relation_tuples_proto != nil { - return - } - file_kessel_relations_v0_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_kessel_relations_v0_relation_tuples_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CreateTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_relation_tuples_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CreateTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_relation_tuples_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ReadTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_relation_tuples_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ReadTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_relation_tuples_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_relation_tuples_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_relation_tuples_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RelationTupleFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_kessel_relations_v0_relation_tuples_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SubjectFilter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_kessel_relations_v0_relation_tuples_proto_msgTypes[2].OneofWrappers = []any{} - file_kessel_relations_v0_relation_tuples_proto_msgTypes[6].OneofWrappers = []any{} - file_kessel_relations_v0_relation_tuples_proto_msgTypes[7].OneofWrappers = []any{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kessel_relations_v0_relation_tuples_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_kessel_relations_v0_relation_tuples_proto_goTypes, - DependencyIndexes: file_kessel_relations_v0_relation_tuples_proto_depIdxs, - MessageInfos: file_kessel_relations_v0_relation_tuples_proto_msgTypes, - }.Build() - File_kessel_relations_v0_relation_tuples_proto = out.File - file_kessel_relations_v0_relation_tuples_proto_rawDesc = nil - file_kessel_relations_v0_relation_tuples_proto_goTypes = nil - file_kessel_relations_v0_relation_tuples_proto_depIdxs = nil -} diff --git a/api/kessel/relations/v1beta1/check.pb.go b/api/kessel/relations/v1beta1/check.pb.go new file mode 100644 index 0000000..78f839a --- /dev/null +++ b/api/kessel/relations/v1beta1/check.pb.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: kessel/relations/v1beta1/check.proto + +package v1beta1 + +import ( + _ "github.com/envoyproxy/protoc-gen-validate/validate" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CheckResponse_Allowed int32 + +const ( + CheckResponse_ALLOWED_UNSPECIFIED CheckResponse_Allowed = 0 + CheckResponse_ALLOWED_TRUE CheckResponse_Allowed = 1 + CheckResponse_ALLOWED_FALSE CheckResponse_Allowed = 2 // e.g. ALLOWED_CONDITIONAL = 3; +) + +// Enum value maps for CheckResponse_Allowed. +var ( + CheckResponse_Allowed_name = map[int32]string{ + 0: "ALLOWED_UNSPECIFIED", + 1: "ALLOWED_TRUE", + 2: "ALLOWED_FALSE", + } + CheckResponse_Allowed_value = map[string]int32{ + "ALLOWED_UNSPECIFIED": 0, + "ALLOWED_TRUE": 1, + "ALLOWED_FALSE": 2, + } +) + +func (x CheckResponse_Allowed) Enum() *CheckResponse_Allowed { + p := new(CheckResponse_Allowed) + *p = x + return p +} + +func (x CheckResponse_Allowed) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CheckResponse_Allowed) Descriptor() protoreflect.EnumDescriptor { + return file_kessel_relations_v1beta1_check_proto_enumTypes[0].Descriptor() +} + +func (CheckResponse_Allowed) Type() protoreflect.EnumType { + return &file_kessel_relations_v1beta1_check_proto_enumTypes[0] +} + +func (x CheckResponse_Allowed) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CheckResponse_Allowed.Descriptor instead. +func (CheckResponse_Allowed) EnumDescriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_check_proto_rawDescGZIP(), []int{1, 0} +} + +type CheckRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + Subject *SubjectReference `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` +} + +func (x *CheckRequest) Reset() { + *x = CheckRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_check_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckRequest) ProtoMessage() {} + +func (x *CheckRequest) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_check_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead. +func (*CheckRequest) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_check_proto_rawDescGZIP(), []int{0} +} + +func (x *CheckRequest) GetResource() *ObjectReference { + if x != nil { + return x.Resource + } + return nil +} + +func (x *CheckRequest) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (x *CheckRequest) GetSubject() *SubjectReference { + if x != nil { + return x.Subject + } + return nil +} + +type CheckResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Allowed CheckResponse_Allowed `protobuf:"varint,1,opt,name=allowed,proto3,enum=kessel.relations.v1beta1.CheckResponse_Allowed" json:"allowed,omitempty"` +} + +func (x *CheckResponse) Reset() { + *x = CheckResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_check_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckResponse) ProtoMessage() {} + +func (x *CheckResponse) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_check_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead. +func (*CheckResponse) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_check_proto_rawDescGZIP(), []int{1} +} + +func (x *CheckResponse) GetAllowed() CheckResponse_Allowed { + if x != nil { + return x.Allowed + } + return CheckResponse_ALLOWED_UNSPECIFIED +} + +var File_kessel_relations_v1beta1_check_proto protoreflect.FileDescriptor + +var file_kessel_relations_v1beta1_check_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, + 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, + 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x4f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, + 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x22, 0x47, 0x0a, 0x07, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x17, 0x0a, + 0x13, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, + 0x44, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, 0x4c, 0x4f, + 0x57, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x02, 0x32, 0x89, 0x01, 0x0a, 0x12, + 0x4b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x73, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x26, 0x2e, 0x6b, 0x65, + 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x72, 0x0a, 0x28, 0x6f, 0x72, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_kessel_relations_v1beta1_check_proto_rawDescOnce sync.Once + file_kessel_relations_v1beta1_check_proto_rawDescData = file_kessel_relations_v1beta1_check_proto_rawDesc +) + +func file_kessel_relations_v1beta1_check_proto_rawDescGZIP() []byte { + file_kessel_relations_v1beta1_check_proto_rawDescOnce.Do(func() { + file_kessel_relations_v1beta1_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_relations_v1beta1_check_proto_rawDescData) + }) + return file_kessel_relations_v1beta1_check_proto_rawDescData +} + +var file_kessel_relations_v1beta1_check_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_kessel_relations_v1beta1_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_kessel_relations_v1beta1_check_proto_goTypes = []any{ + (CheckResponse_Allowed)(0), // 0: kessel.relations.v1beta1.CheckResponse.Allowed + (*CheckRequest)(nil), // 1: kessel.relations.v1beta1.CheckRequest + (*CheckResponse)(nil), // 2: kessel.relations.v1beta1.CheckResponse + (*ObjectReference)(nil), // 3: kessel.relations.v1beta1.ObjectReference + (*SubjectReference)(nil), // 4: kessel.relations.v1beta1.SubjectReference +} +var file_kessel_relations_v1beta1_check_proto_depIdxs = []int32{ + 3, // 0: kessel.relations.v1beta1.CheckRequest.resource:type_name -> kessel.relations.v1beta1.ObjectReference + 4, // 1: kessel.relations.v1beta1.CheckRequest.subject:type_name -> kessel.relations.v1beta1.SubjectReference + 0, // 2: kessel.relations.v1beta1.CheckResponse.allowed:type_name -> kessel.relations.v1beta1.CheckResponse.Allowed + 1, // 3: kessel.relations.v1beta1.KesselCheckService.Check:input_type -> kessel.relations.v1beta1.CheckRequest + 2, // 4: kessel.relations.v1beta1.KesselCheckService.Check:output_type -> kessel.relations.v1beta1.CheckResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_kessel_relations_v1beta1_check_proto_init() } +func file_kessel_relations_v1beta1_check_proto_init() { + if File_kessel_relations_v1beta1_check_proto != nil { + return + } + file_kessel_relations_v1beta1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_kessel_relations_v1beta1_check_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CheckRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_check_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*CheckResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_kessel_relations_v1beta1_check_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_kessel_relations_v1beta1_check_proto_goTypes, + DependencyIndexes: file_kessel_relations_v1beta1_check_proto_depIdxs, + EnumInfos: file_kessel_relations_v1beta1_check_proto_enumTypes, + MessageInfos: file_kessel_relations_v1beta1_check_proto_msgTypes, + }.Build() + File_kessel_relations_v1beta1_check_proto = out.File + file_kessel_relations_v1beta1_check_proto_rawDesc = nil + file_kessel_relations_v1beta1_check_proto_goTypes = nil + file_kessel_relations_v1beta1_check_proto_depIdxs = nil +} diff --git a/api/kessel/relations/v0/check.pb.validate.go b/api/kessel/relations/v1beta1/check.pb.validate.go similarity index 99% rename from api/kessel/relations/v0/check.pb.validate.go rename to api/kessel/relations/v1beta1/check.pb.validate.go index 04b3fd4..e032078 100644 --- a/api/kessel/relations/v0/check.pb.validate.go +++ b/api/kessel/relations/v1beta1/check.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: kessel/relations/v0/check.proto +// source: kessel/relations/v1beta1/check.proto -package v0 +package v1beta1 import ( "bytes" diff --git a/api/kessel/relations/v0/check.proto b/api/kessel/relations/v1beta1/check.proto similarity index 80% rename from api/kessel/relations/v0/check.proto rename to api/kessel/relations/v1beta1/check.proto index 1d53f10..f815003 100644 --- a/api/kessel/relations/v0/check.proto +++ b/api/kessel/relations/v1beta1/check.proto @@ -1,22 +1,22 @@ syntax = "proto3"; -package kessel.relations.v0; +package kessel.relations.v1beta1; import "google/api/annotations.proto"; -import "kessel/relations/v0/common.proto"; +import "kessel/relations/v1beta1/common.proto"; import "validate/validate.proto"; -option go_package = "github.com/project-kessel/relations-api/api/kessel/relations/v0"; +option go_package = "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1"; option java_multiple_files = true; -option java_package = "org.project_kessel.api.relations.v0"; +option java_package = "org.project_kessel.api.relations.v1beta1"; service KesselCheckService { // Checks for the existence of a single Relationship // (a Relation between a Resource and a Subject or Subject Set). rpc Check (CheckRequest) returns (CheckResponse) { option (google.api.http) = { - post: "/v0/check" + post: "/v1beta1/check" body: "*" }; }; diff --git a/api/kessel/relations/v0/check_grpc.pb.go b/api/kessel/relations/v1beta1/check_grpc.pb.go similarity index 93% rename from api/kessel/relations/v0/check_grpc.pb.go rename to api/kessel/relations/v1beta1/check_grpc.pb.go index 8909ba0..3ac7a93 100644 --- a/api/kessel/relations/v0/check_grpc.pb.go +++ b/api/kessel/relations/v1beta1/check_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.4.0 // - protoc v4.25.1 -// source: kessel/relations/v0/check.proto +// source: kessel/relations/v1beta1/check.proto -package v0 +package v1beta1 import ( context "context" @@ -19,7 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion8 const ( - KesselCheckService_Check_FullMethodName = "/kessel.relations.v0.KesselCheckService/Check" + KesselCheckService_Check_FullMethodName = "/kessel.relations.v1beta1.KesselCheckService/Check" ) // KesselCheckServiceClient is the client API for KesselCheckService service. @@ -101,7 +101,7 @@ func _KesselCheckService_Check_Handler(srv interface{}, ctx context.Context, dec // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var KesselCheckService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "kessel.relations.v0.KesselCheckService", + ServiceName: "kessel.relations.v1beta1.KesselCheckService", HandlerType: (*KesselCheckServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -110,5 +110,5 @@ var KesselCheckService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "kessel/relations/v0/check.proto", + Metadata: "kessel/relations/v1beta1/check.proto", } diff --git a/api/kessel/relations/v0/check_http.pb.go b/api/kessel/relations/v1beta1/check_http.pb.go similarity index 89% rename from api/kessel/relations/v0/check_http.pb.go rename to api/kessel/relations/v1beta1/check_http.pb.go index 6397bbd..dcc1613 100644 --- a/api/kessel/relations/v0/check_http.pb.go +++ b/api/kessel/relations/v1beta1/check_http.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-http v2.7.3 // - protoc v4.25.1 -// source: kessel/relations/v0/check.proto +// source: kessel/relations/v1beta1/check.proto -package v0 +package v1beta1 import ( context "context" @@ -19,7 +19,7 @@ var _ = binding.EncodeURL const _ = http.SupportPackageIsVersion1 -const OperationKesselCheckServiceCheck = "/kessel.relations.v0.KesselCheckService/Check" +const OperationKesselCheckServiceCheck = "/kessel.relations.v1beta1.KesselCheckService/Check" type KesselCheckServiceHTTPServer interface { // Check Checks for the existence of a single Relationship @@ -29,7 +29,7 @@ type KesselCheckServiceHTTPServer interface { func RegisterKesselCheckServiceHTTPServer(s *http.Server, srv KesselCheckServiceHTTPServer) { r := s.Route("/") - r.POST("/v0/check", _KesselCheckService_Check0_HTTP_Handler(srv)) + r.POST("/v1beta1/check", _KesselCheckService_Check0_HTTP_Handler(srv)) } func _KesselCheckService_Check0_HTTP_Handler(srv KesselCheckServiceHTTPServer) func(ctx http.Context) error { @@ -68,7 +68,7 @@ func NewKesselCheckServiceHTTPClient(client *http.Client) KesselCheckServiceHTTP func (c *KesselCheckServiceHTTPClientImpl) Check(ctx context.Context, in *CheckRequest, opts ...http.CallOption) (*CheckResponse, error) { var out CheckResponse - pattern := "/v0/check" + pattern := "/v1beta1/check" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationKesselCheckServiceCheck)) opts = append(opts, http.PathTemplate(pattern)) diff --git a/api/kessel/relations/v0/common.pb.go b/api/kessel/relations/v1beta1/common.pb.go similarity index 51% rename from api/kessel/relations/v0/common.pb.go rename to api/kessel/relations/v1beta1/common.pb.go index 574c5c3..248b2e9 100644 --- a/api/kessel/relations/v0/common.pb.go +++ b/api/kessel/relations/v1beta1/common.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.34.2 // protoc v4.25.1 -// source: kessel/relations/v0/common.proto +// source: kessel/relations/v1beta1/common.proto -package v0 +package v1beta1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" @@ -43,7 +43,7 @@ type Relationship struct { func (x *Relationship) Reset() { *x = Relationship{} if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_common_proto_msgTypes[0] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -56,7 +56,7 @@ func (x *Relationship) String() string { func (*Relationship) ProtoMessage() {} func (x *Relationship) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_common_proto_msgTypes[0] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69,7 +69,7 @@ func (x *Relationship) ProtoReflect() protoreflect.Message { // Deprecated: Use Relationship.ProtoReflect.Descriptor instead. func (*Relationship) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_common_proto_rawDescGZIP(), []int{0} + return file_kessel_relations_v1beta1_common_proto_rawDescGZIP(), []int{0} } func (x *Relationship) GetResource() *ObjectReference { @@ -108,7 +108,7 @@ type SubjectReference struct { func (x *SubjectReference) Reset() { *x = SubjectReference{} if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_common_proto_msgTypes[1] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -121,7 +121,7 @@ func (x *SubjectReference) String() string { func (*SubjectReference) ProtoMessage() {} func (x *SubjectReference) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_common_proto_msgTypes[1] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -134,7 +134,7 @@ func (x *SubjectReference) ProtoReflect() protoreflect.Message { // Deprecated: Use SubjectReference.ProtoReflect.Descriptor instead. func (*SubjectReference) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_common_proto_rawDescGZIP(), []int{1} + return file_kessel_relations_v1beta1_common_proto_rawDescGZIP(), []int{1} } func (x *SubjectReference) GetRelation() string { @@ -163,7 +163,7 @@ type RequestPagination struct { func (x *RequestPagination) Reset() { *x = RequestPagination{} if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_common_proto_msgTypes[2] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -176,7 +176,7 @@ func (x *RequestPagination) String() string { func (*RequestPagination) ProtoMessage() {} func (x *RequestPagination) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_common_proto_msgTypes[2] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -189,7 +189,7 @@ func (x *RequestPagination) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestPagination.ProtoReflect.Descriptor instead. func (*RequestPagination) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_common_proto_rawDescGZIP(), []int{2} + return file_kessel_relations_v1beta1_common_proto_rawDescGZIP(), []int{2} } func (x *RequestPagination) GetLimit() uint32 { @@ -217,7 +217,7 @@ type ResponsePagination struct { func (x *ResponsePagination) Reset() { *x = ResponsePagination{} if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_common_proto_msgTypes[3] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -230,7 +230,7 @@ func (x *ResponsePagination) String() string { func (*ResponsePagination) ProtoMessage() {} func (x *ResponsePagination) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_common_proto_msgTypes[3] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -243,7 +243,7 @@ func (x *ResponsePagination) ProtoReflect() protoreflect.Message { // Deprecated: Use ResponsePagination.ProtoReflect.Descriptor instead. func (*ResponsePagination) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_common_proto_rawDescGZIP(), []int{3} + return file_kessel_relations_v1beta1_common_proto_rawDescGZIP(), []int{3} } func (x *ResponsePagination) GetContinuationToken() string { @@ -265,7 +265,7 @@ type ObjectReference struct { func (x *ObjectReference) Reset() { *x = ObjectReference{} if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_common_proto_msgTypes[4] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -278,7 +278,7 @@ func (x *ObjectReference) String() string { func (*ObjectReference) ProtoMessage() {} func (x *ObjectReference) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_common_proto_msgTypes[4] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -291,7 +291,7 @@ func (x *ObjectReference) ProtoReflect() protoreflect.Message { // Deprecated: Use ObjectReference.ProtoReflect.Descriptor instead. func (*ObjectReference) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_common_proto_rawDescGZIP(), []int{4} + return file_kessel_relations_v1beta1_common_proto_rawDescGZIP(), []int{4} } func (x *ObjectReference) GetType() *ObjectType { @@ -320,7 +320,7 @@ type ObjectType struct { func (x *ObjectType) Reset() { *x = ObjectType{} if protoimpl.UnsafeEnabled { - mi := &file_kessel_relations_v0_common_proto_msgTypes[5] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -333,7 +333,7 @@ func (x *ObjectType) String() string { func (*ObjectType) ProtoMessage() {} func (x *ObjectType) ProtoReflect() protoreflect.Message { - mi := &file_kessel_relations_v0_common_proto_msgTypes[5] + mi := &file_kessel_relations_v1beta1_common_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -346,7 +346,7 @@ func (x *ObjectType) ProtoReflect() protoreflect.Message { // Deprecated: Use ObjectType.ProtoReflect.Descriptor instead. func (*ObjectType) Descriptor() ([]byte, []int) { - return file_kessel_relations_v0_common_proto_rawDescGZIP(), []int{5} + return file_kessel_relations_v1beta1_common_proto_rawDescGZIP(), []int{5} } func (x *ObjectType) GetNamespace() string { @@ -363,95 +363,98 @@ func (x *ObjectType) GetName() string { return "" } -var File_kessel_relations_v0_common_proto protoreflect.FileDescriptor - -var file_kessel_relations_v0_common_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xca, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, - 0x70, 0x12, 0x4a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, - 0x02, 0x08, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x8a, 0x01, - 0x0a, 0x10, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7d, 0x0a, 0x11, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1d, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, - 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, - 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, - 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, - 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x43, 0x0a, 0x12, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, - 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x69, - 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x68, 0x0a, 0x23, 0x6f, - 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, - 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x76, 0x30, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_kessel_relations_v1beta1_common_proto protoreflect.FileDescriptor + +var file_kessel_relations_v1beta1_common_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x01, 0x0a, 0x0c, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x4f, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4d, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, + 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x7d, 0x0a, 0x11, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x69, + 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x43, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6e, 0x0a, 0x0f, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, + 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x17, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x72, 0x0a, 0x28, 0x6f, 0x72, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, + 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_kessel_relations_v0_common_proto_rawDescOnce sync.Once - file_kessel_relations_v0_common_proto_rawDescData = file_kessel_relations_v0_common_proto_rawDesc + file_kessel_relations_v1beta1_common_proto_rawDescOnce sync.Once + file_kessel_relations_v1beta1_common_proto_rawDescData = file_kessel_relations_v1beta1_common_proto_rawDesc ) -func file_kessel_relations_v0_common_proto_rawDescGZIP() []byte { - file_kessel_relations_v0_common_proto_rawDescOnce.Do(func() { - file_kessel_relations_v0_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_relations_v0_common_proto_rawDescData) +func file_kessel_relations_v1beta1_common_proto_rawDescGZIP() []byte { + file_kessel_relations_v1beta1_common_proto_rawDescOnce.Do(func() { + file_kessel_relations_v1beta1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_relations_v1beta1_common_proto_rawDescData) }) - return file_kessel_relations_v0_common_proto_rawDescData -} - -var file_kessel_relations_v0_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_kessel_relations_v0_common_proto_goTypes = []any{ - (*Relationship)(nil), // 0: kessel.relations.v0.Relationship - (*SubjectReference)(nil), // 1: kessel.relations.v0.SubjectReference - (*RequestPagination)(nil), // 2: kessel.relations.v0.RequestPagination - (*ResponsePagination)(nil), // 3: kessel.relations.v0.ResponsePagination - (*ObjectReference)(nil), // 4: kessel.relations.v0.ObjectReference - (*ObjectType)(nil), // 5: kessel.relations.v0.ObjectType -} -var file_kessel_relations_v0_common_proto_depIdxs = []int32{ - 4, // 0: kessel.relations.v0.Relationship.resource:type_name -> kessel.relations.v0.ObjectReference - 1, // 1: kessel.relations.v0.Relationship.subject:type_name -> kessel.relations.v0.SubjectReference - 4, // 2: kessel.relations.v0.SubjectReference.subject:type_name -> kessel.relations.v0.ObjectReference - 5, // 3: kessel.relations.v0.ObjectReference.type:type_name -> kessel.relations.v0.ObjectType + return file_kessel_relations_v1beta1_common_proto_rawDescData +} + +var file_kessel_relations_v1beta1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_kessel_relations_v1beta1_common_proto_goTypes = []any{ + (*Relationship)(nil), // 0: kessel.relations.v1beta1.Relationship + (*SubjectReference)(nil), // 1: kessel.relations.v1beta1.SubjectReference + (*RequestPagination)(nil), // 2: kessel.relations.v1beta1.RequestPagination + (*ResponsePagination)(nil), // 3: kessel.relations.v1beta1.ResponsePagination + (*ObjectReference)(nil), // 4: kessel.relations.v1beta1.ObjectReference + (*ObjectType)(nil), // 5: kessel.relations.v1beta1.ObjectType +} +var file_kessel_relations_v1beta1_common_proto_depIdxs = []int32{ + 4, // 0: kessel.relations.v1beta1.Relationship.resource:type_name -> kessel.relations.v1beta1.ObjectReference + 1, // 1: kessel.relations.v1beta1.Relationship.subject:type_name -> kessel.relations.v1beta1.SubjectReference + 4, // 2: kessel.relations.v1beta1.SubjectReference.subject:type_name -> kessel.relations.v1beta1.ObjectReference + 5, // 3: kessel.relations.v1beta1.ObjectReference.type:type_name -> kessel.relations.v1beta1.ObjectType 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -459,13 +462,13 @@ var file_kessel_relations_v0_common_proto_depIdxs = []int32{ 0, // [0:4] is the sub-list for field type_name } -func init() { file_kessel_relations_v0_common_proto_init() } -func file_kessel_relations_v0_common_proto_init() { - if File_kessel_relations_v0_common_proto != nil { +func init() { file_kessel_relations_v1beta1_common_proto_init() } +func file_kessel_relations_v1beta1_common_proto_init() { + if File_kessel_relations_v1beta1_common_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_kessel_relations_v0_common_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_kessel_relations_v1beta1_common_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Relationship); i { case 0: return &v.state @@ -477,7 +480,7 @@ func file_kessel_relations_v0_common_proto_init() { return nil } } - file_kessel_relations_v0_common_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_kessel_relations_v1beta1_common_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*SubjectReference); i { case 0: return &v.state @@ -489,7 +492,7 @@ func file_kessel_relations_v0_common_proto_init() { return nil } } - file_kessel_relations_v0_common_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_kessel_relations_v1beta1_common_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*RequestPagination); i { case 0: return &v.state @@ -501,7 +504,7 @@ func file_kessel_relations_v0_common_proto_init() { return nil } } - file_kessel_relations_v0_common_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_kessel_relations_v1beta1_common_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ResponsePagination); i { case 0: return &v.state @@ -513,7 +516,7 @@ func file_kessel_relations_v0_common_proto_init() { return nil } } - file_kessel_relations_v0_common_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_kessel_relations_v1beta1_common_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*ObjectReference); i { case 0: return &v.state @@ -525,7 +528,7 @@ func file_kessel_relations_v0_common_proto_init() { return nil } } - file_kessel_relations_v0_common_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_kessel_relations_v1beta1_common_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*ObjectType); i { case 0: return &v.state @@ -538,24 +541,24 @@ func file_kessel_relations_v0_common_proto_init() { } } } - file_kessel_relations_v0_common_proto_msgTypes[1].OneofWrappers = []any{} - file_kessel_relations_v0_common_proto_msgTypes[2].OneofWrappers = []any{} + file_kessel_relations_v1beta1_common_proto_msgTypes[1].OneofWrappers = []any{} + file_kessel_relations_v1beta1_common_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_kessel_relations_v0_common_proto_rawDesc, + RawDescriptor: file_kessel_relations_v1beta1_common_proto_rawDesc, NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_kessel_relations_v0_common_proto_goTypes, - DependencyIndexes: file_kessel_relations_v0_common_proto_depIdxs, - MessageInfos: file_kessel_relations_v0_common_proto_msgTypes, + GoTypes: file_kessel_relations_v1beta1_common_proto_goTypes, + DependencyIndexes: file_kessel_relations_v1beta1_common_proto_depIdxs, + MessageInfos: file_kessel_relations_v1beta1_common_proto_msgTypes, }.Build() - File_kessel_relations_v0_common_proto = out.File - file_kessel_relations_v0_common_proto_rawDesc = nil - file_kessel_relations_v0_common_proto_goTypes = nil - file_kessel_relations_v0_common_proto_depIdxs = nil + File_kessel_relations_v1beta1_common_proto = out.File + file_kessel_relations_v1beta1_common_proto_rawDesc = nil + file_kessel_relations_v1beta1_common_proto_goTypes = nil + file_kessel_relations_v1beta1_common_proto_depIdxs = nil } diff --git a/api/kessel/relations/v0/common.pb.validate.go b/api/kessel/relations/v1beta1/common.pb.validate.go similarity index 99% rename from api/kessel/relations/v0/common.pb.validate.go rename to api/kessel/relations/v1beta1/common.pb.validate.go index ce3547a..22ed79f 100644 --- a/api/kessel/relations/v0/common.pb.validate.go +++ b/api/kessel/relations/v1beta1/common.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: kessel/relations/v0/common.proto +// source: kessel/relations/v1beta1/common.proto -package v0 +package v1beta1 import ( "bytes" diff --git a/api/kessel/relations/v0/common.proto b/api/kessel/relations/v1beta1/common.proto similarity index 93% rename from api/kessel/relations/v0/common.proto rename to api/kessel/relations/v1beta1/common.proto index d434ae7..ef539f6 100644 --- a/api/kessel/relations/v0/common.proto +++ b/api/kessel/relations/v1beta1/common.proto @@ -1,12 +1,12 @@ syntax = "proto3"; -package kessel.relations.v0; +package kessel.relations.v1beta1; import "validate/validate.proto"; -option go_package = "github.com/project-kessel/relations-api/api/kessel/relations/v0"; +option go_package = "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1"; option java_multiple_files = true; -option java_package = "org.project_kessel.api.relations.v0"; +option java_package = "org.project_kessel.api.relations.v1beta1"; // A _Relationship_ is the realization of a _Relation_ (a string) // between a _Resource_ and a _Subject_ or a _Subject Set_ (known as a Userset in Zanzibar). diff --git a/api/kessel/relations/v1beta1/lookup.pb.go b/api/kessel/relations/v1beta1/lookup.pb.go new file mode 100644 index 0000000..cf80fc7 --- /dev/null +++ b/api/kessel/relations/v1beta1/lookup.pb.go @@ -0,0 +1,517 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: kessel/relations/v1beta1/lookup.proto + +package v1beta1 + +import ( + _ "github.com/envoyproxy/protoc-gen-validate/validate" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LookupResourcesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResourceType *ObjectType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + Subject *SubjectReference `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Pagination *RequestPagination `protobuf:"bytes,4,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` +} + +func (x *LookupResourcesRequest) Reset() { + *x = LookupResourcesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_lookup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupResourcesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupResourcesRequest) ProtoMessage() {} + +func (x *LookupResourcesRequest) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_lookup_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupResourcesRequest.ProtoReflect.Descriptor instead. +func (*LookupResourcesRequest) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_lookup_proto_rawDescGZIP(), []int{0} +} + +func (x *LookupResourcesRequest) GetResourceType() *ObjectType { + if x != nil { + return x.ResourceType + } + return nil +} + +func (x *LookupResourcesRequest) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (x *LookupResourcesRequest) GetSubject() *SubjectReference { + if x != nil { + return x.Subject + } + return nil +} + +func (x *LookupResourcesRequest) GetPagination() *RequestPagination { + if x != nil { + return x.Pagination + } + return nil +} + +type LookupResourcesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Pagination *ResponsePagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *LookupResourcesResponse) Reset() { + *x = LookupResourcesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_lookup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupResourcesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupResourcesResponse) ProtoMessage() {} + +func (x *LookupResourcesResponse) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_lookup_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupResourcesResponse.ProtoReflect.Descriptor instead. +func (*LookupResourcesResponse) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_lookup_proto_rawDescGZIP(), []int{1} +} + +func (x *LookupResourcesResponse) GetResource() *ObjectReference { + if x != nil { + return x.Resource + } + return nil +} + +func (x *LookupResourcesResponse) GetPagination() *ResponsePagination { + if x != nil { + return x.Pagination + } + return nil +} + +type LookupSubjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + SubjectType *ObjectType `protobuf:"bytes,3,opt,name=subject_type,json=subjectType,proto3" json:"subject_type,omitempty"` + SubjectRelation *string `protobuf:"bytes,4,opt,name=subject_relation,json=subjectRelation,proto3,oneof" json:"subject_relation,omitempty"` + Pagination *RequestPagination `protobuf:"bytes,5,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` +} + +func (x *LookupSubjectsRequest) Reset() { + *x = LookupSubjectsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_lookup_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupSubjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupSubjectsRequest) ProtoMessage() {} + +func (x *LookupSubjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_lookup_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupSubjectsRequest.ProtoReflect.Descriptor instead. +func (*LookupSubjectsRequest) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_lookup_proto_rawDescGZIP(), []int{2} +} + +func (x *LookupSubjectsRequest) GetResource() *ObjectReference { + if x != nil { + return x.Resource + } + return nil +} + +func (x *LookupSubjectsRequest) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (x *LookupSubjectsRequest) GetSubjectType() *ObjectType { + if x != nil { + return x.SubjectType + } + return nil +} + +func (x *LookupSubjectsRequest) GetSubjectRelation() string { + if x != nil && x.SubjectRelation != nil { + return *x.SubjectRelation + } + return "" +} + +func (x *LookupSubjectsRequest) GetPagination() *RequestPagination { + if x != nil { + return x.Pagination + } + return nil +} + +type LookupSubjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subject *SubjectReference `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + Pagination *ResponsePagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *LookupSubjectsResponse) Reset() { + *x = LookupSubjectsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_lookup_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupSubjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupSubjectsResponse) ProtoMessage() {} + +func (x *LookupSubjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_lookup_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupSubjectsResponse.ProtoReflect.Descriptor instead. +func (*LookupSubjectsResponse) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_lookup_proto_rawDescGZIP(), []int{3} +} + +func (x *LookupSubjectsResponse) GetSubject() *SubjectReference { + if x != nil { + return x.Subject + } + return nil +} + +func (x *LookupSubjectsResponse) GetPagination() *ResponsePagination { + if x != nil { + return x.Pagination + } + return nil +} + +var File_kessel_relations_v1beta1_lookup_proto protoreflect.FileDescriptor + +var file_kessel_relations_v1beta1_lookup_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x25, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xc3, 0x02, 0x0a, 0x16, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x0d, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x23, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x50, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, + 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xae, 0x01, 0x0a, 0x17, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x45, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, + 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x86, 0x03, 0x0a, 0x15, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x4f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6b, + 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x10, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x50, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, + 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x01, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0xac, 0x01, 0x0a, 0x16, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x65, + 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x4c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xbf, + 0x02, 0x0a, 0x13, 0x4b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2f, 0x2e, 0x6b, 0x65, 0x73, 0x73, + 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6b, 0x65, 0x73, + 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x30, 0x01, 0x12, 0x94, 0x01, 0x0a, 0x0f, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, + 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x30, 0x01, + 0x42, 0x72, 0x0a, 0x28, 0x6f, 0x72, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x44, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6b, 0x65, 0x73, 0x73, + 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_kessel_relations_v1beta1_lookup_proto_rawDescOnce sync.Once + file_kessel_relations_v1beta1_lookup_proto_rawDescData = file_kessel_relations_v1beta1_lookup_proto_rawDesc +) + +func file_kessel_relations_v1beta1_lookup_proto_rawDescGZIP() []byte { + file_kessel_relations_v1beta1_lookup_proto_rawDescOnce.Do(func() { + file_kessel_relations_v1beta1_lookup_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_relations_v1beta1_lookup_proto_rawDescData) + }) + return file_kessel_relations_v1beta1_lookup_proto_rawDescData +} + +var file_kessel_relations_v1beta1_lookup_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_kessel_relations_v1beta1_lookup_proto_goTypes = []any{ + (*LookupResourcesRequest)(nil), // 0: kessel.relations.v1beta1.LookupResourcesRequest + (*LookupResourcesResponse)(nil), // 1: kessel.relations.v1beta1.LookupResourcesResponse + (*LookupSubjectsRequest)(nil), // 2: kessel.relations.v1beta1.LookupSubjectsRequest + (*LookupSubjectsResponse)(nil), // 3: kessel.relations.v1beta1.LookupSubjectsResponse + (*ObjectType)(nil), // 4: kessel.relations.v1beta1.ObjectType + (*SubjectReference)(nil), // 5: kessel.relations.v1beta1.SubjectReference + (*RequestPagination)(nil), // 6: kessel.relations.v1beta1.RequestPagination + (*ObjectReference)(nil), // 7: kessel.relations.v1beta1.ObjectReference + (*ResponsePagination)(nil), // 8: kessel.relations.v1beta1.ResponsePagination +} +var file_kessel_relations_v1beta1_lookup_proto_depIdxs = []int32{ + 4, // 0: kessel.relations.v1beta1.LookupResourcesRequest.resource_type:type_name -> kessel.relations.v1beta1.ObjectType + 5, // 1: kessel.relations.v1beta1.LookupResourcesRequest.subject:type_name -> kessel.relations.v1beta1.SubjectReference + 6, // 2: kessel.relations.v1beta1.LookupResourcesRequest.pagination:type_name -> kessel.relations.v1beta1.RequestPagination + 7, // 3: kessel.relations.v1beta1.LookupResourcesResponse.resource:type_name -> kessel.relations.v1beta1.ObjectReference + 8, // 4: kessel.relations.v1beta1.LookupResourcesResponse.pagination:type_name -> kessel.relations.v1beta1.ResponsePagination + 7, // 5: kessel.relations.v1beta1.LookupSubjectsRequest.resource:type_name -> kessel.relations.v1beta1.ObjectReference + 4, // 6: kessel.relations.v1beta1.LookupSubjectsRequest.subject_type:type_name -> kessel.relations.v1beta1.ObjectType + 6, // 7: kessel.relations.v1beta1.LookupSubjectsRequest.pagination:type_name -> kessel.relations.v1beta1.RequestPagination + 5, // 8: kessel.relations.v1beta1.LookupSubjectsResponse.subject:type_name -> kessel.relations.v1beta1.SubjectReference + 8, // 9: kessel.relations.v1beta1.LookupSubjectsResponse.pagination:type_name -> kessel.relations.v1beta1.ResponsePagination + 2, // 10: kessel.relations.v1beta1.KesselLookupService.LookupSubjects:input_type -> kessel.relations.v1beta1.LookupSubjectsRequest + 0, // 11: kessel.relations.v1beta1.KesselLookupService.LookupResources:input_type -> kessel.relations.v1beta1.LookupResourcesRequest + 3, // 12: kessel.relations.v1beta1.KesselLookupService.LookupSubjects:output_type -> kessel.relations.v1beta1.LookupSubjectsResponse + 1, // 13: kessel.relations.v1beta1.KesselLookupService.LookupResources:output_type -> kessel.relations.v1beta1.LookupResourcesResponse + 12, // [12:14] is the sub-list for method output_type + 10, // [10:12] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_kessel_relations_v1beta1_lookup_proto_init() } +func file_kessel_relations_v1beta1_lookup_proto_init() { + if File_kessel_relations_v1beta1_lookup_proto != nil { + return + } + file_kessel_relations_v1beta1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_kessel_relations_v1beta1_lookup_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*LookupResourcesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_lookup_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*LookupResourcesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_lookup_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*LookupSubjectsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_lookup_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*LookupSubjectsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_kessel_relations_v1beta1_lookup_proto_msgTypes[0].OneofWrappers = []any{} + file_kessel_relations_v1beta1_lookup_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_kessel_relations_v1beta1_lookup_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_kessel_relations_v1beta1_lookup_proto_goTypes, + DependencyIndexes: file_kessel_relations_v1beta1_lookup_proto_depIdxs, + MessageInfos: file_kessel_relations_v1beta1_lookup_proto_msgTypes, + }.Build() + File_kessel_relations_v1beta1_lookup_proto = out.File + file_kessel_relations_v1beta1_lookup_proto_rawDesc = nil + file_kessel_relations_v1beta1_lookup_proto_goTypes = nil + file_kessel_relations_v1beta1_lookup_proto_depIdxs = nil +} diff --git a/api/kessel/relations/v0/lookup.pb.validate.go b/api/kessel/relations/v1beta1/lookup.pb.validate.go similarity index 99% rename from api/kessel/relations/v0/lookup.pb.validate.go rename to api/kessel/relations/v1beta1/lookup.pb.validate.go index 3e6b291..e69abd9 100644 --- a/api/kessel/relations/v0/lookup.pb.validate.go +++ b/api/kessel/relations/v1beta1/lookup.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: kessel/relations/v0/lookup.proto +// source: kessel/relations/v1beta1/lookup.proto -package v0 +package v1beta1 import ( "bytes" diff --git a/api/kessel/relations/v0/lookup.proto b/api/kessel/relations/v1beta1/lookup.proto similarity index 84% rename from api/kessel/relations/v0/lookup.proto rename to api/kessel/relations/v1beta1/lookup.proto index 45a1b8c..ac1fa45 100644 --- a/api/kessel/relations/v0/lookup.proto +++ b/api/kessel/relations/v1beta1/lookup.proto @@ -1,25 +1,25 @@ syntax = "proto3"; -package kessel.relations.v0; +package kessel.relations.v1beta1; import "google/api/annotations.proto"; -import "kessel/relations/v0/common.proto"; +import "kessel/relations/v1beta1/common.proto"; import "validate/validate.proto"; -option go_package = "github.com/project-kessel/relations-api/api/kessel/relations/v0"; +option go_package = "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1"; option java_multiple_files = true; -option java_package = "org.project_kessel.api.relations.v0"; +option java_package = "org.project_kessel.api.relations.v1beta1"; service KesselLookupService { rpc LookupSubjects(LookupSubjectsRequest) returns (stream LookupSubjectsResponse) { option (google.api.http) = { - get: "/v0/subjects" + get: "/v1beta1/subjects" }; }; rpc LookupResources(LookupResourcesRequest) returns (stream LookupResourcesResponse) { option (google.api.http) = { - get: "/v0/resources" + get: "/v1beta1/resources" }; }; } diff --git a/api/kessel/relations/v0/lookup_grpc.pb.go b/api/kessel/relations/v1beta1/lookup_grpc.pb.go similarity index 96% rename from api/kessel/relations/v0/lookup_grpc.pb.go rename to api/kessel/relations/v1beta1/lookup_grpc.pb.go index cab4fd1..fe5a20e 100644 --- a/api/kessel/relations/v0/lookup_grpc.pb.go +++ b/api/kessel/relations/v1beta1/lookup_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.4.0 // - protoc v4.25.1 -// source: kessel/relations/v0/lookup.proto +// source: kessel/relations/v1beta1/lookup.proto -package v0 +package v1beta1 import ( context "context" @@ -19,8 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion8 const ( - KesselLookupService_LookupSubjects_FullMethodName = "/kessel.relations.v0.KesselLookupService/LookupSubjects" - KesselLookupService_LookupResources_FullMethodName = "/kessel.relations.v0.KesselLookupService/LookupResources" + KesselLookupService_LookupSubjects_FullMethodName = "/kessel.relations.v1beta1.KesselLookupService/LookupSubjects" + KesselLookupService_LookupResources_FullMethodName = "/kessel.relations.v1beta1.KesselLookupService/LookupResources" ) // KesselLookupServiceClient is the client API for KesselLookupService service. @@ -183,7 +183,7 @@ func (x *kesselLookupServiceLookupResourcesServer) Send(m *LookupResourcesRespon // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var KesselLookupService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "kessel.relations.v0.KesselLookupService", + ServiceName: "kessel.relations.v1beta1.KesselLookupService", HandlerType: (*KesselLookupServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ @@ -198,5 +198,5 @@ var KesselLookupService_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "kessel/relations/v0/lookup.proto", + Metadata: "kessel/relations/v1beta1/lookup.proto", } diff --git a/api/kessel/relations/v1beta1/relation_tuples.pb.go b/api/kessel/relations/v1beta1/relation_tuples.pb.go new file mode 100644 index 0000000..ba5128d --- /dev/null +++ b/api/kessel/relations/v1beta1/relation_tuples.pb.go @@ -0,0 +1,770 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v4.25.1 +// source: kessel/relations/v1beta1/relation_tuples.proto + +package v1beta1 + +import ( + _ "github.com/envoyproxy/protoc-gen-validate/validate" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CreateTuplesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether or not the request should ignore existing tuples (`true`), + // or if the request should fail if the same tuple already exists (`false`). + // + // Defaults to `false`. + Upsert bool `protobuf:"varint,1,opt,name=upsert,proto3" json:"upsert,omitempty"` + Tuples []*Relationship `protobuf:"bytes,2,rep,name=tuples,proto3" json:"tuples,omitempty"` +} + +func (x *CreateTuplesRequest) Reset() { + *x = CreateTuplesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTuplesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTuplesRequest) ProtoMessage() {} + +func (x *CreateTuplesRequest) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTuplesRequest.ProtoReflect.Descriptor instead. +func (*CreateTuplesRequest) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateTuplesRequest) GetUpsert() bool { + if x != nil { + return x.Upsert + } + return false +} + +func (x *CreateTuplesRequest) GetTuples() []*Relationship { + if x != nil { + return x.Tuples + } + return nil +} + +type CreateTuplesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateTuplesResponse) Reset() { + *x = CreateTuplesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateTuplesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTuplesResponse) ProtoMessage() {} + +func (x *CreateTuplesResponse) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTuplesResponse.ProtoReflect.Descriptor instead. +func (*CreateTuplesResponse) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP(), []int{1} +} + +type ReadTuplesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filter *RelationTupleFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + Pagination *RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3,oneof" json:"pagination,omitempty"` +} + +func (x *ReadTuplesRequest) Reset() { + *x = ReadTuplesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadTuplesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadTuplesRequest) ProtoMessage() {} + +func (x *ReadTuplesRequest) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadTuplesRequest.ProtoReflect.Descriptor instead. +func (*ReadTuplesRequest) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP(), []int{2} +} + +func (x *ReadTuplesRequest) GetFilter() *RelationTupleFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ReadTuplesRequest) GetPagination() *RequestPagination { + if x != nil { + return x.Pagination + } + return nil +} + +type ReadTuplesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tuple *Relationship `protobuf:"bytes,1,opt,name=tuple,proto3" json:"tuple,omitempty"` + Pagination *ResponsePagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *ReadTuplesResponse) Reset() { + *x = ReadTuplesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadTuplesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadTuplesResponse) ProtoMessage() {} + +func (x *ReadTuplesResponse) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadTuplesResponse.ProtoReflect.Descriptor instead. +func (*ReadTuplesResponse) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP(), []int{3} +} + +func (x *ReadTuplesResponse) GetTuple() *Relationship { + if x != nil { + return x.Tuple + } + return nil +} + +func (x *ReadTuplesResponse) GetPagination() *ResponsePagination { + if x != nil { + return x.Pagination + } + return nil +} + +type DeleteTuplesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filter *RelationTupleFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *DeleteTuplesRequest) Reset() { + *x = DeleteTuplesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTuplesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTuplesRequest) ProtoMessage() {} + +func (x *DeleteTuplesRequest) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTuplesRequest.ProtoReflect.Descriptor instead. +func (*DeleteTuplesRequest) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteTuplesRequest) GetFilter() *RelationTupleFilter { + if x != nil { + return x.Filter + } + return nil +} + +type DeleteTuplesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteTuplesResponse) Reset() { + *x = DeleteTuplesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTuplesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTuplesResponse) ProtoMessage() {} + +func (x *DeleteTuplesResponse) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTuplesResponse.ProtoReflect.Descriptor instead. +func (*DeleteTuplesResponse) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP(), []int{5} +} + +// RelationTupleFilter is used to filter tuples based on their resource, relation, and subject. +// All fields are optional but capabilities may vary based on the chosen store and its indexes. +// At least one field must be provided. +type RelationTupleFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ResourceNamespace *string `protobuf:"bytes,1,opt,name=resource_namespace,json=resourceNamespace,proto3,oneof" json:"resource_namespace,omitempty"` + ResourceType *string `protobuf:"bytes,2,opt,name=resource_type,json=resourceType,proto3,oneof" json:"resource_type,omitempty"` + ResourceId *string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3,oneof" json:"resource_id,omitempty"` + Relation *string `protobuf:"bytes,4,opt,name=relation,proto3,oneof" json:"relation,omitempty"` + SubjectFilter *SubjectFilter `protobuf:"bytes,5,opt,name=subject_filter,json=subjectFilter,proto3,oneof" json:"subject_filter,omitempty"` +} + +func (x *RelationTupleFilter) Reset() { + *x = RelationTupleFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelationTupleFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelationTupleFilter) ProtoMessage() {} + +func (x *RelationTupleFilter) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RelationTupleFilter.ProtoReflect.Descriptor instead. +func (*RelationTupleFilter) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP(), []int{6} +} + +func (x *RelationTupleFilter) GetResourceNamespace() string { + if x != nil && x.ResourceNamespace != nil { + return *x.ResourceNamespace + } + return "" +} + +func (x *RelationTupleFilter) GetResourceType() string { + if x != nil && x.ResourceType != nil { + return *x.ResourceType + } + return "" +} + +func (x *RelationTupleFilter) GetResourceId() string { + if x != nil && x.ResourceId != nil { + return *x.ResourceId + } + return "" +} + +func (x *RelationTupleFilter) GetRelation() string { + if x != nil && x.Relation != nil { + return *x.Relation + } + return "" +} + +func (x *RelationTupleFilter) GetSubjectFilter() *SubjectFilter { + if x != nil { + return x.SubjectFilter + } + return nil +} + +type SubjectFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectNamespace *string `protobuf:"bytes,1,opt,name=subject_namespace,json=subjectNamespace,proto3,oneof" json:"subject_namespace,omitempty"` + SubjectType *string `protobuf:"bytes,2,opt,name=subject_type,json=subjectType,proto3,oneof" json:"subject_type,omitempty"` + SubjectId *string `protobuf:"bytes,3,opt,name=subject_id,json=subjectId,proto3,oneof" json:"subject_id,omitempty"` + Relation *string `protobuf:"bytes,4,opt,name=relation,proto3,oneof" json:"relation,omitempty"` +} + +func (x *SubjectFilter) Reset() { + *x = SubjectFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectFilter) ProtoMessage() {} + +func (x *SubjectFilter) ProtoReflect() protoreflect.Message { + mi := &file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectFilter.ProtoReflect.Descriptor instead. +func (*SubjectFilter) Descriptor() ([]byte, []int) { + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP(), []int{7} +} + +func (x *SubjectFilter) GetSubjectNamespace() string { + if x != nil && x.SubjectNamespace != nil { + return *x.SubjectNamespace + } + return "" +} + +func (x *SubjectFilter) GetSubjectType() string { + if x != nil && x.SubjectType != nil { + return *x.SubjectType + } + return "" +} + +func (x *SubjectFilter) GetSubjectId() string { + if x != nil && x.SubjectId != nil { + return *x.SubjectId + } + return "" +} + +func (x *SubjectFilter) GetRelation() string { + if x != nil && x.Relation != nil { + return *x.Relation + } + return "" +} + +var File_kessel_relations_v1beta1_relation_tuples_proto protoreflect.FileDescriptor + +var file_kessel_relations_v1beta1_relation_tuples_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x18, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x06, 0x75, 0x70, 0x73, 0x65, 0x72, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, + 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xc5, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6b, 0x65, 0x73, + 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, + 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x4c, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x13, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x4f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe8, 0x02, 0x0a, 0x13, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x32, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x53, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x04, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x42, 0x15, 0x0a, 0x13, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xf1, 0x01, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, + 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x0f, 0x0a, 0x0d, + 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x42, 0x0b, 0x0a, 0x09, + 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xae, 0x03, 0x0a, 0x12, 0x4b, 0x65, + 0x73, 0x73, 0x65, 0x6c, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x89, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x12, 0x2d, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x82, 0x01, 0x0a, + 0x0a, 0x52, 0x65, 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x6b, 0x65, + 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, + 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x30, + 0x01, 0x12, 0x86, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x2a, 0x0f, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0x72, 0x0a, 0x28, 0x6f, 0x72, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6b, 0x65, 0x73, + 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6b, 0x65, 0x73, 0x73, 0x65, 0x6c, 0x2f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_kessel_relations_v1beta1_relation_tuples_proto_rawDescOnce sync.Once + file_kessel_relations_v1beta1_relation_tuples_proto_rawDescData = file_kessel_relations_v1beta1_relation_tuples_proto_rawDesc +) + +func file_kessel_relations_v1beta1_relation_tuples_proto_rawDescGZIP() []byte { + file_kessel_relations_v1beta1_relation_tuples_proto_rawDescOnce.Do(func() { + file_kessel_relations_v1beta1_relation_tuples_proto_rawDescData = protoimpl.X.CompressGZIP(file_kessel_relations_v1beta1_relation_tuples_proto_rawDescData) + }) + return file_kessel_relations_v1beta1_relation_tuples_proto_rawDescData +} + +var file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_kessel_relations_v1beta1_relation_tuples_proto_goTypes = []any{ + (*CreateTuplesRequest)(nil), // 0: kessel.relations.v1beta1.CreateTuplesRequest + (*CreateTuplesResponse)(nil), // 1: kessel.relations.v1beta1.CreateTuplesResponse + (*ReadTuplesRequest)(nil), // 2: kessel.relations.v1beta1.ReadTuplesRequest + (*ReadTuplesResponse)(nil), // 3: kessel.relations.v1beta1.ReadTuplesResponse + (*DeleteTuplesRequest)(nil), // 4: kessel.relations.v1beta1.DeleteTuplesRequest + (*DeleteTuplesResponse)(nil), // 5: kessel.relations.v1beta1.DeleteTuplesResponse + (*RelationTupleFilter)(nil), // 6: kessel.relations.v1beta1.RelationTupleFilter + (*SubjectFilter)(nil), // 7: kessel.relations.v1beta1.SubjectFilter + (*Relationship)(nil), // 8: kessel.relations.v1beta1.Relationship + (*RequestPagination)(nil), // 9: kessel.relations.v1beta1.RequestPagination + (*ResponsePagination)(nil), // 10: kessel.relations.v1beta1.ResponsePagination +} +var file_kessel_relations_v1beta1_relation_tuples_proto_depIdxs = []int32{ + 8, // 0: kessel.relations.v1beta1.CreateTuplesRequest.tuples:type_name -> kessel.relations.v1beta1.Relationship + 6, // 1: kessel.relations.v1beta1.ReadTuplesRequest.filter:type_name -> kessel.relations.v1beta1.RelationTupleFilter + 9, // 2: kessel.relations.v1beta1.ReadTuplesRequest.pagination:type_name -> kessel.relations.v1beta1.RequestPagination + 8, // 3: kessel.relations.v1beta1.ReadTuplesResponse.tuple:type_name -> kessel.relations.v1beta1.Relationship + 10, // 4: kessel.relations.v1beta1.ReadTuplesResponse.pagination:type_name -> kessel.relations.v1beta1.ResponsePagination + 6, // 5: kessel.relations.v1beta1.DeleteTuplesRequest.filter:type_name -> kessel.relations.v1beta1.RelationTupleFilter + 7, // 6: kessel.relations.v1beta1.RelationTupleFilter.subject_filter:type_name -> kessel.relations.v1beta1.SubjectFilter + 0, // 7: kessel.relations.v1beta1.KesselTupleService.CreateTuples:input_type -> kessel.relations.v1beta1.CreateTuplesRequest + 2, // 8: kessel.relations.v1beta1.KesselTupleService.ReadTuples:input_type -> kessel.relations.v1beta1.ReadTuplesRequest + 4, // 9: kessel.relations.v1beta1.KesselTupleService.DeleteTuples:input_type -> kessel.relations.v1beta1.DeleteTuplesRequest + 1, // 10: kessel.relations.v1beta1.KesselTupleService.CreateTuples:output_type -> kessel.relations.v1beta1.CreateTuplesResponse + 3, // 11: kessel.relations.v1beta1.KesselTupleService.ReadTuples:output_type -> kessel.relations.v1beta1.ReadTuplesResponse + 5, // 12: kessel.relations.v1beta1.KesselTupleService.DeleteTuples:output_type -> kessel.relations.v1beta1.DeleteTuplesResponse + 10, // [10:13] is the sub-list for method output_type + 7, // [7:10] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_kessel_relations_v1beta1_relation_tuples_proto_init() } +func file_kessel_relations_v1beta1_relation_tuples_proto_init() { + if File_kessel_relations_v1beta1_relation_tuples_proto != nil { + return + } + file_kessel_relations_v1beta1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*CreateTuplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*CreateTuplesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ReadTuplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ReadTuplesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeleteTuplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteTuplesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*RelationTupleFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*SubjectFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[2].OneofWrappers = []any{} + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[6].OneofWrappers = []any{} + file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes[7].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_kessel_relations_v1beta1_relation_tuples_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_kessel_relations_v1beta1_relation_tuples_proto_goTypes, + DependencyIndexes: file_kessel_relations_v1beta1_relation_tuples_proto_depIdxs, + MessageInfos: file_kessel_relations_v1beta1_relation_tuples_proto_msgTypes, + }.Build() + File_kessel_relations_v1beta1_relation_tuples_proto = out.File + file_kessel_relations_v1beta1_relation_tuples_proto_rawDesc = nil + file_kessel_relations_v1beta1_relation_tuples_proto_goTypes = nil + file_kessel_relations_v1beta1_relation_tuples_proto_depIdxs = nil +} diff --git a/api/kessel/relations/v0/relation_tuples.pb.validate.go b/api/kessel/relations/v1beta1/relation_tuples.pb.validate.go similarity index 99% rename from api/kessel/relations/v0/relation_tuples.pb.validate.go rename to api/kessel/relations/v1beta1/relation_tuples.pb.validate.go index 0bafe4a..ae0f3aa 100644 --- a/api/kessel/relations/v0/relation_tuples.pb.validate.go +++ b/api/kessel/relations/v1beta1/relation_tuples.pb.validate.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-validate. DO NOT EDIT. -// source: kessel/relations/v0/relation_tuples.proto +// source: kessel/relations/v1beta1/relation_tuples.proto -package v0 +package v1beta1 import ( "bytes" diff --git a/api/kessel/relations/v0/relation_tuples.proto b/api/kessel/relations/v1beta1/relation_tuples.proto similarity index 89% rename from api/kessel/relations/v0/relation_tuples.proto rename to api/kessel/relations/v1beta1/relation_tuples.proto index 2ef17b4..2a08393 100644 --- a/api/kessel/relations/v0/relation_tuples.proto +++ b/api/kessel/relations/v1beta1/relation_tuples.proto @@ -1,14 +1,14 @@ syntax = "proto3"; -package kessel.relations.v0; +package kessel.relations.v1beta1; import "google/api/annotations.proto"; -import "kessel/relations/v0/common.proto"; +import "kessel/relations/v1beta1/common.proto"; import "validate/validate.proto"; -option go_package = "github.com/project-kessel/relations-api/api/kessel/relations/v0"; +option go_package = "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1"; option java_multiple_files = true; -option java_package = "org.project_kessel.api.relations.v0"; +option java_package = "org.project_kessel.api.relations.v1beta1"; // KesselTupleServices manages the persisted _Tuples_ stored in the system.. // @@ -20,18 +20,18 @@ option java_package = "org.project_kessel.api.relations.v0"; service KesselTupleService { rpc CreateTuples (CreateTuplesRequest) returns (CreateTuplesResponse) { option (google.api.http) = { - post: "/v0/tuples" + post: "/v1beta1/tuples" body: "*" }; }; rpc ReadTuples (ReadTuplesRequest) returns (stream ReadTuplesResponse) { option (google.api.http) = { - get: "/v0/tuples" + get: "/v1beta1/tuples" }; }; rpc DeleteTuples (DeleteTuplesRequest) returns (DeleteTuplesResponse) { option (google.api.http) = { - delete: "/v0/tuples" + delete: "/v1beta1/tuples" }; }; } diff --git a/api/kessel/relations/v0/relation_tuples_grpc.pb.go b/api/kessel/relations/v1beta1/relation_tuples_grpc.pb.go similarity index 96% rename from api/kessel/relations/v0/relation_tuples_grpc.pb.go rename to api/kessel/relations/v1beta1/relation_tuples_grpc.pb.go index 47781f3..6cbe971 100644 --- a/api/kessel/relations/v0/relation_tuples_grpc.pb.go +++ b/api/kessel/relations/v1beta1/relation_tuples_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.4.0 // - protoc v4.25.1 -// source: kessel/relations/v0/relation_tuples.proto +// source: kessel/relations/v1beta1/relation_tuples.proto -package v0 +package v1beta1 import ( context "context" @@ -19,9 +19,9 @@ import ( const _ = grpc.SupportPackageIsVersion8 const ( - KesselTupleService_CreateTuples_FullMethodName = "/kessel.relations.v0.KesselTupleService/CreateTuples" - KesselTupleService_ReadTuples_FullMethodName = "/kessel.relations.v0.KesselTupleService/ReadTuples" - KesselTupleService_DeleteTuples_FullMethodName = "/kessel.relations.v0.KesselTupleService/DeleteTuples" + KesselTupleService_CreateTuples_FullMethodName = "/kessel.relations.v1beta1.KesselTupleService/CreateTuples" + KesselTupleService_ReadTuples_FullMethodName = "/kessel.relations.v1beta1.KesselTupleService/ReadTuples" + KesselTupleService_DeleteTuples_FullMethodName = "/kessel.relations.v1beta1.KesselTupleService/DeleteTuples" ) // KesselTupleServiceClient is the client API for KesselTupleService service. @@ -207,7 +207,7 @@ func _KesselTupleService_DeleteTuples_Handler(srv interface{}, ctx context.Conte // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var KesselTupleService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "kessel.relations.v0.KesselTupleService", + ServiceName: "kessel.relations.v1beta1.KesselTupleService", HandlerType: (*KesselTupleServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -226,5 +226,5 @@ var KesselTupleService_ServiceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "kessel/relations/v0/relation_tuples.proto", + Metadata: "kessel/relations/v1beta1/relation_tuples.proto", } diff --git a/api/kessel/relations/v0/relation_tuples_http.pb.go b/api/kessel/relations/v1beta1/relation_tuples_http.pb.go similarity index 90% rename from api/kessel/relations/v0/relation_tuples_http.pb.go rename to api/kessel/relations/v1beta1/relation_tuples_http.pb.go index 3cb02d6..918536e 100644 --- a/api/kessel/relations/v0/relation_tuples_http.pb.go +++ b/api/kessel/relations/v1beta1/relation_tuples_http.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-http v2.7.3 // - protoc v4.25.1 -// source: kessel/relations/v0/relation_tuples.proto +// source: kessel/relations/v1beta1/relation_tuples.proto -package v0 +package v1beta1 import ( context "context" @@ -19,8 +19,8 @@ var _ = binding.EncodeURL const _ = http.SupportPackageIsVersion1 -const OperationKesselTupleServiceCreateTuples = "/kessel.relations.v0.KesselTupleService/CreateTuples" -const OperationKesselTupleServiceDeleteTuples = "/kessel.relations.v0.KesselTupleService/DeleteTuples" +const OperationKesselTupleServiceCreateTuples = "/kessel.relations.v1beta1.KesselTupleService/CreateTuples" +const OperationKesselTupleServiceDeleteTuples = "/kessel.relations.v1beta1.KesselTupleService/DeleteTuples" type KesselTupleServiceHTTPServer interface { CreateTuples(context.Context, *CreateTuplesRequest) (*CreateTuplesResponse, error) @@ -29,8 +29,8 @@ type KesselTupleServiceHTTPServer interface { func RegisterKesselTupleServiceHTTPServer(s *http.Server, srv KesselTupleServiceHTTPServer) { r := s.Route("/") - r.POST("/v0/tuples", _KesselTupleService_CreateTuples0_HTTP_Handler(srv)) - r.DELETE("/v0/tuples", _KesselTupleService_DeleteTuples0_HTTP_Handler(srv)) + r.POST("/v1beta1/tuples", _KesselTupleService_CreateTuples0_HTTP_Handler(srv)) + r.DELETE("/v1beta1/tuples", _KesselTupleService_DeleteTuples0_HTTP_Handler(srv)) } func _KesselTupleService_CreateTuples0_HTTP_Handler(srv KesselTupleServiceHTTPServer) func(ctx http.Context) error { @@ -89,7 +89,7 @@ func NewKesselTupleServiceHTTPClient(client *http.Client) KesselTupleServiceHTTP func (c *KesselTupleServiceHTTPClientImpl) CreateTuples(ctx context.Context, in *CreateTuplesRequest, opts ...http.CallOption) (*CreateTuplesResponse, error) { var out CreateTuplesResponse - pattern := "/v0/tuples" + pattern := "/v1beta1/tuples" path := binding.EncodeURL(pattern, in, false) opts = append(opts, http.Operation(OperationKesselTupleServiceCreateTuples)) opts = append(opts, http.PathTemplate(pattern)) @@ -102,7 +102,7 @@ func (c *KesselTupleServiceHTTPClientImpl) CreateTuples(ctx context.Context, in func (c *KesselTupleServiceHTTPClientImpl) DeleteTuples(ctx context.Context, in *DeleteTuplesRequest, opts ...http.CallOption) (*DeleteTuplesResponse, error) { var out DeleteTuplesResponse - pattern := "/v0/tuples" + pattern := "/v1beta1/tuples" path := binding.EncodeURL(pattern, in, true) opts = append(opts, http.Operation(OperationKesselTupleServiceDeleteTuples)) opts = append(opts, http.PathTemplate(pattern)) diff --git a/internal/biz/lookup.go b/internal/biz/lookup.go index 9c48de3..830134c 100644 --- a/internal/biz/lookup.go +++ b/internal/biz/lookup.go @@ -3,7 +3,7 @@ package biz import ( "context" - v0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + v0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" ) const ( diff --git a/internal/biz/relationships.go b/internal/biz/relationships.go index a589587..da380d5 100644 --- a/internal/biz/relationships.go +++ b/internal/biz/relationships.go @@ -3,7 +3,7 @@ package biz import ( "context" - v0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + v0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/go-kratos/kratos/v2/log" ) diff --git a/internal/data/spicedb.go b/internal/data/spicedb.go index b68638b..d404f85 100644 --- a/internal/data/spicedb.go +++ b/internal/data/spicedb.go @@ -9,7 +9,7 @@ import ( "strings" "time" - apiV0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + apiV0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/project-kessel/relations-api/internal/biz" "github.com/project-kessel/relations-api/internal/conf" diff --git a/internal/data/spicedb_test.go b/internal/data/spicedb_test.go index ef7b756..0600b97 100644 --- a/internal/data/spicedb_test.go +++ b/internal/data/spicedb_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - apiV0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + apiV0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/project-kessel/relations-api/internal/biz" "github.com/project-kessel/relations-api/internal/conf" diff --git a/internal/server/grpc.go b/internal/server/grpc.go index 683fc42..f3a2ade 100644 --- a/internal/server/grpc.go +++ b/internal/server/grpc.go @@ -1,8 +1,8 @@ package server import ( - h "github.com/project-kessel/relations-api/api/health/v1" - v0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + h "github.com/project-kessel/relations-api/api/kessel/health/v1" + v0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/project-kessel/relations-api/internal/conf" "github.com/project-kessel/relations-api/internal/server/middleware" "github.com/project-kessel/relations-api/internal/service" @@ -36,7 +36,7 @@ func NewGRPCServer(c *conf.Server, relations *service.RelationshipsService, heal srv := grpc.NewServer(opts...) v0.RegisterKesselTupleServiceServer(srv, relations) v0.RegisterKesselCheckServiceServer(srv, check) - h.RegisterKesselHealthServer(srv, health) + h.RegisterKesselHealthServiceServer(srv, health) v0.RegisterKesselLookupServiceServer(srv, subjects) return srv } diff --git a/internal/server/http.go b/internal/server/http.go index 14ad106..ee9774e 100644 --- a/internal/server/http.go +++ b/internal/server/http.go @@ -1,8 +1,8 @@ package server import ( - h "github.com/project-kessel/relations-api/api/health/v1" - v0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + h "github.com/project-kessel/relations-api/api/kessel/health/v1" + v0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/project-kessel/relations-api/internal/conf" "github.com/project-kessel/relations-api/internal/service" @@ -38,6 +38,6 @@ func NewHTTPServer(c *conf.Server, relationships *service.RelationshipsService, srv := http.NewServer(opts...) v0.RegisterKesselTupleServiceHTTPServer(srv, relationships) v0.RegisterKesselCheckServiceHTTPServer(srv, check) - h.RegisterKesselHealthHTTPServer(srv, health) + h.RegisterKesselHealthServiceHTTPServer(srv, health) return srv } diff --git a/internal/service/check.go b/internal/service/check.go index 0f120a1..393a2dc 100644 --- a/internal/service/check.go +++ b/internal/service/check.go @@ -9,7 +9,7 @@ import ( "github.com/go-kratos/kratos/v2/errors" "github.com/go-kratos/kratos/v2/log" - pb "github.com/project-kessel/relations-api/api/kessel/relations/v0" + pb "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" ) type CheckService struct { diff --git a/internal/service/health.go b/internal/service/health.go index 053154a..30fe534 100644 --- a/internal/service/health.go +++ b/internal/service/health.go @@ -3,12 +3,12 @@ package service import ( "context" - pb "github.com/project-kessel/relations-api/api/health/v1" + pb "github.com/project-kessel/relations-api/api/kessel/health/v1" "github.com/project-kessel/relations-api/internal/biz" ) type HealthService struct { - pb.UnimplementedKesselHealthServer + pb.UnimplementedKesselHealthServiceServer backendUseCase *biz.IsBackendAvaliableUsecase } @@ -18,14 +18,14 @@ func NewHealthService(backendUsecase *biz.IsBackendAvaliableUsecase) *HealthServ } } -func (s *HealthService) GetLivez(ctx context.Context, req *pb.GetLivezRequest) (*pb.GetLivezReply, error) { - return &pb.GetLivezReply{Status: "OK", Code: 200}, nil +func (s *HealthService) GetLivez(ctx context.Context, req *pb.GetLivezRequest) (*pb.GetLivezResponse, error) { + return &pb.GetLivezResponse{Status: "OK", Code: 200}, nil } -func (s *HealthService) GetReadyz(ctx context.Context, req *pb.GetReadyzRequest) (*pb.GetReadyzReply, error) { +func (s *HealthService) GetReadyz(ctx context.Context, req *pb.GetReadyzRequest) (*pb.GetReadyzResponse, error) { err := s.backendUseCase.IsBackendAvailable() if err != nil { - return &pb.GetReadyzReply{Status: "Unavailable", Code: 503}, nil + return &pb.GetReadyzResponse{Status: "Unavailable", Code: 503}, nil } - return &pb.GetReadyzReply{Status: "OK", Code: 200}, nil + return &pb.GetReadyzResponse{Status: "OK", Code: 200}, nil } diff --git a/internal/service/health_test.go b/internal/service/health_test.go index e5e9100..d044b46 100644 --- a/internal/service/health_test.go +++ b/internal/service/health_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - pb "github.com/project-kessel/relations-api/api/health/v1" + pb "github.com/project-kessel/relations-api/api/kessel/health/v1" "github.com/project-kessel/relations-api/internal/biz" "github.com/project-kessel/relations-api/internal/data" @@ -23,7 +23,7 @@ func TestHealthService_GetLivez(t *testing.T) { resp, err := service.GetLivez(ctx, &pb.GetLivezRequest{}) assert.NoError(t, err) - assert.Equal(t, resp, &pb.GetLivezReply{Status: "OK", Code: 200}) + assert.Equal(t, resp, &pb.GetLivezResponse{Status: "OK", Code: 200}) } func TestHealthService_GetReadyz_SpiceDBAvailable(t *testing.T) { @@ -37,7 +37,7 @@ func TestHealthService_GetReadyz_SpiceDBAvailable(t *testing.T) { resp, err := service.GetReadyz(ctx, &pb.GetReadyzRequest{}) assert.NoError(t, err) - assert.Equal(t, resp, &pb.GetReadyzReply{Status: "OK", Code: 200}) + assert.Equal(t, resp, &pb.GetReadyzResponse{Status: "OK", Code: 200}) } func TestHealthService_GetReadyz_SpiceDBUnavailable(t *testing.T) { @@ -50,7 +50,7 @@ func TestHealthService_GetReadyz_SpiceDBUnavailable(t *testing.T) { resp, err := service.GetReadyz(ctx, &pb.GetReadyzRequest{}) assert.NoError(t, err) - assert.Equal(t, resp, &pb.GetReadyzReply{Status: "Unavailable", Code: 503}) + assert.Equal(t, resp, &pb.GetReadyzResponse{Status: "Unavailable", Code: 503}) } type DummyZanzibar struct { diff --git a/internal/service/lookup.go b/internal/service/lookup.go index 23432af..2f11916 100644 --- a/internal/service/lookup.go +++ b/internal/service/lookup.go @@ -5,7 +5,7 @@ import ( "github.com/go-kratos/kratos/v2/errors" "github.com/go-kratos/kratos/v2/log" - pb "github.com/project-kessel/relations-api/api/kessel/relations/v0" + pb "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/project-kessel/relations-api/internal/biz" ) diff --git a/internal/service/lookup_test.go b/internal/service/lookup_test.go index 1523b01..4b48ce6 100644 --- a/internal/service/lookup_test.go +++ b/internal/service/lookup_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - v0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + v0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/project-kessel/relations-api/internal/biz" "github.com/project-kessel/relations-api/internal/data" diff --git a/internal/service/relationships.go b/internal/service/relationships.go index 96c672c..0cf7f3f 100644 --- a/internal/service/relationships.go +++ b/internal/service/relationships.go @@ -9,7 +9,7 @@ import ( "github.com/go-kratos/kratos/v2/errors" "github.com/go-kratos/kratos/v2/log" - pb "github.com/project-kessel/relations-api/api/kessel/relations/v0" + pb "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" ) type RelationshipsService struct { diff --git a/internal/service/relationships_test.go b/internal/service/relationships_test.go index 9635988..d928ec5 100644 --- a/internal/service/relationships_test.go +++ b/internal/service/relationships_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - v0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + v0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/project-kessel/relations-api/internal/biz" "github.com/project-kessel/relations-api/internal/data" diff --git a/openapi.yaml b/openapi.yaml index c88cc1f..ba4d5d1 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -9,28 +9,28 @@ paths: /livez: get: tags: - - KesselHealth - operationId: KesselHealth_GetLivez + - KesselHealthService + operationId: KesselHealthService_GetLivez responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v1.GetLivezReply' + $ref: '#/components/schemas/kessel.health.v1.GetLivezResponse' /readyz: get: tags: - - KesselHealth - operationId: KesselHealth_GetReadyz + - KesselHealthService + operationId: KesselHealthService_GetReadyz responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v1.GetReadyzReply' - /v0/check: + $ref: '#/components/schemas/kessel.health.v1.GetReadyzResponse' + /v1beta1/check: post: tags: - KesselCheckService @@ -40,7 +40,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v0.CheckRequest' + $ref: '#/components/schemas/kessel.relations.v1beta1.CheckRequest' required: true responses: "200": @@ -48,8 +48,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v0.CheckResponse' - /v0/resources: + $ref: '#/components/schemas/kessel.relations.v1beta1.CheckResponse' + /v1beta1/resources: get: tags: - KesselLookupService @@ -101,8 +101,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v0.LookupResourcesResponse' - /v0/subjects: + $ref: '#/components/schemas/kessel.relations.v1beta1.LookupResourcesResponse' + /v1beta1/subjects: get: tags: - KesselLookupService @@ -151,8 +151,8 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v0.LookupSubjectsResponse' - /v0/tuples: + $ref: '#/components/schemas/kessel.relations.v1beta1.LookupSubjectsResponse' + /v1beta1/tuples: get: tags: - KesselTupleService @@ -205,7 +205,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v0.ReadTuplesResponse' + $ref: '#/components/schemas/kessel.relations.v1beta1.ReadTuplesResponse' post: tags: - KesselTupleService @@ -214,7 +214,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v0.CreateTuplesRequest' + $ref: '#/components/schemas/kessel.relations.v1beta1.CreateTuplesRequest' required: true responses: "200": @@ -222,7 +222,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v0.CreateTuplesResponse' + $ref: '#/components/schemas/kessel.relations.v1beta1.CreateTuplesResponse' delete: tags: - KesselTupleService @@ -266,25 +266,41 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/kessel.relations.v0.DeleteTuplesResponse' + $ref: '#/components/schemas/kessel.relations.v1beta1.DeleteTuplesResponse' components: schemas: - kessel.relations.v0.CheckRequest: + kessel.health.v1.GetLivezResponse: + type: object + properties: + status: + type: string + code: + type: integer + format: uint32 + kessel.health.v1.GetReadyzResponse: + type: object + properties: + status: + type: string + code: + type: integer + format: uint32 + kessel.relations.v1beta1.CheckRequest: type: object properties: resource: - $ref: '#/components/schemas/kessel.relations.v0.ObjectReference' + $ref: '#/components/schemas/kessel.relations.v1beta1.ObjectReference' relation: type: string subject: - $ref: '#/components/schemas/kessel.relations.v0.SubjectReference' - kessel.relations.v0.CheckResponse: + $ref: '#/components/schemas/kessel.relations.v1beta1.SubjectReference' + kessel.relations.v1beta1.CheckResponse: type: object properties: allowed: type: integer format: enum - kessel.relations.v0.CreateTuplesRequest: + kessel.relations.v1beta1.CreateTuplesRequest: type: object properties: upsert: @@ -293,64 +309,64 @@ components: tuples: type: array items: - $ref: '#/components/schemas/kessel.relations.v0.Relationship' - kessel.relations.v0.CreateTuplesResponse: + $ref: '#/components/schemas/kessel.relations.v1beta1.Relationship' + kessel.relations.v1beta1.CreateTuplesResponse: type: object properties: {} - kessel.relations.v0.DeleteTuplesResponse: + kessel.relations.v1beta1.DeleteTuplesResponse: type: object properties: {} - kessel.relations.v0.LookupResourcesResponse: + kessel.relations.v1beta1.LookupResourcesResponse: type: object properties: resource: - $ref: '#/components/schemas/kessel.relations.v0.ObjectReference' + $ref: '#/components/schemas/kessel.relations.v1beta1.ObjectReference' pagination: - $ref: '#/components/schemas/kessel.relations.v0.ResponsePagination' - kessel.relations.v0.LookupSubjectsResponse: + $ref: '#/components/schemas/kessel.relations.v1beta1.ResponsePagination' + kessel.relations.v1beta1.LookupSubjectsResponse: type: object properties: subject: - $ref: '#/components/schemas/kessel.relations.v0.SubjectReference' + $ref: '#/components/schemas/kessel.relations.v1beta1.SubjectReference' pagination: - $ref: '#/components/schemas/kessel.relations.v0.ResponsePagination' - kessel.relations.v0.ObjectReference: + $ref: '#/components/schemas/kessel.relations.v1beta1.ResponsePagination' + kessel.relations.v1beta1.ObjectReference: type: object properties: type: - $ref: '#/components/schemas/kessel.relations.v0.ObjectType' + $ref: '#/components/schemas/kessel.relations.v1beta1.ObjectType' id: type: string - kessel.relations.v0.ObjectType: + kessel.relations.v1beta1.ObjectType: type: object properties: namespace: type: string name: type: string - kessel.relations.v0.ReadTuplesResponse: + kessel.relations.v1beta1.ReadTuplesResponse: type: object properties: tuple: - $ref: '#/components/schemas/kessel.relations.v0.Relationship' + $ref: '#/components/schemas/kessel.relations.v1beta1.Relationship' pagination: - $ref: '#/components/schemas/kessel.relations.v0.ResponsePagination' - kessel.relations.v0.Relationship: + $ref: '#/components/schemas/kessel.relations.v1beta1.ResponsePagination' + kessel.relations.v1beta1.Relationship: type: object properties: resource: - $ref: '#/components/schemas/kessel.relations.v0.ObjectReference' + $ref: '#/components/schemas/kessel.relations.v1beta1.ObjectReference' relation: type: string subject: - $ref: '#/components/schemas/kessel.relations.v0.SubjectReference' + $ref: '#/components/schemas/kessel.relations.v1beta1.SubjectReference' description: "A _Relationship_ is the realization of a _Relation_ (a string) \n between a _Resource_ and a _Subject_ or a _Subject Set_ (known as a Userset in Zanzibar).\n\n All Relationships are object-object relations.\n \"Resource\" and \"Subject\" are relative terms which define the direction of a Relation.\n That is, Relations are unidirectional.\n If you reverse the Subject and Resource, it is a different Relation and a different Relationship.\n Conventionally, we generally refer to the Resource first, then Subject,\n following the direction of typical graph traversal (Resource to Subject)." - kessel.relations.v0.ResponsePagination: + kessel.relations.v1beta1.ResponsePagination: type: object properties: continuationToken: type: string - kessel.relations.v0.SubjectReference: + kessel.relations.v1beta1.SubjectReference: type: object properties: relation: @@ -359,27 +375,11 @@ components: An optional relation which points to a set of Subjects instead of the single Subject. e.g. "members" or "owners" of a group identified in `subject`. subject: - $ref: '#/components/schemas/kessel.relations.v0.ObjectReference' + $ref: '#/components/schemas/kessel.relations.v1beta1.ObjectReference' description: A reference to a Subject or, if a `relation` is provided, a Subject Set. - kessel.relations.v1.GetLivezReply: - type: object - properties: - status: - type: string - code: - type: integer - format: uint32 - kessel.relations.v1.GetReadyzReply: - type: object - properties: - status: - type: string - code: - type: integer - format: uint32 tags: - name: KesselCheckService - - name: KesselHealth + - name: KesselHealthService - name: KesselLookupService - name: KesselTupleService description: "KesselTupleServices manages the persisted _Tuples_ stored in the system..\n \n A Tuple is an explicitly stated, persistent relation \n between a Resource and a Subject or Subject Set. \n It has the same _shape_ as a Relationship but is not the same thing as a Relationship.\n \n A single Tuple may result in zero-to-many Relationships." diff --git a/test/kessel_test.go b/test/kessel_test.go index ace2b11..796866f 100644 --- a/test/kessel_test.go +++ b/test/kessel_test.go @@ -10,7 +10,7 @@ import ( "github.com/go-kratos/kratos/v2/log" "github.com/go-kratos/kratos/v2/middleware/tracing" - v0 "github.com/project-kessel/relations-api/api/kessel/relations/v0" + v0 "github.com/project-kessel/relations-api/api/kessel/relations/v1beta1" "github.com/stretchr/testify/assert" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure"