diff --git a/daemon/pb/servers.pb.go b/daemon/pb/servers.pb.go index 78df6814..3b8ba1cd 100644 --- a/daemon/pb/servers.pb.go +++ b/daemon/pb/servers.pb.go @@ -136,7 +136,7 @@ type Server struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` HostName string `protobuf:"bytes,4,opt,name=host_name,json=hostName,proto3" json:"host_name,omitempty"` Virtual bool `protobuf:"varint,5,opt,name=virtual,proto3" json:"virtual,omitempty"` - ServerGroup []config.ServerGroup `protobuf:"varint,6,rep,packed,name=server_group,json=serverGroup,proto3,enum=config.ServerGroup" json:"server_group,omitempty"` + ServerGroups []config.ServerGroup `protobuf:"varint,6,rep,packed,name=server_groups,json=serverGroups,proto3,enum=config.ServerGroup" json:"server_groups,omitempty"` Technologies []Technology `protobuf:"varint,7,rep,packed,name=technologies,proto3,enum=pb.Technology" json:"technologies,omitempty"` } @@ -193,9 +193,9 @@ func (x *Server) GetVirtual() bool { return false } -func (x *Server) GetServerGroup() []config.ServerGroup { +func (x *Server) GetServerGroups() []config.ServerGroup { if x != nil { - return x.ServerGroup + return x.ServerGroups } return nil } @@ -450,59 +450,59 @@ var File_servers_proto protoreflect.FileDescriptor var file_servers_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0c, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, - 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x32, 0x0a, 0x0c, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x65, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x65, 0x63, - 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x0c, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, - 0x6f, 0x67, 0x69, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, - 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x24, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x22, 0x5a, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x69, 0x74, 0x79, 0x52, 0x06, 0x63, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x22, 0x4d, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x70, - 0x12, 0x3f, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, - 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, - 0x79, 0x22, 0x73, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x73, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x4c, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, - 0x49, 0x47, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x49, - 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x53, 0x5f, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x10, 0x02, 0x2a, 0x8b, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, - 0x6f, 0x67, 0x79, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x54, - 0x45, 0x43, 0x48, 0x4e, 0x4c, 0x4f, 0x47, 0x59, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, - 0x52, 0x44, 0x4c, 0x59, 0x4e, 0x58, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x45, 0x4e, - 0x56, 0x50, 0x4e, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x45, - 0x4e, 0x56, 0x50, 0x4e, 0x5f, 0x55, 0x44, 0x50, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x42, - 0x46, 0x55, 0x53, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x56, 0x50, 0x4e, - 0x5f, 0x54, 0x43, 0x50, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x42, 0x46, 0x55, 0x53, 0x43, - 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x56, 0x50, 0x4e, 0x5f, 0x55, 0x44, 0x50, - 0x10, 0x05, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x4e, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x6e, 0x6f, - 0x72, 0x64, 0x76, 0x70, 0x6e, 0x2d, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2f, 0x64, 0x61, 0x65, 0x6d, - 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x07, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x0d, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x12, 0x32, 0x0a, 0x0c, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, + 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x54, + 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x0c, 0x74, 0x65, 0x63, 0x68, 0x6e, + 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x43, 0x69, 0x74, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x69, 0x74, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x22, 0x5a, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x06, + 0x63, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, + 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x69, 0x74, 0x79, 0x52, 0x06, 0x63, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x22, 0x4d, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x4d, + 0x61, 0x70, 0x12, 0x3f, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x62, 0x79, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x72, 0x79, 0x22, 0x73, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x4c, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, + 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, + 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x53, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0x8b, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x63, 0x68, 0x6e, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x5f, 0x54, 0x45, 0x43, 0x48, 0x4e, 0x4c, 0x4f, 0x47, 0x59, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x4e, 0x4f, 0x52, 0x44, 0x4c, 0x59, 0x4e, 0x58, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, + 0x45, 0x4e, 0x56, 0x50, 0x4e, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, + 0x50, 0x45, 0x4e, 0x56, 0x50, 0x4e, 0x5f, 0x55, 0x44, 0x50, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, + 0x4f, 0x42, 0x46, 0x55, 0x53, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x56, + 0x50, 0x4e, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x42, 0x46, 0x55, + 0x53, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x56, 0x50, 0x4e, 0x5f, 0x55, + 0x44, 0x50, 0x10, 0x05, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x4e, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, + 0x6e, 0x6f, 0x72, 0x64, 0x76, 0x70, 0x6e, 0x2d, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2f, 0x64, 0x61, + 0x65, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -530,7 +530,7 @@ var file_servers_proto_goTypes = []interface{}{ (config.ServerGroup)(0), // 7: config.ServerGroup } var file_servers_proto_depIdxs = []int32{ - 7, // 0: pb.Server.server_group:type_name -> config.ServerGroup + 7, // 0: pb.Server.server_groups:type_name -> config.ServerGroup 1, // 1: pb.Server.technologies:type_name -> pb.Technology 2, // 2: pb.ServerCity.servers:type_name -> pb.Server 3, // 3: pb.ServerCountry.cities:type_name -> pb.ServerCity diff --git a/daemon/rpc_servers.go b/daemon/rpc_servers.go index 2b4912d9..1bbae579 100644 --- a/daemon/rpc_servers.go +++ b/daemon/rpc_servers.go @@ -61,7 +61,6 @@ func serversListToServersMap(internalServers core.Servers, allowVirtual bool) [] sMap := make(serversMap) - numberOfServers := 0 for _, server := range internalServers { if !allowVirtual && server.IsVirtualLocation() { continue @@ -71,7 +70,7 @@ func serversListToServersMap(internalServers core.Servers, allowVirtual bool) [] Id: server.ID, HostName: server.Hostname, Virtual: server.IsVirtualLocation(), - ServerGroup: groupFilter(server.Groups), + ServerGroups: groupFilter(server.Groups), Technologies: technologiesToProtobuf(server.Technologies), } @@ -87,7 +86,6 @@ func serversListToServersMap(internalServers core.Servers, allowVirtual bool) [] } sMap[countryCode][cityName] = append(sMap[countryCode][cityName], &s) - numberOfServers++ } countries := []*pb.ServerCountry{} diff --git a/daemon/rpc_servers_test.go b/daemon/rpc_servers_test.go index a7c4bea4..413d4fc4 100644 --- a/daemon/rpc_servers_test.go +++ b/daemon/rpc_servers_test.go @@ -273,30 +273,30 @@ func TestServers(t *testing.T) { } expectedServer1 := pb.Server{ - Id: int64(server1ID), - HostName: server1Hostname, - Virtual: true, - ServerGroup: []config.ServerGroup{config.ServerGroup_P2P, config.ServerGroup_STANDARD_VPN_SERVERS}, + Id: int64(server1ID), + HostName: server1Hostname, + Virtual: true, + ServerGroups: []config.ServerGroup{config.ServerGroup_P2P, config.ServerGroup_STANDARD_VPN_SERVERS}, Technologies: []pb.Technology{ pb.Technology_NORDLYNX, pb.Technology_OPENVPN_TCP, }, } expectedServer2 := pb.Server{ - Id: int64(server2ID), - HostName: server2Hostname, - Virtual: false, - ServerGroup: []config.ServerGroup{config.ServerGroup_STANDARD_VPN_SERVERS}, + Id: int64(server2ID), + HostName: server2Hostname, + Virtual: false, + ServerGroups: []config.ServerGroup{config.ServerGroup_STANDARD_VPN_SERVERS}, Technologies: []pb.Technology{ pb.Technology_OPENVPN_TCP, pb.Technology_OPENVPN_UDP, }, } expectedServer3 := pb.Server{ - Id: int64(server3ID), - HostName: server3Hostname, - Virtual: false, - ServerGroup: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS}, + Id: int64(server3ID), + HostName: server3Hostname, + Virtual: false, + ServerGroups: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS}, Technologies: []pb.Technology{ pb.Technology_OBFUSCATED_OPENVPN_TCP, pb.Technology_OPENVPN_TCP, @@ -310,10 +310,10 @@ func TestServers(t *testing.T) { expectedServersOpenVPNTCP = addToServersMap(expectedServersOpenVPNTCP, "lt", "Vilnius", &expectedServer3) expectedServer4 := pb.Server{ - Id: int64(server4ID), - HostName: server4Hostname, - Virtual: true, - ServerGroup: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS}, + Id: int64(server4ID), + HostName: server4Hostname, + Virtual: true, + ServerGroups: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS}, Technologies: []pb.Technology{ pb.Technology_OBFUSCATED_OPENVPN_UDP, pb.Technology_OBFUSCATED_OPENVPN_TCP, @@ -323,10 +323,10 @@ func TestServers(t *testing.T) { }, } expectedServer5 := pb.Server{ - Id: int64(server5ID), - HostName: server5Hostname, - Virtual: false, - ServerGroup: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS}, + Id: int64(server5ID), + HostName: server5Hostname, + Virtual: false, + ServerGroups: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS}, Technologies: []pb.Technology{ pb.Technology_OBFUSCATED_OPENVPN_UDP, pb.Technology_OBFUSCATED_OPENVPN_TCP, @@ -353,10 +353,10 @@ func TestServers(t *testing.T) { "lt", "Vilnius", &pb.Server{ - Id: int64(server3ID), - HostName: server3Hostname, - Virtual: false, - ServerGroup: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS}, + Id: int64(server3ID), + HostName: server3Hostname, + Virtual: false, + ServerGroups: []config.ServerGroup{config.ServerGroup_OBFUSCATED, config.ServerGroup_STANDARD_VPN_SERVERS}, Technologies: []pb.Technology{ pb.Technology_OBFUSCATED_OPENVPN_TCP, pb.Technology_OPENVPN_TCP, diff --git a/protobuf/daemon/servers.proto b/protobuf/daemon/servers.proto index 2d3b3dce..2cbb2a3f 100644 --- a/protobuf/daemon/servers.proto +++ b/protobuf/daemon/servers.proto @@ -25,7 +25,7 @@ message Server { int64 id = 1; string host_name = 4; bool virtual = 5; - repeated config.ServerGroup server_group = 6; + repeated config.ServerGroup server_groups = 6; repeated Technology technologies = 7; }