diff --git a/database/ipfilter.go b/database/ipfilter.go new file mode 100644 index 0000000..81bb6b7 --- /dev/null +++ b/database/ipfilter.go @@ -0,0 +1,55 @@ +package database + +import ( + "errors" + + "github.com/sirupsen/logrus" +) + +type IPFilter struct { + Id string `gorm:"primaryKey;AutoIncrement;"` + Action FilterAction + Address string `gorm:"index;not null;"` + Description string +} + +type FilterAction int32 + +const ( + ALLOW FilterAction = iota + DENY +) + +func (s *Mysql) AddIPFilter(entry *IPFilter) error { + r := s.client.First(&IPFilter{}, "address = ?", entry.Address) + + if r.RowsAffected != 0 { + return errors.New("already exists") + } else if r.Error != nil && r.RowsAffected != 0 { + return r.Error + } + + result := s.client.Create(entry) + if result.Error != nil { + logrus.WithError(result.Error).Errorf("[IPFW] Failed AddIPFilter") + return result.Error + } + + return nil +} + +func (s *Mysql) RemoveIPFilter(address string) error { + r := s.client.Delete(&IPFilter{}, "address = ?", address) + return r.Error +} + +func (s *Mysql) GetIPFilter(address string) (*IPFilter, error) { + var entry *IPFilter + r := s.client.Find(&entry, "address = ?", address) + return entry, r.Error +} + +// func (s *Mysql) ListIPFilter() ([]IPFilter, error) { +// var entries []IPFilter +// +// } diff --git a/database/mysql.go b/database/mysql.go index 2fbaac3..977a95a 100644 --- a/database/mysql.go +++ b/database/mysql.go @@ -45,6 +45,11 @@ func NewMysqlClient(mysqlConStr, database string) *Mysql { return nil } + if err := m.client.AutoMigrate(&Players{}); err != nil { + logrus.Fatalf("[MySQL] Failed to migrate: %s", err) + return nil + } + if err := m.InitBungeeTable(); err != nil { return nil } diff --git a/database/player.go b/database/player.go new file mode 100644 index 0000000..ac64e1c --- /dev/null +++ b/database/player.go @@ -0,0 +1,105 @@ +package database + +import ( + "encoding/json" + + "github.com/sirupsen/logrus" + "github.com/synchthia/nebula-api/nebulapb" + "gorm.io/gorm/clause" +) + +type Players struct { + ID uint `gorm:"primary_key;AutoIncrement;"` + UUID string `gorm:"index;unique;"` + Name string `gorm:"index;not null;"` + CurrentServer string + Latency int64 + RawProperties string `gorm:"type:text"` +} + +type UpdateOption struct { + IsQuit bool +} + +func (p *Players) ToProtobuf() *nebulapb.PlayerProfile { + return &nebulapb.PlayerProfile{ + PlayerUUID: p.UUID, + PlayerName: p.Name, + PlayerLatency: int64(p.Latency), + CurrentServer: p.CurrentServer, + Properties: func() []*nebulapb.PlayerProperty { + properties := []*nebulapb.PlayerProperty{} + if err := json.Unmarshal([]byte(p.RawProperties), &properties); err != nil { + return nil + } + return properties + }(), + } +} + +func PlayersFromProtobuf(p *nebulapb.PlayerProfile) *Players { + return &Players{ + UUID: p.PlayerUUID, + Name: p.PlayerName, + Latency: int64(p.PlayerLatency), + CurrentServer: p.CurrentServer, + RawProperties: func() string { + if b, err := json.Marshal(p.Properties); err != nil { + return "[]" + } else { + return string(b) + } + }(), + } +} + +func (s *Mysql) GetAllPlayers() ([]Players, error) { + var players []Players + r := s.client.Where("current_server != ?", "").Find(&players) + if r.Error != nil { + logrus.WithError(r.Error).Errorf("[Player] Failed Find Player") + return nil, r.Error + } + + return players, nil +} + +func (s *Mysql) UpdateAllPlayers(players []Players) error { + r := s.client.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: "uuid"}}, + UpdateAll: true, + }).Create(players) + + return r.Error +} + +func (s *Mysql) SyncPlayer(newPlayer *Players, opts *UpdateOption) (bool, error) { + var player Players + findRes := s.client.Clauses(clause.Locking{Strength: "UPDATE"}).Model(&Players{}).First(&player, "uuid = ?", newPlayer.UUID) + if findRes.Error != nil { + logrus.WithError(findRes.Error).Errorf("[Player] SyncPlayer: Failed update player data (%s)", newPlayer.UUID) + return false, findRes.Error + } + + quit := false + if opts != nil { + was := player.CurrentServer + if opts.IsQuit { + if was == newPlayer.CurrentServer { + newPlayer.CurrentServer = "" + quit = true + } else { + return false, nil + } + } else { + player.CurrentServer = newPlayer.CurrentServer + } + } + + r := s.client.Clauses(clause.OnConflict{ + Columns: []clause.Column{{Name: "uuid"}}, + UpdateAll: true, + }).Create(newPlayer) + + return quit, r.Error +} diff --git a/nebulapb/nebulapb.pb.go b/nebulapb/nebulapb.pb.go index 3e8db1b..386fe34 100644 --- a/nebulapb/nebulapb.pb.go +++ b/nebulapb/nebulapb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc v5.27.2 // source: nebulapb.proto package nebulapb @@ -20,6 +20,55 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type PlayerPropertiesStream_Type int32 + +const ( + PlayerPropertiesStream_JOIN_SOLO PlayerPropertiesStream_Type = 0 + PlayerPropertiesStream_QUIT_SOLO PlayerPropertiesStream_Type = 1 + PlayerPropertiesStream_ADVERTISE_ALL PlayerPropertiesStream_Type = 2 +) + +// Enum value maps for PlayerPropertiesStream_Type. +var ( + PlayerPropertiesStream_Type_name = map[int32]string{ + 0: "JOIN_SOLO", + 1: "QUIT_SOLO", + 2: "ADVERTISE_ALL", + } + PlayerPropertiesStream_Type_value = map[string]int32{ + "JOIN_SOLO": 0, + "QUIT_SOLO": 1, + "ADVERTISE_ALL": 2, + } +) + +func (x PlayerPropertiesStream_Type) Enum() *PlayerPropertiesStream_Type { + p := new(PlayerPropertiesStream_Type) + *p = x + return p +} + +func (x PlayerPropertiesStream_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PlayerPropertiesStream_Type) Descriptor() protoreflect.EnumDescriptor { + return file_nebulapb_proto_enumTypes[0].Descriptor() +} + +func (PlayerPropertiesStream_Type) Type() protoreflect.EnumType { + return &file_nebulapb_proto_enumTypes[0] +} + +func (x PlayerPropertiesStream_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PlayerPropertiesStream_Type.Descriptor instead. +func (PlayerPropertiesStream_Type) EnumDescriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{0, 0} +} + type ServerEntryStream_Type int32 const ( @@ -50,11 +99,11 @@ func (x ServerEntryStream_Type) String() string { } func (ServerEntryStream_Type) Descriptor() protoreflect.EnumDescriptor { - return file_nebulapb_proto_enumTypes[0].Descriptor() + return file_nebulapb_proto_enumTypes[1].Descriptor() } func (ServerEntryStream_Type) Type() protoreflect.EnumType { - return &file_nebulapb_proto_enumTypes[0] + return &file_nebulapb_proto_enumTypes[1] } func (x ServerEntryStream_Type) Number() protoreflect.EnumNumber { @@ -63,7 +112,7 @@ func (x ServerEntryStream_Type) Number() protoreflect.EnumNumber { // Deprecated: Use ServerEntryStream_Type.Descriptor instead. func (ServerEntryStream_Type) EnumDescriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{0, 0} + return file_nebulapb_proto_rawDescGZIP(), []int{1, 0} } type BungeeEntryStream_Type int32 @@ -96,11 +145,11 @@ func (x BungeeEntryStream_Type) String() string { } func (BungeeEntryStream_Type) Descriptor() protoreflect.EnumDescriptor { - return file_nebulapb_proto_enumTypes[1].Descriptor() + return file_nebulapb_proto_enumTypes[2].Descriptor() } func (BungeeEntryStream_Type) Type() protoreflect.EnumType { - return &file_nebulapb_proto_enumTypes[1] + return &file_nebulapb_proto_enumTypes[2] } func (x BungeeEntryStream_Type) Number() protoreflect.EnumNumber { @@ -109,7 +158,71 @@ func (x BungeeEntryStream_Type) Number() protoreflect.EnumNumber { // Deprecated: Use BungeeEntryStream_Type.Descriptor instead. func (BungeeEntryStream_Type) EnumDescriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{10, 0} + return file_nebulapb_proto_rawDescGZIP(), []int{11, 0} +} + +// PlayerPropertiesStream +type PlayerPropertiesStream struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type PlayerPropertiesStream_Type `protobuf:"varint,1,opt,name=type,proto3,enum=nebulapb.PlayerPropertiesStream_Type" json:"type,omitempty"` + Solo *PlayerProfile `protobuf:"bytes,2,opt,name=solo,proto3" json:"solo,omitempty"` + All []*PlayerProfile `protobuf:"bytes,3,rep,name=all,proto3" json:"all,omitempty"` +} + +func (x *PlayerPropertiesStream) Reset() { + *x = PlayerPropertiesStream{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerPropertiesStream) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerPropertiesStream) ProtoMessage() {} + +func (x *PlayerPropertiesStream) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerPropertiesStream.ProtoReflect.Descriptor instead. +func (*PlayerPropertiesStream) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{0} +} + +func (x *PlayerPropertiesStream) GetType() PlayerPropertiesStream_Type { + if x != nil { + return x.Type + } + return PlayerPropertiesStream_JOIN_SOLO +} + +func (x *PlayerPropertiesStream) GetSolo() *PlayerProfile { + if x != nil { + return x.Solo + } + return nil +} + +func (x *PlayerPropertiesStream) GetAll() []*PlayerProfile { + if x != nil { + return x.All + } + return nil } // ServerEntryStream (type: sync, remove) @@ -125,7 +238,7 @@ type ServerEntryStream struct { func (x *ServerEntryStream) Reset() { *x = ServerEntryStream{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[0] + mi := &file_nebulapb_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -138,7 +251,7 @@ func (x *ServerEntryStream) String() string { func (*ServerEntryStream) ProtoMessage() {} func (x *ServerEntryStream) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[0] + mi := &file_nebulapb_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -151,7 +264,7 @@ func (x *ServerEntryStream) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerEntryStream.ProtoReflect.Descriptor instead. func (*ServerEntryStream) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{0} + return file_nebulapb_proto_rawDescGZIP(), []int{1} } func (x *ServerEntryStream) GetType() ServerEntryStream_Type { @@ -186,7 +299,7 @@ type ServerEntry struct { func (x *ServerEntry) Reset() { *x = ServerEntry{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[1] + mi := &file_nebulapb_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -199,7 +312,7 @@ func (x *ServerEntry) String() string { func (*ServerEntry) ProtoMessage() {} func (x *ServerEntry) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[1] + mi := &file_nebulapb_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -212,7 +325,7 @@ func (x *ServerEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerEntry.ProtoReflect.Descriptor instead. func (*ServerEntry) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{1} + return file_nebulapb_proto_rawDescGZIP(), []int{2} } func (x *ServerEntry) GetName() string { @@ -283,7 +396,7 @@ type Lockdown struct { func (x *Lockdown) Reset() { *x = Lockdown{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[2] + mi := &file_nebulapb_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -296,7 +409,7 @@ func (x *Lockdown) String() string { func (*Lockdown) ProtoMessage() {} func (x *Lockdown) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[2] + mi := &file_nebulapb_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -309,7 +422,7 @@ func (x *Lockdown) ProtoReflect() protoreflect.Message { // Deprecated: Use Lockdown.ProtoReflect.Descriptor instead. func (*Lockdown) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{2} + return file_nebulapb_proto_rawDescGZIP(), []int{3} } func (x *Lockdown) GetEnabled() bool { @@ -342,7 +455,7 @@ type ServerStatus struct { func (x *ServerStatus) Reset() { *x = ServerStatus{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[3] + mi := &file_nebulapb_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -355,7 +468,7 @@ func (x *ServerStatus) String() string { func (*ServerStatus) ProtoMessage() {} func (x *ServerStatus) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[3] + mi := &file_nebulapb_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -368,7 +481,7 @@ func (x *ServerStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerStatus.ProtoReflect.Descriptor instead. func (*ServerStatus) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{3} + return file_nebulapb_proto_rawDescGZIP(), []int{4} } func (x *ServerStatus) GetOnline() bool { @@ -416,7 +529,7 @@ type GetServerEntryRequest struct { func (x *GetServerEntryRequest) Reset() { *x = GetServerEntryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[4] + mi := &file_nebulapb_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -429,7 +542,7 @@ func (x *GetServerEntryRequest) String() string { func (*GetServerEntryRequest) ProtoMessage() {} func (x *GetServerEntryRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[4] + mi := &file_nebulapb_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -442,7 +555,7 @@ func (x *GetServerEntryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetServerEntryRequest.ProtoReflect.Descriptor instead. func (*GetServerEntryRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{4} + return file_nebulapb_proto_rawDescGZIP(), []int{5} } type GetServerEntryResponse struct { @@ -456,7 +569,7 @@ type GetServerEntryResponse struct { func (x *GetServerEntryResponse) Reset() { *x = GetServerEntryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[5] + mi := &file_nebulapb_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -469,7 +582,7 @@ func (x *GetServerEntryResponse) String() string { func (*GetServerEntryResponse) ProtoMessage() {} func (x *GetServerEntryResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[5] + mi := &file_nebulapb_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -482,7 +595,7 @@ func (x *GetServerEntryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetServerEntryResponse.ProtoReflect.Descriptor instead. func (*GetServerEntryResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{5} + return file_nebulapb_proto_rawDescGZIP(), []int{6} } func (x *GetServerEntryResponse) GetEntry() []*ServerEntry { @@ -503,7 +616,7 @@ type AddServerEntryRequest struct { func (x *AddServerEntryRequest) Reset() { *x = AddServerEntryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[6] + mi := &file_nebulapb_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -516,7 +629,7 @@ func (x *AddServerEntryRequest) String() string { func (*AddServerEntryRequest) ProtoMessage() {} func (x *AddServerEntryRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[6] + mi := &file_nebulapb_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -529,7 +642,7 @@ func (x *AddServerEntryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddServerEntryRequest.ProtoReflect.Descriptor instead. func (*AddServerEntryRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{6} + return file_nebulapb_proto_rawDescGZIP(), []int{7} } func (x *AddServerEntryRequest) GetEntry() *ServerEntry { @@ -548,7 +661,7 @@ type AddServerEntryResponse struct { func (x *AddServerEntryResponse) Reset() { *x = AddServerEntryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[7] + mi := &file_nebulapb_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -561,7 +674,7 @@ func (x *AddServerEntryResponse) String() string { func (*AddServerEntryResponse) ProtoMessage() {} func (x *AddServerEntryResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[7] + mi := &file_nebulapb_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -574,7 +687,7 @@ func (x *AddServerEntryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddServerEntryResponse.ProtoReflect.Descriptor instead. func (*AddServerEntryResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{7} + return file_nebulapb_proto_rawDescGZIP(), []int{8} } type RemoveServerEntryRequest struct { @@ -588,7 +701,7 @@ type RemoveServerEntryRequest struct { func (x *RemoveServerEntryRequest) Reset() { *x = RemoveServerEntryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[8] + mi := &file_nebulapb_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -601,7 +714,7 @@ func (x *RemoveServerEntryRequest) String() string { func (*RemoveServerEntryRequest) ProtoMessage() {} func (x *RemoveServerEntryRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[8] + mi := &file_nebulapb_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -614,7 +727,7 @@ func (x *RemoveServerEntryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveServerEntryRequest.ProtoReflect.Descriptor instead. func (*RemoveServerEntryRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{8} + return file_nebulapb_proto_rawDescGZIP(), []int{9} } func (x *RemoveServerEntryRequest) GetName() string { @@ -633,7 +746,7 @@ type RemoveServerEntryResponse struct { func (x *RemoveServerEntryResponse) Reset() { *x = RemoveServerEntryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[9] + mi := &file_nebulapb_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -646,7 +759,7 @@ func (x *RemoveServerEntryResponse) String() string { func (*RemoveServerEntryResponse) ProtoMessage() {} func (x *RemoveServerEntryResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[9] + mi := &file_nebulapb_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -659,7 +772,7 @@ func (x *RemoveServerEntryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveServerEntryResponse.ProtoReflect.Descriptor instead. func (*RemoveServerEntryResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{9} + return file_nebulapb_proto_rawDescGZIP(), []int{10} } // -- @@ -678,7 +791,7 @@ type BungeeEntryStream struct { func (x *BungeeEntryStream) Reset() { *x = BungeeEntryStream{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[10] + mi := &file_nebulapb_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -691,7 +804,7 @@ func (x *BungeeEntryStream) String() string { func (*BungeeEntryStream) ProtoMessage() {} func (x *BungeeEntryStream) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[10] + mi := &file_nebulapb_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -704,7 +817,7 @@ func (x *BungeeEntryStream) ProtoReflect() protoreflect.Message { // Deprecated: Use BungeeEntryStream.ProtoReflect.Descriptor instead. func (*BungeeEntryStream) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{10} + return file_nebulapb_proto_rawDescGZIP(), []int{11} } func (x *BungeeEntryStream) GetType() BungeeEntryStream_Type { @@ -740,7 +853,7 @@ type BungeeEntry struct { func (x *BungeeEntry) Reset() { *x = BungeeEntry{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[11] + mi := &file_nebulapb_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -753,7 +866,7 @@ func (x *BungeeEntry) String() string { func (*BungeeEntry) ProtoMessage() {} func (x *BungeeEntry) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[11] + mi := &file_nebulapb_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -766,7 +879,7 @@ func (x *BungeeEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use BungeeEntry.ProtoReflect.Descriptor instead. func (*BungeeEntry) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{11} + return file_nebulapb_proto_rawDescGZIP(), []int{12} } func (x *BungeeEntry) GetMotd() string { @@ -792,7 +905,7 @@ type GetBungeeEntryRequest struct { func (x *GetBungeeEntryRequest) Reset() { *x = GetBungeeEntryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[12] + mi := &file_nebulapb_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -805,7 +918,7 @@ func (x *GetBungeeEntryRequest) String() string { func (*GetBungeeEntryRequest) ProtoMessage() {} func (x *GetBungeeEntryRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[12] + mi := &file_nebulapb_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -818,7 +931,7 @@ func (x *GetBungeeEntryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBungeeEntryRequest.ProtoReflect.Descriptor instead. func (*GetBungeeEntryRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{12} + return file_nebulapb_proto_rawDescGZIP(), []int{13} } type GetBungeeEntryResponse struct { @@ -832,7 +945,7 @@ type GetBungeeEntryResponse struct { func (x *GetBungeeEntryResponse) Reset() { *x = GetBungeeEntryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[13] + mi := &file_nebulapb_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -845,7 +958,7 @@ func (x *GetBungeeEntryResponse) String() string { func (*GetBungeeEntryResponse) ProtoMessage() {} func (x *GetBungeeEntryResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[13] + mi := &file_nebulapb_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -858,7 +971,7 @@ func (x *GetBungeeEntryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBungeeEntryResponse.ProtoReflect.Descriptor instead. func (*GetBungeeEntryResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{13} + return file_nebulapb_proto_rawDescGZIP(), []int{14} } func (x *GetBungeeEntryResponse) GetEntry() *BungeeEntry { @@ -879,7 +992,7 @@ type SendBungeeCommandRequest struct { func (x *SendBungeeCommandRequest) Reset() { *x = SendBungeeCommandRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[14] + mi := &file_nebulapb_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -892,7 +1005,7 @@ func (x *SendBungeeCommandRequest) String() string { func (*SendBungeeCommandRequest) ProtoMessage() {} func (x *SendBungeeCommandRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[14] + mi := &file_nebulapb_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -905,7 +1018,7 @@ func (x *SendBungeeCommandRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendBungeeCommandRequest.ProtoReflect.Descriptor instead. func (*SendBungeeCommandRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{14} + return file_nebulapb_proto_rawDescGZIP(), []int{15} } func (x *SendBungeeCommandRequest) GetCommand() string { @@ -924,7 +1037,7 @@ type SendBungeeCommandResponse struct { func (x *SendBungeeCommandResponse) Reset() { *x = SendBungeeCommandResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[15] + mi := &file_nebulapb_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -937,7 +1050,7 @@ func (x *SendBungeeCommandResponse) String() string { func (*SendBungeeCommandResponse) ProtoMessage() {} func (x *SendBungeeCommandResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[15] + mi := &file_nebulapb_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -950,7 +1063,7 @@ func (x *SendBungeeCommandResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SendBungeeCommandResponse.ProtoReflect.Descriptor instead. func (*SendBungeeCommandResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{15} + return file_nebulapb_proto_rawDescGZIP(), []int{16} } type SetMotdRequest struct { @@ -964,7 +1077,7 @@ type SetMotdRequest struct { func (x *SetMotdRequest) Reset() { *x = SetMotdRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[16] + mi := &file_nebulapb_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -977,7 +1090,7 @@ func (x *SetMotdRequest) String() string { func (*SetMotdRequest) ProtoMessage() {} func (x *SetMotdRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[16] + mi := &file_nebulapb_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -990,7 +1103,7 @@ func (x *SetMotdRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetMotdRequest.ProtoReflect.Descriptor instead. func (*SetMotdRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{16} + return file_nebulapb_proto_rawDescGZIP(), []int{17} } func (x *SetMotdRequest) GetMotd() string { @@ -1009,7 +1122,7 @@ type SetMotdResponse struct { func (x *SetMotdResponse) Reset() { *x = SetMotdResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[17] + mi := &file_nebulapb_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1022,7 +1135,7 @@ func (x *SetMotdResponse) String() string { func (*SetMotdResponse) ProtoMessage() {} func (x *SetMotdResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[17] + mi := &file_nebulapb_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1035,7 +1148,7 @@ func (x *SetMotdResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetMotdResponse.ProtoReflect.Descriptor instead. func (*SetMotdResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{17} + return file_nebulapb_proto_rawDescGZIP(), []int{18} } type SetFaviconRequest struct { @@ -1049,7 +1162,7 @@ type SetFaviconRequest struct { func (x *SetFaviconRequest) Reset() { *x = SetFaviconRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[18] + mi := &file_nebulapb_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1062,7 +1175,7 @@ func (x *SetFaviconRequest) String() string { func (*SetFaviconRequest) ProtoMessage() {} func (x *SetFaviconRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[18] + mi := &file_nebulapb_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1075,7 +1188,7 @@ func (x *SetFaviconRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetFaviconRequest.ProtoReflect.Descriptor instead. func (*SetFaviconRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{18} + return file_nebulapb_proto_rawDescGZIP(), []int{19} } func (x *SetFaviconRequest) GetFavicon() string { @@ -1094,7 +1207,7 @@ type SetFaviconResponse struct { func (x *SetFaviconResponse) Reset() { *x = SetFaviconResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[19] + mi := &file_nebulapb_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1107,7 +1220,7 @@ func (x *SetFaviconResponse) String() string { func (*SetFaviconResponse) ProtoMessage() {} func (x *SetFaviconResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[19] + mi := &file_nebulapb_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1120,7 +1233,7 @@ func (x *SetFaviconResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetFaviconResponse.ProtoReflect.Descriptor instead. func (*SetFaviconResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{19} + return file_nebulapb_proto_rawDescGZIP(), []int{20} } type SetLockdownRequest struct { @@ -1135,7 +1248,7 @@ type SetLockdownRequest struct { func (x *SetLockdownRequest) Reset() { *x = SetLockdownRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[20] + mi := &file_nebulapb_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1148,7 +1261,7 @@ func (x *SetLockdownRequest) String() string { func (*SetLockdownRequest) ProtoMessage() {} func (x *SetLockdownRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[20] + mi := &file_nebulapb_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1161,7 +1274,7 @@ func (x *SetLockdownRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetLockdownRequest.ProtoReflect.Descriptor instead. func (*SetLockdownRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{20} + return file_nebulapb_proto_rawDescGZIP(), []int{21} } func (x *SetLockdownRequest) GetName() string { @@ -1189,7 +1302,7 @@ type SetLockdownResponse struct { func (x *SetLockdownResponse) Reset() { *x = SetLockdownResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[21] + mi := &file_nebulapb_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1202,7 +1315,7 @@ func (x *SetLockdownResponse) String() string { func (*SetLockdownResponse) ProtoMessage() {} func (x *SetLockdownResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[21] + mi := &file_nebulapb_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1215,7 +1328,7 @@ func (x *SetLockdownResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetLockdownResponse.ProtoReflect.Descriptor instead. func (*SetLockdownResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{21} + return file_nebulapb_proto_rawDescGZIP(), []int{22} } func (x *SetLockdownResponse) GetEntry() *ServerEntry { @@ -1240,7 +1353,7 @@ type IPLookupResult struct { func (x *IPLookupResult) Reset() { *x = IPLookupResult{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[22] + mi := &file_nebulapb_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1253,7 +1366,7 @@ func (x *IPLookupResult) String() string { func (*IPLookupResult) ProtoMessage() {} func (x *IPLookupResult) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[22] + mi := &file_nebulapb_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1266,7 +1379,7 @@ func (x *IPLookupResult) ProtoReflect() protoreflect.Message { // Deprecated: Use IPLookupResult.ProtoReflect.Descriptor instead. func (*IPLookupResult) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{22} + return file_nebulapb_proto_rawDescGZIP(), []int{23} } func (x *IPLookupResult) GetIpAddress() string { @@ -1308,7 +1421,7 @@ type IPLookupRequest struct { func (x *IPLookupRequest) Reset() { *x = IPLookupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[23] + mi := &file_nebulapb_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1321,7 +1434,7 @@ func (x *IPLookupRequest) String() string { func (*IPLookupRequest) ProtoMessage() {} func (x *IPLookupRequest) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[23] + mi := &file_nebulapb_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1334,7 +1447,7 @@ func (x *IPLookupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use IPLookupRequest.ProtoReflect.Descriptor instead. func (*IPLookupRequest) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{23} + return file_nebulapb_proto_rawDescGZIP(), []int{24} } func (x *IPLookupRequest) GetIpAddress() string { @@ -1355,7 +1468,7 @@ type IPLookupResponse struct { func (x *IPLookupResponse) Reset() { *x = IPLookupResponse{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[24] + mi := &file_nebulapb_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1368,7 +1481,7 @@ func (x *IPLookupResponse) String() string { func (*IPLookupResponse) ProtoMessage() {} func (x *IPLookupResponse) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[24] + mi := &file_nebulapb_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1381,7 +1494,7 @@ func (x *IPLookupResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use IPLookupResponse.ProtoReflect.Descriptor instead. func (*IPLookupResponse) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{24} + return file_nebulapb_proto_rawDescGZIP(), []int{25} } func (x *IPLookupResponse) GetResult() *IPLookupResult { @@ -1391,32 +1504,34 @@ func (x *IPLookupResponse) GetResult() *IPLookupResult { return nil } -type ServerStatus_Version struct { +// TabList +type PlayerProperty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Protocol int32 `protobuf:"varint,2,opt,name=protocol,proto3" json:"protocol,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` } -func (x *ServerStatus_Version) Reset() { - *x = ServerStatus_Version{} +func (x *PlayerProperty) Reset() { + *x = PlayerProperty{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[25] + mi := &file_nebulapb_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ServerStatus_Version) String() string { +func (x *PlayerProperty) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ServerStatus_Version) ProtoMessage() {} +func (*PlayerProperty) ProtoMessage() {} -func (x *ServerStatus_Version) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[25] +func (x *PlayerProperty) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1427,38 +1542,527 @@ func (x *ServerStatus_Version) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ServerStatus_Version.ProtoReflect.Descriptor instead. -func (*ServerStatus_Version) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{3, 0} +// Deprecated: Use PlayerProperty.ProtoReflect.Descriptor instead. +func (*PlayerProperty) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{26} } -func (x *ServerStatus_Version) GetName() string { +func (x *PlayerProperty) GetName() string { if x != nil { return x.Name } return "" } -func (x *ServerStatus_Version) GetProtocol() int32 { +func (x *PlayerProperty) GetValue() string { if x != nil { - return x.Protocol + return x.Value } - return 0 + return "" } -type ServerStatus_Players struct { +func (x *PlayerProperty) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +type PlayerProfile struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Max int32 `protobuf:"varint,1,opt,name=max,proto3" json:"max,omitempty"` + PlayerUUID string `protobuf:"bytes,1,opt,name=playerUUID,proto3" json:"playerUUID,omitempty"` + PlayerName string `protobuf:"bytes,2,opt,name=playerName,proto3" json:"playerName,omitempty"` + PlayerLatency int64 `protobuf:"varint,3,opt,name=playerLatency,proto3" json:"playerLatency,omitempty"` + CurrentServer string `protobuf:"bytes,4,opt,name=currentServer,proto3" json:"currentServer,omitempty"` + Properties []*PlayerProperty `protobuf:"bytes,5,rep,name=properties,proto3" json:"properties,omitempty"` + Hide bool `protobuf:"varint,6,opt,name=hide,proto3" json:"hide,omitempty"` +} + +func (x *PlayerProfile) Reset() { + *x = PlayerProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerProfile) ProtoMessage() {} + +func (x *PlayerProfile) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[27] + 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 PlayerProfile.ProtoReflect.Descriptor instead. +func (*PlayerProfile) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{27} +} + +func (x *PlayerProfile) GetPlayerUUID() string { + if x != nil { + return x.PlayerUUID + } + return "" +} + +func (x *PlayerProfile) GetPlayerName() string { + if x != nil { + return x.PlayerName + } + return "" +} + +func (x *PlayerProfile) GetPlayerLatency() int64 { + if x != nil { + return x.PlayerLatency + } + return 0 +} + +func (x *PlayerProfile) GetCurrentServer() string { + if x != nil { + return x.CurrentServer + } + return "" +} + +func (x *PlayerProfile) GetProperties() []*PlayerProperty { + if x != nil { + return x.Properties + } + return nil +} + +func (x *PlayerProfile) GetHide() bool { + if x != nil { + return x.Hide + } + return false +} + +type PlayerLoginRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Profile *PlayerProfile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"` +} + +func (x *PlayerLoginRequest) Reset() { + *x = PlayerLoginRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerLoginRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerLoginRequest) ProtoMessage() {} + +func (x *PlayerLoginRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[28] + 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 PlayerLoginRequest.ProtoReflect.Descriptor instead. +func (*PlayerLoginRequest) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{28} +} + +func (x *PlayerLoginRequest) GetProfile() *PlayerProfile { + if x != nil { + return x.Profile + } + return nil +} + +type PlayerLoginResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PlayerLoginResponse) Reset() { + *x = PlayerLoginResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerLoginResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerLoginResponse) ProtoMessage() {} + +func (x *PlayerLoginResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[29] + 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 PlayerLoginResponse.ProtoReflect.Descriptor instead. +func (*PlayerLoginResponse) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{29} +} + +type PlayerQuitRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Profile *PlayerProfile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"` +} + +func (x *PlayerQuitRequest) Reset() { + *x = PlayerQuitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerQuitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerQuitRequest) ProtoMessage() {} + +func (x *PlayerQuitRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[30] + 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 PlayerQuitRequest.ProtoReflect.Descriptor instead. +func (*PlayerQuitRequest) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{30} +} + +func (x *PlayerQuitRequest) GetProfile() *PlayerProfile { + if x != nil { + return x.Profile + } + return nil +} + +type PlayerQuitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PlayerQuitResponse) Reset() { + *x = PlayerQuitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerQuitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerQuitResponse) ProtoMessage() {} + +func (x *PlayerQuitResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[31] + 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 PlayerQuitResponse.ProtoReflect.Descriptor instead. +func (*PlayerQuitResponse) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{31} +} + +type FetchAllPlayersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FetchAllPlayersRequest) Reset() { + *x = FetchAllPlayersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchAllPlayersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchAllPlayersRequest) ProtoMessage() {} + +func (x *FetchAllPlayersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[32] + 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 FetchAllPlayersRequest.ProtoReflect.Descriptor instead. +func (*FetchAllPlayersRequest) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{32} +} + +type FetchAllPlayersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Profiles []*PlayerProfile `protobuf:"bytes,1,rep,name=profiles,proto3" json:"profiles,omitempty"` +} + +func (x *FetchAllPlayersResponse) Reset() { + *x = FetchAllPlayersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchAllPlayersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchAllPlayersResponse) ProtoMessage() {} + +func (x *FetchAllPlayersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[33] + 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 FetchAllPlayersResponse.ProtoReflect.Descriptor instead. +func (*FetchAllPlayersResponse) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{33} +} + +func (x *FetchAllPlayersResponse) GetProfiles() []*PlayerProfile { + if x != nil { + return x.Profiles + } + return nil +} + +type UpdateAllPlayersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Profiles []*PlayerProfile `protobuf:"bytes,1,rep,name=profiles,proto3" json:"profiles,omitempty"` +} + +func (x *UpdateAllPlayersRequest) Reset() { + *x = UpdateAllPlayersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAllPlayersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAllPlayersRequest) ProtoMessage() {} + +func (x *UpdateAllPlayersRequest) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[34] + 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 UpdateAllPlayersRequest.ProtoReflect.Descriptor instead. +func (*UpdateAllPlayersRequest) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{34} +} + +func (x *UpdateAllPlayersRequest) GetProfiles() []*PlayerProfile { + if x != nil { + return x.Profiles + } + return nil +} + +type UpdateAllPlayersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateAllPlayersResponse) Reset() { + *x = UpdateAllPlayersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAllPlayersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAllPlayersResponse) ProtoMessage() {} + +func (x *UpdateAllPlayersResponse) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[35] + 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 UpdateAllPlayersResponse.ProtoReflect.Descriptor instead. +func (*UpdateAllPlayersResponse) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{35} +} + +type ServerStatus_Version struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Protocol int32 `protobuf:"varint,2,opt,name=protocol,proto3" json:"protocol,omitempty"` +} + +func (x *ServerStatus_Version) Reset() { + *x = ServerStatus_Version{} + if protoimpl.UnsafeEnabled { + mi := &file_nebulapb_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerStatus_Version) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerStatus_Version) ProtoMessage() {} + +func (x *ServerStatus_Version) ProtoReflect() protoreflect.Message { + mi := &file_nebulapb_proto_msgTypes[36] + 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 ServerStatus_Version.ProtoReflect.Descriptor instead. +func (*ServerStatus_Version) Descriptor() ([]byte, []int) { + return file_nebulapb_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *ServerStatus_Version) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ServerStatus_Version) GetProtocol() int32 { + if x != nil { + return x.Protocol + } + return 0 +} + +type ServerStatus_Players struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Max int32 `protobuf:"varint,1,opt,name=max,proto3" json:"max,omitempty"` Online int32 `protobuf:"varint,2,opt,name=online,proto3" json:"online,omitempty"` // should be have sample? } func (x *ServerStatus_Players) Reset() { *x = ServerStatus_Players{} if protoimpl.UnsafeEnabled { - mi := &file_nebulapb_proto_msgTypes[26] + mi := &file_nebulapb_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1471,7 +2075,7 @@ func (x *ServerStatus_Players) String() string { func (*ServerStatus_Players) ProtoMessage() {} func (x *ServerStatus_Players) ProtoReflect() protoreflect.Message { - mi := &file_nebulapb_proto_msgTypes[26] + mi := &file_nebulapb_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1484,7 +2088,7 @@ func (x *ServerStatus_Players) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerStatus_Players.ProtoReflect.Descriptor instead. func (*ServerStatus_Players) Descriptor() ([]byte, []int) { - return file_nebulapb_proto_rawDescGZIP(), []int{3, 1} + return file_nebulapb_proto_rawDescGZIP(), []int{4, 1} } func (x *ServerStatus_Players) GetMax() int32 { @@ -1505,185 +2109,266 @@ var File_nebulapb_proto protoreflect.FileDescriptor var file_nebulapb_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x08, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x22, 0x94, 0x01, 0x0a, 0x11, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x12, 0x08, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x22, 0xe4, 0x01, 0x0a, 0x16, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x2b, 0x0a, 0x04, 0x73, 0x6f, 0x6c, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x73, 0x6f, 0x6c, 0x6f, 0x12, 0x29, 0x0a, + 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x62, + 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x37, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x51, 0x55, 0x49, 0x54, 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x01, 0x12, 0x11, + 0x0a, 0x0d, 0x41, 0x44, 0x56, 0x45, 0x52, 0x54, 0x49, 0x53, 0x45, 0x5f, 0x41, 0x4c, 0x4c, 0x10, + 0x02, 0x22, 0x94, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, + 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, + 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x1c, 0x0a, 0x04, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x01, 0x22, 0x81, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6d, 0x6f, 0x74, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x74, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x2e, 0x0a, 0x08, + 0x6c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, + 0x77, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x2e, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, + 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x46, 0x0a, 0x08, + 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc6, 0x02, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x38, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, + 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, + 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x33, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x17, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x44, 0x0a, + 0x15, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x22, 0x18, 0x0a, 0x16, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, + 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1b, 0x0a, + 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x11, 0x42, + 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x22, 0x1c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x53, - 0x59, 0x4e, 0x43, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, - 0x01, 0x22, 0x81, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, - 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x74, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x74, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x2e, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, - 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, - 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, - 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x46, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, - 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc6, 0x02, - 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, - 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, - 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x38, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, - 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x1a, 0x33, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, - 0x6d, 0x61, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x45, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, - 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x44, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x18, 0x0a, 0x16, - 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x11, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, - 0x70, 0x62, 0x2e, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x1d, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, - 0x0a, 0x04, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4d, 0x4d, - 0x41, 0x4e, 0x44, 0x10, 0x01, 0x22, 0x3b, 0x0a, 0x0b, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x74, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x74, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x76, 0x69, - 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x76, 0x69, 0x63, - 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x16, 0x47, - 0x65, 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, - 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x22, 0x34, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x53, 0x65, 0x6e, 0x64, - 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x74, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x74, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x74, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x53, - 0x65, 0x74, 0x4d, 0x6f, 0x74, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, - 0x0a, 0x11, 0x53, 0x65, 0x74, 0x46, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x14, 0x0a, - 0x12, 0x53, 0x65, 0x74, 0x46, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x58, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, - 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, - 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x64, - 0x6f, 0x77, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x42, 0x0a, - 0x13, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x22, 0x7c, 0x0a, 0x0e, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x73, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x69, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x53, 0x75, 0x73, 0x70, 0x69, 0x63, 0x69, - 0x6f, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x53, 0x75, 0x73, - 0x70, 0x69, 0x63, 0x69, 0x6f, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, - 0x2f, 0x0a, 0x0f, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x44, 0x0a, 0x10, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, - 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0xed, 0x05, 0x0a, 0x06, 0x4e, 0x65, 0x62, 0x75, 0x6c, - 0x61, 0x12, 0x55, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x62, - 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, - 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x5e, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, - 0x61, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x55, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, + 0x2e, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x1d, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4d, 0x4d, 0x41, 0x4e, 0x44, 0x10, 0x01, 0x22, 0x3b, 0x0a, 0x0b, + 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6d, + 0x6f, 0x74, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x74, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x75, - 0x6e, 0x67, 0x65, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x6e, 0x65, - 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x75, 0x6e, 0x67, 0x65, - 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, - 0x75, 0x6e, 0x67, 0x65, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x74, - 0x64, 0x12, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, - 0x4d, 0x6f, 0x74, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, 0x65, - 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x74, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x46, - 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, - 0x62, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, - 0x65, 0x74, 0x46, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, - 0x77, 0x6e, 0x12, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, + 0x73, 0x74, 0x22, 0x45, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, + 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x34, 0x0a, 0x18, 0x53, 0x65, 0x6e, + 0x64, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, + 0x1b, 0x0a, 0x19, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, 0x0e, + 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x74, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6d, 0x6f, 0x74, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, + 0x74, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x74, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x46, 0x61, 0x76, 0x69, + 0x63, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, + 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x76, + 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x14, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x46, 0x61, 0x76, 0x69, 0x63, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x4c, - 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x43, 0x0a, 0x08, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x19, 0x2e, - 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, - 0x61, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x34, 0x0a, 0x18, 0x6e, 0x65, 0x74, 0x2e, 0x73, 0x79, - 0x6e, 0x63, 0x68, 0x74, 0x68, 0x69, 0x61, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, 0x61, - 0x70, 0x69, 0x42, 0x0c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x5a, 0x0a, 0x2e, 0x2f, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, + 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, + 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x42, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x64, + 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x65, 0x62, + 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x7c, 0x0a, 0x0e, 0x49, 0x50, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x70, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x73, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, + 0x53, 0x75, 0x73, 0x70, 0x69, 0x63, 0x69, 0x6f, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x69, 0x73, 0x53, 0x75, 0x73, 0x70, 0x69, 0x63, 0x69, 0x6f, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x0f, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x70, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x70, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x44, 0x0a, 0x10, 0x49, 0x50, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, + 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x58, 0x0a, + 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xe9, 0x01, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x55, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x55, 0x55, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, + 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x75, + 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x69, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x68, + 0x69, 0x64, 0x65, 0x22, 0x47, 0x0a, 0x12, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x62, + 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x15, 0x0a, 0x13, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x46, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x51, 0x75, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x62, 0x75, + 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x18, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a, 0x17, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, + 0x61, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x17, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, + 0x61, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbd, 0x08, 0x0a, 0x06, 0x4e, 0x65, 0x62, 0x75, + 0x6c, 0x61, 0x12, 0x55, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0e, 0x41, 0x64, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x6e, 0x65, + 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, + 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x5e, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, + 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x75, + 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x55, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, 0x42, + 0x75, 0x6e, 0x67, 0x65, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x6e, + 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x42, 0x75, 0x6e, 0x67, + 0x65, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x42, 0x75, 0x6e, 0x67, 0x65, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x4d, 0x6f, + 0x74, 0x64, 0x12, 0x18, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, + 0x74, 0x4d, 0x6f, 0x74, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6e, + 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x6f, 0x74, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x53, 0x65, 0x74, + 0x46, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, + 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, + 0x53, 0x65, 0x74, 0x46, 0x61, 0x76, 0x69, 0x63, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x64, + 0x6f, 0x77, 0x6e, 0x12, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, + 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, + 0x4c, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x43, 0x0a, 0x08, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x12, 0x19, + 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6e, 0x65, 0x62, 0x75, + 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x49, 0x50, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, + 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x51, + 0x75, 0x69, 0x74, 0x12, 0x1b, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x58, 0x0a, 0x0f, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, + 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x21, + 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x41, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x34, 0x0a, 0x18, 0x6e, 0x65, 0x74, 0x2e, 0x73, + 0x79, 0x6e, 0x63, 0x68, 0x74, 0x68, 0x69, 0x61, 0x2e, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x2e, + 0x61, 0x70, 0x69, 0x42, 0x0c, 0x4e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x5a, 0x0a, 0x2e, 0x2f, 0x6e, 0x65, 0x62, 0x75, 0x6c, 0x61, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1698,77 +2383,105 @@ func file_nebulapb_proto_rawDescGZIP() []byte { return file_nebulapb_proto_rawDescData } -var file_nebulapb_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_nebulapb_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_nebulapb_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_nebulapb_proto_msgTypes = make([]protoimpl.MessageInfo, 38) var file_nebulapb_proto_goTypes = []interface{}{ - (ServerEntryStream_Type)(0), // 0: nebulapb.ServerEntryStream.Type - (BungeeEntryStream_Type)(0), // 1: nebulapb.BungeeEntryStream.Type - (*ServerEntryStream)(nil), // 2: nebulapb.ServerEntryStream - (*ServerEntry)(nil), // 3: nebulapb.ServerEntry - (*Lockdown)(nil), // 4: nebulapb.Lockdown - (*ServerStatus)(nil), // 5: nebulapb.ServerStatus - (*GetServerEntryRequest)(nil), // 6: nebulapb.GetServerEntryRequest - (*GetServerEntryResponse)(nil), // 7: nebulapb.GetServerEntryResponse - (*AddServerEntryRequest)(nil), // 8: nebulapb.AddServerEntryRequest - (*AddServerEntryResponse)(nil), // 9: nebulapb.AddServerEntryResponse - (*RemoveServerEntryRequest)(nil), // 10: nebulapb.RemoveServerEntryRequest - (*RemoveServerEntryResponse)(nil), // 11: nebulapb.RemoveServerEntryResponse - (*BungeeEntryStream)(nil), // 12: nebulapb.BungeeEntryStream - (*BungeeEntry)(nil), // 13: nebulapb.BungeeEntry - (*GetBungeeEntryRequest)(nil), // 14: nebulapb.GetBungeeEntryRequest - (*GetBungeeEntryResponse)(nil), // 15: nebulapb.GetBungeeEntryResponse - (*SendBungeeCommandRequest)(nil), // 16: nebulapb.SendBungeeCommandRequest - (*SendBungeeCommandResponse)(nil), // 17: nebulapb.SendBungeeCommandResponse - (*SetMotdRequest)(nil), // 18: nebulapb.SetMotdRequest - (*SetMotdResponse)(nil), // 19: nebulapb.SetMotdResponse - (*SetFaviconRequest)(nil), // 20: nebulapb.SetFaviconRequest - (*SetFaviconResponse)(nil), // 21: nebulapb.SetFaviconResponse - (*SetLockdownRequest)(nil), // 22: nebulapb.SetLockdownRequest - (*SetLockdownResponse)(nil), // 23: nebulapb.SetLockdownResponse - (*IPLookupResult)(nil), // 24: nebulapb.IPLookupResult - (*IPLookupRequest)(nil), // 25: nebulapb.IPLookupRequest - (*IPLookupResponse)(nil), // 26: nebulapb.IPLookupResponse - (*ServerStatus_Version)(nil), // 27: nebulapb.ServerStatus.Version - (*ServerStatus_Players)(nil), // 28: nebulapb.ServerStatus.Players + (PlayerPropertiesStream_Type)(0), // 0: nebulapb.PlayerPropertiesStream.Type + (ServerEntryStream_Type)(0), // 1: nebulapb.ServerEntryStream.Type + (BungeeEntryStream_Type)(0), // 2: nebulapb.BungeeEntryStream.Type + (*PlayerPropertiesStream)(nil), // 3: nebulapb.PlayerPropertiesStream + (*ServerEntryStream)(nil), // 4: nebulapb.ServerEntryStream + (*ServerEntry)(nil), // 5: nebulapb.ServerEntry + (*Lockdown)(nil), // 6: nebulapb.Lockdown + (*ServerStatus)(nil), // 7: nebulapb.ServerStatus + (*GetServerEntryRequest)(nil), // 8: nebulapb.GetServerEntryRequest + (*GetServerEntryResponse)(nil), // 9: nebulapb.GetServerEntryResponse + (*AddServerEntryRequest)(nil), // 10: nebulapb.AddServerEntryRequest + (*AddServerEntryResponse)(nil), // 11: nebulapb.AddServerEntryResponse + (*RemoveServerEntryRequest)(nil), // 12: nebulapb.RemoveServerEntryRequest + (*RemoveServerEntryResponse)(nil), // 13: nebulapb.RemoveServerEntryResponse + (*BungeeEntryStream)(nil), // 14: nebulapb.BungeeEntryStream + (*BungeeEntry)(nil), // 15: nebulapb.BungeeEntry + (*GetBungeeEntryRequest)(nil), // 16: nebulapb.GetBungeeEntryRequest + (*GetBungeeEntryResponse)(nil), // 17: nebulapb.GetBungeeEntryResponse + (*SendBungeeCommandRequest)(nil), // 18: nebulapb.SendBungeeCommandRequest + (*SendBungeeCommandResponse)(nil), // 19: nebulapb.SendBungeeCommandResponse + (*SetMotdRequest)(nil), // 20: nebulapb.SetMotdRequest + (*SetMotdResponse)(nil), // 21: nebulapb.SetMotdResponse + (*SetFaviconRequest)(nil), // 22: nebulapb.SetFaviconRequest + (*SetFaviconResponse)(nil), // 23: nebulapb.SetFaviconResponse + (*SetLockdownRequest)(nil), // 24: nebulapb.SetLockdownRequest + (*SetLockdownResponse)(nil), // 25: nebulapb.SetLockdownResponse + (*IPLookupResult)(nil), // 26: nebulapb.IPLookupResult + (*IPLookupRequest)(nil), // 27: nebulapb.IPLookupRequest + (*IPLookupResponse)(nil), // 28: nebulapb.IPLookupResponse + (*PlayerProperty)(nil), // 29: nebulapb.PlayerProperty + (*PlayerProfile)(nil), // 30: nebulapb.PlayerProfile + (*PlayerLoginRequest)(nil), // 31: nebulapb.PlayerLoginRequest + (*PlayerLoginResponse)(nil), // 32: nebulapb.PlayerLoginResponse + (*PlayerQuitRequest)(nil), // 33: nebulapb.PlayerQuitRequest + (*PlayerQuitResponse)(nil), // 34: nebulapb.PlayerQuitResponse + (*FetchAllPlayersRequest)(nil), // 35: nebulapb.FetchAllPlayersRequest + (*FetchAllPlayersResponse)(nil), // 36: nebulapb.FetchAllPlayersResponse + (*UpdateAllPlayersRequest)(nil), // 37: nebulapb.UpdateAllPlayersRequest + (*UpdateAllPlayersResponse)(nil), // 38: nebulapb.UpdateAllPlayersResponse + (*ServerStatus_Version)(nil), // 39: nebulapb.ServerStatus.Version + (*ServerStatus_Players)(nil), // 40: nebulapb.ServerStatus.Players } var file_nebulapb_proto_depIdxs = []int32{ - 0, // 0: nebulapb.ServerEntryStream.type:type_name -> nebulapb.ServerEntryStream.Type - 3, // 1: nebulapb.ServerEntryStream.entry:type_name -> nebulapb.ServerEntry - 4, // 2: nebulapb.ServerEntry.lockdown:type_name -> nebulapb.Lockdown - 5, // 3: nebulapb.ServerEntry.status:type_name -> nebulapb.ServerStatus - 27, // 4: nebulapb.ServerStatus.version:type_name -> nebulapb.ServerStatus.Version - 28, // 5: nebulapb.ServerStatus.players:type_name -> nebulapb.ServerStatus.Players - 3, // 6: nebulapb.GetServerEntryResponse.entry:type_name -> nebulapb.ServerEntry - 3, // 7: nebulapb.AddServerEntryRequest.entry:type_name -> nebulapb.ServerEntry - 1, // 8: nebulapb.BungeeEntryStream.type:type_name -> nebulapb.BungeeEntryStream.Type - 13, // 9: nebulapb.BungeeEntryStream.entry:type_name -> nebulapb.BungeeEntry - 13, // 10: nebulapb.GetBungeeEntryResponse.entry:type_name -> nebulapb.BungeeEntry - 4, // 11: nebulapb.SetLockdownRequest.lockdown:type_name -> nebulapb.Lockdown - 3, // 12: nebulapb.SetLockdownResponse.entry:type_name -> nebulapb.ServerEntry - 24, // 13: nebulapb.IPLookupResponse.result:type_name -> nebulapb.IPLookupResult - 6, // 14: nebulapb.Nebula.GetServerEntry:input_type -> nebulapb.GetServerEntryRequest - 8, // 15: nebulapb.Nebula.AddServerEntry:input_type -> nebulapb.AddServerEntryRequest - 10, // 16: nebulapb.Nebula.RemoveServerEntry:input_type -> nebulapb.RemoveServerEntryRequest - 14, // 17: nebulapb.Nebula.GetBungeeEntry:input_type -> nebulapb.GetBungeeEntryRequest - 16, // 18: nebulapb.Nebula.SendBungeeCommand:input_type -> nebulapb.SendBungeeCommandRequest - 18, // 19: nebulapb.Nebula.SetMotd:input_type -> nebulapb.SetMotdRequest - 20, // 20: nebulapb.Nebula.SetFavicon:input_type -> nebulapb.SetFaviconRequest - 22, // 21: nebulapb.Nebula.SetLockdown:input_type -> nebulapb.SetLockdownRequest - 25, // 22: nebulapb.Nebula.IPLookup:input_type -> nebulapb.IPLookupRequest - 7, // 23: nebulapb.Nebula.GetServerEntry:output_type -> nebulapb.GetServerEntryResponse - 9, // 24: nebulapb.Nebula.AddServerEntry:output_type -> nebulapb.AddServerEntryResponse - 11, // 25: nebulapb.Nebula.RemoveServerEntry:output_type -> nebulapb.RemoveServerEntryResponse - 15, // 26: nebulapb.Nebula.GetBungeeEntry:output_type -> nebulapb.GetBungeeEntryResponse - 17, // 27: nebulapb.Nebula.SendBungeeCommand:output_type -> nebulapb.SendBungeeCommandResponse - 19, // 28: nebulapb.Nebula.SetMotd:output_type -> nebulapb.SetMotdResponse - 21, // 29: nebulapb.Nebula.SetFavicon:output_type -> nebulapb.SetFaviconResponse - 23, // 30: nebulapb.Nebula.SetLockdown:output_type -> nebulapb.SetLockdownResponse - 26, // 31: nebulapb.Nebula.IPLookup:output_type -> nebulapb.IPLookupResponse - 23, // [23:32] is the sub-list for method output_type - 14, // [14:23] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 0, // 0: nebulapb.PlayerPropertiesStream.type:type_name -> nebulapb.PlayerPropertiesStream.Type + 30, // 1: nebulapb.PlayerPropertiesStream.solo:type_name -> nebulapb.PlayerProfile + 30, // 2: nebulapb.PlayerPropertiesStream.all:type_name -> nebulapb.PlayerProfile + 1, // 3: nebulapb.ServerEntryStream.type:type_name -> nebulapb.ServerEntryStream.Type + 5, // 4: nebulapb.ServerEntryStream.entry:type_name -> nebulapb.ServerEntry + 6, // 5: nebulapb.ServerEntry.lockdown:type_name -> nebulapb.Lockdown + 7, // 6: nebulapb.ServerEntry.status:type_name -> nebulapb.ServerStatus + 39, // 7: nebulapb.ServerStatus.version:type_name -> nebulapb.ServerStatus.Version + 40, // 8: nebulapb.ServerStatus.players:type_name -> nebulapb.ServerStatus.Players + 5, // 9: nebulapb.GetServerEntryResponse.entry:type_name -> nebulapb.ServerEntry + 5, // 10: nebulapb.AddServerEntryRequest.entry:type_name -> nebulapb.ServerEntry + 2, // 11: nebulapb.BungeeEntryStream.type:type_name -> nebulapb.BungeeEntryStream.Type + 15, // 12: nebulapb.BungeeEntryStream.entry:type_name -> nebulapb.BungeeEntry + 15, // 13: nebulapb.GetBungeeEntryResponse.entry:type_name -> nebulapb.BungeeEntry + 6, // 14: nebulapb.SetLockdownRequest.lockdown:type_name -> nebulapb.Lockdown + 5, // 15: nebulapb.SetLockdownResponse.entry:type_name -> nebulapb.ServerEntry + 26, // 16: nebulapb.IPLookupResponse.result:type_name -> nebulapb.IPLookupResult + 29, // 17: nebulapb.PlayerProfile.properties:type_name -> nebulapb.PlayerProperty + 30, // 18: nebulapb.PlayerLoginRequest.profile:type_name -> nebulapb.PlayerProfile + 30, // 19: nebulapb.PlayerQuitRequest.profile:type_name -> nebulapb.PlayerProfile + 30, // 20: nebulapb.FetchAllPlayersResponse.profiles:type_name -> nebulapb.PlayerProfile + 30, // 21: nebulapb.UpdateAllPlayersRequest.profiles:type_name -> nebulapb.PlayerProfile + 8, // 22: nebulapb.Nebula.GetServerEntry:input_type -> nebulapb.GetServerEntryRequest + 10, // 23: nebulapb.Nebula.AddServerEntry:input_type -> nebulapb.AddServerEntryRequest + 12, // 24: nebulapb.Nebula.RemoveServerEntry:input_type -> nebulapb.RemoveServerEntryRequest + 16, // 25: nebulapb.Nebula.GetBungeeEntry:input_type -> nebulapb.GetBungeeEntryRequest + 18, // 26: nebulapb.Nebula.SendBungeeCommand:input_type -> nebulapb.SendBungeeCommandRequest + 20, // 27: nebulapb.Nebula.SetMotd:input_type -> nebulapb.SetMotdRequest + 22, // 28: nebulapb.Nebula.SetFavicon:input_type -> nebulapb.SetFaviconRequest + 24, // 29: nebulapb.Nebula.SetLockdown:input_type -> nebulapb.SetLockdownRequest + 27, // 30: nebulapb.Nebula.IPLookup:input_type -> nebulapb.IPLookupRequest + 31, // 31: nebulapb.Nebula.PlayerLogin:input_type -> nebulapb.PlayerLoginRequest + 33, // 32: nebulapb.Nebula.PlayerQuit:input_type -> nebulapb.PlayerQuitRequest + 35, // 33: nebulapb.Nebula.FetchAllPlayers:input_type -> nebulapb.FetchAllPlayersRequest + 37, // 34: nebulapb.Nebula.UpdateAllPlayers:input_type -> nebulapb.UpdateAllPlayersRequest + 9, // 35: nebulapb.Nebula.GetServerEntry:output_type -> nebulapb.GetServerEntryResponse + 11, // 36: nebulapb.Nebula.AddServerEntry:output_type -> nebulapb.AddServerEntryResponse + 13, // 37: nebulapb.Nebula.RemoveServerEntry:output_type -> nebulapb.RemoveServerEntryResponse + 17, // 38: nebulapb.Nebula.GetBungeeEntry:output_type -> nebulapb.GetBungeeEntryResponse + 19, // 39: nebulapb.Nebula.SendBungeeCommand:output_type -> nebulapb.SendBungeeCommandResponse + 21, // 40: nebulapb.Nebula.SetMotd:output_type -> nebulapb.SetMotdResponse + 23, // 41: nebulapb.Nebula.SetFavicon:output_type -> nebulapb.SetFaviconResponse + 25, // 42: nebulapb.Nebula.SetLockdown:output_type -> nebulapb.SetLockdownResponse + 28, // 43: nebulapb.Nebula.IPLookup:output_type -> nebulapb.IPLookupResponse + 32, // 44: nebulapb.Nebula.PlayerLogin:output_type -> nebulapb.PlayerLoginResponse + 34, // 45: nebulapb.Nebula.PlayerQuit:output_type -> nebulapb.PlayerQuitResponse + 36, // 46: nebulapb.Nebula.FetchAllPlayers:output_type -> nebulapb.FetchAllPlayersResponse + 38, // 47: nebulapb.Nebula.UpdateAllPlayers:output_type -> nebulapb.UpdateAllPlayersResponse + 35, // [35:48] is the sub-list for method output_type + 22, // [22:35] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_nebulapb_proto_init() } @@ -1778,7 +2491,7 @@ func file_nebulapb_proto_init() { } if !protoimpl.UnsafeEnabled { file_nebulapb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerEntryStream); i { + switch v := v.(*PlayerPropertiesStream); i { case 0: return &v.state case 1: @@ -1790,7 +2503,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerEntry); i { + switch v := v.(*ServerEntryStream); i { case 0: return &v.state case 1: @@ -1802,7 +2515,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Lockdown); i { + switch v := v.(*ServerEntry); i { case 0: return &v.state case 1: @@ -1814,7 +2527,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerStatus); i { + switch v := v.(*Lockdown); i { case 0: return &v.state case 1: @@ -1826,7 +2539,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetServerEntryRequest); i { + switch v := v.(*ServerStatus); i { case 0: return &v.state case 1: @@ -1838,7 +2551,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetServerEntryResponse); i { + switch v := v.(*GetServerEntryRequest); i { case 0: return &v.state case 1: @@ -1850,7 +2563,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddServerEntryRequest); i { + switch v := v.(*GetServerEntryResponse); i { case 0: return &v.state case 1: @@ -1862,7 +2575,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddServerEntryResponse); i { + switch v := v.(*AddServerEntryRequest); i { case 0: return &v.state case 1: @@ -1874,7 +2587,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveServerEntryRequest); i { + switch v := v.(*AddServerEntryResponse); i { case 0: return &v.state case 1: @@ -1886,7 +2599,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveServerEntryResponse); i { + switch v := v.(*RemoveServerEntryRequest); i { case 0: return &v.state case 1: @@ -1898,7 +2611,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BungeeEntryStream); i { + switch v := v.(*RemoveServerEntryResponse); i { case 0: return &v.state case 1: @@ -1910,7 +2623,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BungeeEntry); i { + switch v := v.(*BungeeEntryStream); i { case 0: return &v.state case 1: @@ -1922,7 +2635,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBungeeEntryRequest); i { + switch v := v.(*BungeeEntry); i { case 0: return &v.state case 1: @@ -1934,7 +2647,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBungeeEntryResponse); i { + switch v := v.(*GetBungeeEntryRequest); i { case 0: return &v.state case 1: @@ -1946,7 +2659,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendBungeeCommandRequest); i { + switch v := v.(*GetBungeeEntryResponse); i { case 0: return &v.state case 1: @@ -1958,7 +2671,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendBungeeCommandResponse); i { + switch v := v.(*SendBungeeCommandRequest); i { case 0: return &v.state case 1: @@ -1970,7 +2683,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMotdRequest); i { + switch v := v.(*SendBungeeCommandResponse); i { case 0: return &v.state case 1: @@ -1982,7 +2695,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMotdResponse); i { + switch v := v.(*SetMotdRequest); i { case 0: return &v.state case 1: @@ -1994,7 +2707,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetFaviconRequest); i { + switch v := v.(*SetMotdResponse); i { case 0: return &v.state case 1: @@ -2006,7 +2719,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetFaviconResponse); i { + switch v := v.(*SetFaviconRequest); i { case 0: return &v.state case 1: @@ -2018,7 +2731,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetLockdownRequest); i { + switch v := v.(*SetFaviconResponse); i { case 0: return &v.state case 1: @@ -2030,7 +2743,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetLockdownResponse); i { + switch v := v.(*SetLockdownRequest); i { case 0: return &v.state case 1: @@ -2042,7 +2755,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IPLookupResult); i { + switch v := v.(*SetLockdownResponse); i { case 0: return &v.state case 1: @@ -2054,7 +2767,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IPLookupRequest); i { + switch v := v.(*IPLookupResult); i { case 0: return &v.state case 1: @@ -2066,7 +2779,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IPLookupResponse); i { + switch v := v.(*IPLookupRequest); i { case 0: return &v.state case 1: @@ -2078,7 +2791,7 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerStatus_Version); i { + switch v := v.(*IPLookupResponse); i { case 0: return &v.state case 1: @@ -2090,6 +2803,138 @@ func file_nebulapb_proto_init() { } } file_nebulapb_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerProperty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerLoginRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerLoginResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerQuitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlayerQuitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchAllPlayersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchAllPlayersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAllPlayersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAllPlayersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerStatus_Version); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_nebulapb_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerStatus_Players); i { case 0: return &v.state @@ -2107,8 +2952,8 @@ func file_nebulapb_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_nebulapb_proto_rawDesc, - NumEnums: 2, - NumMessages: 27, + NumEnums: 3, + NumMessages: 38, NumExtensions: 0, NumServices: 1, }, diff --git a/nebulapb/nebulapb.proto b/nebulapb/nebulapb.proto index 973ad89..c7dceda 100644 --- a/nebulapb/nebulapb.proto +++ b/nebulapb/nebulapb.proto @@ -34,6 +34,30 @@ service Nebula { // API <- Bungee / Server rpc IPLookup(IPLookupRequest) returns (IPLookupResponse) {} + + // API <- Velocity + rpc PlayerLogin(PlayerLoginRequest) returns (PlayerLoginResponse) {} + rpc PlayerQuit(PlayerQuitRequest) returns (PlayerQuitResponse) {} + rpc FetchAllPlayers(FetchAllPlayersRequest) + returns (FetchAllPlayersResponse) {} + rpc UpdateAllPlayers(UpdateAllPlayersRequest) + returns (UpdateAllPlayersResponse) {} +} + +//-- +// PlayerProfile Entry +//-- + +// PlayerPropertiesStream +message PlayerPropertiesStream { + enum Type { + JOIN_SOLO = 0; + QUIT_SOLO = 1; + ADVERTISE_ALL = 2; + } + Type type = 1; + PlayerProfile solo = 2; + repeated PlayerProfile all = 3; } //-- @@ -149,3 +173,33 @@ message IPLookupResult { message IPLookupRequest { string ipAddress = 1; } message IPLookupResponse { IPLookupResult result = 1; } + +// +// TabList +// +message PlayerProperty { + string name = 1; + string value = 2; + string signature = 3; +} + +message PlayerProfile { + string playerUUID = 1; + string playerName = 2; + int64 playerLatency = 3; + string currentServer = 4; + repeated PlayerProperty properties = 5; + bool hide = 6; +} + +message PlayerLoginRequest { PlayerProfile profile = 1; } +message PlayerLoginResponse {} + +message PlayerQuitRequest { PlayerProfile profile = 1; } +message PlayerQuitResponse {} + +message FetchAllPlayersRequest {} +message FetchAllPlayersResponse { repeated PlayerProfile profiles = 1; } + +message UpdateAllPlayersRequest { repeated PlayerProfile profiles = 1; } +message UpdateAllPlayersResponse {} diff --git a/nebulapb/nebulapb_grpc.pb.go b/nebulapb/nebulapb_grpc.pb.go index 7259c3b..9cf4fef 100644 --- a/nebulapb/nebulapb_grpc.pb.go +++ b/nebulapb/nebulapb_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.12 +// - protoc v5.27.2 // source: nebulapb.proto package nebulapb @@ -40,6 +40,11 @@ type NebulaClient interface { SetLockdown(ctx context.Context, in *SetLockdownRequest, opts ...grpc.CallOption) (*SetLockdownResponse, error) // API <- Bungee / Server IPLookup(ctx context.Context, in *IPLookupRequest, opts ...grpc.CallOption) (*IPLookupResponse, error) + // API <- Velocity + PlayerLogin(ctx context.Context, in *PlayerLoginRequest, opts ...grpc.CallOption) (*PlayerLoginResponse, error) + PlayerQuit(ctx context.Context, in *PlayerQuitRequest, opts ...grpc.CallOption) (*PlayerQuitResponse, error) + FetchAllPlayers(ctx context.Context, in *FetchAllPlayersRequest, opts ...grpc.CallOption) (*FetchAllPlayersResponse, error) + UpdateAllPlayers(ctx context.Context, in *UpdateAllPlayersRequest, opts ...grpc.CallOption) (*UpdateAllPlayersResponse, error) } type nebulaClient struct { @@ -131,6 +136,42 @@ func (c *nebulaClient) IPLookup(ctx context.Context, in *IPLookupRequest, opts . return out, nil } +func (c *nebulaClient) PlayerLogin(ctx context.Context, in *PlayerLoginRequest, opts ...grpc.CallOption) (*PlayerLoginResponse, error) { + out := new(PlayerLoginResponse) + err := c.cc.Invoke(ctx, "/nebulapb.Nebula/PlayerLogin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nebulaClient) PlayerQuit(ctx context.Context, in *PlayerQuitRequest, opts ...grpc.CallOption) (*PlayerQuitResponse, error) { + out := new(PlayerQuitResponse) + err := c.cc.Invoke(ctx, "/nebulapb.Nebula/PlayerQuit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nebulaClient) FetchAllPlayers(ctx context.Context, in *FetchAllPlayersRequest, opts ...grpc.CallOption) (*FetchAllPlayersResponse, error) { + out := new(FetchAllPlayersResponse) + err := c.cc.Invoke(ctx, "/nebulapb.Nebula/FetchAllPlayers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nebulaClient) UpdateAllPlayers(ctx context.Context, in *UpdateAllPlayersRequest, opts ...grpc.CallOption) (*UpdateAllPlayersResponse, error) { + out := new(UpdateAllPlayersResponse) + err := c.cc.Invoke(ctx, "/nebulapb.Nebula/UpdateAllPlayers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // NebulaServer is the server API for Nebula service. // All implementations should embed UnimplementedNebulaServer // for forward compatibility @@ -153,6 +194,11 @@ type NebulaServer interface { SetLockdown(context.Context, *SetLockdownRequest) (*SetLockdownResponse, error) // API <- Bungee / Server IPLookup(context.Context, *IPLookupRequest) (*IPLookupResponse, error) + // API <- Velocity + PlayerLogin(context.Context, *PlayerLoginRequest) (*PlayerLoginResponse, error) + PlayerQuit(context.Context, *PlayerQuitRequest) (*PlayerQuitResponse, error) + FetchAllPlayers(context.Context, *FetchAllPlayersRequest) (*FetchAllPlayersResponse, error) + UpdateAllPlayers(context.Context, *UpdateAllPlayersRequest) (*UpdateAllPlayersResponse, error) } // UnimplementedNebulaServer should be embedded to have forward compatible implementations. @@ -186,6 +232,18 @@ func (UnimplementedNebulaServer) SetLockdown(context.Context, *SetLockdownReques func (UnimplementedNebulaServer) IPLookup(context.Context, *IPLookupRequest) (*IPLookupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method IPLookup not implemented") } +func (UnimplementedNebulaServer) PlayerLogin(context.Context, *PlayerLoginRequest) (*PlayerLoginResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PlayerLogin not implemented") +} +func (UnimplementedNebulaServer) PlayerQuit(context.Context, *PlayerQuitRequest) (*PlayerQuitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PlayerQuit not implemented") +} +func (UnimplementedNebulaServer) FetchAllPlayers(context.Context, *FetchAllPlayersRequest) (*FetchAllPlayersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchAllPlayers not implemented") +} +func (UnimplementedNebulaServer) UpdateAllPlayers(context.Context, *UpdateAllPlayersRequest) (*UpdateAllPlayersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAllPlayers not implemented") +} // UnsafeNebulaServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NebulaServer will @@ -360,6 +418,78 @@ func _Nebula_IPLookup_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Nebula_PlayerLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PlayerLoginRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NebulaServer).PlayerLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nebulapb.Nebula/PlayerLogin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NebulaServer).PlayerLogin(ctx, req.(*PlayerLoginRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Nebula_PlayerQuit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PlayerQuitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NebulaServer).PlayerQuit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nebulapb.Nebula/PlayerQuit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NebulaServer).PlayerQuit(ctx, req.(*PlayerQuitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Nebula_FetchAllPlayers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchAllPlayersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NebulaServer).FetchAllPlayers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nebulapb.Nebula/FetchAllPlayers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NebulaServer).FetchAllPlayers(ctx, req.(*FetchAllPlayersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Nebula_UpdateAllPlayers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAllPlayersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NebulaServer).UpdateAllPlayers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nebulapb.Nebula/UpdateAllPlayers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NebulaServer).UpdateAllPlayers(ctx, req.(*UpdateAllPlayersRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Nebula_ServiceDesc is the grpc.ServiceDesc for Nebula service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -403,6 +533,22 @@ var Nebula_ServiceDesc = grpc.ServiceDesc{ MethodName: "IPLookup", Handler: _Nebula_IPLookup_Handler, }, + { + MethodName: "PlayerLogin", + Handler: _Nebula_PlayerLogin_Handler, + }, + { + MethodName: "PlayerQuit", + Handler: _Nebula_PlayerQuit_Handler, + }, + { + MethodName: "FetchAllPlayers", + Handler: _Nebula_FetchAllPlayers_Handler, + }, + { + MethodName: "UpdateAllPlayers", + Handler: _Nebula_UpdateAllPlayers_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "nebulapb.proto", diff --git a/server/grpc.go b/server/grpc.go index 0b46280..ceaf09a 100644 --- a/server/grpc.go +++ b/server/grpc.go @@ -11,6 +11,7 @@ import ( "github.com/sirupsen/logrus" "github.com/synchthia/nebula-api/database" + "github.com/synchthia/nebula-api/nebulapb" pb "github.com/synchthia/nebula-api/nebulapb" "github.com/synchthia/nebula-api/service" "github.com/synchthia/nebula-api/stream" @@ -185,6 +186,67 @@ func (s *grpcServer) IPLookup(ctx context.Context, e *pb.IPLookupRequest) (*pb.I } } +func (s *grpcServer) PlayerLogin(ctx context.Context, e *pb.PlayerLoginRequest) (*pb.PlayerLoginResponse, error) { + if err := stream.PublishPlayerProfile(nebulapb.PlayerPropertiesStream_JOIN_SOLO, e.Profile); err != nil { + return &pb.PlayerLoginResponse{}, err + } + + if _, err := s.svc.MySQL.SyncPlayer(database.PlayersFromProtobuf(e.Profile), nil); err != nil { + return &pb.PlayerLoginResponse{}, err + } + + return &pb.PlayerLoginResponse{}, nil +} + +func (s *grpcServer) PlayerQuit(ctx context.Context, e *pb.PlayerQuitRequest) (*pb.PlayerQuitResponse, error) { + quit, err := s.svc.MySQL.SyncPlayer(database.PlayersFromProtobuf(e.Profile), &database.UpdateOption{IsQuit: true}) + if err != nil { + return &pb.PlayerQuitResponse{}, err + } + + if quit { + if err := stream.PublishPlayerProfile(nebulapb.PlayerPropertiesStream_QUIT_SOLO, e.Profile); err != nil { + return &pb.PlayerQuitResponse{}, err + } + } + + return &pb.PlayerQuitResponse{}, nil +} + +func (s *grpcServer) FetchAllPlayers(ctx context.Context, e *pb.FetchAllPlayersRequest) (*pb.FetchAllPlayersResponse, error) { + r, err := s.svc.MySQL.GetAllPlayers() + if err != nil { + return nil, err + } + + var resp []*pb.PlayerProfile + for _, r := range r { + resp = append(resp, r.ToProtobuf()) + } + + return &pb.FetchAllPlayersResponse{ + Profiles: resp, + }, nil +} + +func (s *grpcServer) UpdateAllPlayers(ctx context.Context, e *pb.UpdateAllPlayersRequest) (*pb.UpdateAllPlayersResponse, error) { + var profiles []database.Players + + if len(e.Profiles) == 0 { + return &pb.UpdateAllPlayersResponse{}, nil + } + + if err := stream.PublicAllPlayerProfile(nebulapb.PlayerPropertiesStream_ADVERTISE_ALL, e.Profiles); err != nil { + return &pb.UpdateAllPlayersResponse{}, err + } + + for _, profile := range e.Profiles { + profiles = append(profiles, *database.PlayersFromProtobuf(profile)) + } + + return &pb.UpdateAllPlayersResponse{}, s.svc.MySQL.UpdateAllPlayers(profiles) +} + func (s *grpcServer) BungeeEntry_DBtoPB(dbEntry database.Bungee) *pb.BungeeEntry { return &pb.BungeeEntry{ Motd: dbEntry.Motd, diff --git a/stream/player.go b/stream/player.go new file mode 100644 index 0000000..23c47ad --- /dev/null +++ b/stream/player.go @@ -0,0 +1,59 @@ +package stream + +import ( + "encoding/json" + "errors" + + "github.com/sirupsen/logrus" + "github.com/synchthia/nebula-api/nebulapb" +) + +// PublishPlayerProfile - Stream for tablist +func PublishPlayerProfile(streamType nebulapb.PlayerPropertiesStream_Type, data *nebulapb.PlayerProfile) error { + c := pool.Get() + defer c.Close() + + if streamType != nebulapb.PlayerPropertiesStream_JOIN_SOLO && streamType != nebulapb.PlayerPropertiesStream_QUIT_SOLO { + return errors.New("seriously?") + } + + d := &nebulapb.PlayerPropertiesStream{ + Type: streamType, + Solo: data, + } + + serialized, _ := json.Marshal(&d) + logrus.Debugln(d) + + _, err := c.Do("PUBLISH", "nebula.player.global", string(serialized)) + if err != nil { + logrus.WithError(err).Errorf("[Publish] Failed Publish Player Profile") + return err + } + return nil +} + +// PublishAllPlayerProfile +func PublicAllPlayerProfile(streamType nebulapb.PlayerPropertiesStream_Type, data []*nebulapb.PlayerProfile) error { + c := pool.Get() + defer c.Close() + + if streamType != nebulapb.PlayerPropertiesStream_ADVERTISE_ALL { + return errors.New("seriously?") + } + + d := &nebulapb.PlayerPropertiesStream{ + Type: streamType, + All: data, + } + + serialized, _ := json.Marshal(&d) + logrus.Debugln(d) + + _, err := c.Do("PUBLISH", "nebula.player.global", string(serialized)) + if err != nil { + logrus.WithError(err).Errorf("[Publish] Failed Publish Player Profile") + return err + } + return nil +}