From 2c3d1f9aa670376a1198277b15b44b772e810d5f Mon Sep 17 00:00:00 2001 From: Roman Nikitin Date: Sat, 18 Nov 2023 01:42:05 +0300 Subject: [PATCH] Move go proto to pkg/proto, add .gitattributes --- cmd/client/cli/add.go | 2 +- cmd/client/cli/tail.go | 2 +- cmd/client/cli/update.go | 2 +- cmd/client/cli/utils.go | 2 +- cmd/server/main.go | 6 +- internal/client/client.go | 6 +- internal/config/config.go | 2 +- internal/exploit/cache.go | 2 +- internal/exploit/cache_test.go | 2 +- internal/exploit/runner.go | 2 +- internal/exploit/storage.go | 2 +- internal/exploit/storage_test.go | 2 +- internal/server/exploits/server.go | 2 +- internal/server/exploits/server_test.go | 4 +- internal/server/exploits/storage.go | 2 +- internal/server/exploits/storage_test.go | 4 +- internal/server/fs/server.go | 2 +- internal/server/logs/logline.go | 2 +- internal/server/logs/server.go | 2 +- pkg/filestream/filestream.go | 2 +- pkg/filestream/filestream_test.go | 2 +- pkg/hostbucket/hostbucket.go | 2 +- pkg/joblogger/logger.go | 2 +- pkg/joblogger/sender.go | 2 +- proto/buf.gen.yaml | 6 +- proto/go/exploits/api.pb.go | 1742 ---------------------- proto/go/exploits/api_grpc.pb.go | 376 ----- proto/go/fileserver/api.pb.go | 226 --- proto/go/fileserver/api_grpc.pb.go | 202 --- proto/go/logs/api.pb.go | 406 ----- proto/go/logs/api_grpc.pb.go | 170 --- 31 files changed, 33 insertions(+), 3155 deletions(-) delete mode 100644 proto/go/exploits/api.pb.go delete mode 100644 proto/go/exploits/api_grpc.pb.go delete mode 100644 proto/go/fileserver/api.pb.go delete mode 100644 proto/go/fileserver/api_grpc.pb.go delete mode 100644 proto/go/logs/api.pb.go delete mode 100644 proto/go/logs/api_grpc.pb.go diff --git a/cmd/client/cli/add.go b/cmd/client/cli/add.go index 53b6061..2bd611c 100644 --- a/cmd/client/cli/add.go +++ b/cmd/client/cli/add.go @@ -19,7 +19,7 @@ import ( "github.com/c4t-but-s4d/neo/v2/internal/client" "github.com/c4t-but-s4d/neo/v2/pkg/archive" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) type addCLI struct { diff --git a/cmd/client/cli/tail.go b/cmd/client/cli/tail.go index 946384e..112ceeb 100644 --- a/cmd/client/cli/tail.go +++ b/cmd/client/cli/tail.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/cobra" "github.com/c4t-but-s4d/neo/v2/internal/client" - logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs" + logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs" ) type tailCLI struct { diff --git a/cmd/client/cli/update.go b/cmd/client/cli/update.go index 040b2a3..72d9d6f 100644 --- a/cmd/client/cli/update.go +++ b/cmd/client/cli/update.go @@ -12,7 +12,7 @@ import ( "github.com/c4t-but-s4d/neo/v2/internal/client" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) type updateCLI struct { diff --git a/cmd/client/cli/utils.go b/cmd/client/cli/utils.go index 8cb9246..46a029b 100644 --- a/cmd/client/cli/utils.go +++ b/cmd/client/cli/utils.go @@ -5,7 +5,7 @@ import ( "github.com/samber/lo" - "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) func isBinary(data []byte) bool { diff --git a/cmd/server/main.go b/cmd/server/main.go index f4bcd17..42d87a3 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -28,9 +28,9 @@ import ( "github.com/c4t-but-s4d/neo/v2/pkg/mu" "github.com/c4t-but-s4d/neo/v2/pkg/neohttp" "github.com/c4t-but-s4d/neo/v2/pkg/neosync" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" - fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver" - logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" + fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver" + logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs" ) func main() { diff --git a/internal/client/client.go b/internal/client/client.go index 0a8e4fe..ee7b217 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -10,9 +10,9 @@ import ( "google.golang.org/grpc" "github.com/c4t-but-s4d/neo/v2/pkg/filestream" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" - fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver" - logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" + fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver" + logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs" ) func New(cc grpc.ClientConnInterface, id string) *Client { diff --git a/internal/config/config.go b/internal/config/config.go index 7f666e3..4e01476 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -7,7 +7,7 @@ import ( "google.golang.org/protobuf/types/known/durationpb" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) type ExploitsConfig struct { diff --git a/internal/exploit/cache.go b/internal/exploit/cache.go index b368256..a6f9251 100644 --- a/internal/exploit/cache.go +++ b/internal/exploit/cache.go @@ -4,7 +4,7 @@ import ( "sync" "time" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) func NewCache() *Cache { diff --git a/internal/exploit/cache_test.go b/internal/exploit/cache_test.go index 1cd1812..a3e5d77 100644 --- a/internal/exploit/cache_test.go +++ b/internal/exploit/cache_test.go @@ -7,7 +7,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "google.golang.org/protobuf/testing/protocmp" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) func TestCache_Diff(t *testing.T) { diff --git a/internal/exploit/runner.go b/internal/exploit/runner.go index 0493931..97850db 100644 --- a/internal/exploit/runner.go +++ b/internal/exploit/runner.go @@ -21,7 +21,7 @@ import ( "github.com/c4t-but-s4d/neo/v2/internal/models" "github.com/c4t-but-s4d/neo/v2/internal/queue" "github.com/c4t-but-s4d/neo/v2/pkg/joblogger" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) var ( diff --git a/internal/exploit/storage.go b/internal/exploit/storage.go index b2397cd..d99bd8f 100644 --- a/internal/exploit/storage.go +++ b/internal/exploit/storage.go @@ -12,7 +12,7 @@ import ( "github.com/c4t-but-s4d/neo/v2/internal/client" "github.com/c4t-but-s4d/neo/v2/pkg/archive" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) func NewStorage(cache *Cache, exploitDir string, client *client.Client) *Storage { diff --git a/internal/exploit/storage_test.go b/internal/exploit/storage_test.go index 5fb8c86..74cefc8 100644 --- a/internal/exploit/storage_test.go +++ b/internal/exploit/storage_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/c4t-but-s4d/neo/v2/pkg/archive" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) func mockStorage() (*Storage, func() error) { diff --git a/internal/server/exploits/server.go b/internal/server/exploits/server.go index 15b9562..8a6ab24 100644 --- a/internal/server/exploits/server.go +++ b/internal/server/exploits/server.go @@ -14,8 +14,8 @@ import ( serverConfig "github.com/c4t-but-s4d/neo/v2/internal/server/config" "github.com/c4t-but-s4d/neo/v2/pkg/gstream" "github.com/c4t-but-s4d/neo/v2/pkg/hostbucket" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" "github.com/c4t-but-s4d/neo/v2/pkg/pubsub" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" ) func New(cfg *serverConfig.Config, storage *CachedStorage) *Server { diff --git a/internal/server/exploits/server_test.go b/internal/server/exploits/server_test.go index a25eec2..1dec111 100644 --- a/internal/server/exploits/server_test.go +++ b/internal/server/exploits/server_test.go @@ -14,8 +14,8 @@ import ( "github.com/c4t-but-s4d/neo/v2/internal/server/config" "github.com/c4t-but-s4d/neo/v2/pkg/hostbucket" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" - fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" + fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver" ) func testServer(t *testing.T) (*Server, func()) { diff --git a/internal/server/exploits/storage.go b/internal/server/exploits/storage.go index c47b1a1..6a61a11 100644 --- a/internal/server/exploits/storage.go +++ b/internal/server/exploits/storage.go @@ -10,7 +10,7 @@ import ( bolt "go.etcd.io/bbolt" "google.golang.org/protobuf/proto" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" ) const ( diff --git a/internal/server/exploits/storage_test.go b/internal/server/exploits/storage_test.go index 4fc987b..d69a9a5 100644 --- a/internal/server/exploits/storage_test.go +++ b/internal/server/exploits/storage_test.go @@ -12,8 +12,8 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/testing/protocmp" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" - fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" + fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver" ) func testDB() (*bolt.DB, func()) { diff --git a/internal/server/fs/server.go b/internal/server/fs/server.go index 79325a0..2286dfc 100644 --- a/internal/server/fs/server.go +++ b/internal/server/fs/server.go @@ -12,7 +12,7 @@ import ( serverConfig "github.com/c4t-but-s4d/neo/v2/internal/server/config" "github.com/c4t-but-s4d/neo/v2/internal/server/utils" "github.com/c4t-but-s4d/neo/v2/pkg/filestream" - fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver" + fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver" ) func New(cfg *serverConfig.Config) (*Server, error) { diff --git a/internal/server/logs/logline.go b/internal/server/logs/logline.go index f2659c4..f6f913d 100644 --- a/internal/server/logs/logline.go +++ b/internal/server/logs/logline.go @@ -6,7 +6,7 @@ import ( "github.com/mitchellh/mapstructure" - logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs" + logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs" ) func NewLogLineFromValues(vals map[string]interface{}) (*LogLine, error) { diff --git a/internal/server/logs/server.go b/internal/server/logs/server.go index 3812923..064d805 100644 --- a/internal/server/logs/server.go +++ b/internal/server/logs/server.go @@ -10,7 +10,7 @@ import ( "github.com/c4t-but-s4d/neo/v2/internal/server/common" "github.com/c4t-but-s4d/neo/v2/internal/server/utils" "github.com/c4t-but-s4d/neo/v2/pkg/gstream" - logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs" + logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs" ) const ( diff --git a/pkg/filestream/filestream.go b/pkg/filestream/filestream.go index 3bed68a..c6a2105 100644 --- a/pkg/filestream/filestream.go +++ b/pkg/filestream/filestream.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver" + fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver" ) const ( diff --git a/pkg/filestream/filestream_test.go b/pkg/filestream/filestream_test.go index cda51bc..cff0d16 100644 --- a/pkg/filestream/filestream_test.go +++ b/pkg/filestream/filestream_test.go @@ -11,7 +11,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" - fspb "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver" + fspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/fileserver" ) type failedReadWriter struct { diff --git a/pkg/hostbucket/hostbucket.go b/pkg/hostbucket/hostbucket.go index 30e5ccf..33a46a9 100644 --- a/pkg/hostbucket/hostbucket.go +++ b/pkg/hostbucket/hostbucket.go @@ -6,8 +6,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" + epb "github.com/c4t-but-s4d/neo/v2/pkg/proto/exploits" "github.com/c4t-but-s4d/neo/v2/pkg/rendezvous" - epb "github.com/c4t-but-s4d/neo/v2/proto/go/exploits" ) func New(teams map[string]string) *HostBucket { diff --git a/pkg/joblogger/logger.go b/pkg/joblogger/logger.go index dd5e3e1..7ab968d 100644 --- a/pkg/joblogger/logger.go +++ b/pkg/joblogger/logger.go @@ -8,7 +8,7 @@ import ( "github.com/sirupsen/logrus" "github.com/c4t-but-s4d/neo/v2/internal/logger" - logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs" + logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs" ) // 1 MB. diff --git a/pkg/joblogger/sender.go b/pkg/joblogger/sender.go index faccce5..3a8c67b 100644 --- a/pkg/joblogger/sender.go +++ b/pkg/joblogger/sender.go @@ -9,7 +9,7 @@ import ( "github.com/sirupsen/logrus" "github.com/c4t-but-s4d/neo/v2/internal/client" - logspb "github.com/c4t-but-s4d/neo/v2/proto/go/logs" + logspb "github.com/c4t-but-s4d/neo/v2/pkg/proto/logs" ) const ( diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index 2d9dae1..d17b9fa 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -2,15 +2,15 @@ version: v1 managed: enabled: true go_package_prefix: - default: github.com/c4t-but-s4d/neo/v2/proto/go + default: github.com/c4t-but-s4d/neo/v2/pkg/proto plugins: # Go - name: go - out: go + out: ../pkg/proto opt: - paths=source_relative - name: go-grpc - out: go + out: ../pkg/proto opt: - paths=source_relative diff --git a/proto/go/exploits/api.pb.go b/proto/go/exploits/api.pb.go deleted file mode 100644 index 76e67b5..0000000 --- a/proto/go/exploits/api.pb.go +++ /dev/null @@ -1,1742 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: exploits/api.proto - -package exploits - -import ( - fileserver "github.com/c4t-but-s4d/neo/v2/proto/go/fileserver" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TeamBucket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Teams map[string]string `protobuf:"bytes,1,rep,name=teams,proto3" json:"teams,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *TeamBucket) Reset() { - *x = TeamBucket{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TeamBucket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TeamBucket) ProtoMessage() {} - -func (x *TeamBucket) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TeamBucket.ProtoReflect.Descriptor instead. -func (*TeamBucket) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{0} -} - -func (x *TeamBucket) GetTeams() map[string]string { - if x != nil { - return x.Teams - } - return nil -} - -type ExploitConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Entrypoint string `protobuf:"bytes,1,opt,name=entrypoint,proto3" json:"entrypoint,omitempty"` - IsArchive bool `protobuf:"varint,2,opt,name=is_archive,json=isArchive,proto3" json:"is_archive,omitempty"` - RunEvery *durationpb.Duration `protobuf:"bytes,3,opt,name=run_every,json=runEvery,proto3" json:"run_every,omitempty"` - Timeout *durationpb.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"` - Disabled bool `protobuf:"varint,5,opt,name=disabled,proto3" json:"disabled,omitempty"` - Endless bool `protobuf:"varint,6,opt,name=endless,proto3" json:"endless,omitempty"` -} - -func (x *ExploitConfiguration) Reset() { - *x = ExploitConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExploitConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExploitConfiguration) ProtoMessage() {} - -func (x *ExploitConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_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 ExploitConfiguration.ProtoReflect.Descriptor instead. -func (*ExploitConfiguration) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{1} -} - -func (x *ExploitConfiguration) GetEntrypoint() string { - if x != nil { - return x.Entrypoint - } - return "" -} - -func (x *ExploitConfiguration) GetIsArchive() bool { - if x != nil { - return x.IsArchive - } - return false -} - -func (x *ExploitConfiguration) GetRunEvery() *durationpb.Duration { - if x != nil { - return x.RunEvery - } - return nil -} - -func (x *ExploitConfiguration) GetTimeout() *durationpb.Duration { - if x != nil { - return x.Timeout - } - return nil -} - -func (x *ExploitConfiguration) GetDisabled() bool { - if x != nil { - return x.Disabled - } - return false -} - -func (x *ExploitConfiguration) GetEndless() bool { - if x != nil { - return x.Endless - } - return false -} - -type ExploitState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExploitId string `protobuf:"bytes,1,opt,name=exploit_id,json=exploitId,proto3" json:"exploit_id,omitempty"` - Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - File *fileserver.FileInfo `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` - Config *ExploitConfiguration `protobuf:"bytes,6,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *ExploitState) Reset() { - *x = ExploitState{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExploitState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExploitState) ProtoMessage() {} - -func (x *ExploitState) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[2] - 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 ExploitState.ProtoReflect.Descriptor instead. -func (*ExploitState) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{2} -} - -func (x *ExploitState) GetExploitId() string { - if x != nil { - return x.ExploitId - } - return "" -} - -func (x *ExploitState) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *ExploitState) GetFile() *fileserver.FileInfo { - if x != nil { - return x.File - } - return nil -} - -func (x *ExploitState) GetConfig() *ExploitConfiguration { - if x != nil { - return x.Config - } - return nil -} - -type Config struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FarmUrl string `protobuf:"bytes,1,opt,name=farm_url,json=farmUrl,proto3" json:"farm_url,omitempty"` - FarmPassword string `protobuf:"bytes,2,opt,name=farm_password,json=farmPassword,proto3" json:"farm_password,omitempty"` - FlagRegexp string `protobuf:"bytes,3,opt,name=flag_regexp,json=flagRegexp,proto3" json:"flag_regexp,omitempty"` - PingEvery *durationpb.Duration `protobuf:"bytes,4,opt,name=ping_every,json=pingEvery,proto3" json:"ping_every,omitempty"` - SubmitEvery *durationpb.Duration `protobuf:"bytes,5,opt,name=submit_every,json=submitEvery,proto3" json:"submit_every,omitempty"` - Environ []string `protobuf:"bytes,6,rep,name=environ,proto3" json:"environ,omitempty"` -} - -func (x *Config) Reset() { - *x = Config{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Config) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Config) ProtoMessage() {} - -func (x *Config) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_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 Config.ProtoReflect.Descriptor instead. -func (*Config) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{3} -} - -func (x *Config) GetFarmUrl() string { - if x != nil { - return x.FarmUrl - } - return "" -} - -func (x *Config) GetFarmPassword() string { - if x != nil { - return x.FarmPassword - } - return "" -} - -func (x *Config) GetFlagRegexp() string { - if x != nil { - return x.FlagRegexp - } - return "" -} - -func (x *Config) GetPingEvery() *durationpb.Duration { - if x != nil { - return x.PingEvery - } - return nil -} - -func (x *Config) GetSubmitEvery() *durationpb.Duration { - if x != nil { - return x.SubmitEvery - } - return nil -} - -func (x *Config) GetEnviron() []string { - if x != nil { - return x.Environ - } - return nil -} - -type ServerState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Ping distribution by client - ClientTeamMap map[string]*TeamBucket `protobuf:"bytes,1,rep,name=client_team_map,json=clientTeamMap,proto3" json:"client_team_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Exploits []*ExploitState `protobuf:"bytes,2,rep,name=exploits,proto3" json:"exploits,omitempty"` - Config *Config `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` -} - -func (x *ServerState) Reset() { - *x = ServerState{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerState) ProtoMessage() {} - -func (x *ServerState) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_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 ServerState.ProtoReflect.Descriptor instead. -func (*ServerState) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{4} -} - -func (x *ServerState) GetClientTeamMap() map[string]*TeamBucket { - if x != nil { - return x.ClientTeamMap - } - return nil -} - -func (x *ServerState) GetExploits() []*ExploitState { - if x != nil { - return x.Exploits - } - return nil -} - -func (x *ServerState) GetConfig() *Config { - if x != nil { - return x.Config - } - return nil -} - -type PingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - // Types that are assignable to Payload: - // - // *PingRequest_ServerInfoRequest - // *PingRequest_HeartbeatRequest - // *PingRequest_LeaveRequest - Payload isPingRequest_Payload `protobuf_oneof:"payload"` -} - -func (x *PingRequest) Reset() { - *x = PingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingRequest) ProtoMessage() {} - -func (x *PingRequest) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_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 PingRequest.ProtoReflect.Descriptor instead. -func (*PingRequest) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{5} -} - -func (x *PingRequest) GetClientId() string { - if x != nil { - return x.ClientId - } - return "" -} - -func (m *PingRequest) GetPayload() isPingRequest_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (x *PingRequest) GetServerInfoRequest() *PingRequest_ServerInfo { - if x, ok := x.GetPayload().(*PingRequest_ServerInfoRequest); ok { - return x.ServerInfoRequest - } - return nil -} - -func (x *PingRequest) GetHeartbeatRequest() *PingRequest_Heartbeat { - if x, ok := x.GetPayload().(*PingRequest_HeartbeatRequest); ok { - return x.HeartbeatRequest - } - return nil -} - -func (x *PingRequest) GetLeaveRequest() *PingRequest_Leave { - if x, ok := x.GetPayload().(*PingRequest_LeaveRequest); ok { - return x.LeaveRequest - } - return nil -} - -type isPingRequest_Payload interface { - isPingRequest_Payload() -} - -type PingRequest_ServerInfoRequest struct { - ServerInfoRequest *PingRequest_ServerInfo `protobuf:"bytes,2,opt,name=server_info_request,json=serverInfoRequest,proto3,oneof"` -} - -type PingRequest_HeartbeatRequest struct { - HeartbeatRequest *PingRequest_Heartbeat `protobuf:"bytes,3,opt,name=heartbeat_request,json=heartbeatRequest,proto3,oneof"` -} - -type PingRequest_LeaveRequest struct { - LeaveRequest *PingRequest_Leave `protobuf:"bytes,4,opt,name=leave_request,json=leaveRequest,proto3,oneof"` -} - -func (*PingRequest_ServerInfoRequest) isPingRequest_Payload() {} - -func (*PingRequest_HeartbeatRequest) isPingRequest_Payload() {} - -func (*PingRequest_LeaveRequest) isPingRequest_Payload() {} - -type PingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - State *ServerState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *PingResponse) Reset() { - *x = PingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingResponse) ProtoMessage() {} - -func (x *PingResponse) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[6] - 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 PingResponse.ProtoReflect.Descriptor instead. -func (*PingResponse) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{6} -} - -func (x *PingResponse) GetState() *ServerState { - if x != nil { - return x.State - } - return nil -} - -type ExploitRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExploitId string `protobuf:"bytes,1,opt,name=exploit_id,json=exploitId,proto3" json:"exploit_id,omitempty"` -} - -func (x *ExploitRequest) Reset() { - *x = ExploitRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExploitRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExploitRequest) ProtoMessage() {} - -func (x *ExploitRequest) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[7] - 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 ExploitRequest.ProtoReflect.Descriptor instead. -func (*ExploitRequest) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{7} -} - -func (x *ExploitRequest) GetExploitId() string { - if x != nil { - return x.ExploitId - } - return "" -} - -type ExploitResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - State *ExploitState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *ExploitResponse) Reset() { - *x = ExploitResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExploitResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExploitResponse) ProtoMessage() {} - -func (x *ExploitResponse) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[8] - 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 ExploitResponse.ProtoReflect.Descriptor instead. -func (*ExploitResponse) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{8} -} - -func (x *ExploitResponse) GetState() *ExploitState { - if x != nil { - return x.State - } - return nil -} - -type UpdateExploitRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - State *ExploitState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *UpdateExploitRequest) Reset() { - *x = UpdateExploitRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateExploitRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateExploitRequest) ProtoMessage() {} - -func (x *UpdateExploitRequest) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[9] - 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 UpdateExploitRequest.ProtoReflect.Descriptor instead. -func (*UpdateExploitRequest) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{9} -} - -func (x *UpdateExploitRequest) GetState() *ExploitState { - if x != nil { - return x.State - } - return nil -} - -type UpdateExploitResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - State *ExploitState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` -} - -func (x *UpdateExploitResponse) Reset() { - *x = UpdateExploitResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateExploitResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateExploitResponse) ProtoMessage() {} - -func (x *UpdateExploitResponse) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[10] - 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 UpdateExploitResponse.ProtoReflect.Descriptor instead. -func (*UpdateExploitResponse) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{10} -} - -func (x *UpdateExploitResponse) GetState() *ExploitState { - if x != nil { - return x.State - } - return nil -} - -type BroadcastRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` -} - -func (x *BroadcastRequest) Reset() { - *x = BroadcastRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastRequest) ProtoMessage() {} - -func (x *BroadcastRequest) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[11] - 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 BroadcastRequest.ProtoReflect.Descriptor instead. -func (*BroadcastRequest) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{11} -} - -func (x *BroadcastRequest) GetCommand() string { - if x != nil { - return x.Command - } - return "" -} - -type BroadcastResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *BroadcastResponse) Reset() { - *x = BroadcastResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastResponse) ProtoMessage() {} - -func (x *BroadcastResponse) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[12] - 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 BroadcastResponse.ProtoReflect.Descriptor instead. -func (*BroadcastResponse) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{12} -} - -type BroadcastSubscribeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *BroadcastSubscribeRequest) Reset() { - *x = BroadcastSubscribeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastSubscribeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastSubscribeRequest) ProtoMessage() {} - -func (x *BroadcastSubscribeRequest) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[13] - 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 BroadcastSubscribeRequest.ProtoReflect.Descriptor instead. -func (*BroadcastSubscribeRequest) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{13} -} - -type BroadcastSubscribeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` -} - -func (x *BroadcastSubscribeResponse) Reset() { - *x = BroadcastSubscribeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastSubscribeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastSubscribeResponse) ProtoMessage() {} - -func (x *BroadcastSubscribeResponse) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[14] - 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 BroadcastSubscribeResponse.ProtoReflect.Descriptor instead. -func (*BroadcastSubscribeResponse) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{14} -} - -func (x *BroadcastSubscribeResponse) GetCommand() string { - if x != nil { - return x.Command - } - return "" -} - -type SingleRunRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExploitId string `protobuf:"bytes,1,opt,name=exploit_id,json=exploitId,proto3" json:"exploit_id,omitempty"` -} - -func (x *SingleRunRequest) Reset() { - *x = SingleRunRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingleRunRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleRunRequest) ProtoMessage() {} - -func (x *SingleRunRequest) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[15] - 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 SingleRunRequest.ProtoReflect.Descriptor instead. -func (*SingleRunRequest) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{15} -} - -func (x *SingleRunRequest) GetExploitId() string { - if x != nil { - return x.ExploitId - } - return "" -} - -type SingleRunResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SingleRunResponse) Reset() { - *x = SingleRunResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingleRunResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleRunResponse) ProtoMessage() {} - -func (x *SingleRunResponse) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[16] - 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 SingleRunResponse.ProtoReflect.Descriptor instead. -func (*SingleRunResponse) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{16} -} - -type SingleRunSubscribeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SingleRunSubscribeRequest) Reset() { - *x = SingleRunSubscribeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingleRunSubscribeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleRunSubscribeRequest) ProtoMessage() {} - -func (x *SingleRunSubscribeRequest) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[17] - 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 SingleRunSubscribeRequest.ProtoReflect.Descriptor instead. -func (*SingleRunSubscribeRequest) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{17} -} - -type SingleRunSubscribeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ExploitId string `protobuf:"bytes,1,opt,name=exploit_id,json=exploitId,proto3" json:"exploit_id,omitempty"` -} - -func (x *SingleRunSubscribeResponse) Reset() { - *x = SingleRunSubscribeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingleRunSubscribeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleRunSubscribeResponse) ProtoMessage() {} - -func (x *SingleRunSubscribeResponse) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[18] - 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 SingleRunSubscribeResponse.ProtoReflect.Descriptor instead. -func (*SingleRunSubscribeResponse) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{18} -} - -func (x *SingleRunSubscribeResponse) GetExploitId() string { - if x != nil { - return x.ExploitId - } - return "" -} - -type PingRequest_ServerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *PingRequest_ServerInfo) Reset() { - *x = PingRequest_ServerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingRequest_ServerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingRequest_ServerInfo) ProtoMessage() {} - -func (x *PingRequest_ServerInfo) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_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 PingRequest_ServerInfo.ProtoReflect.Descriptor instead. -func (*PingRequest_ServerInfo) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{5, 0} -} - -type PingRequest_Heartbeat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Weight int32 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty"` -} - -func (x *PingRequest_Heartbeat) Reset() { - *x = PingRequest_Heartbeat{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingRequest_Heartbeat) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingRequest_Heartbeat) ProtoMessage() {} - -func (x *PingRequest_Heartbeat) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[22] - 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 PingRequest_Heartbeat.ProtoReflect.Descriptor instead. -func (*PingRequest_Heartbeat) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{5, 1} -} - -func (x *PingRequest_Heartbeat) GetWeight() int32 { - if x != nil { - return x.Weight - } - return 0 -} - -type PingRequest_Leave struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *PingRequest_Leave) Reset() { - *x = PingRequest_Leave{} - if protoimpl.UnsafeEnabled { - mi := &file_exploits_api_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PingRequest_Leave) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PingRequest_Leave) ProtoMessage() {} - -func (x *PingRequest_Leave) ProtoReflect() protoreflect.Message { - mi := &file_exploits_api_proto_msgTypes[23] - 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 PingRequest_Leave.ProtoReflect.Descriptor instead. -func (*PingRequest_Leave) Descriptor() ([]byte, []int) { - return file_exploits_api_proto_rawDescGZIP(), []int{5, 2} -} - -var File_exploits_api_proto protoreflect.FileDescriptor - -var file_exploits_api_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x1a, 0x14, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x35, 0x0a, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x54, 0x65, 0x61, - 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x05, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x54, 0x65, 0x61, - 0x6d, 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, 0xf8, 0x01, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, - 0x69, 0x73, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x69, 0x73, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x72, - 0x75, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x75, 0x6e, 0x45, 0x76, - 0x65, 0x72, 0x79, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x22, 0xa9, - 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x49, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x45, 0x78, - 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xfb, 0x01, 0x0a, 0x06, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x61, 0x72, 0x6d, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x72, 0x6d, 0x55, 0x72, 0x6c, - 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x61, 0x72, 0x6d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x61, 0x72, 0x6d, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x72, 0x65, - 0x67, 0x65, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x6c, 0x61, 0x67, - 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x38, 0x0a, 0x0a, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x65, - 0x76, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x69, 0x6e, 0x67, 0x45, 0x76, 0x65, 0x72, 0x79, - 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x76, 0x65, 0x72, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x45, 0x76, 0x65, 0x72, 0x79, 0x12, 0x18, - 0x0a, 0x07, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x22, 0x95, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, - 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x70, 0x12, 0x32, 0x0a, 0x08, 0x65, 0x78, - 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, - 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x12, 0x28, - 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x56, 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x42, - 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xd9, 0x02, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x52, 0x0a, - 0x13, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x78, 0x70, - 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, 0x52, 0x11, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, - 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, - 0x10, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, - 0x69, 0x74, 0x73, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x1a, 0x23, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x1a, 0x07, 0x0a, 0x05, 0x4c, 0x65, 0x61, 0x76, - 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x3b, 0x0a, 0x0c, - 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x78, - 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2f, 0x0a, 0x0e, 0x45, 0x78, 0x70, - 0x6c, 0x6f, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, - 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x0f, 0x45, 0x78, - 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, - 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x44, 0x0a, 0x14, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x45, 0x78, - 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x22, 0x45, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x6c, 0x6f, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x78, 0x70, 0x6c, - 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x2c, 0x0a, 0x10, 0x42, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, - 0x61, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x36, 0x0a, 0x1a, 0x42, 0x72, 0x6f, 0x61, - 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x22, 0x31, 0x0a, 0x10, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, - 0x74, 0x49, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x75, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x53, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x1a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, - 0x75, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, - 0x49, 0x64, 0x32, 0xb9, 0x04, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x37, - 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, - 0x73, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x07, 0x45, 0x78, 0x70, 0x6c, 0x6f, - 0x69, 0x74, 0x12, 0x18, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x45, 0x78, - 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x65, - 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x0d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x70, - 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x6c, - 0x6f, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x70, - 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x78, 0x70, 0x6c, - 0x6f, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, - 0x10, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x12, 0x1a, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x42, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x12, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x12, 0x23, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x42, 0x72, - 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, - 0x74, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, - 0x01, 0x12, 0x46, 0x0a, 0x09, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x12, 0x1a, - 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x65, 0x78, 0x70, - 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x12, 0x53, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, - 0x23, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x52, 0x75, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x2e, - 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x75, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x89, - 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x42, - 0x08, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x34, 0x74, 0x2d, 0x62, 0x75, 0x74, 0x2d, - 0x73, 0x34, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x2f, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x45, - 0x58, 0x58, 0xaa, 0x02, 0x08, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0xca, 0x02, 0x08, - 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0xe2, 0x02, 0x14, 0x45, 0x78, 0x70, 0x6c, 0x6f, - 0x69, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x08, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_exploits_api_proto_rawDescOnce sync.Once - file_exploits_api_proto_rawDescData = file_exploits_api_proto_rawDesc -) - -func file_exploits_api_proto_rawDescGZIP() []byte { - file_exploits_api_proto_rawDescOnce.Do(func() { - file_exploits_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_exploits_api_proto_rawDescData) - }) - return file_exploits_api_proto_rawDescData -} - -var file_exploits_api_proto_msgTypes = make([]protoimpl.MessageInfo, 24) -var file_exploits_api_proto_goTypes = []interface{}{ - (*TeamBucket)(nil), // 0: exploits.TeamBucket - (*ExploitConfiguration)(nil), // 1: exploits.ExploitConfiguration - (*ExploitState)(nil), // 2: exploits.ExploitState - (*Config)(nil), // 3: exploits.Config - (*ServerState)(nil), // 4: exploits.ServerState - (*PingRequest)(nil), // 5: exploits.PingRequest - (*PingResponse)(nil), // 6: exploits.PingResponse - (*ExploitRequest)(nil), // 7: exploits.ExploitRequest - (*ExploitResponse)(nil), // 8: exploits.ExploitResponse - (*UpdateExploitRequest)(nil), // 9: exploits.UpdateExploitRequest - (*UpdateExploitResponse)(nil), // 10: exploits.UpdateExploitResponse - (*BroadcastRequest)(nil), // 11: exploits.BroadcastRequest - (*BroadcastResponse)(nil), // 12: exploits.BroadcastResponse - (*BroadcastSubscribeRequest)(nil), // 13: exploits.BroadcastSubscribeRequest - (*BroadcastSubscribeResponse)(nil), // 14: exploits.BroadcastSubscribeResponse - (*SingleRunRequest)(nil), // 15: exploits.SingleRunRequest - (*SingleRunResponse)(nil), // 16: exploits.SingleRunResponse - (*SingleRunSubscribeRequest)(nil), // 17: exploits.SingleRunSubscribeRequest - (*SingleRunSubscribeResponse)(nil), // 18: exploits.SingleRunSubscribeResponse - nil, // 19: exploits.TeamBucket.TeamsEntry - nil, // 20: exploits.ServerState.ClientTeamMapEntry - (*PingRequest_ServerInfo)(nil), // 21: exploits.PingRequest.ServerInfo - (*PingRequest_Heartbeat)(nil), // 22: exploits.PingRequest.Heartbeat - (*PingRequest_Leave)(nil), // 23: exploits.PingRequest.Leave - (*durationpb.Duration)(nil), // 24: google.protobuf.Duration - (*fileserver.FileInfo)(nil), // 25: fileserver.FileInfo -} -var file_exploits_api_proto_depIdxs = []int32{ - 19, // 0: exploits.TeamBucket.teams:type_name -> exploits.TeamBucket.TeamsEntry - 24, // 1: exploits.ExploitConfiguration.run_every:type_name -> google.protobuf.Duration - 24, // 2: exploits.ExploitConfiguration.timeout:type_name -> google.protobuf.Duration - 25, // 3: exploits.ExploitState.file:type_name -> fileserver.FileInfo - 1, // 4: exploits.ExploitState.config:type_name -> exploits.ExploitConfiguration - 24, // 5: exploits.Config.ping_every:type_name -> google.protobuf.Duration - 24, // 6: exploits.Config.submit_every:type_name -> google.protobuf.Duration - 20, // 7: exploits.ServerState.client_team_map:type_name -> exploits.ServerState.ClientTeamMapEntry - 2, // 8: exploits.ServerState.exploits:type_name -> exploits.ExploitState - 3, // 9: exploits.ServerState.config:type_name -> exploits.Config - 21, // 10: exploits.PingRequest.server_info_request:type_name -> exploits.PingRequest.ServerInfo - 22, // 11: exploits.PingRequest.heartbeat_request:type_name -> exploits.PingRequest.Heartbeat - 23, // 12: exploits.PingRequest.leave_request:type_name -> exploits.PingRequest.Leave - 4, // 13: exploits.PingResponse.state:type_name -> exploits.ServerState - 2, // 14: exploits.ExploitResponse.state:type_name -> exploits.ExploitState - 2, // 15: exploits.UpdateExploitRequest.state:type_name -> exploits.ExploitState - 2, // 16: exploits.UpdateExploitResponse.state:type_name -> exploits.ExploitState - 0, // 17: exploits.ServerState.ClientTeamMapEntry.value:type_name -> exploits.TeamBucket - 5, // 18: exploits.Service.Ping:input_type -> exploits.PingRequest - 7, // 19: exploits.Service.Exploit:input_type -> exploits.ExploitRequest - 9, // 20: exploits.Service.UpdateExploit:input_type -> exploits.UpdateExploitRequest - 11, // 21: exploits.Service.BroadcastCommand:input_type -> exploits.BroadcastRequest - 13, // 22: exploits.Service.BroadcastSubscribe:input_type -> exploits.BroadcastSubscribeRequest - 15, // 23: exploits.Service.SingleRun:input_type -> exploits.SingleRunRequest - 17, // 24: exploits.Service.SingleRunSubscribe:input_type -> exploits.SingleRunSubscribeRequest - 6, // 25: exploits.Service.Ping:output_type -> exploits.PingResponse - 8, // 26: exploits.Service.Exploit:output_type -> exploits.ExploitResponse - 10, // 27: exploits.Service.UpdateExploit:output_type -> exploits.UpdateExploitResponse - 12, // 28: exploits.Service.BroadcastCommand:output_type -> exploits.BroadcastResponse - 14, // 29: exploits.Service.BroadcastSubscribe:output_type -> exploits.BroadcastSubscribeResponse - 16, // 30: exploits.Service.SingleRun:output_type -> exploits.SingleRunResponse - 18, // 31: exploits.Service.SingleRunSubscribe:output_type -> exploits.SingleRunSubscribeResponse - 25, // [25:32] is the sub-list for method output_type - 18, // [18:25] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name -} - -func init() { file_exploits_api_proto_init() } -func file_exploits_api_proto_init() { - if File_exploits_api_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_exploits_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TeamBucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExploitConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExploitState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Config); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExploitRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExploitResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateExploitRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateExploitResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastSubscribeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BroadcastSubscribeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleRunRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleRunResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleRunSubscribeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleRunSubscribeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest_ServerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest_Heartbeat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_exploits_api_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PingRequest_Leave); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_exploits_api_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*PingRequest_ServerInfoRequest)(nil), - (*PingRequest_HeartbeatRequest)(nil), - (*PingRequest_LeaveRequest)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_exploits_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 24, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_exploits_api_proto_goTypes, - DependencyIndexes: file_exploits_api_proto_depIdxs, - MessageInfos: file_exploits_api_proto_msgTypes, - }.Build() - File_exploits_api_proto = out.File - file_exploits_api_proto_rawDesc = nil - file_exploits_api_proto_goTypes = nil - file_exploits_api_proto_depIdxs = nil -} diff --git a/proto/go/exploits/api_grpc.pb.go b/proto/go/exploits/api_grpc.pb.go deleted file mode 100644 index ffd27fe..0000000 --- a/proto/go/exploits/api_grpc.pb.go +++ /dev/null @@ -1,376 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: exploits/api.proto - -package exploits - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ServiceClient is the client API for Service service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ServiceClient interface { - Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) - Exploit(ctx context.Context, in *ExploitRequest, opts ...grpc.CallOption) (*ExploitResponse, error) - UpdateExploit(ctx context.Context, in *UpdateExploitRequest, opts ...grpc.CallOption) (*UpdateExploitResponse, error) - BroadcastCommand(ctx context.Context, in *BroadcastRequest, opts ...grpc.CallOption) (*BroadcastResponse, error) - BroadcastSubscribe(ctx context.Context, in *BroadcastSubscribeRequest, opts ...grpc.CallOption) (Service_BroadcastSubscribeClient, error) - SingleRun(ctx context.Context, in *SingleRunRequest, opts ...grpc.CallOption) (*SingleRunResponse, error) - SingleRunSubscribe(ctx context.Context, in *SingleRunSubscribeRequest, opts ...grpc.CallOption) (Service_SingleRunSubscribeClient, error) -} - -type serviceClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { - return &serviceClient{cc} -} - -func (c *serviceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { - out := new(PingResponse) - err := c.cc.Invoke(ctx, "/exploits.Service/Ping", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) Exploit(ctx context.Context, in *ExploitRequest, opts ...grpc.CallOption) (*ExploitResponse, error) { - out := new(ExploitResponse) - err := c.cc.Invoke(ctx, "/exploits.Service/Exploit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) UpdateExploit(ctx context.Context, in *UpdateExploitRequest, opts ...grpc.CallOption) (*UpdateExploitResponse, error) { - out := new(UpdateExploitResponse) - err := c.cc.Invoke(ctx, "/exploits.Service/UpdateExploit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) BroadcastCommand(ctx context.Context, in *BroadcastRequest, opts ...grpc.CallOption) (*BroadcastResponse, error) { - out := new(BroadcastResponse) - err := c.cc.Invoke(ctx, "/exploits.Service/BroadcastCommand", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) BroadcastSubscribe(ctx context.Context, in *BroadcastSubscribeRequest, opts ...grpc.CallOption) (Service_BroadcastSubscribeClient, error) { - stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[0], "/exploits.Service/BroadcastSubscribe", opts...) - if err != nil { - return nil, err - } - x := &serviceBroadcastSubscribeClient{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 Service_BroadcastSubscribeClient interface { - Recv() (*BroadcastSubscribeResponse, error) - grpc.ClientStream -} - -type serviceBroadcastSubscribeClient struct { - grpc.ClientStream -} - -func (x *serviceBroadcastSubscribeClient) Recv() (*BroadcastSubscribeResponse, error) { - m := new(BroadcastSubscribeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *serviceClient) SingleRun(ctx context.Context, in *SingleRunRequest, opts ...grpc.CallOption) (*SingleRunResponse, error) { - out := new(SingleRunResponse) - err := c.cc.Invoke(ctx, "/exploits.Service/SingleRun", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) SingleRunSubscribe(ctx context.Context, in *SingleRunSubscribeRequest, opts ...grpc.CallOption) (Service_SingleRunSubscribeClient, error) { - stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[1], "/exploits.Service/SingleRunSubscribe", opts...) - if err != nil { - return nil, err - } - x := &serviceSingleRunSubscribeClient{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 Service_SingleRunSubscribeClient interface { - Recv() (*SingleRunSubscribeResponse, error) - grpc.ClientStream -} - -type serviceSingleRunSubscribeClient struct { - grpc.ClientStream -} - -func (x *serviceSingleRunSubscribeClient) Recv() (*SingleRunSubscribeResponse, error) { - m := new(SingleRunSubscribeResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ServiceServer is the server API for Service service. -// All implementations must embed UnimplementedServiceServer -// for forward compatibility -type ServiceServer interface { - Ping(context.Context, *PingRequest) (*PingResponse, error) - Exploit(context.Context, *ExploitRequest) (*ExploitResponse, error) - UpdateExploit(context.Context, *UpdateExploitRequest) (*UpdateExploitResponse, error) - BroadcastCommand(context.Context, *BroadcastRequest) (*BroadcastResponse, error) - BroadcastSubscribe(*BroadcastSubscribeRequest, Service_BroadcastSubscribeServer) error - SingleRun(context.Context, *SingleRunRequest) (*SingleRunResponse, error) - SingleRunSubscribe(*SingleRunSubscribeRequest, Service_SingleRunSubscribeServer) error - mustEmbedUnimplementedServiceServer() -} - -// UnimplementedServiceServer must be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} - -func (UnimplementedServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} -func (UnimplementedServiceServer) Exploit(context.Context, *ExploitRequest) (*ExploitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Exploit not implemented") -} -func (UnimplementedServiceServer) UpdateExploit(context.Context, *UpdateExploitRequest) (*UpdateExploitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateExploit not implemented") -} -func (UnimplementedServiceServer) BroadcastCommand(context.Context, *BroadcastRequest) (*BroadcastResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastCommand not implemented") -} -func (UnimplementedServiceServer) BroadcastSubscribe(*BroadcastSubscribeRequest, Service_BroadcastSubscribeServer) error { - return status.Errorf(codes.Unimplemented, "method BroadcastSubscribe not implemented") -} -func (UnimplementedServiceServer) SingleRun(context.Context, *SingleRunRequest) (*SingleRunResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SingleRun not implemented") -} -func (UnimplementedServiceServer) SingleRunSubscribe(*SingleRunSubscribeRequest, Service_SingleRunSubscribeServer) error { - return status.Errorf(codes.Unimplemented, "method SingleRunSubscribe not implemented") -} -func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} - -// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ServiceServer will -// result in compilation errors. -type UnsafeServiceServer interface { - mustEmbedUnimplementedServiceServer() -} - -func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { - s.RegisterService(&Service_ServiceDesc, srv) -} - -func _Service_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).Ping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/exploits.Service/Ping", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).Ping(ctx, req.(*PingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_Exploit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExploitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).Exploit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/exploits.Service/Exploit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).Exploit(ctx, req.(*ExploitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_UpdateExploit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateExploitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).UpdateExploit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/exploits.Service/UpdateExploit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).UpdateExploit(ctx, req.(*UpdateExploitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_BroadcastCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BroadcastRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).BroadcastCommand(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/exploits.Service/BroadcastCommand", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).BroadcastCommand(ctx, req.(*BroadcastRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_BroadcastSubscribe_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(BroadcastSubscribeRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ServiceServer).BroadcastSubscribe(m, &serviceBroadcastSubscribeServer{stream}) -} - -type Service_BroadcastSubscribeServer interface { - Send(*BroadcastSubscribeResponse) error - grpc.ServerStream -} - -type serviceBroadcastSubscribeServer struct { - grpc.ServerStream -} - -func (x *serviceBroadcastSubscribeServer) Send(m *BroadcastSubscribeResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _Service_SingleRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SingleRunRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).SingleRun(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/exploits.Service/SingleRun", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).SingleRun(ctx, req.(*SingleRunRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_SingleRunSubscribe_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SingleRunSubscribeRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ServiceServer).SingleRunSubscribe(m, &serviceSingleRunSubscribeServer{stream}) -} - -type Service_SingleRunSubscribeServer interface { - Send(*SingleRunSubscribeResponse) error - grpc.ServerStream -} - -type serviceSingleRunSubscribeServer struct { - grpc.ServerStream -} - -func (x *serviceSingleRunSubscribeServer) Send(m *SingleRunSubscribeResponse) error { - return x.ServerStream.SendMsg(m) -} - -// Service_ServiceDesc is the grpc.ServiceDesc for Service service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Service_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "exploits.Service", - HandlerType: (*ServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Ping", - Handler: _Service_Ping_Handler, - }, - { - MethodName: "Exploit", - Handler: _Service_Exploit_Handler, - }, - { - MethodName: "UpdateExploit", - Handler: _Service_UpdateExploit_Handler, - }, - { - MethodName: "BroadcastCommand", - Handler: _Service_BroadcastCommand_Handler, - }, - { - MethodName: "SingleRun", - Handler: _Service_SingleRun_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "BroadcastSubscribe", - Handler: _Service_BroadcastSubscribe_Handler, - ServerStreams: true, - }, - { - StreamName: "SingleRunSubscribe", - Handler: _Service_SingleRunSubscribe_Handler, - ServerStreams: true, - }, - }, - Metadata: "exploits/api.proto", -} diff --git a/proto/go/fileserver/api.pb.go b/proto/go/fileserver/api.pb.go deleted file mode 100644 index 5be2053..0000000 --- a/proto/go/fileserver/api.pb.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: fileserver/api.proto - -package fileserver - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type FileInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` -} - -func (x *FileInfo) Reset() { - *x = FileInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_fileserver_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileInfo) ProtoMessage() {} - -func (x *FileInfo) ProtoReflect() protoreflect.Message { - mi := &file_fileserver_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FileInfo.ProtoReflect.Descriptor instead. -func (*FileInfo) Descriptor() ([]byte, []int) { - return file_fileserver_api_proto_rawDescGZIP(), []int{0} -} - -func (x *FileInfo) GetUuid() string { - if x != nil { - return x.Uuid - } - return "" -} - -type FileStream struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` -} - -func (x *FileStream) Reset() { - *x = FileStream{} - if protoimpl.UnsafeEnabled { - mi := &file_fileserver_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FileStream) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileStream) ProtoMessage() {} - -func (x *FileStream) ProtoReflect() protoreflect.Message { - mi := &file_fileserver_api_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 FileStream.ProtoReflect.Descriptor instead. -func (*FileStream) Descriptor() ([]byte, []int) { - return file_fileserver_api_proto_rawDescGZIP(), []int{1} -} - -func (x *FileStream) GetChunk() []byte { - if x != nil { - return x.Chunk - } - return nil -} - -var File_fileserver_api_proto protoreflect.FileDescriptor - -var file_fileserver_api_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x22, 0x1e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, - 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, - 0x69, 0x64, 0x22, 0x22, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x32, 0x8b, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, - 0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x46, 0x69, - 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00, - 0x28, 0x01, 0x12, 0x40, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, - 0x6c, 0x65, 0x12, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x22, 0x00, 0x30, 0x01, 0x42, 0x95, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x08, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x34, 0x74, 0x2d, 0x62, 0x75, 0x74, 0x2d, 0x73, 0x34, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x2f, - 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0xca, 0x02, 0x0a, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0xe2, 0x02, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_fileserver_api_proto_rawDescOnce sync.Once - file_fileserver_api_proto_rawDescData = file_fileserver_api_proto_rawDesc -) - -func file_fileserver_api_proto_rawDescGZIP() []byte { - file_fileserver_api_proto_rawDescOnce.Do(func() { - file_fileserver_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_fileserver_api_proto_rawDescData) - }) - return file_fileserver_api_proto_rawDescData -} - -var file_fileserver_api_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_fileserver_api_proto_goTypes = []interface{}{ - (*FileInfo)(nil), // 0: fileserver.FileInfo - (*FileStream)(nil), // 1: fileserver.FileStream -} -var file_fileserver_api_proto_depIdxs = []int32{ - 1, // 0: fileserver.Service.UploadFile:input_type -> fileserver.FileStream - 0, // 1: fileserver.Service.DownloadFile:input_type -> fileserver.FileInfo - 0, // 2: fileserver.Service.UploadFile:output_type -> fileserver.FileInfo - 1, // 3: fileserver.Service.DownloadFile:output_type -> fileserver.FileStream - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_fileserver_api_proto_init() } -func file_fileserver_api_proto_init() { - if File_fileserver_api_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_fileserver_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_fileserver_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FileStream); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_fileserver_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_fileserver_api_proto_goTypes, - DependencyIndexes: file_fileserver_api_proto_depIdxs, - MessageInfos: file_fileserver_api_proto_msgTypes, - }.Build() - File_fileserver_api_proto = out.File - file_fileserver_api_proto_rawDesc = nil - file_fileserver_api_proto_goTypes = nil - file_fileserver_api_proto_depIdxs = nil -} diff --git a/proto/go/fileserver/api_grpc.pb.go b/proto/go/fileserver/api_grpc.pb.go deleted file mode 100644 index e7a0f91..0000000 --- a/proto/go/fileserver/api_grpc.pb.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: fileserver/api.proto - -package fileserver - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ServiceClient is the client API for Service service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ServiceClient interface { - UploadFile(ctx context.Context, opts ...grpc.CallOption) (Service_UploadFileClient, error) - DownloadFile(ctx context.Context, in *FileInfo, opts ...grpc.CallOption) (Service_DownloadFileClient, error) -} - -type serviceClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { - return &serviceClient{cc} -} - -func (c *serviceClient) UploadFile(ctx context.Context, opts ...grpc.CallOption) (Service_UploadFileClient, error) { - stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[0], "/fileserver.Service/UploadFile", opts...) - if err != nil { - return nil, err - } - x := &serviceUploadFileClient{stream} - return x, nil -} - -type Service_UploadFileClient interface { - Send(*FileStream) error - CloseAndRecv() (*FileInfo, error) - grpc.ClientStream -} - -type serviceUploadFileClient struct { - grpc.ClientStream -} - -func (x *serviceUploadFileClient) Send(m *FileStream) error { - return x.ClientStream.SendMsg(m) -} - -func (x *serviceUploadFileClient) CloseAndRecv() (*FileInfo, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(FileInfo) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *serviceClient) DownloadFile(ctx context.Context, in *FileInfo, opts ...grpc.CallOption) (Service_DownloadFileClient, error) { - stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[1], "/fileserver.Service/DownloadFile", opts...) - if err != nil { - return nil, err - } - x := &serviceDownloadFileClient{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 Service_DownloadFileClient interface { - Recv() (*FileStream, error) - grpc.ClientStream -} - -type serviceDownloadFileClient struct { - grpc.ClientStream -} - -func (x *serviceDownloadFileClient) Recv() (*FileStream, error) { - m := new(FileStream) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ServiceServer is the server API for Service service. -// All implementations must embed UnimplementedServiceServer -// for forward compatibility -type ServiceServer interface { - UploadFile(Service_UploadFileServer) error - DownloadFile(*FileInfo, Service_DownloadFileServer) error - mustEmbedUnimplementedServiceServer() -} - -// UnimplementedServiceServer must be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} - -func (UnimplementedServiceServer) UploadFile(Service_UploadFileServer) error { - return status.Errorf(codes.Unimplemented, "method UploadFile not implemented") -} -func (UnimplementedServiceServer) DownloadFile(*FileInfo, Service_DownloadFileServer) error { - return status.Errorf(codes.Unimplemented, "method DownloadFile not implemented") -} -func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} - -// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ServiceServer will -// result in compilation errors. -type UnsafeServiceServer interface { - mustEmbedUnimplementedServiceServer() -} - -func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { - s.RegisterService(&Service_ServiceDesc, srv) -} - -func _Service_UploadFile_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ServiceServer).UploadFile(&serviceUploadFileServer{stream}) -} - -type Service_UploadFileServer interface { - SendAndClose(*FileInfo) error - Recv() (*FileStream, error) - grpc.ServerStream -} - -type serviceUploadFileServer struct { - grpc.ServerStream -} - -func (x *serviceUploadFileServer) SendAndClose(m *FileInfo) error { - return x.ServerStream.SendMsg(m) -} - -func (x *serviceUploadFileServer) Recv() (*FileStream, error) { - m := new(FileStream) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Service_DownloadFile_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(FileInfo) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ServiceServer).DownloadFile(m, &serviceDownloadFileServer{stream}) -} - -type Service_DownloadFileServer interface { - Send(*FileStream) error - grpc.ServerStream -} - -type serviceDownloadFileServer struct { - grpc.ServerStream -} - -func (x *serviceDownloadFileServer) Send(m *FileStream) error { - return x.ServerStream.SendMsg(m) -} - -// Service_ServiceDesc is the grpc.ServiceDesc for Service service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Service_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "fileserver.Service", - HandlerType: (*ServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "UploadFile", - Handler: _Service_UploadFile_Handler, - ClientStreams: true, - }, - { - StreamName: "DownloadFile", - Handler: _Service_DownloadFile_Handler, - ServerStreams: true, - }, - }, - Metadata: "fileserver/api.proto", -} diff --git a/proto/go/logs/api.pb.go b/proto/go/logs/api.pb.go deleted file mode 100644 index b9757c8..0000000 --- a/proto/go/logs/api.pb.go +++ /dev/null @@ -1,406 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: logs/api.proto - -package logs - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type LogLine struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exploit string `protobuf:"bytes,1,opt,name=exploit,proto3" json:"exploit,omitempty"` - Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` - Level string `protobuf:"bytes,4,opt,name=level,proto3" json:"level,omitempty"` - Team string `protobuf:"bytes,5,opt,name=team,proto3" json:"team,omitempty"` -} - -func (x *LogLine) Reset() { - *x = LogLine{} - if protoimpl.UnsafeEnabled { - mi := &file_logs_api_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LogLine) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LogLine) ProtoMessage() {} - -func (x *LogLine) ProtoReflect() protoreflect.Message { - mi := &file_logs_api_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LogLine.ProtoReflect.Descriptor instead. -func (*LogLine) Descriptor() ([]byte, []int) { - return file_logs_api_proto_rawDescGZIP(), []int{0} -} - -func (x *LogLine) GetExploit() string { - if x != nil { - return x.Exploit - } - return "" -} - -func (x *LogLine) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *LogLine) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *LogLine) GetLevel() string { - if x != nil { - return x.Level - } - return "" -} - -func (x *LogLine) GetTeam() string { - if x != nil { - return x.Team - } - return "" -} - -type AddLogLinesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Lines []*LogLine `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines,omitempty"` -} - -func (x *AddLogLinesRequest) Reset() { - *x = AddLogLinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_logs_api_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddLogLinesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddLogLinesRequest) ProtoMessage() {} - -func (x *AddLogLinesRequest) ProtoReflect() protoreflect.Message { - mi := &file_logs_api_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 AddLogLinesRequest.ProtoReflect.Descriptor instead. -func (*AddLogLinesRequest) Descriptor() ([]byte, []int) { - return file_logs_api_proto_rawDescGZIP(), []int{1} -} - -func (x *AddLogLinesRequest) GetLines() []*LogLine { - if x != nil { - return x.Lines - } - return nil -} - -type SearchLogLinesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exploit string `protobuf:"bytes,1,opt,name=exploit,proto3" json:"exploit,omitempty"` - Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` -} - -func (x *SearchLogLinesRequest) Reset() { - *x = SearchLogLinesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_logs_api_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchLogLinesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchLogLinesRequest) ProtoMessage() {} - -func (x *SearchLogLinesRequest) ProtoReflect() protoreflect.Message { - mi := &file_logs_api_proto_msgTypes[2] - 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 SearchLogLinesRequest.ProtoReflect.Descriptor instead. -func (*SearchLogLinesRequest) Descriptor() ([]byte, []int) { - return file_logs_api_proto_rawDescGZIP(), []int{2} -} - -func (x *SearchLogLinesRequest) GetExploit() string { - if x != nil { - return x.Exploit - } - return "" -} - -func (x *SearchLogLinesRequest) GetVersion() int64 { - if x != nil { - return x.Version - } - return 0 -} - -type SearchLogLinesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Lines []*LogLine `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines,omitempty"` -} - -func (x *SearchLogLinesResponse) Reset() { - *x = SearchLogLinesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_logs_api_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchLogLinesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchLogLinesResponse) ProtoMessage() {} - -func (x *SearchLogLinesResponse) ProtoReflect() protoreflect.Message { - mi := &file_logs_api_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 SearchLogLinesResponse.ProtoReflect.Descriptor instead. -func (*SearchLogLinesResponse) Descriptor() ([]byte, []int) { - return file_logs_api_proto_rawDescGZIP(), []int{3} -} - -func (x *SearchLogLinesResponse) GetLines() []*LogLine { - if x != nil { - return x.Lines - } - return nil -} - -var File_logs_api_proto protoreflect.FileDescriptor - -var file_logs_api_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x01, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x39, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x4c, 0x6f, - 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, - 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, - 0x6f, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x22, 0x4b, 0x0a, 0x15, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x6f, 0x67, 0x4c, - 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, - 0x78, 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, - 0x70, 0x6c, 0x6f, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x3d, 0x0a, 0x16, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, - 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x32, 0x9d, - 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x41, 0x64, - 0x64, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4f, 0x0a, - 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x12, - 0x1b, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x6f, 0x67, - 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, - 0x6f, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4c, 0x6f, 0x67, 0x4c, 0x69, 0x6e, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x71, - 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x08, 0x41, 0x70, 0x69, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x34, 0x74, 0x2d, 0x62, 0x75, 0x74, 0x2d, 0x73, 0x34, 0x64, 0x2f, 0x6e, - 0x65, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x6c, - 0x6f, 0x67, 0x73, 0xa2, 0x02, 0x03, 0x4c, 0x58, 0x58, 0xaa, 0x02, 0x04, 0x4c, 0x6f, 0x67, 0x73, - 0xca, 0x02, 0x04, 0x4c, 0x6f, 0x67, 0x73, 0xe2, 0x02, 0x10, 0x4c, 0x6f, 0x67, 0x73, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x04, 0x4c, 0x6f, 0x67, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_logs_api_proto_rawDescOnce sync.Once - file_logs_api_proto_rawDescData = file_logs_api_proto_rawDesc -) - -func file_logs_api_proto_rawDescGZIP() []byte { - file_logs_api_proto_rawDescOnce.Do(func() { - file_logs_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_logs_api_proto_rawDescData) - }) - return file_logs_api_proto_rawDescData -} - -var file_logs_api_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_logs_api_proto_goTypes = []interface{}{ - (*LogLine)(nil), // 0: logs.LogLine - (*AddLogLinesRequest)(nil), // 1: logs.AddLogLinesRequest - (*SearchLogLinesRequest)(nil), // 2: logs.SearchLogLinesRequest - (*SearchLogLinesResponse)(nil), // 3: logs.SearchLogLinesResponse - (*emptypb.Empty)(nil), // 4: google.protobuf.Empty -} -var file_logs_api_proto_depIdxs = []int32{ - 0, // 0: logs.AddLogLinesRequest.lines:type_name -> logs.LogLine - 0, // 1: logs.SearchLogLinesResponse.lines:type_name -> logs.LogLine - 1, // 2: logs.Service.AddLogLines:input_type -> logs.AddLogLinesRequest - 2, // 3: logs.Service.SearchLogLines:input_type -> logs.SearchLogLinesRequest - 4, // 4: logs.Service.AddLogLines:output_type -> google.protobuf.Empty - 3, // 5: logs.Service.SearchLogLines:output_type -> logs.SearchLogLinesResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_logs_api_proto_init() } -func file_logs_api_proto_init() { - if File_logs_api_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_logs_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogLine); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_logs_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddLogLinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_logs_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchLogLinesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_logs_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchLogLinesResponse); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_logs_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_logs_api_proto_goTypes, - DependencyIndexes: file_logs_api_proto_depIdxs, - MessageInfos: file_logs_api_proto_msgTypes, - }.Build() - File_logs_api_proto = out.File - file_logs_api_proto_rawDesc = nil - file_logs_api_proto_goTypes = nil - file_logs_api_proto_depIdxs = nil -} diff --git a/proto/go/logs/api_grpc.pb.go b/proto/go/logs/api_grpc.pb.go deleted file mode 100644 index 6624ebd..0000000 --- a/proto/go/logs/api_grpc.pb.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: logs/api.proto - -package logs - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// ServiceClient is the client API for Service service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ServiceClient interface { - AddLogLines(ctx context.Context, in *AddLogLinesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - SearchLogLines(ctx context.Context, in *SearchLogLinesRequest, opts ...grpc.CallOption) (Service_SearchLogLinesClient, error) -} - -type serviceClient struct { - cc grpc.ClientConnInterface -} - -func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { - return &serviceClient{cc} -} - -func (c *serviceClient) AddLogLines(ctx context.Context, in *AddLogLinesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/logs.Service/AddLogLines", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) SearchLogLines(ctx context.Context, in *SearchLogLinesRequest, opts ...grpc.CallOption) (Service_SearchLogLinesClient, error) { - stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[0], "/logs.Service/SearchLogLines", opts...) - if err != nil { - return nil, err - } - x := &serviceSearchLogLinesClient{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 Service_SearchLogLinesClient interface { - Recv() (*SearchLogLinesResponse, error) - grpc.ClientStream -} - -type serviceSearchLogLinesClient struct { - grpc.ClientStream -} - -func (x *serviceSearchLogLinesClient) Recv() (*SearchLogLinesResponse, error) { - m := new(SearchLogLinesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ServiceServer is the server API for Service service. -// All implementations must embed UnimplementedServiceServer -// for forward compatibility -type ServiceServer interface { - AddLogLines(context.Context, *AddLogLinesRequest) (*emptypb.Empty, error) - SearchLogLines(*SearchLogLinesRequest, Service_SearchLogLinesServer) error - mustEmbedUnimplementedServiceServer() -} - -// UnimplementedServiceServer must be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} - -func (UnimplementedServiceServer) AddLogLines(context.Context, *AddLogLinesRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddLogLines not implemented") -} -func (UnimplementedServiceServer) SearchLogLines(*SearchLogLinesRequest, Service_SearchLogLinesServer) error { - return status.Errorf(codes.Unimplemented, "method SearchLogLines not implemented") -} -func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} - -// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ServiceServer will -// result in compilation errors. -type UnsafeServiceServer interface { - mustEmbedUnimplementedServiceServer() -} - -func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { - s.RegisterService(&Service_ServiceDesc, srv) -} - -func _Service_AddLogLines_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddLogLinesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).AddLogLines(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/logs.Service/AddLogLines", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).AddLogLines(ctx, req.(*AddLogLinesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_SearchLogLines_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SearchLogLinesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ServiceServer).SearchLogLines(m, &serviceSearchLogLinesServer{stream}) -} - -type Service_SearchLogLinesServer interface { - Send(*SearchLogLinesResponse) error - grpc.ServerStream -} - -type serviceSearchLogLinesServer struct { - grpc.ServerStream -} - -func (x *serviceSearchLogLinesServer) Send(m *SearchLogLinesResponse) error { - return x.ServerStream.SendMsg(m) -} - -// Service_ServiceDesc is the grpc.ServiceDesc for Service service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Service_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "logs.Service", - HandlerType: (*ServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AddLogLines", - Handler: _Service_AddLogLines_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "SearchLogLines", - Handler: _Service_SearchLogLines_Handler, - ServerStreams: true, - }, - }, - Metadata: "logs/api.proto", -}