diff --git a/proto/plugin/identity_management/v1/identity_management.pb.go b/proto/plugin/identity_management/v1/identity_management.pb.go new file mode 100644 index 0000000..a0420dc --- /dev/null +++ b/proto/plugin/identity_management/v1/identity_management.pb.go @@ -0,0 +1,448 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc (unknown) +// source: plugin/identity_management/v1/identity_management.proto + +package identity_managementv1 + +import ( + 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 GetUsersForGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (x *GetUsersForGroupRequest) Reset() { + *x = GetUsersForGroupRequest{} + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUsersForGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersForGroupRequest) ProtoMessage() {} + +func (x *GetUsersForGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUsersForGroupRequest.ProtoReflect.Descriptor instead. +func (*GetUsersForGroupRequest) Descriptor() ([]byte, []int) { + return file_plugin_identity_management_v1_identity_management_proto_rawDescGZIP(), []int{0} +} + +func (x *GetUsersForGroupRequest) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +type GetUsersForGroupResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` +} + +func (x *GetUsersForGroupResponse) Reset() { + *x = GetUsersForGroupResponse{} + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUsersForGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUsersForGroupResponse) ProtoMessage() {} + +func (x *GetUsersForGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUsersForGroupResponse.ProtoReflect.Descriptor instead. +func (*GetUsersForGroupResponse) Descriptor() ([]byte, []int) { + return file_plugin_identity_management_v1_identity_management_proto_rawDescGZIP(), []int{1} +} + +func (x *GetUsersForGroupResponse) GetUsers() []*User { + if x != nil { + return x.Users + } + return nil +} + +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` +} + +func (x *User) Reset() { + *x = User{} + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_plugin_identity_management_v1_identity_management_proto_rawDescGZIP(), []int{2} +} + +func (x *User) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *User) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *User) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +type GetGroupsForUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` +} + +func (x *GetGroupsForUserRequest) Reset() { + *x = GetGroupsForUserRequest{} + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetGroupsForUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupsForUserRequest) ProtoMessage() {} + +func (x *GetGroupsForUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupsForUserRequest.ProtoReflect.Descriptor instead. +func (*GetGroupsForUserRequest) Descriptor() ([]byte, []int) { + return file_plugin_identity_management_v1_identity_management_proto_rawDescGZIP(), []int{3} +} + +func (x *GetGroupsForUserRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type GetGroupsForUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` +} + +func (x *GetGroupsForUserResponse) Reset() { + *x = GetGroupsForUserResponse{} + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetGroupsForUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupsForUserResponse) ProtoMessage() {} + +func (x *GetGroupsForUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupsForUserResponse.ProtoReflect.Descriptor instead. +func (*GetGroupsForUserResponse) Descriptor() ([]byte, []int) { + return file_plugin_identity_management_v1_identity_management_proto_rawDescGZIP(), []int{4} +} + +func (x *GetGroupsForUserResponse) GetGroups() []*Group { + if x != nil { + return x.Groups + } + return nil +} + +type Group struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Group) Reset() { + *x = Group{} + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Group) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Group) ProtoMessage() {} + +func (x *Group) ProtoReflect() protoreflect.Message { + mi := &file_plugin_identity_management_v1_identity_management_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Group.ProtoReflect.Descriptor instead. +func (*Group) Descriptor() ([]byte, []int) { + return file_plugin_identity_management_v1_identity_management_proto_rawDescGZIP(), []int{5} +} + +func (x *Group) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Group) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_plugin_identity_management_v1_identity_management_proto protoreflect.FileDescriptor + +var file_plugin_identity_management_v1_identity_management_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x22, 0x34, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x55, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x40, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x32, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2b, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x32, 0xa7, 0x02, 0x0a, 0x19, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x83, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x36, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x6f, + 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x36, 0x2e, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa7, 0x02, 0x0a, + 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x42, 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x6b, 0x63, + 0x6d, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, + 0x3b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x50, 0x49, 0x58, 0xaa, 0x02, 0x1c, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1c, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x28, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x5c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x3a, 0x3a, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_plugin_identity_management_v1_identity_management_proto_rawDescOnce sync.Once + file_plugin_identity_management_v1_identity_management_proto_rawDescData = file_plugin_identity_management_v1_identity_management_proto_rawDesc +) + +func file_plugin_identity_management_v1_identity_management_proto_rawDescGZIP() []byte { + file_plugin_identity_management_v1_identity_management_proto_rawDescOnce.Do(func() { + file_plugin_identity_management_v1_identity_management_proto_rawDescData = protoimpl.X.CompressGZIP(file_plugin_identity_management_v1_identity_management_proto_rawDescData) + }) + return file_plugin_identity_management_v1_identity_management_proto_rawDescData +} + +var file_plugin_identity_management_v1_identity_management_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_plugin_identity_management_v1_identity_management_proto_goTypes = []any{ + (*GetUsersForGroupRequest)(nil), // 0: plugin.identity_management.v1.GetUsersForGroupRequest + (*GetUsersForGroupResponse)(nil), // 1: plugin.identity_management.v1.GetUsersForGroupResponse + (*User)(nil), // 2: plugin.identity_management.v1.User + (*GetGroupsForUserRequest)(nil), // 3: plugin.identity_management.v1.GetGroupsForUserRequest + (*GetGroupsForUserResponse)(nil), // 4: plugin.identity_management.v1.GetGroupsForUserResponse + (*Group)(nil), // 5: plugin.identity_management.v1.Group +} +var file_plugin_identity_management_v1_identity_management_proto_depIdxs = []int32{ + 2, // 0: plugin.identity_management.v1.GetUsersForGroupResponse.users:type_name -> plugin.identity_management.v1.User + 5, // 1: plugin.identity_management.v1.GetGroupsForUserResponse.groups:type_name -> plugin.identity_management.v1.Group + 0, // 2: plugin.identity_management.v1.IdentityManagementService.GetUsersForGroup:input_type -> plugin.identity_management.v1.GetUsersForGroupRequest + 3, // 3: plugin.identity_management.v1.IdentityManagementService.GetGroupsForUser:input_type -> plugin.identity_management.v1.GetGroupsForUserRequest + 1, // 4: plugin.identity_management.v1.IdentityManagementService.GetUsersForGroup:output_type -> plugin.identity_management.v1.GetUsersForGroupResponse + 4, // 5: plugin.identity_management.v1.IdentityManagementService.GetGroupsForUser:output_type -> plugin.identity_management.v1.GetGroupsForUserResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_plugin_identity_management_v1_identity_management_proto_init() } +func file_plugin_identity_management_v1_identity_management_proto_init() { + if File_plugin_identity_management_v1_identity_management_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_plugin_identity_management_v1_identity_management_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_plugin_identity_management_v1_identity_management_proto_goTypes, + DependencyIndexes: file_plugin_identity_management_v1_identity_management_proto_depIdxs, + MessageInfos: file_plugin_identity_management_v1_identity_management_proto_msgTypes, + }.Build() + File_plugin_identity_management_v1_identity_management_proto = out.File + file_plugin_identity_management_v1_identity_management_proto_rawDesc = nil + file_plugin_identity_management_v1_identity_management_proto_goTypes = nil + file_plugin_identity_management_v1_identity_management_proto_depIdxs = nil +} diff --git a/proto/plugin/identity_management/v1/identity_management.pb.validate.go b/proto/plugin/identity_management/v1/identity_management.pb.validate.go new file mode 100644 index 0000000..37dc23c --- /dev/null +++ b/proto/plugin/identity_management/v1/identity_management.pb.validate.go @@ -0,0 +1,722 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: plugin/identity_management/v1/identity_management.proto + +package identity_managementv1 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GetUsersForGroupRequest 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 *GetUsersForGroupRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetUsersForGroupRequest 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 +// GetUsersForGroupRequestMultiError, or nil if none found. +func (m *GetUsersForGroupRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetUsersForGroupRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for GroupId + + if len(errors) > 0 { + return GetUsersForGroupRequestMultiError(errors) + } + + return nil +} + +// GetUsersForGroupRequestMultiError is an error wrapping multiple validation +// errors returned by GetUsersForGroupRequest.ValidateAll() if the designated +// constraints aren't met. +type GetUsersForGroupRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetUsersForGroupRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetUsersForGroupRequestMultiError) AllErrors() []error { return m } + +// GetUsersForGroupRequestValidationError is the validation error returned by +// GetUsersForGroupRequest.Validate if the designated constraints aren't met. +type GetUsersForGroupRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetUsersForGroupRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetUsersForGroupRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetUsersForGroupRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetUsersForGroupRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetUsersForGroupRequestValidationError) ErrorName() string { + return "GetUsersForGroupRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetUsersForGroupRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetUsersForGroupRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetUsersForGroupRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetUsersForGroupRequestValidationError{} + +// Validate checks the field values on GetUsersForGroupResponse 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 *GetUsersForGroupResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetUsersForGroupResponse 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 +// GetUsersForGroupResponseMultiError, or nil if none found. +func (m *GetUsersForGroupResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetUsersForGroupResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetUsers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetUsersForGroupResponseValidationError{ + field: fmt.Sprintf("Users[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetUsersForGroupResponseValidationError{ + field: fmt.Sprintf("Users[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetUsersForGroupResponseValidationError{ + field: fmt.Sprintf("Users[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return GetUsersForGroupResponseMultiError(errors) + } + + return nil +} + +// GetUsersForGroupResponseMultiError is an error wrapping multiple validation +// errors returned by GetUsersForGroupResponse.ValidateAll() if the designated +// constraints aren't met. +type GetUsersForGroupResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetUsersForGroupResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetUsersForGroupResponseMultiError) AllErrors() []error { return m } + +// GetUsersForGroupResponseValidationError is the validation error returned by +// GetUsersForGroupResponse.Validate if the designated constraints aren't met. +type GetUsersForGroupResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetUsersForGroupResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetUsersForGroupResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetUsersForGroupResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetUsersForGroupResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetUsersForGroupResponseValidationError) ErrorName() string { + return "GetUsersForGroupResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetUsersForGroupResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetUsersForGroupResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetUsersForGroupResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetUsersForGroupResponseValidationError{} + +// Validate checks the field values on User 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 *User) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on User 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 UserMultiError, or nil if none found. +func (m *User) ValidateAll() error { + return m.validate(true) +} + +func (m *User) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for Name + + // no validation rules for Email + + if len(errors) > 0 { + return UserMultiError(errors) + } + + return nil +} + +// UserMultiError is an error wrapping multiple validation errors returned by +// User.ValidateAll() if the designated constraints aren't met. +type UserMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UserMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UserMultiError) AllErrors() []error { return m } + +// UserValidationError is the validation error returned by User.Validate if the +// designated constraints aren't met. +type UserValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UserValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UserValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UserValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UserValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UserValidationError) ErrorName() string { return "UserValidationError" } + +// Error satisfies the builtin error interface +func (e UserValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sUser.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UserValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UserValidationError{} + +// Validate checks the field values on GetGroupsForUserRequest 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 *GetGroupsForUserRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetGroupsForUserRequest 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 +// GetGroupsForUserRequestMultiError, or nil if none found. +func (m *GetGroupsForUserRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetGroupsForUserRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for UserId + + if len(errors) > 0 { + return GetGroupsForUserRequestMultiError(errors) + } + + return nil +} + +// GetGroupsForUserRequestMultiError is an error wrapping multiple validation +// errors returned by GetGroupsForUserRequest.ValidateAll() if the designated +// constraints aren't met. +type GetGroupsForUserRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetGroupsForUserRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetGroupsForUserRequestMultiError) AllErrors() []error { return m } + +// GetGroupsForUserRequestValidationError is the validation error returned by +// GetGroupsForUserRequest.Validate if the designated constraints aren't met. +type GetGroupsForUserRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetGroupsForUserRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetGroupsForUserRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetGroupsForUserRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetGroupsForUserRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetGroupsForUserRequestValidationError) ErrorName() string { + return "GetGroupsForUserRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetGroupsForUserRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetGroupsForUserRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetGroupsForUserRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetGroupsForUserRequestValidationError{} + +// Validate checks the field values on GetGroupsForUserResponse 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 *GetGroupsForUserResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetGroupsForUserResponse 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 +// GetGroupsForUserResponseMultiError, or nil if none found. +func (m *GetGroupsForUserResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetGroupsForUserResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetGroups() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetGroupsForUserResponseValidationError{ + field: fmt.Sprintf("Groups[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetGroupsForUserResponseValidationError{ + field: fmt.Sprintf("Groups[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetGroupsForUserResponseValidationError{ + field: fmt.Sprintf("Groups[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return GetGroupsForUserResponseMultiError(errors) + } + + return nil +} + +// GetGroupsForUserResponseMultiError is an error wrapping multiple validation +// errors returned by GetGroupsForUserResponse.ValidateAll() if the designated +// constraints aren't met. +type GetGroupsForUserResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetGroupsForUserResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetGroupsForUserResponseMultiError) AllErrors() []error { return m } + +// GetGroupsForUserResponseValidationError is the validation error returned by +// GetGroupsForUserResponse.Validate if the designated constraints aren't met. +type GetGroupsForUserResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetGroupsForUserResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetGroupsForUserResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetGroupsForUserResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetGroupsForUserResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetGroupsForUserResponseValidationError) ErrorName() string { + return "GetGroupsForUserResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetGroupsForUserResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetGroupsForUserResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetGroupsForUserResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetGroupsForUserResponseValidationError{} + +// Validate checks the field values on Group 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 *Group) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Group 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 GroupMultiError, or nil if none found. +func (m *Group) ValidateAll() error { + return m.validate(true) +} + +func (m *Group) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for Name + + if len(errors) > 0 { + return GroupMultiError(errors) + } + + return nil +} + +// GroupMultiError is an error wrapping multiple validation errors returned by +// Group.ValidateAll() if the designated constraints aren't met. +type GroupMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GroupMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GroupMultiError) AllErrors() []error { return m } + +// GroupValidationError is the validation error returned by Group.Validate if +// the designated constraints aren't met. +type GroupValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GroupValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GroupValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GroupValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GroupValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GroupValidationError) ErrorName() string { return "GroupValidationError" } + +// Error satisfies the builtin error interface +func (e GroupValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGroup.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GroupValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GroupValidationError{} diff --git a/proto/plugin/identity_management/v1/identity_management.proto b/proto/plugin/identity_management/v1/identity_management.proto new file mode 100644 index 0000000..0c2add9 --- /dev/null +++ b/proto/plugin/identity_management/v1/identity_management.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package plugin.identity_management.v1; + +service IdentityManagementService { + rpc GetUsersForGroup(GetUsersForGroupRequest) returns (GetUsersForGroupResponse); + rpc GetGroupsForUser(GetGroupsForUserRequest) returns (GetGroupsForUserResponse); +} + +message GetUsersForGroupRequest { + string group_id = 1; +} + +message GetUsersForGroupResponse { + repeated User users = 1; +} + +message User { + string id = 1; + string name = 2; + string email = 3; +} + +message GetGroupsForUserRequest { + string user_id = 1; +} + +message GetGroupsForUserResponse { + repeated Group groups = 1; +} + +message Group { + string id = 1; + string name = 2; +} diff --git a/proto/plugin/identity_management/v1/identity_management_ext_plugin.pb.go b/proto/plugin/identity_management/v1/identity_management_ext_plugin.pb.go new file mode 100644 index 0000000..ea1e220 --- /dev/null +++ b/proto/plugin/identity_management/v1/identity_management_ext_plugin.pb.go @@ -0,0 +1,55 @@ +// Code generated by protoc-gen-go-extension. DO NOT EDIT. + +package identity_managementv1 + +import ( + api "github.com/openkcm/plugin-sdk/api" + grpc "google.golang.org/grpc" +) + +const ( + Type = "IdentityManagementService" + GRPCServiceFullName = "plugin.identity_management.v1.IdentityManagementService" +) + +func IdentityManagementServicePluginServer(server IdentityManagementServiceServer) api.PluginServer { + return identityManagementServicePluginServer{IdentityManagementServiceServer: server} +} + +type identityManagementServicePluginServer struct { + IdentityManagementServiceServer +} + +func (s identityManagementServicePluginServer) Type() string { + return Type +} + +func (s identityManagementServicePluginServer) GRPCServiceName() string { + return GRPCServiceFullName +} + +func (s identityManagementServicePluginServer) RegisterServer(server *grpc.Server) any { + RegisterIdentityManagementServiceServer(server, s.IdentityManagementServiceServer) + return s.IdentityManagementServiceServer +} + +type IdentityManagementServicePluginClient struct { + IdentityManagementServiceClient +} + +func (s IdentityManagementServicePluginClient) Type() string { + return Type +} + +func (c *IdentityManagementServicePluginClient) IsInitialized() bool { + return c.IdentityManagementServiceClient != nil +} + +func (c *IdentityManagementServicePluginClient) GRPCServiceName() string { + return GRPCServiceFullName +} + +func (c *IdentityManagementServicePluginClient) InitClient(conn grpc.ClientConnInterface) any { + c.IdentityManagementServiceClient = NewIdentityManagementServiceClient(conn) + return c.IdentityManagementServiceClient +} diff --git a/proto/plugin/identity_management/v1/identity_management_grpc.pb.go b/proto/plugin/identity_management/v1/identity_management_grpc.pb.go new file mode 100644 index 0000000..fe0a40a --- /dev/null +++ b/proto/plugin/identity_management/v1/identity_management_grpc.pb.go @@ -0,0 +1,147 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: plugin/identity_management/v1/identity_management.proto + +package identity_managementv1 + +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.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + IdentityManagementService_GetUsersForGroup_FullMethodName = "/plugin.identity_management.v1.IdentityManagementService/GetUsersForGroup" + IdentityManagementService_GetGroupsForUser_FullMethodName = "/plugin.identity_management.v1.IdentityManagementService/GetGroupsForUser" +) + +// IdentityManagementServiceClient is the client API for IdentityManagementService 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 IdentityManagementServiceClient interface { + GetUsersForGroup(ctx context.Context, in *GetUsersForGroupRequest, opts ...grpc.CallOption) (*GetUsersForGroupResponse, error) + GetGroupsForUser(ctx context.Context, in *GetGroupsForUserRequest, opts ...grpc.CallOption) (*GetGroupsForUserResponse, error) +} + +type identityManagementServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewIdentityManagementServiceClient(cc grpc.ClientConnInterface) IdentityManagementServiceClient { + return &identityManagementServiceClient{cc} +} + +func (c *identityManagementServiceClient) GetUsersForGroup(ctx context.Context, in *GetUsersForGroupRequest, opts ...grpc.CallOption) (*GetUsersForGroupResponse, error) { + out := new(GetUsersForGroupResponse) + err := c.cc.Invoke(ctx, IdentityManagementService_GetUsersForGroup_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *identityManagementServiceClient) GetGroupsForUser(ctx context.Context, in *GetGroupsForUserRequest, opts ...grpc.CallOption) (*GetGroupsForUserResponse, error) { + out := new(GetGroupsForUserResponse) + err := c.cc.Invoke(ctx, IdentityManagementService_GetGroupsForUser_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IdentityManagementServiceServer is the server API for IdentityManagementService service. +// All implementations must embed UnimplementedIdentityManagementServiceServer +// for forward compatibility +type IdentityManagementServiceServer interface { + GetUsersForGroup(context.Context, *GetUsersForGroupRequest) (*GetUsersForGroupResponse, error) + GetGroupsForUser(context.Context, *GetGroupsForUserRequest) (*GetGroupsForUserResponse, error) + mustEmbedUnimplementedIdentityManagementServiceServer() +} + +// UnimplementedIdentityManagementServiceServer must be embedded to have forward compatible implementations. +type UnimplementedIdentityManagementServiceServer struct { +} + +func (UnimplementedIdentityManagementServiceServer) GetUsersForGroup(context.Context, *GetUsersForGroupRequest) (*GetUsersForGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUsersForGroup not implemented") +} +func (UnimplementedIdentityManagementServiceServer) GetGroupsForUser(context.Context, *GetGroupsForUserRequest) (*GetGroupsForUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupsForUser not implemented") +} +func (UnimplementedIdentityManagementServiceServer) mustEmbedUnimplementedIdentityManagementServiceServer() { +} + +// UnsafeIdentityManagementServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to IdentityManagementServiceServer will +// result in compilation errors. +type UnsafeIdentityManagementServiceServer interface { + mustEmbedUnimplementedIdentityManagementServiceServer() +} + +func RegisterIdentityManagementServiceServer(s grpc.ServiceRegistrar, srv IdentityManagementServiceServer) { + s.RegisterService(&IdentityManagementService_ServiceDesc, srv) +} + +func _IdentityManagementService_GetUsersForGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUsersForGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityManagementServiceServer).GetUsersForGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityManagementService_GetUsersForGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityManagementServiceServer).GetUsersForGroup(ctx, req.(*GetUsersForGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IdentityManagementService_GetGroupsForUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupsForUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IdentityManagementServiceServer).GetGroupsForUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: IdentityManagementService_GetGroupsForUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IdentityManagementServiceServer).GetGroupsForUser(ctx, req.(*GetGroupsForUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// IdentityManagementService_ServiceDesc is the grpc.ServiceDesc for IdentityManagementService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var IdentityManagementService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "plugin.identity_management.v1.IdentityManagementService", + HandlerType: (*IdentityManagementServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetUsersForGroup", + Handler: _IdentityManagementService_GetUsersForGroup_Handler, + }, + { + MethodName: "GetGroupsForUser", + Handler: _IdentityManagementService_GetGroupsForUser_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "plugin/identity_management/v1/identity_management.proto", +}