From 0d318ba158b15ffa709924550b0272e3a9c3f765 Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 15:41:36 +0000 Subject: [PATCH 01/10] defined roles and helper commands --- pkg/db/db.go | 8 ++++++-- pkg/teamserver/roles/roles.go | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 pkg/teamserver/roles/roles.go diff --git a/pkg/db/db.go b/pkg/db/db.go index 590c03e..7a40036 100644 --- a/pkg/db/db.go +++ b/pkg/db/db.go @@ -5,6 +5,7 @@ import ( "github.com/google/uuid" "github.com/pygrum/monarch/pkg/config" "github.com/pygrum/monarch/pkg/log" + "github.com/pygrum/monarch/pkg/teamserver/roles" "gorm.io/driver/mysql" "gorm.io/gorm" "gorm.io/gorm/logger" @@ -33,8 +34,11 @@ func Initialize() string { uid := uuid.New().String() consoleUser := &Player{} if db.Where("username = ?", "console").First(consoleUser); len(consoleUser.UUID) == 0 { - consoleUser.UUID = uid - consoleUser.Username = "console" + consoleUser = &Player{ + UUID: uid, + Username: "console", + Role: roles.RoleAdmin, + } if result := db.Create(consoleUser); result.Error != nil { l.Fatal("could not create default 'console' user: %v", result.Error) } diff --git a/pkg/teamserver/roles/roles.go b/pkg/teamserver/roles/roles.go new file mode 100644 index 0000000..3258a66 --- /dev/null +++ b/pkg/teamserver/roles/roles.go @@ -0,0 +1 @@ +package roles From 2aee07d7bcfe29524af7884e164baba8a00ea0af Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 15:42:42 +0000 Subject: [PATCH 02/10] prevent players from performing admin actions, only allow admins or owners to delete their created assets --- pkg/db/models.go | 3 ++ pkg/teamserver/teamserver.go | 84 +++++++++++++++++++++++++++++------- 2 files changed, 71 insertions(+), 16 deletions(-) diff --git a/pkg/db/models.go b/pkg/db/models.go index da76d07..56a923e 100644 --- a/pkg/db/models.go +++ b/pkg/db/models.go @@ -1,6 +1,7 @@ package db import ( + "github.com/pygrum/monarch/pkg/teamserver/roles" "time" "gorm.io/gorm" @@ -42,6 +43,7 @@ type Profile struct { gorm.Model Name string `gorm:"unique"` BuilderID string + CreatedBy string } // ProfileRecord is one build configuration, and is bound to a profile in the profiles table @@ -58,5 +60,6 @@ type Player struct { ClientCA string // base64 representation of client certificate for mTLS Challenge string Secret string + Role roles.Role CreatedAt time.Time } diff --git a/pkg/teamserver/teamserver.go b/pkg/teamserver/teamserver.go index 04e26a3..3f73022 100644 --- a/pkg/teamserver/teamserver.go +++ b/pkg/teamserver/teamserver.go @@ -6,7 +6,9 @@ import ( "crypto/x509" "errors" "fmt" + "github.com/pygrum/monarch/pkg/teamserver/roles" "github.com/pygrum/monarch/pkg/types" + "google.golang.org/grpc/metadata" "math" "net" "os" @@ -107,7 +109,14 @@ func (s *MonarchServer) NewAgent(_ context.Context, agent *clientpb.Agent) (*cli return &clientpb.Empty{}, nil } -func (s *MonarchServer) RmAgents(_ context.Context, req *clientpb.AgentRequest) (*clientpb.Empty, error) { +func (s *MonarchServer) RmAgents(ctx context.Context, req *clientpb.AgentRequest) (*clientpb.Empty, error) { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, errors.New("no metadata attached") + } + player := md["player"] + role := md["role"] + var agents []db.Agent if err := db.FindConditional("agent_id IN ?", req.AgentId, &agents); err != nil { return nil, fmt.Errorf("failed to retrieve the specified agents: %v", err) @@ -121,6 +130,9 @@ func (s *MonarchServer) RmAgents(_ context.Context, req *clientpb.AgentRequest) return nil, fmt.Errorf("no agents with the provided names exist") } for _, agent := range agents { + if agent.CreatedBy != player[0] && roles.Role(role[0]) != roles.RoleAdmin { + return nil, fmt.Errorf("you are not authorized to delete %s", agent.Name) + } if err := db.DeleteOne(&agent); err != nil { return nil, fmt.Errorf("failed to delete %s: %v", agent.Name, err) } @@ -186,14 +198,20 @@ func (s *MonarchServer) Profiles(_ context.Context, req *clientpb.ProfileRequest return pbProfiles, nil } -func (s *MonarchServer) SaveProfile(_ context.Context, req *clientpb.SaveProfileRequest) (*clientpb.Empty, error) { +func (s *MonarchServer) SaveProfile(ctx context.Context, req *clientpb.SaveProfileRequest) (*clientpb.Empty, error) { profile := &db.Profile{} + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, errors.New("no metadata attached") + } + player := md["player"] if db.Where("name = ? AND builder_id = ?", req.Name, req.BuilderId).Find(&profile); len(profile.Name) != 0 { return nil, fmt.Errorf("a profile for this build named '%s' already exists", req.Name) } profile = &db.Profile{ Name: req.Name, BuilderID: req.BuilderId, + CreatedBy: player[0], } var records []db.ProfileRecord for k, v := range req.Options { @@ -243,19 +261,34 @@ func (s *MonarchServer) LoadProfile(_ context.Context, req *clientpb.SaveProfile } func (s *MonarchServer) RmProfiles(ctx context.Context, req *clientpb.ProfileRequest) (*clientpb.Empty, error) { - profiles, err := s.Profiles(ctx, req) - if err != nil { - return nil, err + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, errors.New("no metadata attached") } - var records []db.ProfileRecord - if err := db.FindConditional("profile IN ?", req.Name, &records); err != nil { - return nil, fmt.Errorf("failed to find profile values: %v", err) + player := md["player"][0] + role := md["role"][0] + + var profiles []db.Profile + if err := db.Where("name IN ? AND builder_id = ? ", req.Name, req.BuilderId).Find(&profiles).Error; err != nil { + return nil, fmt.Errorf("couldn't get profiles: %v", err) } - if err := db.Delete(records); err != nil { - return nil, fmt.Errorf("failed to delete profile values: %v", err) + if len(profiles) == 0 { + return nil, errors.New("no profiles found") } - if err := db.Delete(profiles); err != nil { - return nil, fmt.Errorf("failed to delete profiles: %v", err) + for _, profile := range profiles { + var records []db.ProfileRecord + if err := db.FindConditional("profile IN ?", req.Name, &records); err != nil { + return nil, fmt.Errorf("failed to find profile values: %v", err) + } + if profile.CreatedBy != player && roles.Role(role) != roles.RoleAdmin { + return nil, fmt.Errorf("you are not authorized to delete %s", profile.Name) + } + if err := db.Delete(profiles); err != nil { + return nil, fmt.Errorf("failed to delete profiles: %v", err) + } + if err := db.Delete(records); err != nil { + return nil, fmt.Errorf("failed to delete profile values: %v", err) + } } return &clientpb.Empty{}, nil } @@ -360,7 +393,7 @@ func (s *MonarchServer) Uninstall(req *clientpb.UninstallRequest, stream rpcpb.M if err = db.FindOneConditional("builder_id = ?", b.BuilderId, &builder); err != nil { return err } - if err := utils.Cleanup(builder); err != nil { + if err := utils.Cleanup(builder, stream); err != nil { return fmt.Errorf("%v", err) } _ = stream.Send(&rpcpb.Notification{ @@ -510,7 +543,7 @@ func (s *MonarchServer) StageView(context.Context, *clientpb.Empty) (*clientpb.S return stage, nil } -func (s *MonarchServer) StageAdd(_ context.Context, r *clientpb.StageAddRequest) (*rpcpb.Notification, error) { +func (s *MonarchServer) StageAdd(ctx context.Context, r *clientpb.StageAddRequest) (*rpcpb.Notification, error) { agent := &db.Agent{} if err := db.FindOneConditional("agent_id = ?", r.Agent, &agent); err != nil { if err = db.FindOneConditional("name = ?", r.Agent, &agent); err != nil { @@ -521,7 +554,12 @@ func (s *MonarchServer) StageAdd(_ context.Context, r *clientpb.StageAddRequest) r.Alias = filepath.Base(agent.File) } r.Alias = filepath.Base(r.Alias) - http.Stage.Add(r.Alias, agent.Name, agent.File) + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, errors.New("no metadata attached") + } + player := md["player"][0] + http.Stage.Add(r.Alias, agent.Name, agent.File, player) return &rpcpb.Notification{ LogLevel: rpcpb.LogLevel_LevelInfo, Msg: fmt.Sprintf( @@ -531,7 +569,20 @@ func (s *MonarchServer) StageAdd(_ context.Context, r *clientpb.StageAddRequest) }, nil } -func (s *MonarchServer) Unstage(_ context.Context, r *clientpb.UnstageRequest) (*clientpb.Empty, error) { +func (s *MonarchServer) Unstage(ctx context.Context, r *clientpb.UnstageRequest) (*clientpb.Empty, error) { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, errors.New("no metadata attached") + } + player := md["player"][0] + role := md["role"][0] + for k, v := range *http.Stage.View() { + if r.Alias == k { + if v.StagedBy != player && roles.Role(role) != roles.RoleAdmin { + return nil, fmt.Errorf("you are not authorized to remove %s from the stage", r.Alias) + } + } + } http.Stage.Rm(r.Alias) return &clientpb.Empty{}, nil } @@ -610,6 +661,7 @@ func Start() error { opts := []grpc.ServerOption{ grpc.Creds(creds), grpc.UnaryInterceptor(interceptor.Unary()), + grpc.StreamInterceptor(interceptor.Stream()), grpc.MaxRecvMsgSize(math.MaxInt32), } grpcServer = grpc.NewServer(opts...) From 29f0c3597d26fd6691db15ed9ecd877345d1b668 Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 15:43:42 +0000 Subject: [PATCH 03/10] uninstall streaming --- pkg/commands/install.go | 4 ++-- pkg/commands/install_local.go | 3 ++- pkg/install/install.go | 2 +- pkg/utils/utils.go | 19 ++++++++++++++----- scripts/install-monarch.sh | 1 - 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/pkg/commands/install.go b/pkg/commands/install.go index a154e2d..8a6f34d 100644 --- a/pkg/commands/install.go +++ b/pkg/commands/install.go @@ -21,11 +21,11 @@ func installCmd(repoUrl, branch string, useCreds bool) { for { notif, err := stream.Recv() if err == io.EOF { - break + return } if err != nil { cLogger.Error("install failed: %v", err) - break + return } log.NumericalLevel(cLogger, uint16(notif.LogLevel), notif.Msg) } diff --git a/pkg/commands/install_local.go b/pkg/commands/install_local.go index df627f9..992647d 100644 --- a/pkg/commands/install_local.go +++ b/pkg/commands/install_local.go @@ -23,7 +23,8 @@ func localCmd(path string) { break } if err != nil { - cLogger.Error("failed to receive notification: %v", err) + cLogger.Error("install failed: %v", err) + return } log.NumericalLevel(cLogger, uint16(notif.LogLevel), notif.Msg) } diff --git a/pkg/install/install.go b/pkg/install/install.go index 3433d79..c2258dc 100644 --- a/pkg/install/install.go +++ b/pkg/install/install.go @@ -109,7 +109,7 @@ func Setup(path string, stream rpcpb.Monarch_InstallServer) (*db.Builder, error) if err := db.FindOneConditional("name = ?", royal.Name, b); err == nil { // just to check that we actually returned sum if b.Name == royal.Name { - if err = utils.Cleanup(b); err != nil { + if err = utils.Cleanup(b, stream); err != nil { return nil, fmt.Errorf("failed to delete existing builder: %v", err) } } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index f737cff..e8be210 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,6 +8,7 @@ import ( "github.com/pygrum/monarch/pkg/db" "github.com/pygrum/monarch/pkg/docker" "github.com/pygrum/monarch/pkg/log" + "github.com/pygrum/monarch/pkg/protobuf/rpcpb" ) var cLogger log.Logger @@ -17,11 +18,13 @@ func init() { } // Cleanup is used to delete all data associated with a builder -func Cleanup(builder *db.Builder) error { +func Cleanup(builder *db.Builder, stream rpcpb.Monarch_UninstallServer) error { ctx := context.Background() if err := docker.Cli.ContainerStop(ctx, builder.ContainerID, container.StopOptions{}); err != nil { - cLogger.Error("failed to stop container for %s: %v", builder.Name, err) - // don't return, we will force removal + _ = stream.Send(&rpcpb.Notification{ + LogLevel: rpcpb.LogLevel_LevelError, + Msg: fmt.Sprintf("failed to stop container for %s: %v", builder.Name, err), + }) } if err := docker.Cli.ContainerRemove(ctx, builder.ContainerID, types.ContainerRemoveOptions{Force: true}); err != nil { return fmt.Errorf("failed to remove container for %s: %v", builder.Name, err) @@ -31,8 +34,14 @@ func Cleanup(builder *db.Builder) error { return fmt.Errorf("failed to remove image for %s: %v", builder.Name, err) } for _, i := range m { - cLogger.Info("%s: untagged", i.Untagged) - cLogger.Info("deleted %s", i.Deleted) + _ = stream.Send(&rpcpb.Notification{ + LogLevel: rpcpb.LogLevel_LevelInfo, + Msg: fmt.Sprintf("%s: untagged", i.Untagged), + }) + _ = stream.Send(&rpcpb.Notification{ + LogLevel: rpcpb.LogLevel_LevelInfo, + Msg: fmt.Sprintf("deleted %s", i.Deleted), + }) } return db.Delete(builder) } diff --git a/scripts/install-monarch.sh b/scripts/install-monarch.sh index 53fe2f6..4294c9e 100644 --- a/scripts/install-monarch.sh +++ b/scripts/install-monarch.sh @@ -72,7 +72,6 @@ openssl req -newkey rsa:4096 \ -out "${MONARCH_PATH}/server-req.pem" \ -keyout "${MONARCH_PATH}/${MONARCH_NAME}-key.pem" \ -subj "/C=US/ST=California/L=Mountain View/O=Google LLC/CN=*.google.com" -echo "signing server request with CA certificate" echo "signing server request with CA private key" openssl x509 -req \ From 23b1b5e3609672e8618ac55ea492278ab042a24b Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 15:44:26 +0000 Subject: [PATCH 04/10] properly init context for console and client users --- cmd/monarch/monarch.go | 1 + pkg/console/console.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/monarch/monarch.go b/cmd/monarch/monarch.go index 8acac06..28b0feb 100644 --- a/cmd/monarch/monarch.go +++ b/cmd/monarch/monarch.go @@ -19,6 +19,7 @@ func main() { config.ClientConfig.Name = "console" db.Initialize() + commands.ConsoleInitCTX() if err := console.Run(commands.ServerConsoleCommands, true); err != nil { log.Fatal(err) } diff --git a/pkg/console/console.go b/pkg/console/console.go index 9fc0285..a789d6f 100644 --- a/pkg/console/console.go +++ b/pkg/console/console.go @@ -191,7 +191,7 @@ func initCTX() { } m["challenge"] = challenge md := metadata.New(m) - CTX = metadata.NewIncomingContext(CTX, md) + CTX = metadata.NewOutgoingContext(CTX, md) } // MainMenu switches back to the main menu From cb2407b20a0e67ad14b52cae9ae9d4bcd9745d5e Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 15:45:34 +0000 Subject: [PATCH 05/10] role based access to certain endpoints --- pkg/commands/co-op.go | 20 +++++++----- pkg/handler/http/stage.go | 12 +++++--- pkg/teamserver/interceptor.go | 53 ++++++++++++++++++++++++++------ pkg/teamserver/roles/roles.go | 58 +++++++++++++++++++++++++++++++++++ 4 files changed, 121 insertions(+), 22 deletions(-) diff --git a/pkg/commands/co-op.go b/pkg/commands/co-op.go index cfe89f2..d690efa 100644 --- a/pkg/commands/co-op.go +++ b/pkg/commands/co-op.go @@ -5,7 +5,9 @@ import ( "encoding/hex" "encoding/json" "fmt" + "github.com/pygrum/monarch/pkg/consts" "github.com/pygrum/monarch/pkg/protobuf/rpcpb" + "github.com/pygrum/monarch/pkg/teamserver/roles" "github.com/pygrum/monarch/pkg/types" "os" "time" @@ -47,7 +49,7 @@ func playersCmd(names []string) { header := "USERNAME\tACCOUNT CREATION DATE\t" _, _ = fmt.Fprintln(w, header) for _, player := range players { - if player.Username == "console" { + if player.Username == consts.UserConsole { continue } line := fmt.Sprintf("%s\t%s\t", @@ -59,13 +61,9 @@ func playersCmd(names []string) { _ = w.Flush() } -func playersNewCmd(name, lhost string) { - if len(name) == 0 { - cLogger.Error("you must specify the player name") - return - } - if len(lhost) == 0 { - cLogger.Error("you must specify the server host") +func playersNewCmd(name, lhost, role string) { + if !roles.ValidRole(role) { + cLogger.Error("'%s' is not a valid role", role) return } // don't save certificate deliberately, we don't need to and could be an issue if @@ -100,6 +98,7 @@ func playersNewCmd(name, lhost string) { Username: name, ClientCA: b64Cert, Challenge: challenge, + Role: roles.Role(role), Secret: hex.EncodeToString(secret), } bytes, err := json.Marshal(clientConfig) @@ -115,10 +114,15 @@ func playersNewCmd(name, lhost string) { cLogger.Error("failed to create configuration file: %v", err) return } + cLogger.Info("account '%s' created with role '%s'", name, role) cLogger.Success("saved player config to ./" + name + "-monarch-client.config") } func playersKickCmd(name string) { + if name == consts.UserConsole { + cLogger.Warn("you cannot kick yourself") + return + } player := &db.Player{} if err := db.FindOneConditional("username = ?", name, &player); err != nil { cLogger.Error("query failed: %v", err) diff --git a/pkg/handler/http/stage.go b/pkg/handler/http/stage.go index cdd1579..c46803e 100644 --- a/pkg/handler/http/stage.go +++ b/pkg/handler/http/stage.go @@ -11,8 +11,9 @@ const ( ) type StageItem struct { - Path string - Agent string + Path string + Agent string + StagedBy string } type stage struct { @@ -26,10 +27,11 @@ func init() { fileNameMappings: make(map[string]StageItem), } } -func (s *stage) Add(name, agent, path string) { +func (s *stage) Add(name, agent, path, stagedBy string) { s.fileNameMappings[name] = StageItem{ - Path: path, - Agent: agent, + Path: path, + Agent: agent, + StagedBy: stagedBy, } } diff --git a/pkg/teamserver/interceptor.go b/pkg/teamserver/interceptor.go index 282a8fa..3297167 100644 --- a/pkg/teamserver/interceptor.go +++ b/pkg/teamserver/interceptor.go @@ -7,11 +7,24 @@ import ( "fmt" "github.com/pygrum/monarch/pkg/crypto" "github.com/pygrum/monarch/pkg/db" + "github.com/pygrum/monarch/pkg/teamserver/roles" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) type AuthInterceptor struct{} +type wrappedStream struct { + grpc.ServerStream + ctx context.Context +} + +func (w *wrappedStream) Context() context.Context { + return w.ctx +} + +func newWrappedStream(ss grpc.ServerStream, ctx context.Context) *wrappedStream { + return &wrappedStream{ss, ctx} +} func (a *AuthInterceptor) Unary() grpc.UnaryServerInterceptor { return func( @@ -20,7 +33,7 @@ func (a *AuthInterceptor) Unary() grpc.UnaryServerInterceptor { info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error) { - err := a.authorize(ctx) + ctx, err := a.authorize(ctx, info.FullMethod) if err != nil { return nil, err } @@ -28,34 +41,56 @@ func (a *AuthInterceptor) Unary() grpc.UnaryServerInterceptor { } } -func (a *AuthInterceptor) authorize(ctx context.Context) error { +func (a *AuthInterceptor) Stream() grpc.StreamServerInterceptor { + return func( + srv interface{}, + ss grpc.ServerStream, + info *grpc.StreamServerInfo, + handler grpc.StreamHandler, + ) error { + ctx, err := a.authorize(ss.Context(), info.FullMethod) + if err != nil { + return err + } + return handler(srv, newWrappedStream(ss, ctx)) + } +} + +func (a *AuthInterceptor) authorize(ctx context.Context, method string) (context.Context, error) { md, ok := metadata.FromIncomingContext(ctx) if !ok { - return errors.New("no auth metadata provided") + return ctx, errors.New("no auth metadata provided") } v1 := md["uid"] v2 := md["challenge"] if len(v1) == 0 || len(v2) == 0 { - return errors.New("authorization info not provided") + return ctx, errors.New("authorization info not provided") } uid := v1[0] challenge := v2[0] player := &db.Player{} if err := db.FindOneConditional("uuid = ?", uid, &player); err != nil { - return fmt.Errorf("query failed: %v", err) + return ctx, fmt.Errorf("query failed: %v", err) } if len(player.UUID) == 0 { - return errors.New("this player doesn't exist or was kicked from the server") + return ctx, errors.New("this player doesn't exist or was kicked from the server") } secret, _ := hex.DecodeString(player.Secret) plainChallenge, err := crypto.DecryptAES(secret, challenge) if err != nil { - return fmt.Errorf("challenge decryption failed: %v", err) + return ctx, fmt.Errorf("challenge decryption failed: %v", err) } if plainChallenge != player.Challenge { - return fmt.Errorf("challenge string doesn't match - player is unauthorized") + return ctx, fmt.Errorf("challenge string doesn't match - player is unauthorized") + } + if !roles.AuthorizedEndpoint(player.Role, method) { + return ctx, errors.New("player is unauthorized") } - return nil + md["role"] = []string{string(player.Role)} + md["player"] = []string{player.UUID} + ctx = metadata.NewIncomingContext(ctx, md) + + return ctx, nil } func NewAuthInterceptor() *AuthInterceptor { diff --git a/pkg/teamserver/roles/roles.go b/pkg/teamserver/roles/roles.go index 3258a66..8eb5611 100644 --- a/pkg/teamserver/roles/roles.go +++ b/pkg/teamserver/roles/roles.go @@ -1 +1,59 @@ package roles + +import ( + "path/filepath" + "slices" +) + +const ( + RoleAdmin Role = "admin" + RolePlayer Role = "player" +) + +type Role string +type Roles []Role + +var ( + AdminOnly = []string{ + "/Install", + "/Uninstall", + + "/HttpOpen", + "/HttpsOpen", + + "/HttpClose", + "/HttpsClose", + } +) + +func (rs Roles) String() []string { + var s []string + for _, r := range rs { + s = append(s, string(r)) + } + return s +} + +// All returns all roles +func All() Roles { + return Roles{ + RoleAdmin, + RolePlayer, + } +} + +// ValidRole reports whether the specified role is a valid existing role +func ValidRole(r string) bool { + return slices.Contains(All(), Role(r)) +} + +// AuthorizedEndpoint reports whether a player with the provided role is allowed to access the provided endpoint +func AuthorizedEndpoint(r Role, endpoint string) bool { + if r == RoleAdmin { + return true + } + if r == RolePlayer { + return !slices.Contains(AdminOnly, "/"+filepath.Base(endpoint)) + } + return false +} From 5ab6bec802e28f1b07cc1d2dcd9aea872f364911 Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 15:46:13 +0000 Subject: [PATCH 06/10] better completion --- pkg/commands/commands.go | 32 +++++++++++++++++++++++++------- pkg/completion/completion.go | 5 ++++- pkg/consts/consts.go | 5 +++-- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/pkg/commands/commands.go b/pkg/commands/commands.go index 5305321..77955d5 100644 --- a/pkg/commands/commands.go +++ b/pkg/commands/commands.go @@ -6,6 +6,7 @@ import ( "github.com/pygrum/monarch/pkg/completion" "github.com/pygrum/monarch/pkg/config" "github.com/pygrum/monarch/pkg/crypto" + "github.com/pygrum/monarch/pkg/teamserver/roles" "github.com/rsteube/carapace" "github.com/sirupsen/logrus" "google.golang.org/grpc/metadata" @@ -40,6 +41,14 @@ func InitCTX() { ctx = metadata.NewOutgoingContext(ctx, md) } +func ConsoleInitCTX() { + m := make(map[string]string) + m["player"] = config.ClientConfig.UUID + m["role"] = string(roles.RoleAdmin) + md := metadata.New(m) + ctx = metadata.NewOutgoingContext(ctx, md) +} + func ServerConsoleCommands() *cobra.Command { root := ConsoleCommands() var stop bool @@ -61,17 +70,26 @@ func ServerConsoleCommands() *cobra.Command { } carapace.Gen(cmdPlayers).PositionalCompletion(completion.Players()) - var name, lhost string + var name, lhost, role string cmdPlayersNew := &cobra.Command{ Use: "new", Short: "generate a configuration file for a new player", Run: func(cmd *cobra.Command, args []string) { - playersNewCmd(name, lhost) + playersNewCmd(name, lhost, role) }, } cmdPlayersNew.Flags().StringVarP(&name, "username", "u", "", "username of the new player") cmdPlayersNew.Flags().StringVarP(&lhost, "lhost", "l", "", "the hostname the player authenticates to this server using") + cmdPlayersNew.Flags().StringVarP(&role, "role", "r", "player", + "the player role (see autocomplete options)") + carapace.Gen(cmdPlayersNew).FlagCompletion(carapace.ActionMap{ + "role": carapace.ActionValues(roles.All().String()...), + }) + + _ = cmdPlayersNew.MarkFlagRequired("username") + _ = cmdPlayersNew.MarkFlagRequired("lhost") + cmdPlayersKick := &cobra.Command{ Use: "kick [flags] NAME", Short: "kick a player from the server", @@ -117,7 +135,7 @@ func ConsoleCommands() *cobra.Command { buildersCmd(args) }, } - carapace.Gen(cmdBuilders).PositionalCompletion(completion.Builders(ctx)) + carapace.Gen(cmdBuilders).PositionalAnyCompletion(completion.Builders(ctx)) cmdAgents := &cobra.Command{ Use: "agents [flags] AGENTS...", @@ -126,7 +144,7 @@ func ConsoleCommands() *cobra.Command { agentsCmd(args) }, } - carapace.Gen(cmdAgents).PositionalCompletion(completion.Agents(ctx)) + carapace.Gen(cmdAgents).PositionalAnyCompletion(completion.Agents(ctx)) cmdAgentsRm := &cobra.Command{ Use: "rm [flags] AGENTS...", @@ -136,7 +154,7 @@ func ConsoleCommands() *cobra.Command { cmdRm(args) }, } - carapace.Gen(cmdAgentsRm).PositionalCompletion(completion.Agents(ctx)) + carapace.Gen(cmdAgentsRm).PositionalAnyCompletion(completion.Agents(ctx)) cmdAgents.AddCommand(cmdAgentsRm) cmdSessions := &cobra.Command{ @@ -146,7 +164,7 @@ func ConsoleCommands() *cobra.Command { sessionsCmd(args) }, } - carapace.Gen(cmdSessions).PositionalCompletion(completion.Sessions(ctx)) + carapace.Gen(cmdSessions).PositionalAnyCompletion(completion.Sessions(ctx)) cmdUse := &cobra.Command{ Use: "use [id]", @@ -222,7 +240,7 @@ func ConsoleCommands() *cobra.Command { uninstallCmd(args, purge) }, } - carapace.Gen(cmdUninstall).PositionalCompletion(completion.Builders(ctx)) + carapace.Gen(cmdUninstall).PositionalAnyCompletion(completion.Builders(ctx)) cmdUninstall.Flags().BoolVarP(&purge, "delete-data", "p", false, "delete the source"+ " folder that was saved to disk when installed") diff --git a/pkg/completion/completion.go b/pkg/completion/completion.go index 909c349..93b66b4 100644 --- a/pkg/completion/completion.go +++ b/pkg/completion/completion.go @@ -3,6 +3,7 @@ package completion import ( "context" "github.com/pygrum/monarch/pkg/console" + "github.com/pygrum/monarch/pkg/consts" "github.com/pygrum/monarch/pkg/db" "github.com/pygrum/monarch/pkg/protobuf/clientpb" "github.com/rsteube/carapace" @@ -64,7 +65,9 @@ func Players() carapace.Action { var players []db.Player if err := db.Find(&players); err == nil { for _, p := range players { - results = append(results, p.Username) + if p.Username != consts.UserConsole { + results = append(results, p.Username) + } } } return carapace.ActionValues(results...).Tag("players") diff --git a/pkg/consts/consts.go b/pkg/consts/consts.go index 84b1eee..360690c 100644 --- a/pkg/consts/consts.go +++ b/pkg/consts/consts.go @@ -4,6 +4,7 @@ const ( DockerfilesPath = "docker" BuilderDockerfile = "builder/Dockerfile" - MonarchNet = "monarch-net" - Version = "0.0.2" // track with container + MonarchNet = "monarch-net" + Version = "0.0.2" // track with container + UserConsole = "console" ) From 12f862e4878d0160907d27e0f387b4be0c5cdd79 Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 22:28:44 +0000 Subject: [PATCH 07/10] rpc endpoint for listing players - their usernames are not secret --- pkg/commands/co-op.go | 37 +- pkg/commands/send.go | 20 + pkg/completion/completion.go | 14 +- pkg/protobuf/clientpb/client.pb.go | 934 ++++++++++++++----------- pkg/protobuf/clientpb/client.proto | 16 +- pkg/protobuf/rpcpb/services.pb.go | 521 ++++++++------ pkg/protobuf/rpcpb/services.proto | 11 +- pkg/protobuf/rpcpb/services_grpc.pb.go | 145 +++- 8 files changed, 1051 insertions(+), 647 deletions(-) create mode 100644 pkg/commands/send.go diff --git a/pkg/commands/co-op.go b/pkg/commands/co-op.go index d690efa..d86dc31 100644 --- a/pkg/commands/co-op.go +++ b/pkg/commands/co-op.go @@ -5,18 +5,18 @@ import ( "encoding/hex" "encoding/json" "fmt" - "github.com/pygrum/monarch/pkg/consts" - "github.com/pygrum/monarch/pkg/protobuf/rpcpb" - "github.com/pygrum/monarch/pkg/teamserver/roles" - "github.com/pygrum/monarch/pkg/types" - "os" - "time" - "github.com/google/uuid" "github.com/pygrum/monarch/pkg/config" + "github.com/pygrum/monarch/pkg/console" + "github.com/pygrum/monarch/pkg/consts" "github.com/pygrum/monarch/pkg/crypto" "github.com/pygrum/monarch/pkg/db" + "github.com/pygrum/monarch/pkg/protobuf/clientpb" + "github.com/pygrum/monarch/pkg/protobuf/rpcpb" "github.com/pygrum/monarch/pkg/teamserver" + "github.com/pygrum/monarch/pkg/teamserver/roles" + "github.com/pygrum/monarch/pkg/types" + "os" ) func coopCmd(stop bool) { @@ -35,26 +35,21 @@ func coopCmd(stop bool) { } func playersCmd(names []string) { - var players []db.Player - if len(names) > 0 { - if err := db.Where("username IN ?", names).Find(&players).Error; err != nil { - cLogger.Error("query failed: %v", err) - return - } - } else { - if err := db.Find(&players); err != nil { - cLogger.Error("query failed: %v", err) - } + players, err := console.Rpc.Players(ctx, &clientpb.PlayerRequest{Names: names}) + if err != nil { + cLogger.Error("%v", err) + return } - header := "USERNAME\tACCOUNT CREATION DATE\t" + header := "USERNAME\tROLE\tACCOUNT CREATION DATE\t" _, _ = fmt.Fprintln(w, header) - for _, player := range players { + for _, player := range players.Players { if player.Username == consts.UserConsole { continue } - line := fmt.Sprintf("%s\t%s\t", + line := fmt.Sprintf("%s\t%s\t%s\t", player.Username, - player.CreatedAt.Format(time.RFC850), + player.Role, + player.Registered, ) _, _ = fmt.Fprintln(w, line) } diff --git a/pkg/commands/send.go b/pkg/commands/send.go new file mode 100644 index 0000000..8f8f5ab --- /dev/null +++ b/pkg/commands/send.go @@ -0,0 +1,20 @@ +package commands + +import ( + "github.com/pygrum/monarch/pkg/console" + "github.com/pygrum/monarch/pkg/protobuf/rpcpb" +) + +func msgCmd(to, msg string, all bool) { + if len(to) == 0 { + if !all { + cLogger.Error("player not specified with -to, please specify a player name or --all") + return + } + } + if _, err := console.Rpc.SendMessage(ctx, &rpcpb.Message{To: to, Msg: msg}); err != nil { + cLogger.Error("%v", err) + return + } + cLogger.Info("sent") +} diff --git a/pkg/completion/completion.go b/pkg/completion/completion.go index 93b66b4..89b6c9c 100644 --- a/pkg/completion/completion.go +++ b/pkg/completion/completion.go @@ -3,8 +3,6 @@ package completion import ( "context" "github.com/pygrum/monarch/pkg/console" - "github.com/pygrum/monarch/pkg/consts" - "github.com/pygrum/monarch/pkg/db" "github.com/pygrum/monarch/pkg/protobuf/clientpb" "github.com/rsteube/carapace" "strconv" @@ -59,15 +57,13 @@ func Options(options []string) carapace.Action { return carapace.ActionCallback(c) } -func Players() carapace.Action { +func Players(mctx context.Context) carapace.Action { c := func(ctx carapace.Context) carapace.Action { var results []string - var players []db.Player - if err := db.Find(&players); err == nil { - for _, p := range players { - if p.Username != consts.UserConsole { - results = append(results, p.Username) - } + players, err := console.Rpc.Players(mctx, &clientpb.PlayerRequest{Names: make([]string, 0)}) + if err == nil { + for _, p := range players.Players { + results = append(results, p.Username) } } return carapace.ActionValues(results...).Tag("players") diff --git a/pkg/protobuf/clientpb/client.pb.go b/pkg/protobuf/clientpb/client.pb.go index 2283331..7629264 100644 --- a/pkg/protobuf/clientpb/client.pb.go +++ b/pkg/protobuf/clientpb/client.pb.go @@ -64,7 +64,7 @@ func (x InstallRequest_Source) Number() protoreflect.EnumNumber { // Deprecated: Use InstallRequest_Source.Descriptor instead. func (InstallRequest_Source) EnumDescriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{7, 0} + return file_clientpb_client_proto_rawDescGZIP(), []int{10, 0} } type ResponseDetail_Dest int32 @@ -113,7 +113,7 @@ func (x ResponseDetail_Dest) Number() protoreflect.EnumNumber { // Deprecated: Use ResponseDetail_Dest.Descriptor instead. func (ResponseDetail_Dest) EnumDescriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{18, 0} + return file_clientpb_client_proto_rawDescGZIP(), []int{21, 0} } type BuilderRequest struct { @@ -337,6 +337,163 @@ func (x *Builders) GetBuilders() []*Builder { return nil } +type PlayerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` +} + +func (x *PlayerRequest) Reset() { + *x = PlayerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_clientpb_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlayerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlayerRequest) ProtoMessage() {} + +func (x *PlayerRequest) ProtoReflect() protoreflect.Message { + mi := &file_clientpb_client_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlayerRequest.ProtoReflect.Descriptor instead. +func (*PlayerRequest) Descriptor() ([]byte, []int) { + return file_clientpb_client_proto_rawDescGZIP(), []int{3} +} + +func (x *PlayerRequest) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +type Player struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + Registered string `protobuf:"bytes,3,opt,name=registered,proto3" json:"registered,omitempty"` +} + +func (x *Player) Reset() { + *x = Player{} + if protoimpl.UnsafeEnabled { + mi := &file_clientpb_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Player) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Player) ProtoMessage() {} + +func (x *Player) ProtoReflect() protoreflect.Message { + mi := &file_clientpb_client_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Player.ProtoReflect.Descriptor instead. +func (*Player) Descriptor() ([]byte, []int) { + return file_clientpb_client_proto_rawDescGZIP(), []int{4} +} + +func (x *Player) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *Player) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +func (x *Player) GetRegistered() string { + if x != nil { + return x.Registered + } + return "" +} + +type Players struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Players []*Player `protobuf:"bytes,1,rep,name=players,proto3" json:"players,omitempty"` +} + +func (x *Players) Reset() { + *x = Players{} + if protoimpl.UnsafeEnabled { + mi := &file_clientpb_client_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Players) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Players) ProtoMessage() {} + +func (x *Players) ProtoReflect() protoreflect.Message { + mi := &file_clientpb_client_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Players.ProtoReflect.Descriptor instead. +func (*Players) Descriptor() ([]byte, []int) { + return file_clientpb_client_proto_rawDescGZIP(), []int{5} +} + +func (x *Players) GetPlayers() []*Player { + if x != nil { + return x.Players + } + return nil +} + type AgentRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -348,7 +505,7 @@ type AgentRequest struct { func (x *AgentRequest) Reset() { *x = AgentRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[3] + mi := &file_clientpb_client_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -361,7 +518,7 @@ func (x *AgentRequest) String() string { func (*AgentRequest) ProtoMessage() {} func (x *AgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[3] + mi := &file_clientpb_client_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -374,7 +531,7 @@ func (x *AgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentRequest.ProtoReflect.Descriptor instead. func (*AgentRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{3} + return file_clientpb_client_proto_rawDescGZIP(), []int{6} } func (x *AgentRequest) GetAgentId() []string { @@ -405,7 +562,7 @@ type Agent struct { func (x *Agent) Reset() { *x = Agent{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[4] + mi := &file_clientpb_client_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -418,7 +575,7 @@ func (x *Agent) String() string { func (*Agent) ProtoMessage() {} func (x *Agent) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[4] + mi := &file_clientpb_client_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -431,7 +588,7 @@ func (x *Agent) ProtoReflect() protoreflect.Message { // Deprecated: Use Agent.ProtoReflect.Descriptor instead. func (*Agent) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{4} + return file_clientpb_client_proto_rawDescGZIP(), []int{7} } func (x *Agent) GetAgentId() string { @@ -522,7 +679,7 @@ type Agents struct { func (x *Agents) Reset() { *x = Agents{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[5] + mi := &file_clientpb_client_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -535,7 +692,7 @@ func (x *Agents) String() string { func (*Agents) ProtoMessage() {} func (x *Agents) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[5] + mi := &file_clientpb_client_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -548,7 +705,7 @@ func (x *Agents) ProtoReflect() protoreflect.Message { // Deprecated: Use Agents.ProtoReflect.Descriptor instead. func (*Agents) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{5} + return file_clientpb_client_proto_rawDescGZIP(), []int{8} } func (x *Agents) GetAgents() []*Agent { @@ -570,7 +727,7 @@ type ProfileRequest struct { func (x *ProfileRequest) Reset() { *x = ProfileRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[6] + mi := &file_clientpb_client_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -583,7 +740,7 @@ func (x *ProfileRequest) String() string { func (*ProfileRequest) ProtoMessage() {} func (x *ProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[6] + mi := &file_clientpb_client_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -596,7 +753,7 @@ func (x *ProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ProfileRequest.ProtoReflect.Descriptor instead. func (*ProfileRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{6} + return file_clientpb_client_proto_rawDescGZIP(), []int{9} } func (x *ProfileRequest) GetName() []string { @@ -627,7 +784,7 @@ type InstallRequest struct { func (x *InstallRequest) Reset() { *x = InstallRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[7] + mi := &file_clientpb_client_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -640,7 +797,7 @@ func (x *InstallRequest) String() string { func (*InstallRequest) ProtoMessage() {} func (x *InstallRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[7] + mi := &file_clientpb_client_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -653,7 +810,7 @@ func (x *InstallRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InstallRequest.ProtoReflect.Descriptor instead. func (*InstallRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{7} + return file_clientpb_client_proto_rawDescGZIP(), []int{10} } func (x *InstallRequest) GetPath() string { @@ -696,7 +853,7 @@ type UninstallRequest struct { func (x *UninstallRequest) Reset() { *x = UninstallRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[8] + mi := &file_clientpb_client_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -709,7 +866,7 @@ func (x *UninstallRequest) String() string { func (*UninstallRequest) ProtoMessage() {} func (x *UninstallRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[8] + mi := &file_clientpb_client_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -722,7 +879,7 @@ func (x *UninstallRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UninstallRequest.ProtoReflect.Descriptor instead. func (*UninstallRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{8} + return file_clientpb_client_proto_rawDescGZIP(), []int{11} } func (x *UninstallRequest) GetBuilders() *BuilderRequest { @@ -752,7 +909,7 @@ type ProfileRecord struct { func (x *ProfileRecord) Reset() { *x = ProfileRecord{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[9] + mi := &file_clientpb_client_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -765,7 +922,7 @@ func (x *ProfileRecord) String() string { func (*ProfileRecord) ProtoMessage() {} func (x *ProfileRecord) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[9] + mi := &file_clientpb_client_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -778,7 +935,7 @@ func (x *ProfileRecord) ProtoReflect() protoreflect.Message { // Deprecated: Use ProfileRecord.ProtoReflect.Descriptor instead. func (*ProfileRecord) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{9} + return file_clientpb_client_proto_rawDescGZIP(), []int{12} } func (x *ProfileRecord) GetProfile() string { @@ -816,7 +973,7 @@ type Profile struct { func (x *Profile) Reset() { *x = Profile{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[10] + mi := &file_clientpb_client_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -829,7 +986,7 @@ func (x *Profile) String() string { func (*Profile) ProtoMessage() {} func (x *Profile) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[10] + mi := &file_clientpb_client_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -842,7 +999,7 @@ func (x *Profile) ProtoReflect() protoreflect.Message { // Deprecated: Use Profile.ProtoReflect.Descriptor instead. func (*Profile) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{10} + return file_clientpb_client_proto_rawDescGZIP(), []int{13} } func (x *Profile) GetId() int32 { @@ -884,7 +1041,7 @@ type Profiles struct { func (x *Profiles) Reset() { *x = Profiles{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[11] + mi := &file_clientpb_client_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -897,7 +1054,7 @@ func (x *Profiles) String() string { func (*Profiles) ProtoMessage() {} func (x *Profiles) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[11] + mi := &file_clientpb_client_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -910,7 +1067,7 @@ func (x *Profiles) ProtoReflect() protoreflect.Message { // Deprecated: Use Profiles.ProtoReflect.Descriptor instead. func (*Profiles) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{11} + return file_clientpb_client_proto_rawDescGZIP(), []int{14} } func (x *Profiles) GetProfiles() []*Profile { @@ -934,7 +1091,7 @@ type SaveProfileRequest struct { func (x *SaveProfileRequest) Reset() { *x = SaveProfileRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[12] + mi := &file_clientpb_client_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -947,7 +1104,7 @@ func (x *SaveProfileRequest) String() string { func (*SaveProfileRequest) ProtoMessage() {} func (x *SaveProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[12] + mi := &file_clientpb_client_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -960,7 +1117,7 @@ func (x *SaveProfileRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveProfileRequest.ProtoReflect.Descriptor instead. func (*SaveProfileRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{12} + return file_clientpb_client_proto_rawDescGZIP(), []int{15} } func (x *SaveProfileRequest) GetName() string { @@ -1003,7 +1160,7 @@ type ProfileData struct { func (x *ProfileData) Reset() { *x = ProfileData{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[13] + mi := &file_clientpb_client_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1016,7 +1173,7 @@ func (x *ProfileData) String() string { func (*ProfileData) ProtoMessage() {} func (x *ProfileData) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[13] + mi := &file_clientpb_client_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1029,7 +1186,7 @@ func (x *ProfileData) ProtoReflect() protoreflect.Message { // Deprecated: Use ProfileData.ProtoReflect.Descriptor instead. func (*ProfileData) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{13} + return file_clientpb_client_proto_rawDescGZIP(), []int{16} } func (x *ProfileData) GetProfile() *Profile { @@ -1057,7 +1214,7 @@ type SessionsRequest struct { func (x *SessionsRequest) Reset() { *x = SessionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[14] + mi := &file_clientpb_client_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1070,7 +1227,7 @@ func (x *SessionsRequest) String() string { func (*SessionsRequest) ProtoMessage() {} func (x *SessionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[14] + mi := &file_clientpb_client_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1083,7 +1240,7 @@ func (x *SessionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SessionsRequest.ProtoReflect.Descriptor instead. func (*SessionsRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{14} + return file_clientpb_client_proto_rawDescGZIP(), []int{17} } func (x *SessionsRequest) GetIDs() []int32 { @@ -1112,7 +1269,7 @@ type Session struct { func (x *Session) Reset() { *x = Session{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[15] + mi := &file_clientpb_client_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1125,7 +1282,7 @@ func (x *Session) String() string { func (*Session) ProtoMessage() {} func (x *Session) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[15] + mi := &file_clientpb_client_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1138,7 +1295,7 @@ func (x *Session) ProtoReflect() protoreflect.Message { // Deprecated: Use Session.ProtoReflect.Descriptor instead. func (*Session) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{15} + return file_clientpb_client_proto_rawDescGZIP(), []int{18} } func (x *Session) GetId() int32 { @@ -1215,7 +1372,7 @@ type Sessions struct { func (x *Sessions) Reset() { *x = Sessions{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[16] + mi := &file_clientpb_client_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1228,7 +1385,7 @@ func (x *Sessions) String() string { func (*Sessions) ProtoMessage() {} func (x *Sessions) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[16] + mi := &file_clientpb_client_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1241,7 +1398,7 @@ func (x *Sessions) ProtoReflect() protoreflect.Message { // Deprecated: Use Sessions.ProtoReflect.Descriptor instead. func (*Sessions) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{16} + return file_clientpb_client_proto_rawDescGZIP(), []int{19} } func (x *Sessions) GetSessions() []*Session { @@ -1266,7 +1423,7 @@ type HTTPRequest struct { func (x *HTTPRequest) Reset() { *x = HTTPRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[17] + mi := &file_clientpb_client_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1279,7 +1436,7 @@ func (x *HTTPRequest) String() string { func (*HTTPRequest) ProtoMessage() {} func (x *HTTPRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[17] + mi := &file_clientpb_client_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1292,7 +1449,7 @@ func (x *HTTPRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPRequest.ProtoReflect.Descriptor instead. func (*HTTPRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{17} + return file_clientpb_client_proto_rawDescGZIP(), []int{20} } func (x *HTTPRequest) GetSessionId() int32 { @@ -1344,7 +1501,7 @@ type ResponseDetail struct { func (x *ResponseDetail) Reset() { *x = ResponseDetail{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[18] + mi := &file_clientpb_client_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1357,7 +1514,7 @@ func (x *ResponseDetail) String() string { func (*ResponseDetail) ProtoMessage() {} func (x *ResponseDetail) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[18] + mi := &file_clientpb_client_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1370,7 +1527,7 @@ func (x *ResponseDetail) ProtoReflect() protoreflect.Message { // Deprecated: Use ResponseDetail.ProtoReflect.Descriptor instead. func (*ResponseDetail) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{18} + return file_clientpb_client_proto_rawDescGZIP(), []int{21} } func (x *ResponseDetail) GetStatus() builderpb.Status { @@ -1414,7 +1571,7 @@ type HTTPResponse struct { func (x *HTTPResponse) Reset() { *x = HTTPResponse{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[19] + mi := &file_clientpb_client_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1427,7 +1584,7 @@ func (x *HTTPResponse) String() string { func (*HTTPResponse) ProtoMessage() {} func (x *HTTPResponse) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[19] + mi := &file_clientpb_client_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1440,7 +1597,7 @@ func (x *HTTPResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HTTPResponse.ProtoReflect.Descriptor instead. func (*HTTPResponse) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{19} + return file_clientpb_client_proto_rawDescGZIP(), []int{22} } func (x *HTTPResponse) GetAgentId() string { @@ -1484,7 +1641,7 @@ type Registration struct { func (x *Registration) Reset() { *x = Registration{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[20] + mi := &file_clientpb_client_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1497,7 +1654,7 @@ func (x *Registration) String() string { func (*Registration) ProtoMessage() {} func (x *Registration) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[20] + mi := &file_clientpb_client_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1510,7 +1667,7 @@ func (x *Registration) ProtoReflect() protoreflect.Message { // Deprecated: Use Registration.ProtoReflect.Descriptor instead. func (*Registration) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{20} + return file_clientpb_client_proto_rawDescGZIP(), []int{23} } func (x *Registration) GetAgentId() string { @@ -1583,61 +1740,6 @@ func (x *Registration) GetIPAddress() string { return "" } -type NotifyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PlayerId string `protobuf:"bytes,1,opt,name=player_id,json=playerId,proto3" json:"player_id,omitempty"` - PlayerName string `protobuf:"bytes,2,opt,name=player_name,json=playerName,proto3" json:"player_name,omitempty"` -} - -func (x *NotifyRequest) Reset() { - *x = NotifyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NotifyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NotifyRequest) ProtoMessage() {} - -func (x *NotifyRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[21] - 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 NotifyRequest.ProtoReflect.Descriptor instead. -func (*NotifyRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{21} -} - -func (x *NotifyRequest) GetPlayerId() string { - if x != nil { - return x.PlayerId - } - return "" -} - -func (x *NotifyRequest) GetPlayerName() string { - if x != nil { - return x.PlayerName - } - return "" -} - type LockSessionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1650,7 +1752,7 @@ type LockSessionRequest struct { func (x *LockSessionRequest) Reset() { *x = LockSessionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[22] + mi := &file_clientpb_client_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1663,7 +1765,7 @@ func (x *LockSessionRequest) String() string { func (*LockSessionRequest) ProtoMessage() {} func (x *LockSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[22] + mi := &file_clientpb_client_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1676,7 +1778,7 @@ func (x *LockSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LockSessionRequest.ProtoReflect.Descriptor instead. func (*LockSessionRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{22} + return file_clientpb_client_proto_rawDescGZIP(), []int{24} } func (x *LockSessionRequest) GetPlayerName() string { @@ -1705,7 +1807,7 @@ type FreeSessionRequest struct { func (x *FreeSessionRequest) Reset() { *x = FreeSessionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[23] + mi := &file_clientpb_client_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1718,7 +1820,7 @@ func (x *FreeSessionRequest) String() string { func (*FreeSessionRequest) ProtoMessage() {} func (x *FreeSessionRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[23] + mi := &file_clientpb_client_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1731,7 +1833,7 @@ func (x *FreeSessionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FreeSessionRequest.ProtoReflect.Descriptor instead. func (*FreeSessionRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{23} + return file_clientpb_client_proto_rawDescGZIP(), []int{25} } func (x *FreeSessionRequest) GetPlayerName() string { @@ -1760,7 +1862,7 @@ type StageItem struct { func (x *StageItem) Reset() { *x = StageItem{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[24] + mi := &file_clientpb_client_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1773,7 +1875,7 @@ func (x *StageItem) String() string { func (*StageItem) ProtoMessage() {} func (x *StageItem) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[24] + mi := &file_clientpb_client_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1786,7 +1888,7 @@ func (x *StageItem) ProtoReflect() protoreflect.Message { // Deprecated: Use StageItem.ProtoReflect.Descriptor instead. func (*StageItem) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{24} + return file_clientpb_client_proto_rawDescGZIP(), []int{26} } func (x *StageItem) GetPath() string { @@ -1815,7 +1917,7 @@ type Stage struct { func (x *Stage) Reset() { *x = Stage{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[25] + mi := &file_clientpb_client_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1828,7 +1930,7 @@ func (x *Stage) String() string { func (*Stage) ProtoMessage() {} func (x *Stage) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[25] + mi := &file_clientpb_client_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1841,7 +1943,7 @@ func (x *Stage) ProtoReflect() protoreflect.Message { // Deprecated: Use Stage.ProtoReflect.Descriptor instead. func (*Stage) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{25} + return file_clientpb_client_proto_rawDescGZIP(), []int{27} } func (x *Stage) GetEndpoint() string { @@ -1870,7 +1972,7 @@ type StageAddRequest struct { func (x *StageAddRequest) Reset() { *x = StageAddRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[26] + mi := &file_clientpb_client_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1883,7 +1985,7 @@ func (x *StageAddRequest) String() string { func (*StageAddRequest) ProtoMessage() {} func (x *StageAddRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[26] + mi := &file_clientpb_client_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1896,7 +1998,7 @@ func (x *StageAddRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StageAddRequest.ProtoReflect.Descriptor instead. func (*StageAddRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{26} + return file_clientpb_client_proto_rawDescGZIP(), []int{28} } func (x *StageAddRequest) GetAgent() string { @@ -1924,7 +2026,7 @@ type UnstageRequest struct { func (x *UnstageRequest) Reset() { *x = UnstageRequest{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[27] + mi := &file_clientpb_client_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1937,7 +2039,7 @@ func (x *UnstageRequest) String() string { func (*UnstageRequest) ProtoMessage() {} func (x *UnstageRequest) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[27] + mi := &file_clientpb_client_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1950,7 +2052,7 @@ func (x *UnstageRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnstageRequest.ProtoReflect.Descriptor instead. func (*UnstageRequest) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{27} + return file_clientpb_client_proto_rawDescGZIP(), []int{29} } func (x *UnstageRequest) GetAlias() string { @@ -1969,7 +2071,7 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} if protoimpl.UnsafeEnabled { - mi := &file_clientpb_client_proto_msgTypes[28] + mi := &file_clientpb_client_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1982,7 +2084,7 @@ func (x *Empty) String() string { func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_clientpb_client_proto_msgTypes[28] + mi := &file_clientpb_client_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1995,7 +2097,7 @@ func (x *Empty) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty.ProtoReflect.Descriptor instead. func (*Empty) Descriptor() ([]byte, []int) { - return file_clientpb_client_proto_rawDescGZIP(), []int{28} + return file_clientpb_client_proto_rawDescGZIP(), []int{30} } var File_clientpb_client_proto protoreflect.FileDescriptor @@ -2031,199 +2133,206 @@ var file_clientpb_client_proto_rawDesc = []byte{ 0x22, 0x39, 0x0a, 0x08, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x52, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x22, 0x29, 0x0a, 0x0c, 0x41, - 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x88, 0x02, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x53, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x4f, 0x53, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x63, - 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x0a, - 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, - 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, - 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, - 0x79, 0x22, 0x31, 0x0a, 0x06, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x06, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x37, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, - 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, - 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x73, 0x65, 0x43, 0x72, 0x65, 0x64, 0x73, 0x22, 0x1c, - 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x69, 0x74, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x10, 0x01, 0x22, 0x6d, 0x0a, 0x10, - 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x34, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, - 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x53, 0x0a, 0x0d, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x6b, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x39, 0x0a, - 0x08, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0xe8, 0x01, 0x0a, 0x12, 0x53, 0x61, 0x76, - 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 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, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x43, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, - 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6d, 0x6d, 0x75, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6d, 0x6d, - 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x6d, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, - 0x31, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x73, 0x22, 0x23, 0x0a, 0x0f, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x05, 0x52, 0x03, 0x49, 0x44, 0x73, 0x22, 0x97, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, - 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4f, 0x77, 0x6e, 0x65, - 0x72, 0x22, 0x39, 0x0a, 0x08, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, - 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x92, 0x01, 0x0a, - 0x0b, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, + 0x72, 0x52, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x22, 0x58, 0x0a, 0x06, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x22, 0x35, 0x0a, 0x07, + 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x73, 0x22, 0x29, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x88, + 0x02, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x53, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x4f, + 0x53, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x61, 0x72, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x22, 0x31, 0x0a, 0x06, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x0e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x49, + 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, + 0x5f, 0x63, 0x72, 0x65, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x43, 0x72, 0x65, 0x64, 0x73, 0x22, 0x1c, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x07, 0x0a, 0x03, 0x47, 0x69, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x10, 0x01, 0x22, 0x6d, 0x0a, 0x10, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x23, + 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x22, 0x53, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x6b, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, + 0x22, 0xe8, 0x01, 0x0a, 0x12, 0x53, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 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, 0x1d, 0x0a, 0x0a, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x1e, 0x0a, 0x0a, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, + 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6d, 0x0a, 0x0b, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, + 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x23, 0x0a, 0x0f, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x03, 0x49, 0x44, 0x73, 0x22, + 0x97, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x72, 0x67, - 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x31, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x52, 0x04, 0x64, 0x65, - 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x04, 0x44, 0x65, - 0x73, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, - 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x22, 0x80, 0x01, 0x0a, 0x0c, - 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0xf5, - 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, - 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1a, - 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x49, 0x44, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x47, 0x49, 0x44, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x49, - 0x44, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x50, 0x49, 0x44, 0x12, 0x19, 0x0a, 0x08, - 0x68, 0x6f, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x68, 0x6f, 0x6d, 0x65, 0x44, 0x69, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x49, 0x50, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, 0x50, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4d, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x12, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x12, 0x46, - 0x72, 0x65, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0x35, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x67, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, - 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x30, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x53, - 0x74, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, - 0x1a, 0x4d, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, - 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x3d, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x67, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x26, - 0x0a, 0x0e, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, - 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x79, - 0x67, 0x72, 0x75, 0x6d, 0x2f, 0x6d, 0x6f, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x04, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x39, 0x0a, 0x08, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, + 0x70, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0xc7, 0x01, 0x0a, 0x0e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x29, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2e, + 0x44, 0x65, 0x73, 0x74, 0x52, 0x04, 0x64, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x04, 0x44, 0x65, 0x73, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x69, + 0x6c, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x10, 0x01, + 0x12, 0x11, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x22, 0x80, 0x01, 0x0a, 0x0c, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x36, + 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0xf5, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x55, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x49, 0x44, + 0x12, 0x10, 0x0a, 0x03, 0x47, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x47, + 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x49, 0x44, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x50, 0x49, 0x44, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x6f, 0x6d, 0x65, 0x5f, 0x64, 0x69, 0x72, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x6f, 0x6d, 0x65, 0x44, 0x69, 0x72, 0x12, + 0x1d, 0x0a, 0x0a, 0x49, 0x50, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x54, + 0x0a, 0x12, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x12, 0x46, 0x72, 0x65, 0x65, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x09, 0x53, 0x74, + 0x61, 0x67, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x1a, 0x4d, 0x0a, 0x0a, 0x53, 0x74, 0x61, + 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x3d, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x67, + 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x26, 0x0a, 0x0e, 0x55, 0x6e, 0x73, 0x74, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, + 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x79, 0x67, 0x72, 0x75, 0x6d, 0x2f, 0x6d, 0x6f, + 0x6e, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -2239,64 +2348,67 @@ func file_clientpb_client_proto_rawDescGZIP() []byte { } var file_clientpb_client_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_clientpb_client_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_clientpb_client_proto_msgTypes = make([]protoimpl.MessageInfo, 33) var file_clientpb_client_proto_goTypes = []interface{}{ (InstallRequest_Source)(0), // 0: clientpb.InstallRequest.Source (ResponseDetail_Dest)(0), // 1: clientpb.ResponseDetail.Dest (*BuilderRequest)(nil), // 2: clientpb.BuilderRequest (*Builder)(nil), // 3: clientpb.Builder (*Builders)(nil), // 4: clientpb.Builders - (*AgentRequest)(nil), // 5: clientpb.AgentRequest - (*Agent)(nil), // 6: clientpb.Agent - (*Agents)(nil), // 7: clientpb.Agents - (*ProfileRequest)(nil), // 8: clientpb.ProfileRequest - (*InstallRequest)(nil), // 9: clientpb.InstallRequest - (*UninstallRequest)(nil), // 10: clientpb.UninstallRequest - (*ProfileRecord)(nil), // 11: clientpb.ProfileRecord - (*Profile)(nil), // 12: clientpb.Profile - (*Profiles)(nil), // 13: clientpb.Profiles - (*SaveProfileRequest)(nil), // 14: clientpb.SaveProfileRequest - (*ProfileData)(nil), // 15: clientpb.ProfileData - (*SessionsRequest)(nil), // 16: clientpb.SessionsRequest - (*Session)(nil), // 17: clientpb.Session - (*Sessions)(nil), // 18: clientpb.Sessions - (*HTTPRequest)(nil), // 19: clientpb.HTTPRequest - (*ResponseDetail)(nil), // 20: clientpb.ResponseDetail - (*HTTPResponse)(nil), // 21: clientpb.HTTPResponse - (*Registration)(nil), // 22: clientpb.Registration - (*NotifyRequest)(nil), // 23: clientpb.NotifyRequest - (*LockSessionRequest)(nil), // 24: clientpb.LockSessionRequest - (*FreeSessionRequest)(nil), // 25: clientpb.FreeSessionRequest - (*StageItem)(nil), // 26: clientpb.StageItem - (*Stage)(nil), // 27: clientpb.Stage - (*StageAddRequest)(nil), // 28: clientpb.StageAddRequest - (*UnstageRequest)(nil), // 29: clientpb.UnstageRequest - (*Empty)(nil), // 30: clientpb.Empty - nil, // 31: clientpb.SaveProfileRequest.OptionsEntry - nil, // 32: clientpb.Stage.StageEntry - (builderpb.Status)(0), // 33: builderpb.Status + (*PlayerRequest)(nil), // 5: clientpb.PlayerRequest + (*Player)(nil), // 6: clientpb.Player + (*Players)(nil), // 7: clientpb.Players + (*AgentRequest)(nil), // 8: clientpb.AgentRequest + (*Agent)(nil), // 9: clientpb.Agent + (*Agents)(nil), // 10: clientpb.Agents + (*ProfileRequest)(nil), // 11: clientpb.ProfileRequest + (*InstallRequest)(nil), // 12: clientpb.InstallRequest + (*UninstallRequest)(nil), // 13: clientpb.UninstallRequest + (*ProfileRecord)(nil), // 14: clientpb.ProfileRecord + (*Profile)(nil), // 15: clientpb.Profile + (*Profiles)(nil), // 16: clientpb.Profiles + (*SaveProfileRequest)(nil), // 17: clientpb.SaveProfileRequest + (*ProfileData)(nil), // 18: clientpb.ProfileData + (*SessionsRequest)(nil), // 19: clientpb.SessionsRequest + (*Session)(nil), // 20: clientpb.Session + (*Sessions)(nil), // 21: clientpb.Sessions + (*HTTPRequest)(nil), // 22: clientpb.HTTPRequest + (*ResponseDetail)(nil), // 23: clientpb.ResponseDetail + (*HTTPResponse)(nil), // 24: clientpb.HTTPResponse + (*Registration)(nil), // 25: clientpb.Registration + (*LockSessionRequest)(nil), // 26: clientpb.LockSessionRequest + (*FreeSessionRequest)(nil), // 27: clientpb.FreeSessionRequest + (*StageItem)(nil), // 28: clientpb.StageItem + (*Stage)(nil), // 29: clientpb.Stage + (*StageAddRequest)(nil), // 30: clientpb.StageAddRequest + (*UnstageRequest)(nil), // 31: clientpb.UnstageRequest + (*Empty)(nil), // 32: clientpb.Empty + nil, // 33: clientpb.SaveProfileRequest.OptionsEntry + nil, // 34: clientpb.Stage.StageEntry + (builderpb.Status)(0), // 35: builderpb.Status } var file_clientpb_client_proto_depIdxs = []int32{ 3, // 0: clientpb.Builders.builders:type_name -> clientpb.Builder - 6, // 1: clientpb.Agents.agents:type_name -> clientpb.Agent - 0, // 2: clientpb.InstallRequest.source:type_name -> clientpb.InstallRequest.Source - 2, // 3: clientpb.UninstallRequest.builders:type_name -> clientpb.BuilderRequest - 12, // 4: clientpb.Profiles.profiles:type_name -> clientpb.Profile - 31, // 5: clientpb.SaveProfileRequest.options:type_name -> clientpb.SaveProfileRequest.OptionsEntry - 12, // 6: clientpb.ProfileData.profile:type_name -> clientpb.Profile - 11, // 7: clientpb.ProfileData.records:type_name -> clientpb.ProfileRecord - 22, // 8: clientpb.Session.info:type_name -> clientpb.Registration - 17, // 9: clientpb.Sessions.sessions:type_name -> clientpb.Session - 33, // 10: clientpb.ResponseDetail.status:type_name -> builderpb.Status - 1, // 11: clientpb.ResponseDetail.dest:type_name -> clientpb.ResponseDetail.Dest - 20, // 12: clientpb.HTTPResponse.responses:type_name -> clientpb.ResponseDetail - 32, // 13: clientpb.Stage.stage:type_name -> clientpb.Stage.StageEntry - 26, // 14: clientpb.Stage.StageEntry.value:type_name -> clientpb.StageItem - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name + 6, // 1: clientpb.Players.players:type_name -> clientpb.Player + 9, // 2: clientpb.Agents.agents:type_name -> clientpb.Agent + 0, // 3: clientpb.InstallRequest.source:type_name -> clientpb.InstallRequest.Source + 2, // 4: clientpb.UninstallRequest.builders:type_name -> clientpb.BuilderRequest + 15, // 5: clientpb.Profiles.profiles:type_name -> clientpb.Profile + 33, // 6: clientpb.SaveProfileRequest.options:type_name -> clientpb.SaveProfileRequest.OptionsEntry + 15, // 7: clientpb.ProfileData.profile:type_name -> clientpb.Profile + 14, // 8: clientpb.ProfileData.records:type_name -> clientpb.ProfileRecord + 25, // 9: clientpb.Session.info:type_name -> clientpb.Registration + 20, // 10: clientpb.Sessions.sessions:type_name -> clientpb.Session + 35, // 11: clientpb.ResponseDetail.status:type_name -> builderpb.Status + 1, // 12: clientpb.ResponseDetail.dest:type_name -> clientpb.ResponseDetail.Dest + 23, // 13: clientpb.HTTPResponse.responses:type_name -> clientpb.ResponseDetail + 34, // 14: clientpb.Stage.stage:type_name -> clientpb.Stage.StageEntry + 28, // 15: clientpb.Stage.StageEntry.value:type_name -> clientpb.StageItem + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_clientpb_client_proto_init() } @@ -2342,7 +2454,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AgentRequest); i { + switch v := v.(*PlayerRequest); i { case 0: return &v.state case 1: @@ -2354,7 +2466,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Agent); i { + switch v := v.(*Player); i { case 0: return &v.state case 1: @@ -2366,7 +2478,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Agents); i { + switch v := v.(*Players); i { case 0: return &v.state case 1: @@ -2378,7 +2490,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProfileRequest); i { + switch v := v.(*AgentRequest); i { case 0: return &v.state case 1: @@ -2390,7 +2502,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstallRequest); i { + switch v := v.(*Agent); i { case 0: return &v.state case 1: @@ -2402,7 +2514,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UninstallRequest); i { + switch v := v.(*Agents); i { case 0: return &v.state case 1: @@ -2414,7 +2526,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProfileRecord); i { + switch v := v.(*ProfileRequest); i { case 0: return &v.state case 1: @@ -2426,7 +2538,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Profile); i { + switch v := v.(*InstallRequest); i { case 0: return &v.state case 1: @@ -2438,7 +2550,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Profiles); i { + switch v := v.(*UninstallRequest); i { case 0: return &v.state case 1: @@ -2450,7 +2562,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveProfileRequest); i { + switch v := v.(*ProfileRecord); i { case 0: return &v.state case 1: @@ -2462,7 +2574,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProfileData); i { + switch v := v.(*Profile); i { case 0: return &v.state case 1: @@ -2474,7 +2586,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SessionsRequest); i { + switch v := v.(*Profiles); i { case 0: return &v.state case 1: @@ -2486,7 +2598,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Session); i { + switch v := v.(*SaveProfileRequest); i { case 0: return &v.state case 1: @@ -2498,7 +2610,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Sessions); i { + switch v := v.(*ProfileData); i { case 0: return &v.state case 1: @@ -2510,7 +2622,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPRequest); i { + switch v := v.(*SessionsRequest); i { case 0: return &v.state case 1: @@ -2522,7 +2634,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResponseDetail); i { + switch v := v.(*Session); i { case 0: return &v.state case 1: @@ -2534,7 +2646,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPResponse); i { + switch v := v.(*Sessions); i { case 0: return &v.state case 1: @@ -2546,7 +2658,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Registration); i { + switch v := v.(*HTTPRequest); i { case 0: return &v.state case 1: @@ -2558,7 +2670,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NotifyRequest); i { + switch v := v.(*ResponseDetail); i { case 0: return &v.state case 1: @@ -2570,7 +2682,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LockSessionRequest); i { + switch v := v.(*HTTPResponse); i { case 0: return &v.state case 1: @@ -2582,7 +2694,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FreeSessionRequest); i { + switch v := v.(*Registration); i { case 0: return &v.state case 1: @@ -2594,7 +2706,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StageItem); i { + switch v := v.(*LockSessionRequest); i { case 0: return &v.state case 1: @@ -2606,7 +2718,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Stage); i { + switch v := v.(*FreeSessionRequest); i { case 0: return &v.state case 1: @@ -2618,7 +2730,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StageAddRequest); i { + switch v := v.(*StageItem); i { case 0: return &v.state case 1: @@ -2630,7 +2742,7 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnstageRequest); i { + switch v := v.(*Stage); i { case 0: return &v.state case 1: @@ -2642,6 +2754,30 @@ func file_clientpb_client_proto_init() { } } file_clientpb_client_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StageAddRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clientpb_client_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnstageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_clientpb_client_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Empty); i { case 0: return &v.state @@ -2660,7 +2796,7 @@ func file_clientpb_client_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_clientpb_client_proto_rawDesc, NumEnums: 2, - NumMessages: 31, + NumMessages: 33, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/protobuf/clientpb/client.proto b/pkg/protobuf/clientpb/client.proto index 312edb0..071fa76 100644 --- a/pkg/protobuf/clientpb/client.proto +++ b/pkg/protobuf/clientpb/client.proto @@ -24,6 +24,18 @@ message Builder { message Builders { repeated Builder builders = 1; } +message PlayerRequest { + repeated string names = 1; +} + +message Player { + string username = 1; + string role = 2; + string registered = 3; +} +message Players { + repeated Player players = 1; +} message AgentRequest { repeated string agent_id = 1; @@ -149,10 +161,6 @@ message Registration { string home_dir = 9; string IP_address = 10; } -message NotifyRequest { - string player_id = 1; - string player_name = 2; -} message LockSessionRequest { string player_name = 1; int32 session_id = 3; diff --git a/pkg/protobuf/rpcpb/services.pb.go b/pkg/protobuf/rpcpb/services.pb.go index 556284e..d3c93a3 100644 --- a/pkg/protobuf/rpcpb/services.pb.go +++ b/pkg/protobuf/rpcpb/services.pb.go @@ -138,6 +138,77 @@ func (x *Notification) GetMsg() string { return "" } +type Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` + Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` +} + +func (x *Message) Reset() { + *x = Message{} + if protoimpl.UnsafeEnabled { + mi := &file_rpcpb_services_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message) ProtoMessage() {} + +func (x *Message) ProtoReflect() protoreflect.Message { + mi := &file_rpcpb_services_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { + return file_rpcpb_services_proto_rawDescGZIP(), []int{1} +} + +func (x *Message) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +func (x *Message) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *Message) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *Message) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + var File_rpcpb_services_proto protoreflect.FileDescriptor var file_rpcpb_services_proto_rawDesc = []byte{ @@ -150,129 +221,143 @@ var file_rpcpb_services_proto_rawDesc = []byte{ 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6d, - 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x2a, 0x74, 0x0a, - 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, - 0x6c, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x44, 0x65, 0x62, 0x75, - 0x67, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x49, 0x6e, 0x66, 0x6f, - 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x53, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x57, 0x61, 0x72, - 0x6e, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x46, 0x61, 0x74, 0x61, - 0x6c, 0x10, 0x06, 0x32, 0xdc, 0x01, 0x0a, 0x07, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, - 0x4d, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x1e, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, - 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x42, - 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x2e, 0x62, + 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x53, 0x0a, + 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, + 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, + 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, + 0x73, 0x67, 0x2a, 0x74, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, + 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x44, 0x65, 0x62, 0x75, 0x67, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x57, 0x61, 0x72, 0x6e, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x46, 0x61, 0x74, 0x61, 0x6c, 0x10, 0x06, 0x32, 0xdc, 0x01, 0x0a, 0x07, 0x42, 0x75, 0x69, + 0x6c, 0x64, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x12, 0x1e, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x19, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x12, 0x17, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x32, 0x84, 0x0c, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x12, 0x34, - 0x0a, 0x06, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x10, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x73, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x08, 0x52, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x16, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x65, 0x72, 0x73, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x61, - 0x76, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0b, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x61, - 0x76, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x15, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x52, 0x6d, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x19, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, + 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, - 0x72, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, - 0x12, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x2e, 0x62, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x32, 0x9b, 0x0d, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x61, + 0x72, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x17, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x06, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x08, 0x4e, 0x65, 0x77, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x0f, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x1a, + 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x12, 0x35, 0x0a, 0x08, 0x52, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, + 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, 0x42, 0x75, 0x69, + 0x6c, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x73, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, + 0x00, 0x12, 0x3e, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x1c, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x61, 0x76, 0x65, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x12, 0x44, 0x0a, 0x0b, 0x4c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x1c, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x61, 0x76, 0x65, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0a, 0x52, 0x6d, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x2e, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x70, 0x62, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x07, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x49, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, + 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x36, + 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x17, 0x2e, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x07, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x70, + 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x00, 0x30, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x12, 0x1a, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x00, 0x30, 0x01, 0x12, 0x40, 0x0a, 0x09, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x12, 0x1a, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x55, - 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x13, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, - 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x09, - 0x48, 0x74, 0x74, 0x70, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a, - 0x09, 0x48, 0x74, 0x74, 0x70, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x72, 0x70, - 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x00, 0x12, 0x30, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x73, 0x43, 0x6c, 0x6f, 0x73, 0x65, - 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x19, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x00, 0x12, 0x3e, 0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x1c, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x3e, 0x0a, 0x0b, 0x46, 0x72, 0x65, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x1c, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x46, 0x72, 0x65, 0x65, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, - 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x4a, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x1e, 0x2e, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, - 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x15, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, - 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x67, 0x65, 0x56, - 0x69, 0x65, 0x77, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, - 0x53, 0x74, 0x61, 0x67, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x67, 0x65, - 0x41, 0x64, 0x64, 0x12, 0x19, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, - 0x74, 0x61, 0x67, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, - 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x67, 0x65, - 0x12, 0x18, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x74, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, - 0x06, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x17, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x30, 0x01, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x79, 0x67, 0x72, 0x75, 0x6d, 0x2f, 0x6d, - 0x6f, 0x6e, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x72, 0x70, 0x63, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x6e, 0x22, 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x4f, 0x70, + 0x65, 0x6e, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x09, 0x48, 0x74, + 0x74, 0x70, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x09, 0x48, + 0x74, 0x74, 0x70, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x70, + 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, + 0x12, 0x30, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x73, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x0f, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x08, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x00, 0x12, + 0x3e, 0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x3e, 0x0a, 0x0b, 0x46, 0x72, 0x65, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x46, 0x72, 0x65, 0x65, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x4a, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x1e, 0x2e, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x65, 0x72, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x04, 0x53, + 0x65, 0x6e, 0x64, 0x12, 0x15, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x48, + 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x67, 0x65, 0x56, 0x69, 0x65, + 0x77, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x74, + 0x61, 0x67, 0x65, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x67, 0x65, 0x41, 0x64, + 0x64, 0x12, 0x19, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, + 0x67, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, + 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x18, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x06, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x30, 0x01, 0x12, + 0x32, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0f, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, + 0x00, 0x30, 0x01, 0x12, 0x30, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x0e, 0x2e, 0x72, 0x70, 0x63, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x1a, 0x0f, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x79, 0x67, 0x72, 0x75, 0x6d, 0x2f, 0x6d, 0x6f, 0x6e, 0x61, 0x72, + 0x63, 0x68, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x72, 0x70, 0x63, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -288,101 +373,109 @@ func file_rpcpb_services_proto_rawDescGZIP() []byte { } var file_rpcpb_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_rpcpb_services_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_rpcpb_services_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_rpcpb_services_proto_goTypes = []interface{}{ (LogLevel)(0), // 0: rpcpb.LogLevel (*Notification)(nil), // 1: rpcpb.Notification - (*builderpb.DescriptionsRequest)(nil), // 2: builderpb.DescriptionsRequest - (*builderpb.OptionsRequest)(nil), // 3: builderpb.OptionsRequest - (*builderpb.BuildRequest)(nil), // 4: builderpb.BuildRequest - (*clientpb.AgentRequest)(nil), // 5: clientpb.AgentRequest - (*clientpb.Agent)(nil), // 6: clientpb.Agent - (*clientpb.BuilderRequest)(nil), // 7: clientpb.BuilderRequest - (*clientpb.ProfileRequest)(nil), // 8: clientpb.ProfileRequest - (*clientpb.SaveProfileRequest)(nil), // 9: clientpb.SaveProfileRequest - (*clientpb.InstallRequest)(nil), // 10: clientpb.InstallRequest - (*clientpb.UninstallRequest)(nil), // 11: clientpb.UninstallRequest - (*clientpb.Empty)(nil), // 12: clientpb.Empty - (*clientpb.SessionsRequest)(nil), // 13: clientpb.SessionsRequest - (*clientpb.LockSessionRequest)(nil), // 14: clientpb.LockSessionRequest - (*clientpb.FreeSessionRequest)(nil), // 15: clientpb.FreeSessionRequest - (*clientpb.HTTPRequest)(nil), // 16: clientpb.HTTPRequest - (*clientpb.StageAddRequest)(nil), // 17: clientpb.StageAddRequest - (*clientpb.UnstageRequest)(nil), // 18: clientpb.UnstageRequest - (*clientpb.NotifyRequest)(nil), // 19: clientpb.NotifyRequest - (*builderpb.DescriptionsReply)(nil), // 20: builderpb.DescriptionsReply - (*builderpb.OptionsReply)(nil), // 21: builderpb.OptionsReply - (*builderpb.BuildReply)(nil), // 22: builderpb.BuildReply - (*clientpb.Agents)(nil), // 23: clientpb.Agents - (*clientpb.Builders)(nil), // 24: clientpb.Builders - (*clientpb.Profiles)(nil), // 25: clientpb.Profiles - (*clientpb.ProfileData)(nil), // 26: clientpb.ProfileData - (*clientpb.Sessions)(nil), // 27: clientpb.Sessions - (*clientpb.HTTPResponse)(nil), // 28: clientpb.HTTPResponse - (*clientpb.Stage)(nil), // 29: clientpb.Stage + (*Message)(nil), // 2: rpcpb.Message + (*builderpb.DescriptionsRequest)(nil), // 3: builderpb.DescriptionsRequest + (*builderpb.OptionsRequest)(nil), // 4: builderpb.OptionsRequest + (*builderpb.BuildRequest)(nil), // 5: builderpb.BuildRequest + (*clientpb.PlayerRequest)(nil), // 6: clientpb.PlayerRequest + (*clientpb.AgentRequest)(nil), // 7: clientpb.AgentRequest + (*clientpb.Agent)(nil), // 8: clientpb.Agent + (*clientpb.BuilderRequest)(nil), // 9: clientpb.BuilderRequest + (*clientpb.ProfileRequest)(nil), // 10: clientpb.ProfileRequest + (*clientpb.SaveProfileRequest)(nil), // 11: clientpb.SaveProfileRequest + (*clientpb.InstallRequest)(nil), // 12: clientpb.InstallRequest + (*clientpb.UninstallRequest)(nil), // 13: clientpb.UninstallRequest + (*clientpb.Empty)(nil), // 14: clientpb.Empty + (*clientpb.SessionsRequest)(nil), // 15: clientpb.SessionsRequest + (*clientpb.LockSessionRequest)(nil), // 16: clientpb.LockSessionRequest + (*clientpb.FreeSessionRequest)(nil), // 17: clientpb.FreeSessionRequest + (*clientpb.HTTPRequest)(nil), // 18: clientpb.HTTPRequest + (*clientpb.StageAddRequest)(nil), // 19: clientpb.StageAddRequest + (*clientpb.UnstageRequest)(nil), // 20: clientpb.UnstageRequest + (*builderpb.DescriptionsReply)(nil), // 21: builderpb.DescriptionsReply + (*builderpb.OptionsReply)(nil), // 22: builderpb.OptionsReply + (*builderpb.BuildReply)(nil), // 23: builderpb.BuildReply + (*clientpb.Players)(nil), // 24: clientpb.Players + (*clientpb.Agents)(nil), // 25: clientpb.Agents + (*clientpb.Builders)(nil), // 26: clientpb.Builders + (*clientpb.Profiles)(nil), // 27: clientpb.Profiles + (*clientpb.ProfileData)(nil), // 28: clientpb.ProfileData + (*clientpb.Sessions)(nil), // 29: clientpb.Sessions + (*clientpb.HTTPResponse)(nil), // 30: clientpb.HTTPResponse + (*clientpb.Stage)(nil), // 31: clientpb.Stage } var file_rpcpb_services_proto_depIdxs = []int32{ 0, // 0: rpcpb.Notification.log_level:type_name -> rpcpb.LogLevel - 2, // 1: rpcpb.Builder.GetCommands:input_type -> builderpb.DescriptionsRequest - 3, // 2: rpcpb.Builder.GetOptions:input_type -> builderpb.OptionsRequest - 4, // 3: rpcpb.Builder.BuildAgent:input_type -> builderpb.BuildRequest - 5, // 4: rpcpb.Monarch.Agents:input_type -> clientpb.AgentRequest - 6, // 5: rpcpb.Monarch.NewAgent:input_type -> clientpb.Agent - 5, // 6: rpcpb.Monarch.RmAgents:input_type -> clientpb.AgentRequest - 7, // 7: rpcpb.Monarch.Builders:input_type -> clientpb.BuilderRequest - 8, // 8: rpcpb.Monarch.Profiles:input_type -> clientpb.ProfileRequest - 9, // 9: rpcpb.Monarch.SaveProfile:input_type -> clientpb.SaveProfileRequest - 9, // 10: rpcpb.Monarch.LoadProfile:input_type -> clientpb.SaveProfileRequest - 8, // 11: rpcpb.Monarch.RmProfiles:input_type -> clientpb.ProfileRequest - 3, // 12: rpcpb.Monarch.Options:input_type -> builderpb.OptionsRequest - 4, // 13: rpcpb.Monarch.Build:input_type -> builderpb.BuildRequest - 4, // 14: rpcpb.Monarch.EndBuild:input_type -> builderpb.BuildRequest - 10, // 15: rpcpb.Monarch.Install:input_type -> clientpb.InstallRequest - 11, // 16: rpcpb.Monarch.Uninstall:input_type -> clientpb.UninstallRequest - 12, // 17: rpcpb.Monarch.HttpOpen:input_type -> clientpb.Empty - 12, // 18: rpcpb.Monarch.HttpClose:input_type -> clientpb.Empty - 12, // 19: rpcpb.Monarch.HttpsOpen:input_type -> clientpb.Empty - 12, // 20: rpcpb.Monarch.HttpsClose:input_type -> clientpb.Empty - 13, // 21: rpcpb.Monarch.Sessions:input_type -> clientpb.SessionsRequest - 14, // 22: rpcpb.Monarch.LockSession:input_type -> clientpb.LockSessionRequest - 15, // 23: rpcpb.Monarch.FreeSession:input_type -> clientpb.FreeSessionRequest - 2, // 24: rpcpb.Monarch.Commands:input_type -> builderpb.DescriptionsRequest - 16, // 25: rpcpb.Monarch.Send:input_type -> clientpb.HTTPRequest - 12, // 26: rpcpb.Monarch.StageView:input_type -> clientpb.Empty - 17, // 27: rpcpb.Monarch.StageAdd:input_type -> clientpb.StageAddRequest - 18, // 28: rpcpb.Monarch.Unstage:input_type -> clientpb.UnstageRequest - 19, // 29: rpcpb.Monarch.Notify:input_type -> clientpb.NotifyRequest - 20, // 30: rpcpb.Builder.GetCommands:output_type -> builderpb.DescriptionsReply - 21, // 31: rpcpb.Builder.GetOptions:output_type -> builderpb.OptionsReply - 22, // 32: rpcpb.Builder.BuildAgent:output_type -> builderpb.BuildReply - 23, // 33: rpcpb.Monarch.Agents:output_type -> clientpb.Agents - 12, // 34: rpcpb.Monarch.NewAgent:output_type -> clientpb.Empty - 12, // 35: rpcpb.Monarch.RmAgents:output_type -> clientpb.Empty - 24, // 36: rpcpb.Monarch.Builders:output_type -> clientpb.Builders - 25, // 37: rpcpb.Monarch.Profiles:output_type -> clientpb.Profiles - 12, // 38: rpcpb.Monarch.SaveProfile:output_type -> clientpb.Empty - 26, // 39: rpcpb.Monarch.LoadProfile:output_type -> clientpb.ProfileData - 12, // 40: rpcpb.Monarch.RmProfiles:output_type -> clientpb.Empty - 21, // 41: rpcpb.Monarch.Options:output_type -> builderpb.OptionsReply - 22, // 42: rpcpb.Monarch.Build:output_type -> builderpb.BuildReply - 12, // 43: rpcpb.Monarch.EndBuild:output_type -> clientpb.Empty - 1, // 44: rpcpb.Monarch.Install:output_type -> rpcpb.Notification - 1, // 45: rpcpb.Monarch.Uninstall:output_type -> rpcpb.Notification - 1, // 46: rpcpb.Monarch.HttpOpen:output_type -> rpcpb.Notification - 12, // 47: rpcpb.Monarch.HttpClose:output_type -> clientpb.Empty - 1, // 48: rpcpb.Monarch.HttpsOpen:output_type -> rpcpb.Notification - 12, // 49: rpcpb.Monarch.HttpsClose:output_type -> clientpb.Empty - 27, // 50: rpcpb.Monarch.Sessions:output_type -> clientpb.Sessions - 12, // 51: rpcpb.Monarch.LockSession:output_type -> clientpb.Empty - 12, // 52: rpcpb.Monarch.FreeSession:output_type -> clientpb.Empty - 20, // 53: rpcpb.Monarch.Commands:output_type -> builderpb.DescriptionsReply - 28, // 54: rpcpb.Monarch.Send:output_type -> clientpb.HTTPResponse - 29, // 55: rpcpb.Monarch.StageView:output_type -> clientpb.Stage - 1, // 56: rpcpb.Monarch.StageAdd:output_type -> rpcpb.Notification - 12, // 57: rpcpb.Monarch.Unstage:output_type -> clientpb.Empty - 1, // 58: rpcpb.Monarch.Notify:output_type -> rpcpb.Notification - 30, // [30:59] is the sub-list for method output_type - 1, // [1:30] is the sub-list for method input_type + 3, // 1: rpcpb.Builder.GetCommands:input_type -> builderpb.DescriptionsRequest + 4, // 2: rpcpb.Builder.GetOptions:input_type -> builderpb.OptionsRequest + 5, // 3: rpcpb.Builder.BuildAgent:input_type -> builderpb.BuildRequest + 6, // 4: rpcpb.Monarch.Players:input_type -> clientpb.PlayerRequest + 7, // 5: rpcpb.Monarch.Agents:input_type -> clientpb.AgentRequest + 8, // 6: rpcpb.Monarch.NewAgent:input_type -> clientpb.Agent + 7, // 7: rpcpb.Monarch.RmAgents:input_type -> clientpb.AgentRequest + 9, // 8: rpcpb.Monarch.Builders:input_type -> clientpb.BuilderRequest + 10, // 9: rpcpb.Monarch.Profiles:input_type -> clientpb.ProfileRequest + 11, // 10: rpcpb.Monarch.SaveProfile:input_type -> clientpb.SaveProfileRequest + 11, // 11: rpcpb.Monarch.LoadProfile:input_type -> clientpb.SaveProfileRequest + 10, // 12: rpcpb.Monarch.RmProfiles:input_type -> clientpb.ProfileRequest + 4, // 13: rpcpb.Monarch.Options:input_type -> builderpb.OptionsRequest + 5, // 14: rpcpb.Monarch.Build:input_type -> builderpb.BuildRequest + 5, // 15: rpcpb.Monarch.EndBuild:input_type -> builderpb.BuildRequest + 12, // 16: rpcpb.Monarch.Install:input_type -> clientpb.InstallRequest + 13, // 17: rpcpb.Monarch.Uninstall:input_type -> clientpb.UninstallRequest + 14, // 18: rpcpb.Monarch.HttpOpen:input_type -> clientpb.Empty + 14, // 19: rpcpb.Monarch.HttpClose:input_type -> clientpb.Empty + 14, // 20: rpcpb.Monarch.HttpsOpen:input_type -> clientpb.Empty + 14, // 21: rpcpb.Monarch.HttpsClose:input_type -> clientpb.Empty + 15, // 22: rpcpb.Monarch.Sessions:input_type -> clientpb.SessionsRequest + 16, // 23: rpcpb.Monarch.LockSession:input_type -> clientpb.LockSessionRequest + 17, // 24: rpcpb.Monarch.FreeSession:input_type -> clientpb.FreeSessionRequest + 3, // 25: rpcpb.Monarch.Commands:input_type -> builderpb.DescriptionsRequest + 18, // 26: rpcpb.Monarch.Send:input_type -> clientpb.HTTPRequest + 14, // 27: rpcpb.Monarch.StageView:input_type -> clientpb.Empty + 19, // 28: rpcpb.Monarch.StageAdd:input_type -> clientpb.StageAddRequest + 20, // 29: rpcpb.Monarch.Unstage:input_type -> clientpb.UnstageRequest + 14, // 30: rpcpb.Monarch.Notify:input_type -> clientpb.Empty + 14, // 31: rpcpb.Monarch.GetMessages:input_type -> clientpb.Empty + 2, // 32: rpcpb.Monarch.SendMessage:input_type -> rpcpb.Message + 21, // 33: rpcpb.Builder.GetCommands:output_type -> builderpb.DescriptionsReply + 22, // 34: rpcpb.Builder.GetOptions:output_type -> builderpb.OptionsReply + 23, // 35: rpcpb.Builder.BuildAgent:output_type -> builderpb.BuildReply + 24, // 36: rpcpb.Monarch.Players:output_type -> clientpb.Players + 25, // 37: rpcpb.Monarch.Agents:output_type -> clientpb.Agents + 14, // 38: rpcpb.Monarch.NewAgent:output_type -> clientpb.Empty + 14, // 39: rpcpb.Monarch.RmAgents:output_type -> clientpb.Empty + 26, // 40: rpcpb.Monarch.Builders:output_type -> clientpb.Builders + 27, // 41: rpcpb.Monarch.Profiles:output_type -> clientpb.Profiles + 14, // 42: rpcpb.Monarch.SaveProfile:output_type -> clientpb.Empty + 28, // 43: rpcpb.Monarch.LoadProfile:output_type -> clientpb.ProfileData + 14, // 44: rpcpb.Monarch.RmProfiles:output_type -> clientpb.Empty + 22, // 45: rpcpb.Monarch.Options:output_type -> builderpb.OptionsReply + 23, // 46: rpcpb.Monarch.Build:output_type -> builderpb.BuildReply + 14, // 47: rpcpb.Monarch.EndBuild:output_type -> clientpb.Empty + 1, // 48: rpcpb.Monarch.Install:output_type -> rpcpb.Notification + 1, // 49: rpcpb.Monarch.Uninstall:output_type -> rpcpb.Notification + 1, // 50: rpcpb.Monarch.HttpOpen:output_type -> rpcpb.Notification + 14, // 51: rpcpb.Monarch.HttpClose:output_type -> clientpb.Empty + 1, // 52: rpcpb.Monarch.HttpsOpen:output_type -> rpcpb.Notification + 14, // 53: rpcpb.Monarch.HttpsClose:output_type -> clientpb.Empty + 29, // 54: rpcpb.Monarch.Sessions:output_type -> clientpb.Sessions + 14, // 55: rpcpb.Monarch.LockSession:output_type -> clientpb.Empty + 14, // 56: rpcpb.Monarch.FreeSession:output_type -> clientpb.Empty + 21, // 57: rpcpb.Monarch.Commands:output_type -> builderpb.DescriptionsReply + 30, // 58: rpcpb.Monarch.Send:output_type -> clientpb.HTTPResponse + 31, // 59: rpcpb.Monarch.StageView:output_type -> clientpb.Stage + 1, // 60: rpcpb.Monarch.StageAdd:output_type -> rpcpb.Notification + 14, // 61: rpcpb.Monarch.Unstage:output_type -> clientpb.Empty + 1, // 62: rpcpb.Monarch.Notify:output_type -> rpcpb.Notification + 2, // 63: rpcpb.Monarch.GetMessages:output_type -> rpcpb.Message + 14, // 64: rpcpb.Monarch.SendMessage:output_type -> clientpb.Empty + 33, // [33:65] is the sub-list for method output_type + 1, // [1:33] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -406,6 +499,18 @@ func file_rpcpb_services_proto_init() { return nil } } + file_rpcpb_services_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -413,7 +518,7 @@ func file_rpcpb_services_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_rpcpb_services_proto_rawDesc, NumEnums: 1, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 2, }, diff --git a/pkg/protobuf/rpcpb/services.proto b/pkg/protobuf/rpcpb/services.proto index c9e8642..8208625 100644 --- a/pkg/protobuf/rpcpb/services.proto +++ b/pkg/protobuf/rpcpb/services.proto @@ -19,6 +19,12 @@ message Notification { LogLevel log_level = 1; string msg = 2; } +message Message { + string role = 1; + string from = 2; + string to = 3; + string msg = 4; +} service Builder { rpc GetCommands (builderpb.DescriptionsRequest) returns (builderpb.DescriptionsReply) {} @@ -27,6 +33,7 @@ service Builder { } service Monarch { + rpc Players(clientpb.PlayerRequest) returns (clientpb.Players) {} rpc Agents(clientpb.AgentRequest) returns (clientpb.Agents) {} rpc NewAgent(clientpb.Agent) returns (clientpb.Empty) {} rpc RmAgents(clientpb.AgentRequest) returns (clientpb.Empty) {} @@ -61,5 +68,7 @@ service Monarch { rpc Unstage(clientpb.UnstageRequest) returns (clientpb.Empty) {} // Notify used for general notifications - likely run from a goroutine - rpc Notify(clientpb.NotifyRequest) returns (stream Notification) {} + rpc Notify(clientpb.Empty) returns (stream Notification) {} + rpc GetMessages(clientpb.Empty) returns (stream Message) {} + rpc SendMessage(Message) returns (clientpb.Empty) {} } diff --git a/pkg/protobuf/rpcpb/services_grpc.pb.go b/pkg/protobuf/rpcpb/services_grpc.pb.go index 3199892..5a3cfe0 100644 --- a/pkg/protobuf/rpcpb/services_grpc.pb.go +++ b/pkg/protobuf/rpcpb/services_grpc.pb.go @@ -182,6 +182,7 @@ var Builder_ServiceDesc = grpc.ServiceDesc{ // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type MonarchClient interface { + Players(ctx context.Context, in *clientpb.PlayerRequest, opts ...grpc.CallOption) (*clientpb.Players, error) Agents(ctx context.Context, in *clientpb.AgentRequest, opts ...grpc.CallOption) (*clientpb.Agents, error) NewAgent(ctx context.Context, in *clientpb.Agent, opts ...grpc.CallOption) (*clientpb.Empty, error) RmAgents(ctx context.Context, in *clientpb.AgentRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) @@ -208,7 +209,9 @@ type MonarchClient interface { StageAdd(ctx context.Context, in *clientpb.StageAddRequest, opts ...grpc.CallOption) (*Notification, error) Unstage(ctx context.Context, in *clientpb.UnstageRequest, opts ...grpc.CallOption) (*clientpb.Empty, error) // Notify used for general notifications - likely run from a goroutine - Notify(ctx context.Context, in *clientpb.NotifyRequest, opts ...grpc.CallOption) (Monarch_NotifyClient, error) + Notify(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (Monarch_NotifyClient, error) + GetMessages(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (Monarch_GetMessagesClient, error) + SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*clientpb.Empty, error) } type monarchClient struct { @@ -219,6 +222,15 @@ func NewMonarchClient(cc grpc.ClientConnInterface) MonarchClient { return &monarchClient{cc} } +func (c *monarchClient) Players(ctx context.Context, in *clientpb.PlayerRequest, opts ...grpc.CallOption) (*clientpb.Players, error) { + out := new(clientpb.Players) + err := c.cc.Invoke(ctx, "/rpcpb.Monarch/Players", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *monarchClient) Agents(ctx context.Context, in *clientpb.AgentRequest, opts ...grpc.CallOption) (*clientpb.Agents, error) { out := new(clientpb.Agents) err := c.cc.Invoke(ctx, "/rpcpb.Monarch/Agents", in, out, opts...) @@ -490,7 +502,7 @@ func (c *monarchClient) Unstage(ctx context.Context, in *clientpb.UnstageRequest return out, nil } -func (c *monarchClient) Notify(ctx context.Context, in *clientpb.NotifyRequest, opts ...grpc.CallOption) (Monarch_NotifyClient, error) { +func (c *monarchClient) Notify(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (Monarch_NotifyClient, error) { stream, err := c.cc.NewStream(ctx, &Monarch_ServiceDesc.Streams[2], "/rpcpb.Monarch/Notify", opts...) if err != nil { return nil, err @@ -522,10 +534,52 @@ func (x *monarchNotifyClient) Recv() (*Notification, error) { return m, nil } +func (c *monarchClient) GetMessages(ctx context.Context, in *clientpb.Empty, opts ...grpc.CallOption) (Monarch_GetMessagesClient, error) { + stream, err := c.cc.NewStream(ctx, &Monarch_ServiceDesc.Streams[3], "/rpcpb.Monarch/GetMessages", opts...) + if err != nil { + return nil, err + } + x := &monarchGetMessagesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Monarch_GetMessagesClient interface { + Recv() (*Message, error) + grpc.ClientStream +} + +type monarchGetMessagesClient struct { + grpc.ClientStream +} + +func (x *monarchGetMessagesClient) Recv() (*Message, error) { + m := new(Message) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *monarchClient) SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*clientpb.Empty, error) { + out := new(clientpb.Empty) + err := c.cc.Invoke(ctx, "/rpcpb.Monarch/SendMessage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MonarchServer is the server API for Monarch service. // All implementations must embed UnimplementedMonarchServer // for forward compatibility type MonarchServer interface { + Players(context.Context, *clientpb.PlayerRequest) (*clientpb.Players, error) Agents(context.Context, *clientpb.AgentRequest) (*clientpb.Agents, error) NewAgent(context.Context, *clientpb.Agent) (*clientpb.Empty, error) RmAgents(context.Context, *clientpb.AgentRequest) (*clientpb.Empty, error) @@ -552,7 +606,9 @@ type MonarchServer interface { StageAdd(context.Context, *clientpb.StageAddRequest) (*Notification, error) Unstage(context.Context, *clientpb.UnstageRequest) (*clientpb.Empty, error) // Notify used for general notifications - likely run from a goroutine - Notify(*clientpb.NotifyRequest, Monarch_NotifyServer) error + Notify(*clientpb.Empty, Monarch_NotifyServer) error + GetMessages(*clientpb.Empty, Monarch_GetMessagesServer) error + SendMessage(context.Context, *Message) (*clientpb.Empty, error) mustEmbedUnimplementedMonarchServer() } @@ -560,6 +616,9 @@ type MonarchServer interface { type UnimplementedMonarchServer struct { } +func (UnimplementedMonarchServer) Players(context.Context, *clientpb.PlayerRequest) (*clientpb.Players, error) { + return nil, status.Errorf(codes.Unimplemented, "method Players not implemented") +} func (UnimplementedMonarchServer) Agents(context.Context, *clientpb.AgentRequest) (*clientpb.Agents, error) { return nil, status.Errorf(codes.Unimplemented, "method Agents not implemented") } @@ -635,9 +694,15 @@ func (UnimplementedMonarchServer) StageAdd(context.Context, *clientpb.StageAddRe func (UnimplementedMonarchServer) Unstage(context.Context, *clientpb.UnstageRequest) (*clientpb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Unstage not implemented") } -func (UnimplementedMonarchServer) Notify(*clientpb.NotifyRequest, Monarch_NotifyServer) error { +func (UnimplementedMonarchServer) Notify(*clientpb.Empty, Monarch_NotifyServer) error { return status.Errorf(codes.Unimplemented, "method Notify not implemented") } +func (UnimplementedMonarchServer) GetMessages(*clientpb.Empty, Monarch_GetMessagesServer) error { + return status.Errorf(codes.Unimplemented, "method GetMessages not implemented") +} +func (UnimplementedMonarchServer) SendMessage(context.Context, *Message) (*clientpb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented") +} func (UnimplementedMonarchServer) mustEmbedUnimplementedMonarchServer() {} // UnsafeMonarchServer may be embedded to opt out of forward compatibility for this service. @@ -651,6 +716,24 @@ func RegisterMonarchServer(s grpc.ServiceRegistrar, srv MonarchServer) { s.RegisterService(&Monarch_ServiceDesc, srv) } +func _Monarch_Players_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(clientpb.PlayerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MonarchServer).Players(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcpb.Monarch/Players", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MonarchServer).Players(ctx, req.(*clientpb.PlayerRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Monarch_Agents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(clientpb.AgentRequest) if err := dec(in); err != nil { @@ -1108,7 +1191,7 @@ func _Monarch_Unstage_Handler(srv interface{}, ctx context.Context, dec func(int } func _Monarch_Notify_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(clientpb.NotifyRequest) + m := new(clientpb.Empty) if err := stream.RecvMsg(m); err != nil { return err } @@ -1128,6 +1211,45 @@ func (x *monarchNotifyServer) Send(m *Notification) error { return x.ServerStream.SendMsg(m) } +func _Monarch_GetMessages_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(clientpb.Empty) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(MonarchServer).GetMessages(m, &monarchGetMessagesServer{stream}) +} + +type Monarch_GetMessagesServer interface { + Send(*Message) error + grpc.ServerStream +} + +type monarchGetMessagesServer struct { + grpc.ServerStream +} + +func (x *monarchGetMessagesServer) Send(m *Message) error { + return x.ServerStream.SendMsg(m) +} + +func _Monarch_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Message) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MonarchServer).SendMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rpcpb.Monarch/SendMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MonarchServer).SendMessage(ctx, req.(*Message)) + } + return interceptor(ctx, in, info, handler) +} + // Monarch_ServiceDesc is the grpc.ServiceDesc for Monarch service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1135,6 +1257,10 @@ var Monarch_ServiceDesc = grpc.ServiceDesc{ ServiceName: "rpcpb.Monarch", HandlerType: (*MonarchServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "Players", + Handler: _Monarch_Players_Handler, + }, { MethodName: "Agents", Handler: _Monarch_Agents_Handler, @@ -1227,6 +1353,10 @@ var Monarch_ServiceDesc = grpc.ServiceDesc{ MethodName: "Unstage", Handler: _Monarch_Unstage_Handler, }, + { + MethodName: "SendMessage", + Handler: _Monarch_SendMessage_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -1244,6 +1374,11 @@ var Monarch_ServiceDesc = grpc.ServiceDesc{ Handler: _Monarch_Notify_Handler, ServerStreams: true, }, + { + StreamName: "GetMessages", + Handler: _Monarch_GetMessages_Handler, + ServerStreams: true, + }, }, Metadata: "rpcpb/services.proto", } From ae652262ac256eddad82eeeaa3f6527c2ef564ee Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 22:29:30 +0000 Subject: [PATCH 08/10] message sending endpoint --- pkg/commands/commands.go | 46 ++++++++---- pkg/commands/send.go | 2 +- pkg/db/db.go | 19 ++++- pkg/teamserver/teamserver.go | 140 +++++++++++++++++++++++++++-------- 4 files changed, 160 insertions(+), 47 deletions(-) diff --git a/pkg/commands/commands.go b/pkg/commands/commands.go index 77955d5..6eb26fe 100644 --- a/pkg/commands/commands.go +++ b/pkg/commands/commands.go @@ -11,6 +11,7 @@ import ( "github.com/sirupsen/logrus" "google.golang.org/grpc/metadata" "strconv" + "strings" "github.com/pygrum/monarch/pkg/console" "github.com/pygrum/monarch/pkg/log" @@ -20,8 +21,9 @@ import ( ) var ( - ctx = context.Background() - cLogger log.Logger + ctx = context.Background() + cLogger log.Logger + cmdPlayers *cobra.Command ) func init() { @@ -61,15 +63,6 @@ func ServerConsoleCommands() *cobra.Command { } cmdCoop.Flags().BoolVarP(&stop, "stop", "s", false, "turn off co-op mode") - cmdPlayers := &cobra.Command{ - Use: "players", - Short: "list players that have been registered on the server", - Run: func(cmd *cobra.Command, args []string) { - playersCmd(args) - }, - } - carapace.Gen(cmdPlayers).PositionalCompletion(completion.Players()) - var name, lhost, role string cmdPlayersNew := &cobra.Command{ Use: "new", @@ -98,10 +91,10 @@ func ServerConsoleCommands() *cobra.Command { playersKickCmd(args[0]) }, } - carapace.Gen(cmdPlayersKick).PositionalCompletion(completion.Players()) + carapace.Gen(cmdPlayersKick).PositionalCompletion(completion.Players(ctx)) cmdPlayers.AddCommand(cmdPlayersNew, cmdPlayersKick) - root.AddCommand(cmdCoop, cmdPlayers) + root.AddCommand(cmdCoop) return root } @@ -285,8 +278,33 @@ func ConsoleCommands() *cobra.Command { fmt.Print("\033[H\033[2J") }, } + cmdPlayers = &cobra.Command{ + Use: "players [USERNAMES...]", + Short: "list registered players", + Run: func(cmd *cobra.Command, args []string) { + playersCmd(args) + }, + } + carapace.Gen(cmdPlayers).PositionalCompletion(completion.Players(ctx)) + + var to string + var all bool + cmdSend := &cobra.Command{ + Use: "send", + Short: "send a message to another online player", + Run: func(cmd *cobra.Command, args []string) { + sendCmd(to, strings.Join(args, " "), all) + }, + } + cmdSend.Flags().StringVarP(&to, "to", "t", "", "player to message") + cmdSend.Flags().BoolVarP(&all, "all", "a", false, "message all players") + + carapace.Gen(cmdSend).FlagCompletion(carapace.ActionMap{ + "to": completion.Players(ctx), + }) + root.AddCommand(cmdSessions, cmdUse, cmdHttp, cmdHttps, cmdAgents, cmdBuilders, cmdBuild, cmdInstall, cmdUninstall, - cmdStage, cmdUnstage, cmdVersion, cmdClear, cmdExit) + cmdStage, cmdUnstage, cmdVersion, cmdClear, cmdPlayers, cmdSend, cmdExit) root.CompletionOptions.HiddenDefaultCmd = true return root } diff --git a/pkg/commands/send.go b/pkg/commands/send.go index 8f8f5ab..6c36d27 100644 --- a/pkg/commands/send.go +++ b/pkg/commands/send.go @@ -5,7 +5,7 @@ import ( "github.com/pygrum/monarch/pkg/protobuf/rpcpb" ) -func msgCmd(to, msg string, all bool) { +func sendCmd(to, msg string, all bool) { if len(to) == 0 { if !all { cLogger.Error("player not specified with -to, please specify a player name or --all") diff --git a/pkg/db/db.go b/pkg/db/db.go index 7a40036..6a9cc83 100644 --- a/pkg/db/db.go +++ b/pkg/db/db.go @@ -1,6 +1,7 @@ package db import ( + "errors" "fmt" "github.com/google/uuid" "github.com/pygrum/monarch/pkg/config" @@ -11,8 +12,11 @@ import ( "gorm.io/gorm/logger" ) -var db *gorm.DB -var l log.Logger +var ( + ErrPlayerNotFound = errors.New("player not found") + db *gorm.DB + l log.Logger +) // Initialize database func Initialize() string { @@ -85,3 +89,14 @@ func DeleteOne(v interface{}) error { func Where(query interface{}, target ...interface{}) *gorm.DB { return db.Where(query, target...) } + +func GetIDByUsername(user string) (string, error) { + p := &Player{} + if err := FindOneConditional("username = ?", user, &p); err != nil { + return "", err + } + if len(p.UUID) == 0 { + return p.UUID, ErrPlayerNotFound + } + return p.UUID, nil +} diff --git a/pkg/teamserver/teamserver.go b/pkg/teamserver/teamserver.go index 3f73022..f81a9a6 100644 --- a/pkg/teamserver/teamserver.go +++ b/pkg/teamserver/teamserver.go @@ -40,7 +40,8 @@ type MonarchServer struct { } var ( - grpcServer *grpc.Server + grpcServer *grpc.Server + ErrNoMetadata = errors.New("no metadata attached") ) func New() (*MonarchServer, error) { @@ -49,6 +50,28 @@ func New() (*MonarchServer, error) { }, nil } +func (s *MonarchServer) Players(_ context.Context, r *clientpb.PlayerRequest) (*clientpb.Players, error) { + var players []db.Player + var pbPlayers []*clientpb.Player + if len(r.Names) > 0 { + if err := db.Where("username IN ?", r.Names).Find(&players).Error; err != nil { + return nil, fmt.Errorf("query failed: %v", err) + } + } else { + if err := db.Find(&players); err != nil { + return nil, fmt.Errorf("query failed: %v", err) + } + } + for _, p := range players { + pbPlayers = append(pbPlayers, &clientpb.Player{ + Username: p.Username, + Role: string(p.Role), + Registered: p.CreatedAt.Format(time.RFC850), + }) + } + return &clientpb.Players{Players: pbPlayers}, nil +} + func (s *MonarchServer) Agents(_ context.Context, req *clientpb.AgentRequest) (*clientpb.Agents, error) { pbAgents := &clientpb.Agents{} var agents []db.Agent @@ -112,9 +135,9 @@ func (s *MonarchServer) NewAgent(_ context.Context, agent *clientpb.Agent) (*cli func (s *MonarchServer) RmAgents(ctx context.Context, req *clientpb.AgentRequest) (*clientpb.Empty, error) { md, ok := metadata.FromIncomingContext(ctx) if !ok { - return nil, errors.New("no metadata attached") + return nil, ErrNoMetadata } - player := md["player"] + player := md["uid"] role := md["role"] var agents []db.Agent @@ -202,9 +225,9 @@ func (s *MonarchServer) SaveProfile(ctx context.Context, req *clientpb.SaveProfi profile := &db.Profile{} md, ok := metadata.FromIncomingContext(ctx) if !ok { - return nil, errors.New("no metadata attached") + return nil, ErrNoMetadata } - player := md["player"] + player := md["uid"] if db.Where("name = ? AND builder_id = ?", req.Name, req.BuilderId).Find(&profile); len(profile.Name) != 0 { return nil, fmt.Errorf("a profile for this build named '%s' already exists", req.Name) } @@ -263,9 +286,9 @@ func (s *MonarchServer) LoadProfile(_ context.Context, req *clientpb.SaveProfile func (s *MonarchServer) RmProfiles(ctx context.Context, req *clientpb.ProfileRequest) (*clientpb.Empty, error) { md, ok := metadata.FromIncomingContext(ctx) if !ok { - return nil, errors.New("no metadata attached") + return nil, ErrNoMetadata } - player := md["player"][0] + player := md["uid"][0] role := md["role"][0] var profiles []db.Profile @@ -556,9 +579,9 @@ func (s *MonarchServer) StageAdd(ctx context.Context, r *clientpb.StageAddReques r.Alias = filepath.Base(r.Alias) md, ok := metadata.FromIncomingContext(ctx) if !ok { - return nil, errors.New("no metadata attached") + return nil, ErrNoMetadata } - player := md["player"][0] + player := md["uid"][0] http.Stage.Add(r.Alias, agent.Name, agent.File, player) return &rpcpb.Notification{ LogLevel: rpcpb.LogLevel_LevelInfo, @@ -572,9 +595,9 @@ func (s *MonarchServer) StageAdd(ctx context.Context, r *clientpb.StageAddReques func (s *MonarchServer) Unstage(ctx context.Context, r *clientpb.UnstageRequest) (*clientpb.Empty, error) { md, ok := metadata.FromIncomingContext(ctx) if !ok { - return nil, errors.New("no metadata attached") + return nil, ErrNoMetadata } - player := md["player"][0] + player := md["uid"][0] role := md["role"][0] for k, v := range *http.Stage.View() { if r.Alias == k { @@ -587,13 +610,69 @@ func (s *MonarchServer) Unstage(ctx context.Context, r *clientpb.UnstageRequest) return &clientpb.Empty{}, nil } -func (s *MonarchServer) Notify(req *clientpb.NotifyRequest, stream rpcpb.Monarch_NotifyServer) error { - playerID := req.PlayerId +func (s *MonarchServer) SendMessage(ctx context.Context, msg *rpcpb.Message) (*clientpb.Empty, error) { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, ErrNoMetadata + } + role := md["role"][0] + username := md["username"][0] + uid := md["uid"][0] + + msg.From = username + msg.Role = role + if len(msg.To) == 0 { + msg.From = "(*) " + msg.From + sendAll(msg, types.MessageQueues, uid) + return &clientpb.Empty{}, nil + } + id, err := db.GetIDByUsername(msg.To) + if err != nil { + return nil, fmt.Errorf("'%s' doesn't exist", msg.To) + } + if id == uid { + return nil, errors.New("can't send a message to yourself") + } + mQueue, ok := types.MessageQueues[id] + if !ok { + return nil, fmt.Errorf("'%s' is offline", msg.To) + } + return &clientpb.Empty{}, mQueue.Enqueue(msg) +} + +func (s *MonarchServer) GetMessages(_ *clientpb.Empty, stream rpcpb.Monarch_GetMessagesServer) error { + md, ok := metadata.FromIncomingContext(stream.Context()) + if !ok { + return ErrNoMetadata + } + player := md["uid"][0] + + defer func() { + delete(types.MessageQueues, player) + }() + mQueue := &types.MessageQueue{Channel: make(chan *rpcpb.Message, 10)} + types.MessageQueues[player] = mQueue + for { + select { + case <-stream.Context().Done(): + return nil + case msg := <-mQueue.Channel: + _ = stream.Send(msg) + } + } +} + +func (s *MonarchServer) Notify(_ *clientpb.Empty, stream rpcpb.Monarch_NotifyServer) error { + md, ok := metadata.FromIncomingContext(stream.Context()) + if !ok { + return ErrNoMetadata + } + playerID := md["uid"][0] + username := md["username"][0] + var authed, kicked bool p := &db.Player{} - if len(playerID) == 0 { - return errors.New("player ID cannot be blank") - } + if err := db.FindOneConditional("uuid = ?", playerID, &p); err != nil { _ = stream.Send(&rpcpb.Notification{ LogLevel: rpcpb.LogLevel_LevelError, @@ -603,34 +682,35 @@ func (s *MonarchServer) Notify(req *clientpb.NotifyRequest, stream rpcpb.Monarch } authed = true // notify all that you have joined the game (this is done after subbing for notifications, by calling this func) - notifyAll(&rpcpb.Notification{ + sendAll(&rpcpb.Notification{ LogLevel: rpcpb.LogLevel_LevelInfo, - Msg: fmt.Sprintf("%s has joined the operation", req.PlayerName), - }) + Msg: fmt.Sprintf("%s has joined the operation", username), + }, types.NotifQueues) defer func() { delete(types.NotifQueues, playerID) if !kicked && authed { - notifyAll(&rpcpb.Notification{ + sendAll(&rpcpb.Notification{ LogLevel: rpcpb.LogLevel_LevelInfo, - Msg: fmt.Sprintf("%s has left the operation", req.PlayerName), - }) + Msg: fmt.Sprintf("%s has left the operation", username), + }, types.NotifQueues) } }() // Implement a notification queue - queue := &types.NotificationQueue{Channel: make(chan *rpcpb.Notification, 10)} - types.NotifQueues[playerID] = queue + nQueue := &types.NotificationQueue{Channel: make(chan *rpcpb.Notification, 10)} + + types.NotifQueues[playerID] = nQueue for { select { case <-stream.Context().Done(): return nil - case notification := <-queue.Channel: + case notification := <-nQueue.Channel: _ = stream.Send(notification) if notification.Msg == types.NotificationKickPlayer { // name and shame! - notifyAll(&rpcpb.Notification{ + sendAll(&rpcpb.Notification{ LogLevel: rpcpb.LogLevel_LevelInfo, - Msg: fmt.Sprintf("%s has been kicked from the operation", req.PlayerName), - }, p.Username, config.ClientConfig.UUID) + Msg: fmt.Sprintf("%s has been kicked from the operation", username), + }, types.NotifQueues, p.Username, config.ClientConfig.UUID) kicked = true break } @@ -638,8 +718,8 @@ func (s *MonarchServer) Notify(req *clientpb.NotifyRequest, stream rpcpb.Monarch } } -func notifyAll(n *rpcpb.Notification, excludes ...string) { - for k, q := range types.NotifQueues { +func sendAll(n interface{}, queues map[string]types.Queue, excludes ...string) { + for k, q := range queues { if !slices.Contains(excludes, k) { _ = q.Enqueue(n) } From da0eeac50ddd943136c0254fc792b906bae6bd43 Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 22:30:24 +0000 Subject: [PATCH 09/10] listen to message broker before console starts --- pkg/console/console.go | 46 ++++++++++++++++++++++++++++++++---------- pkg/types/types.go | 25 +++++++++++++++++++++++ 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/pkg/console/console.go b/pkg/console/console.go index a789d6f..5bad6e0 100644 --- a/pkg/console/console.go +++ b/pkg/console/console.go @@ -9,6 +9,7 @@ import ( "io" "net" "strconv" + "strings" "github.com/pygrum/monarch/pkg/config" "github.com/pygrum/monarch/pkg/consts" @@ -45,6 +46,7 @@ func NamedMenu(name string, commands func() *cobra.Command) { // Run entrypoint for the entire application func Run(rootCmd func() *cobra.Command, isServer bool) error { + initCTX(isServer) var err error var clientConn *grpc.ClientConn monarchServer = &server{ @@ -66,6 +68,7 @@ func Run(rootCmd func() *cobra.Command, isServer bool) error { Rpc = rpcpb.NewMonarchClient(clientConn) go getNotifications() + go getMessages() return start(rootCmd) } @@ -98,15 +101,8 @@ func testServerConnectivity() { } func getNotifications() { - var playerID, playerName string - playerID = config.ClientConfig.UUID - playerName = config.ClientConfig.Name - tl, _ := log.NewLogger(log.TransientLogger, "") - stream, err := Rpc.Notify(CTX, &clientpb.NotifyRequest{ - PlayerId: playerID, - PlayerName: playerName, - }) + stream, err := Rpc.Notify(CTX, &clientpb.Empty{}) if err != nil { tl.Fatal("can't receive notifications (%v)", err) } @@ -129,6 +125,29 @@ func getNotifications() { } } +func getMessages() { + tl, _ := log.NewLogger(log.TransientLogger, "") + stream, err := Rpc.GetMessages(CTX, &clientpb.Empty{}) + if err != nil { + tl.Error("can't receive messages (%v)", err) + return + } + for { + message, err := stream.Recv() + if errors.Is(err, io.EOF) { + tl.Error("server connection closed") + return + } + if err != nil { + tl.Error("messaging error: %v", err) + return + } + msgFmt := "%s (%s) says: \033[36m%s\033[0m" + msg := fmt.Sprintf(msgFmt, message.From, message.Role, message.Msg) + _, _ = monarchServer.App.TransientPrintf(strings.ReplaceAll(msg, "%", "%%")) + } +} + func initMonarchServer() (*grpc.ClientConn, error) { http.Initialize() lis, err := net.Listen("tcp", fmt.Sprintf("localhost:9999")) @@ -155,7 +174,6 @@ func initMonarchServer() (*grpc.ClientConn, error) { } func initMonarchClient() (*grpc.ClientConn, error) { - initCTX() http.ClientInitialize() c, err := crypto.ClientTLSConfig(&config.ClientConfig) if err != nil { @@ -171,6 +189,8 @@ func initMonarchClient() (*grpc.ClientConn, error) { func newMonarchServer() (*grpc.Server, error) { types.NotifQueues = make(map[string]types.Queue) + types.MessageQueues = make(map[string]types.Queue) + // TODO: fetch key pair and create credentials with credentials.NewTLS grpcServer := grpc.NewServer() srv, err := teamserver.New() @@ -181,10 +201,14 @@ func newMonarchServer() (*grpc.Server, error) { return grpcServer, nil } -func initCTX() { +func initCTX(isServer bool) { m := make(map[string]string) m["uid"] = config.ClientConfig.UUID - + if isServer { + m["username"] = consts.UserConsole + CTX = metadata.NewOutgoingContext(CTX, metadata.New(m)) + return + } challenge, err := crypto.EncryptAES(config.ClientConfig.Secret, config.ClientConfig.Challenge) if err != nil { logrus.Fatalf("couldn't encrypt challenge for auth: %v", err) diff --git a/pkg/types/types.go b/pkg/types/types.go index 78d7214..59c8c32 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -14,12 +14,37 @@ type Queue interface { type NotificationQueue struct { Channel chan *rpcpb.Notification } +type MessageQueue struct { + Channel chan *rpcpb.Message +} const ( NotificationKickPlayer = "you have been kicked from the operation" ) var NotifQueues map[string]Queue +var MessageQueues map[string]Queue + +func (r *MessageQueue) Enqueue(req interface{}) error { + select { + case r.Channel <- req.(*rpcpb.Message): + return nil + default: + return fmt.Errorf("queue is full - max capacity of 10") + } +} + +func (r *MessageQueue) Dequeue() interface{} { + // Must block, as we wait for a request to queue + select { + case req := <-r.Channel: + return req + } +} + +func (r *MessageQueue) Size() int { + return len(r.Channel) +} func (r *NotificationQueue) Enqueue(req interface{}) error { select { From 6f3ef808f9b04bd33019dd3e3ecb11b1b1db806c Mon Sep 17 00:00:00 2001 From: pygrum Date: Sun, 10 Dec 2023 22:30:43 +0000 Subject: [PATCH 10/10] refactoring player -> uid --- pkg/teamserver/interceptor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/teamserver/interceptor.go b/pkg/teamserver/interceptor.go index 3297167..01a6a12 100644 --- a/pkg/teamserver/interceptor.go +++ b/pkg/teamserver/interceptor.go @@ -87,7 +87,7 @@ func (a *AuthInterceptor) authorize(ctx context.Context, method string) (context return ctx, errors.New("player is unauthorized") } md["role"] = []string{string(player.Role)} - md["player"] = []string{player.UUID} + md["username"] = []string{player.Username} ctx = metadata.NewIncomingContext(ctx, md) return ctx, nil