diff --git a/database/group.go b/database/group.go index 71aa150..52d6c35 100644 --- a/database/group.go +++ b/database/group.go @@ -31,11 +31,20 @@ func (g *Groups) ToProtobuf() *systerapb.GroupEntry { } permsMap := make(map[string][]string) + perms := []*systerapb.PermissionsEntry{} for _, p := range g.Permissions { permsMap[p.ServerName] = append(permsMap[p.ServerName], p.Permission) } + for serverName, permissions := range permsMap { + perms = append(perms, &systerapb.PermissionsEntry{ + ServerName: serverName, + Permissions: permissions, + }) + } + + e.Permissions = perms return e } @@ -91,6 +100,27 @@ func (s *Mysql) RemoveGroup(groupName string) error { return nil } +// UpdateGroup - Update Group +func (s *Mysql) UpdateGroup(newGroup Groups) error { + group := Groups{} + r := s.client.First(&group, "name = ?", newGroup.Name) + + if r.RowsAffected == 0 { + return errors.New("group does not exists") + } else if r.Error != nil && r.RowsAffected != 0 { + return r.Error + } + newGroup.ID = group.ID + + result := r.Save(&newGroup) + + if result.Error != nil { + return result.Error + } + + return nil +} + // AddPermission - Add Permission func (s *Mysql) AddPermission(groupName, target string, permissions []string) error { var group Groups diff --git a/server/group.go b/server/group.go index c27ca57..6489c9b 100644 --- a/server/group.go +++ b/server/group.go @@ -40,7 +40,7 @@ func (s *grpcServer) CreateGroup(ctx context.Context, e *pb.CreateGroupRequest) return &pb.Empty{}, err } - stream.PublishGroup(d.ToProtobuf()) + stream.PublishGroup(d.ToProtobuf()) return &pb.Empty{}, err } @@ -50,6 +50,33 @@ func (s *grpcServer) RemoveGroup(ctx context.Context, e *pb.RemoveGroupRequest) return &pb.Empty{}, err } +func (s *grpcServer) UpdateGroup(ctx context.Context, e *pb.UpdateGroupRequest) (*pb.Empty, error) { + d := database.Groups{} + d.Name = e.GroupEntry.GroupName + d.Prefix = e.GroupEntry.GroupPrefix + + var dbPerms []database.Permissions + for _, v := range e.GroupEntry.Permissions { + for _, p := range v.Permissions { + perm := database.Permissions{ + ServerName: v.ServerName, + Permission: p, + } + dbPerms = append(dbPerms, perm) + } + } + d.Permissions = dbPerms + + err := s.mysql.UpdateGroup(d) + if err != nil { + return &pb.Empty{}, err + } + + stream.PublishGroup(d.ToProtobuf()) + + return &pb.Empty{}, err +} + func (s *grpcServer) AddPermission(ctx context.Context, e *pb.AddPermissionRequest) (*pb.Empty, error) { if err := s.mysql.AddPermission(e.GroupName, e.Target, e.Permissions); err != nil { return &pb.Empty{}, err diff --git a/systerapb/systera.pb.go b/systerapb/systera.pb.go index def358c..470bb94 100644 --- a/systerapb/systera.pb.go +++ b/systerapb/systera.pb.go @@ -3077,6 +3077,53 @@ func (x *RemoveGroupRequest) GetGroupName() string { return "" } +type UpdateGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupEntry *GroupEntry `protobuf:"bytes,1,opt,name=group_entry,json=groupEntry,proto3" json:"group_entry,omitempty"` +} + +func (x *UpdateGroupRequest) Reset() { + *x = UpdateGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_systera_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGroupRequest) ProtoMessage() {} + +func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_systera_proto_msgTypes[48] + 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 UpdateGroupRequest.ProtoReflect.Descriptor instead. +func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { + return file_systera_proto_rawDescGZIP(), []int{48} +} + +func (x *UpdateGroupRequest) GetGroupEntry() *GroupEntry { + if x != nil { + return x.GroupEntry + } + return nil +} + type AddPermissionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3090,7 +3137,7 @@ type AddPermissionRequest struct { func (x *AddPermissionRequest) Reset() { *x = AddPermissionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_systera_proto_msgTypes[48] + mi := &file_systera_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3103,7 +3150,7 @@ func (x *AddPermissionRequest) String() string { func (*AddPermissionRequest) ProtoMessage() {} func (x *AddPermissionRequest) ProtoReflect() protoreflect.Message { - mi := &file_systera_proto_msgTypes[48] + mi := &file_systera_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3116,7 +3163,7 @@ func (x *AddPermissionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddPermissionRequest.ProtoReflect.Descriptor instead. func (*AddPermissionRequest) Descriptor() ([]byte, []int) { - return file_systera_proto_rawDescGZIP(), []int{48} + return file_systera_proto_rawDescGZIP(), []int{49} } func (x *AddPermissionRequest) GetGroupName() string { @@ -3153,7 +3200,7 @@ type RemovePermissionRequest struct { func (x *RemovePermissionRequest) Reset() { *x = RemovePermissionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_systera_proto_msgTypes[49] + mi := &file_systera_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3166,7 +3213,7 @@ func (x *RemovePermissionRequest) String() string { func (*RemovePermissionRequest) ProtoMessage() {} func (x *RemovePermissionRequest) ProtoReflect() protoreflect.Message { - mi := &file_systera_proto_msgTypes[49] + mi := &file_systera_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3179,7 +3226,7 @@ func (x *RemovePermissionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemovePermissionRequest.ProtoReflect.Descriptor instead. func (*RemovePermissionRequest) Descriptor() ([]byte, []int) { - return file_systera_proto_rawDescGZIP(), []int{49} + return file_systera_proto_rawDescGZIP(), []int{50} } func (x *RemovePermissionRequest) GetGroupName() string { @@ -3518,133 +3565,142 @@ var file_systera_proto_rawDesc = []byte{ 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x33, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6f, 0x0a, - 0x14, 0x41, 0x64, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x72, - 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2a, 0x38, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0d, 0x0a, - 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, - 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, - 0x50, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, - 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x49, 0x43, 0x4b, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, - 0x54, 0x45, 0x4d, 0x50, 0x42, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x52, - 0x4d, 0x42, 0x41, 0x4e, 0x10, 0x04, 0x32, 0x9c, 0x0e, 0x0a, 0x07, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x72, 0x61, 0x12, 0x3a, 0x0a, 0x08, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x12, 0x1a, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, - 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3a, - 0x0a, 0x08, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, - 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x04, 0x43, 0x68, - 0x61, 0x74, 0x12, 0x16, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x43, - 0x68, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x51, - 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, - 0x1f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x43, - 0x68, 0x61, 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, - 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x57, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x49, - 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, - 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x49, 0x67, 0x6e, 0x6f, - 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, - 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, - 0x0a, 0x11, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, - 0x49, 0x6e, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x72, 0x61, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x63, 0x0a, 0x12, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, - 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x18, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x2a, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, - 0x74, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, - 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, - 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, + 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x72, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6f, 0x0a, 0x14, 0x41, + 0x64, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x72, 0x0a, 0x17, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x20, + 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2a, 0x38, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0b, + 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, + 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x55, + 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x50, 0x75, + 0x6e, 0x69, 0x73, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x01, + 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x49, 0x43, 0x4b, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x45, + 0x4d, 0x50, 0x42, 0x41, 0x4e, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x52, 0x4d, 0x42, + 0x41, 0x4e, 0x10, 0x04, 0x32, 0xde, 0x0e, 0x0a, 0x07, 0x53, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, + 0x12, 0x3a, 0x0a, 0x08, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, + 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x72, 0x61, 0x70, 0x62, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4c, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, + 0x12, 0x16, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0d, + 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x1f, 0x2e, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x68, 0x61, + 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x49, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x57, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x49, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x12, 0x22, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, + 0x61, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x29, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x11, + 0x49, 0x6e, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x49, 0x6e, + 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, + 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, + 0x0a, 0x12, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, + 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x18, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x2a, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, + 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0f, + 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, + 0x21, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4a, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x46, 0x0a, 0x09, 0x41, 0x6c, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x1b, 0x2e, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x6c, 0x74, 0x4c, 0x6f, 0x6f, - 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x6c, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x12, 0x21, 0x2e, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x50, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x50, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, - 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x75, 0x6e, - 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x50, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x3c, 0x0a, 0x05, 0x55, 0x6e, 0x42, 0x61, 0x6e, 0x12, 0x17, 0x2e, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x42, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x55, - 0x6e, 0x42, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, - 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x72, 0x61, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4e, 0x0a, 0x0b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x1d, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x40, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4c, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x4a, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, + 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, + 0x0a, 0x09, 0x41, 0x6c, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x1b, 0x2e, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x6c, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x72, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x6c, 0x74, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, + 0x75, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x50, 0x75, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, + 0x75, 0x6e, 0x69, 0x73, 0x68, 0x12, 0x21, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, + 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x69, 0x73, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x72, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x75, + 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3c, + 0x0a, 0x05, 0x55, 0x6e, 0x42, 0x61, 0x6e, 0x12, 0x17, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, + 0x61, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x42, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x42, + 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x06, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, + 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, + 0x0b, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x1d, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, + 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x40, 0x0a, 0x0b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, + 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x12, 0x1d, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x1d, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x72, 0x61, 0x70, 0x62, @@ -3675,7 +3731,7 @@ func file_systera_proto_rawDescGZIP() []byte { } var file_systera_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_systera_proto_msgTypes = make([]protoimpl.MessageInfo, 50) +var file_systera_proto_msgTypes = make([]protoimpl.MessageInfo, 51) var file_systera_proto_goTypes = []interface{}{ (CallResult)(0), // 0: systerapb.CallResult (PunishLevel)(0), // 1: systerapb.PunishLevel @@ -3732,8 +3788,9 @@ var file_systera_proto_goTypes = []interface{}{ (*FetchGroupsResponse)(nil), // 52: systerapb.FetchGroupsResponse (*CreateGroupRequest)(nil), // 53: systerapb.CreateGroupRequest (*RemoveGroupRequest)(nil), // 54: systerapb.RemoveGroupRequest - (*AddPermissionRequest)(nil), // 55: systerapb.AddPermissionRequest - (*RemovePermissionRequest)(nil), // 56: systerapb.RemovePermissionRequest + (*UpdateGroupRequest)(nil), // 55: systerapb.UpdateGroupRequest + (*AddPermissionRequest)(nil), // 56: systerapb.AddPermissionRequest + (*RemovePermissionRequest)(nil), // 57: systerapb.RemovePermissionRequest } var file_systera_proto_depIdxs = []int32{ 21, // 0: systerapb.ChatEntry.author:type_name -> systerapb.PlayerIdentity @@ -3775,57 +3832,60 @@ var file_systera_proto_depIdxs = []int32{ 50, // 36: systerapb.GroupEntry.permissions:type_name -> systerapb.PermissionsEntry 49, // 37: systerapb.FetchGroupsResponse.groups:type_name -> systerapb.GroupEntry 49, // 38: systerapb.CreateGroupRequest.group_entry:type_name -> systerapb.GroupEntry - 8, // 39: systerapb.Systera.Announce:input_type -> systerapb.AnnounceRequest - 9, // 40: systerapb.Systera.Dispatch:input_type -> systerapb.DispatchRequest - 11, // 41: systerapb.Systera.Chat:input_type -> systerapb.ChatRequest - 12, // 42: systerapb.Systera.AddChatIgnore:input_type -> systerapb.AddChatIgnoreRequest - 13, // 43: systerapb.Systera.RemoveChatIgnore:input_type -> systerapb.RemoveChatIgnoreRequest - 22, // 44: systerapb.Systera.GetPlayerIdentityByName:input_type -> systerapb.GetPlayerIdentityByNameRequest - 26, // 45: systerapb.Systera.InitPlayerProfile:input_type -> systerapb.InitPlayerProfileRequest - 28, // 46: systerapb.Systera.FetchPlayerProfile:input_type -> systerapb.FetchPlayerProfileRequest - 29, // 47: systerapb.Systera.FetchPlayerProfileByName:input_type -> systerapb.FetchPlayerProfileByNameRequest - 31, // 48: systerapb.Systera.SetPlayerGroups:input_type -> systerapb.SetPlayerGroupsRequest - 32, // 49: systerapb.Systera.SetPlayerServer:input_type -> systerapb.SetPlayerServerRequest - 33, // 50: systerapb.Systera.RemovePlayerServer:input_type -> systerapb.RemovePlayerServerRequest - 34, // 51: systerapb.Systera.SetPlayerSettings:input_type -> systerapb.SetPlayerSettingsRequest - 37, // 52: systerapb.Systera.AltLookup:input_type -> systerapb.AltLookupRequest - 40, // 53: systerapb.Systera.GetPlayerPunish:input_type -> systerapb.GetPlayerPunishRequest - 42, // 54: systerapb.Systera.SetPlayerPunish:input_type -> systerapb.SetPlayerPunishRequest - 44, // 55: systerapb.Systera.UnBan:input_type -> systerapb.UnBanRequest - 47, // 56: systerapb.Systera.Report:input_type -> systerapb.ReportRequest - 51, // 57: systerapb.Systera.FetchGroups:input_type -> systerapb.FetchGroupsRequest - 53, // 58: systerapb.Systera.CreateGroup:input_type -> systerapb.CreateGroupRequest - 54, // 59: systerapb.Systera.RemoveGroup:input_type -> systerapb.RemoveGroupRequest - 55, // 60: systerapb.Systera.AddPermission:input_type -> systerapb.AddPermissionRequest - 56, // 61: systerapb.Systera.RemovePermission:input_type -> systerapb.RemovePermissionRequest - 7, // 62: systerapb.Systera.Announce:output_type -> systerapb.Empty - 7, // 63: systerapb.Systera.Dispatch:output_type -> systerapb.Empty - 7, // 64: systerapb.Systera.Chat:output_type -> systerapb.Empty - 14, // 65: systerapb.Systera.AddChatIgnore:output_type -> systerapb.ChatIgnoreResponse - 14, // 66: systerapb.Systera.RemoveChatIgnore:output_type -> systerapb.ChatIgnoreResponse - 23, // 67: systerapb.Systera.GetPlayerIdentityByName:output_type -> systerapb.GetPlayerIdentityByNameResponse - 27, // 68: systerapb.Systera.InitPlayerProfile:output_type -> systerapb.InitPlayerProfileResponse - 30, // 69: systerapb.Systera.FetchPlayerProfile:output_type -> systerapb.FetchPlayerProfileResponse - 30, // 70: systerapb.Systera.FetchPlayerProfileByName:output_type -> systerapb.FetchPlayerProfileResponse - 7, // 71: systerapb.Systera.SetPlayerGroups:output_type -> systerapb.Empty - 7, // 72: systerapb.Systera.SetPlayerServer:output_type -> systerapb.Empty - 7, // 73: systerapb.Systera.RemovePlayerServer:output_type -> systerapb.Empty - 7, // 74: systerapb.Systera.SetPlayerSettings:output_type -> systerapb.Empty - 38, // 75: systerapb.Systera.AltLookup:output_type -> systerapb.AltLookupResponse - 41, // 76: systerapb.Systera.GetPlayerPunish:output_type -> systerapb.GetPlayerPunishResponse - 43, // 77: systerapb.Systera.SetPlayerPunish:output_type -> systerapb.SetPlayerPunishResponse - 45, // 78: systerapb.Systera.UnBan:output_type -> systerapb.UnBanResponse - 48, // 79: systerapb.Systera.Report:output_type -> systerapb.ReportResponse - 52, // 80: systerapb.Systera.FetchGroups:output_type -> systerapb.FetchGroupsResponse - 7, // 81: systerapb.Systera.CreateGroup:output_type -> systerapb.Empty - 7, // 82: systerapb.Systera.RemoveGroup:output_type -> systerapb.Empty - 7, // 83: systerapb.Systera.AddPermission:output_type -> systerapb.Empty - 7, // 84: systerapb.Systera.RemovePermission:output_type -> systerapb.Empty - 62, // [62:85] is the sub-list for method output_type - 39, // [39:62] is the sub-list for method input_type - 39, // [39:39] is the sub-list for extension type_name - 39, // [39:39] is the sub-list for extension extendee - 0, // [0:39] is the sub-list for field type_name + 49, // 39: systerapb.UpdateGroupRequest.group_entry:type_name -> systerapb.GroupEntry + 8, // 40: systerapb.Systera.Announce:input_type -> systerapb.AnnounceRequest + 9, // 41: systerapb.Systera.Dispatch:input_type -> systerapb.DispatchRequest + 11, // 42: systerapb.Systera.Chat:input_type -> systerapb.ChatRequest + 12, // 43: systerapb.Systera.AddChatIgnore:input_type -> systerapb.AddChatIgnoreRequest + 13, // 44: systerapb.Systera.RemoveChatIgnore:input_type -> systerapb.RemoveChatIgnoreRequest + 22, // 45: systerapb.Systera.GetPlayerIdentityByName:input_type -> systerapb.GetPlayerIdentityByNameRequest + 26, // 46: systerapb.Systera.InitPlayerProfile:input_type -> systerapb.InitPlayerProfileRequest + 28, // 47: systerapb.Systera.FetchPlayerProfile:input_type -> systerapb.FetchPlayerProfileRequest + 29, // 48: systerapb.Systera.FetchPlayerProfileByName:input_type -> systerapb.FetchPlayerProfileByNameRequest + 31, // 49: systerapb.Systera.SetPlayerGroups:input_type -> systerapb.SetPlayerGroupsRequest + 32, // 50: systerapb.Systera.SetPlayerServer:input_type -> systerapb.SetPlayerServerRequest + 33, // 51: systerapb.Systera.RemovePlayerServer:input_type -> systerapb.RemovePlayerServerRequest + 34, // 52: systerapb.Systera.SetPlayerSettings:input_type -> systerapb.SetPlayerSettingsRequest + 37, // 53: systerapb.Systera.AltLookup:input_type -> systerapb.AltLookupRequest + 40, // 54: systerapb.Systera.GetPlayerPunish:input_type -> systerapb.GetPlayerPunishRequest + 42, // 55: systerapb.Systera.SetPlayerPunish:input_type -> systerapb.SetPlayerPunishRequest + 44, // 56: systerapb.Systera.UnBan:input_type -> systerapb.UnBanRequest + 47, // 57: systerapb.Systera.Report:input_type -> systerapb.ReportRequest + 51, // 58: systerapb.Systera.FetchGroups:input_type -> systerapb.FetchGroupsRequest + 53, // 59: systerapb.Systera.CreateGroup:input_type -> systerapb.CreateGroupRequest + 54, // 60: systerapb.Systera.RemoveGroup:input_type -> systerapb.RemoveGroupRequest + 55, // 61: systerapb.Systera.UpdateGroup:input_type -> systerapb.UpdateGroupRequest + 56, // 62: systerapb.Systera.AddPermission:input_type -> systerapb.AddPermissionRequest + 57, // 63: systerapb.Systera.RemovePermission:input_type -> systerapb.RemovePermissionRequest + 7, // 64: systerapb.Systera.Announce:output_type -> systerapb.Empty + 7, // 65: systerapb.Systera.Dispatch:output_type -> systerapb.Empty + 7, // 66: systerapb.Systera.Chat:output_type -> systerapb.Empty + 14, // 67: systerapb.Systera.AddChatIgnore:output_type -> systerapb.ChatIgnoreResponse + 14, // 68: systerapb.Systera.RemoveChatIgnore:output_type -> systerapb.ChatIgnoreResponse + 23, // 69: systerapb.Systera.GetPlayerIdentityByName:output_type -> systerapb.GetPlayerIdentityByNameResponse + 27, // 70: systerapb.Systera.InitPlayerProfile:output_type -> systerapb.InitPlayerProfileResponse + 30, // 71: systerapb.Systera.FetchPlayerProfile:output_type -> systerapb.FetchPlayerProfileResponse + 30, // 72: systerapb.Systera.FetchPlayerProfileByName:output_type -> systerapb.FetchPlayerProfileResponse + 7, // 73: systerapb.Systera.SetPlayerGroups:output_type -> systerapb.Empty + 7, // 74: systerapb.Systera.SetPlayerServer:output_type -> systerapb.Empty + 7, // 75: systerapb.Systera.RemovePlayerServer:output_type -> systerapb.Empty + 7, // 76: systerapb.Systera.SetPlayerSettings:output_type -> systerapb.Empty + 38, // 77: systerapb.Systera.AltLookup:output_type -> systerapb.AltLookupResponse + 41, // 78: systerapb.Systera.GetPlayerPunish:output_type -> systerapb.GetPlayerPunishResponse + 43, // 79: systerapb.Systera.SetPlayerPunish:output_type -> systerapb.SetPlayerPunishResponse + 45, // 80: systerapb.Systera.UnBan:output_type -> systerapb.UnBanResponse + 48, // 81: systerapb.Systera.Report:output_type -> systerapb.ReportResponse + 52, // 82: systerapb.Systera.FetchGroups:output_type -> systerapb.FetchGroupsResponse + 7, // 83: systerapb.Systera.CreateGroup:output_type -> systerapb.Empty + 7, // 84: systerapb.Systera.RemoveGroup:output_type -> systerapb.Empty + 7, // 85: systerapb.Systera.UpdateGroup:output_type -> systerapb.Empty + 7, // 86: systerapb.Systera.AddPermission:output_type -> systerapb.Empty + 7, // 87: systerapb.Systera.RemovePermission:output_type -> systerapb.Empty + 64, // [64:88] is the sub-list for method output_type + 40, // [40:64] is the sub-list for method input_type + 40, // [40:40] is the sub-list for extension type_name + 40, // [40:40] is the sub-list for extension extendee + 0, // [0:40] is the sub-list for field type_name } func init() { file_systera_proto_init() } @@ -4411,7 +4471,7 @@ func file_systera_proto_init() { } } file_systera_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddPermissionRequest); i { + switch v := v.(*UpdateGroupRequest); i { case 0: return &v.state case 1: @@ -4423,6 +4483,18 @@ func file_systera_proto_init() { } } file_systera_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddPermissionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_systera_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemovePermissionRequest); i { case 0: return &v.state @@ -4441,7 +4513,7 @@ func file_systera_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_systera_proto_rawDesc, NumEnums: 7, - NumMessages: 50, + NumMessages: 51, NumExtensions: 0, NumServices: 1, }, diff --git a/systerapb/systera.proto b/systerapb/systera.proto index 7848e71..27ab7fe 100644 --- a/systerapb/systera.proto +++ b/systerapb/systera.proto @@ -49,6 +49,7 @@ service Systera { rpc CreateGroup(CreateGroupRequest) returns (Empty) {} rpc RemoveGroup(RemoveGroupRequest) returns (Empty) {} + rpc UpdateGroup(UpdateGroupRequest) returns (Empty) {} rpc AddPermission(AddPermissionRequest) returns (Empty) {} rpc RemovePermission(RemovePermissionRequest) returns (Empty) {} @@ -329,6 +330,8 @@ message CreateGroupRequest { GroupEntry group_entry = 1; } message RemoveGroupRequest { string group_name = 1; } +message UpdateGroupRequest { GroupEntry group_entry = 1; } + message AddPermissionRequest { string group_name = 1; string target = 2; diff --git a/systerapb/systera_grpc.pb.go b/systerapb/systera_grpc.pb.go index 55bd34a..a68cef9 100644 --- a/systerapb/systera_grpc.pb.go +++ b/systerapb/systera_grpc.pb.go @@ -45,6 +45,7 @@ type SysteraClient interface { FetchGroups(ctx context.Context, in *FetchGroupsRequest, opts ...grpc.CallOption) (*FetchGroupsResponse, error) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*Empty, error) RemoveGroup(ctx context.Context, in *RemoveGroupRequest, opts ...grpc.CallOption) (*Empty, error) + UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*Empty, error) AddPermission(ctx context.Context, in *AddPermissionRequest, opts ...grpc.CallOption) (*Empty, error) RemovePermission(ctx context.Context, in *RemovePermissionRequest, opts ...grpc.CallOption) (*Empty, error) } @@ -246,6 +247,15 @@ func (c *systeraClient) RemoveGroup(ctx context.Context, in *RemoveGroupRequest, return out, nil } +func (c *systeraClient) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/systerapb.Systera/UpdateGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *systeraClient) AddPermission(ctx context.Context, in *AddPermissionRequest, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, "/systerapb.Systera/AddPermission", in, out, opts...) @@ -291,6 +301,7 @@ type SysteraServer interface { FetchGroups(context.Context, *FetchGroupsRequest) (*FetchGroupsResponse, error) CreateGroup(context.Context, *CreateGroupRequest) (*Empty, error) RemoveGroup(context.Context, *RemoveGroupRequest) (*Empty, error) + UpdateGroup(context.Context, *UpdateGroupRequest) (*Empty, error) AddPermission(context.Context, *AddPermissionRequest) (*Empty, error) RemovePermission(context.Context, *RemovePermissionRequest) (*Empty, error) } @@ -362,6 +373,9 @@ func (UnimplementedSysteraServer) CreateGroup(context.Context, *CreateGroupReque func (UnimplementedSysteraServer) RemoveGroup(context.Context, *RemoveGroupRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveGroup not implemented") } +func (UnimplementedSysteraServer) UpdateGroup(context.Context, *UpdateGroupRequest) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGroup not implemented") +} func (UnimplementedSysteraServer) AddPermission(context.Context, *AddPermissionRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method AddPermission not implemented") } @@ -758,6 +772,24 @@ func _Systera_RemoveGroup_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Systera_UpdateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SysteraServer).UpdateGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/systerapb.Systera/UpdateGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SysteraServer).UpdateGroup(ctx, req.(*UpdateGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Systera_AddPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddPermissionRequest) if err := dec(in); err != nil { @@ -885,6 +917,10 @@ var Systera_ServiceDesc = grpc.ServiceDesc{ MethodName: "RemoveGroup", Handler: _Systera_RemoveGroup_Handler, }, + { + MethodName: "UpdateGroup", + Handler: _Systera_UpdateGroup_Handler, + }, { MethodName: "AddPermission", Handler: _Systera_AddPermission_Handler,