From 258a75f39cf6a82d6ea62b6910edf4856d12f9b1 Mon Sep 17 00:00:00 2001 From: boppanasusanth Date: Mon, 29 Apr 2024 14:12:47 +0530 Subject: [PATCH] update --- cmd/delete/environment.go | 2 +- cmd/deploy/service.go | 27 +- go.mod | 8 +- go.sum | 8 +- internal/service/environment.go | 2 +- internal/service/service.go | 29 +- main.go | 1 + proto/dream11/od/dto/v1/service.proto | 8 +- proto/dream11/od/service/v1/service.proto | 42 +- proto/gen/go/dream11/od/dto/v1/service.pb.go | 183 +++++-- .../go/dream11/od/service/v1/service.pb.go | 467 ++++-------------- 11 files changed, 308 insertions(+), 469 deletions(-) diff --git a/cmd/delete/environment.go b/cmd/delete/environment.go index 5781ce20..a3159c0b 100644 --- a/cmd/delete/environment.go +++ b/cmd/delete/environment.go @@ -29,7 +29,7 @@ func init() { if err != nil { log.Fatal("Error marking 'name' flag as required:", err) } - + deleteCmd.AddCommand(environmentCmd) } diff --git a/cmd/deploy/service.go b/cmd/deploy/service.go index 3c1d4f34..5d6e8d2d 100644 --- a/cmd/deploy/service.go +++ b/cmd/deploy/service.go @@ -2,17 +2,17 @@ package deploy import ( "encoding/json" + "os" + "github.com/dream11/odin/internal/service" serviceProto "github.com/dream11/odin/proto/gen/go/dream11/od/service/v1" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "io/ioutil" - "os" ) var env string -var provisioning string -var file string +var definitionFile string +var provisioningFile string var serviceClient = service.Service{} @@ -30,8 +30,8 @@ var serviceCmd = &cobra.Command{ func init() { serviceCmd.Flags().StringVar(&env, "env", "", "environment for deploying the service") - serviceCmd.Flags().StringVar(&file, "file", "", "path to the service definition file") - serviceCmd.Flags().StringVar(&provisioning, "provisioning", "", "path to the provisioning file") + serviceCmd.Flags().StringVar(&definitionFile, "file", "", "path to the service definition file") + serviceCmd.Flags().StringVar(&provisioningFile, "provisioning", "", "path to the provisioning file") err := serviceCmd.MarkFlagRequired("env") if err != nil { log.Println("Error marking 'env' flag as required:", err) @@ -44,11 +44,11 @@ func init() { func execute(cmd *cobra.Command) { ctx := cmd.Context() - definitionData, err := readFromFile(file) + definitionData, err := readFromFile(definitionFile) if err != nil { log.Fatal("Error while reading definition file ", err) } - provisioningData, err := readFromFile(provisioning) + provisioningData, err := readFromFile(provisioningFile) if err != nil { log.Fatal("Error while reading provisioning file ", err) @@ -63,22 +63,15 @@ func execute(cmd *cobra.Command) { if err != nil { log.Fatal("Failed to deploy service ", err) } - - //outputFormat, err := cmd.Flags().GetString("output") - //if err != nil { - // log.Fatal(err) - //} } func readFromFile(filePath string) (string, error) { - // Read the file - content, err := ioutil.ReadFile(filePath) + content, err := os.ReadFile(filePath) if err != nil { log.Println("Error reading file:", err) return "", err } - // Validate if the contents are valid JSON var jsonData interface{} err = json.Unmarshal(content, &jsonData) if err != nil { @@ -87,7 +80,6 @@ func readFromFile(filePath string) (string, error) { } - // Convert the JSON content to a string jsonString, err := json.MarshalIndent(jsonData, "", " ") if err != nil { log.Println("Error converting JSON to string:", err) @@ -95,6 +87,5 @@ func readFromFile(filePath string) (string, error) { } - // Print the resulting string return string(jsonString), nil } diff --git a/go.mod b/go.mod index 41e7e252..d769b6ea 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,9 @@ go 1.17 require github.com/olekukonko/tablewriter v0.0.5 +require github.com/briandowns/spinner v1.23.0 + require ( - github.com/briandowns/spinner v1.23.0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -13,7 +14,7 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect @@ -25,7 +26,6 @@ require ( golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect - google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect @@ -38,5 +38,5 @@ require ( golang.org/x/net v0.14.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect google.golang.org/grpc v1.57.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf v1.33.0 ) diff --git a/go.sum b/go.sum index 0736f0d0..371a65ec 100644 --- a/go.sum +++ b/go.sum @@ -1055,6 +1055,7 @@ github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WV github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -1065,9 +1066,9 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -1898,8 +1899,6 @@ google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpX google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1917,8 +1916,9 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/service/environment.go b/internal/service/environment.go index a7806fb6..42a9fa8b 100644 --- a/internal/service/environment.go +++ b/internal/service/environment.go @@ -68,7 +68,7 @@ func (e *Environment) CreateEnvironment(ctx *context.Context, request *environme return err } -// DeleteEnvironment : Delete environment +// DeleteEnvironment deletes environment func (e *Environment) DeleteEnvironment(ctx *context.Context, request *environment.DeleteEnvironmentRequest) error { conn, requestCtx, err := grpcClient(ctx) if err != nil { diff --git a/internal/service/service.go b/internal/service/service.go index 33d805ba..75f83363 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -2,7 +2,12 @@ package service import ( "context" + "errors" "fmt" + "io" + + "github.com/briandowns/spinner" + "github.com/dream11/odin/pkg/constant" service "github.com/dream11/odin/proto/gen/go/dream11/od/service/v1" log "github.com/sirupsen/logrus" ) @@ -22,21 +27,31 @@ func (e *Service) DeployService(ctx *context.Context, request *service.DeploySer return err } - // Receive and process streaming responses + log.Info("Deploying Service...") + spinner := spinner.New(spinner.CharSets[constant.SpinnerType], constant.SpinnerDelay) + err = spinner.Color(constant.SpinnerColor, constant.SpinnerStyle) + if err != nil { + return err + } + + var message string for { response, err := stream.Recv() + spinner.Stop() if err != nil { - // Check for the end of the stream - if err == context.Canceled { + if errors.Is(err, context.Canceled) || err == io.EOF { break } - - log.Fatalf("Error receiving stream: %v", err) + return err } - // Process the received stream - fmt.Println("Received DeployServiceResponse:", response) + if response != nil { + message = response.Message + spinner.Prefix = fmt.Sprintf(" %s ", response.Message) + spinner.Start() + } } + log.Info(message) return err } diff --git a/main.go b/main.go index 16f4d9c7..31c3293d 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( _ "github.com/dream11/odin/cmd/configure" _ "github.com/dream11/odin/cmd/create" _ "github.com/dream11/odin/cmd/delete" + _ "github.com/dream11/odin/cmd/deploy" _ "github.com/dream11/odin/cmd/list" _ "github.com/dream11/odin/internal/ui" ) diff --git a/proto/dream11/od/dto/v1/service.proto b/proto/dream11/od/dto/v1/service.proto index 4f1cf84c..a4b08e86 100644 --- a/proto/dream11/od/dto/v1/service.proto +++ b/proto/dream11/od/dto/v1/service.proto @@ -9,7 +9,9 @@ message ComponentDefinition { string name = 1; string version = 2; string type = 3; - google.protobuf.Struct config = 4; + repeated string depends_on = 4; + google.protobuf.Struct config = 5; + optional google.protobuf.Struct metadata = 6; } message ServiceDefinition { @@ -24,3 +26,7 @@ message ComponentProvisioningConfig { string deployment_type = 2; google.protobuf.Struct params = 3; } + +message ProvisioningConfig { + repeated ComponentProvisioningConfig component_provisioning_config = 1; +} diff --git a/proto/dream11/od/service/v1/service.proto b/proto/dream11/od/service/v1/service.proto index 11cce881..99c62c00 100644 --- a/proto/dream11/od/service/v1/service.proto +++ b/proto/dream11/od/service/v1/service.proto @@ -3,7 +3,6 @@ package dream11.od.service.v1; option go_package = "github.com/dream11/odin/proto/gen/go/dream11/od/service/v1"; - service ServiceService { rpc DeployService(DeployServiceRequest) returns (stream DeployServiceResponse) {} } @@ -15,39 +14,20 @@ message DeployServiceRequest { } message DeployServiceResponse { - enum TYPE{ - INFO = 0; - STATUS = 1; - } - TYPE type = 2; - Body body = 3; -} - -message Body{ - oneof response_body{ - StatusBody status_body = 1; - InfoBody info_body = 2; - } + ServiceStatus service_status = 1; + repeated ComponentStatus components_status = 2; + string message = 3; } -message StatusBody { - int64 id = 1; - string status = 2; - string action = 3; - repeated ComponentStatus component_status = 4; +message ServiceStatus { + string service_status = 1; + string service_action = 2; + string error = 3; } message ComponentStatus { - int64 component_id = 1; - string status = 2; - string action = 3; - string response = 4; + string component_name = 1; + string component_status = 2; + string component_action = 3; + string error = 4; } - -message InfoBody { - int64 id = 1; - string status = 2; - string action = 3; - string info_message = 4; -} - diff --git a/proto/gen/go/dream11/od/dto/v1/service.pb.go b/proto/gen/go/dream11/od/dto/v1/service.pb.go index 25db083c..e8eae9af 100644 --- a/proto/gen/go/dream11/od/dto/v1/service.pb.go +++ b/proto/gen/go/dream11/od/dto/v1/service.pb.go @@ -26,10 +26,12 @@ type ComponentDefinition struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - Config *structpb.Struct `protobuf:"bytes,4,opt,name=config,proto3" json:"config,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + DependsOn []string `protobuf:"bytes,4,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty"` + Config *structpb.Struct `protobuf:"bytes,5,opt,name=config,proto3" json:"config,omitempty"` + Metadata *structpb.Struct `protobuf:"bytes,6,opt,name=metadata,proto3,oneof" json:"metadata,omitempty"` } func (x *ComponentDefinition) Reset() { @@ -85,6 +87,13 @@ func (x *ComponentDefinition) GetType() string { return "" } +func (x *ComponentDefinition) GetDependsOn() []string { + if x != nil { + return x.DependsOn + } + return nil +} + func (x *ComponentDefinition) GetConfig() *structpb.Struct { if x != nil { return x.Config @@ -92,6 +101,13 @@ func (x *ComponentDefinition) GetConfig() *structpb.Struct { return nil } +func (x *ComponentDefinition) GetMetadata() *structpb.Struct { + if x != nil { + return x.Metadata + } + return nil +} + type ServiceDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -226,6 +242,53 @@ func (x *ComponentProvisioningConfig) GetParams() *structpb.Struct { return nil } +type ProvisioningConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ComponentProvisioningConfig []*ComponentProvisioningConfig `protobuf:"bytes,1,rep,name=component_provisioning_config,json=componentProvisioningConfig,proto3" json:"component_provisioning_config,omitempty"` +} + +func (x *ProvisioningConfig) Reset() { + *x = ProvisioningConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_dream11_od_dto_v1_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProvisioningConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProvisioningConfig) ProtoMessage() {} + +func (x *ProvisioningConfig) ProtoReflect() protoreflect.Message { + mi := &file_dream11_od_dto_v1_service_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 ProvisioningConfig.ProtoReflect.Descriptor instead. +func (*ProvisioningConfig) Descriptor() ([]byte, []int) { + return file_dream11_od_dto_v1_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ProvisioningConfig) GetComponentProvisioningConfig() []*ComponentProvisioningConfig { + if x != nil { + return x.ComponentProvisioningConfig + } + return nil +} + var File_dream11_od_dto_v1_service_proto protoreflect.FileDescriptor var file_dream11_od_dto_v1_service_proto_rawDesc = []byte{ @@ -234,39 +297,55 @@ var file_dream11_od_dto_v1_service_proto_rawDesc = []byte{ 0x6f, 0x12, 0x11, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, 0x64, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x74, 0x6f, 0x22, 0xee, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, - 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x9d, 0x01, - 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x46, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x72, 0x65, 0x61, - 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, 0x64, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x9e, 0x01, - 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, - 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x38, - 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x72, 0x65, - 0x61, 0x6d, 0x31, 0x31, 0x2f, 0x6f, 0x64, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2f, 0x6f, - 0x64, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x9d, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x46, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, 0x64, 0x74, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x1d, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, + 0x64, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x1b, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x72, + 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2f, 0x6f, 0x64, 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2f, + 0x6f, 0x64, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -281,22 +360,25 @@ func file_dream11_od_dto_v1_service_proto_rawDescGZIP() []byte { return file_dream11_od_dto_v1_service_proto_rawDescData } -var file_dream11_od_dto_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_dream11_od_dto_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_dream11_od_dto_v1_service_proto_goTypes = []interface{}{ (*ComponentDefinition)(nil), // 0: dream11.od.dto.v1.ComponentDefinition (*ServiceDefinition)(nil), // 1: dream11.od.dto.v1.ServiceDefinition (*ComponentProvisioningConfig)(nil), // 2: dream11.od.dto.v1.ComponentProvisioningConfig - (*structpb.Struct)(nil), // 3: google.protobuf.Struct + (*ProvisioningConfig)(nil), // 3: dream11.od.dto.v1.ProvisioningConfig + (*structpb.Struct)(nil), // 4: google.protobuf.Struct } var file_dream11_od_dto_v1_service_proto_depIdxs = []int32{ - 3, // 0: dream11.od.dto.v1.ComponentDefinition.config:type_name -> google.protobuf.Struct - 0, // 1: dream11.od.dto.v1.ServiceDefinition.components:type_name -> dream11.od.dto.v1.ComponentDefinition - 3, // 2: dream11.od.dto.v1.ComponentProvisioningConfig.params:type_name -> google.protobuf.Struct - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 4, // 0: dream11.od.dto.v1.ComponentDefinition.config:type_name -> google.protobuf.Struct + 4, // 1: dream11.od.dto.v1.ComponentDefinition.metadata:type_name -> google.protobuf.Struct + 0, // 2: dream11.od.dto.v1.ServiceDefinition.components:type_name -> dream11.od.dto.v1.ComponentDefinition + 4, // 3: dream11.od.dto.v1.ComponentProvisioningConfig.params:type_name -> google.protobuf.Struct + 2, // 4: dream11.od.dto.v1.ProvisioningConfig.component_provisioning_config:type_name -> dream11.od.dto.v1.ComponentProvisioningConfig + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_dream11_od_dto_v1_service_proto_init() } @@ -341,14 +423,27 @@ func file_dream11_od_dto_v1_service_proto_init() { return nil } } + file_dream11_od_dto_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProvisioningConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } + file_dream11_od_dto_v1_service_proto_msgTypes[0].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dream11_od_dto_v1_service_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/gen/go/dream11/od/service/v1/service.pb.go b/proto/gen/go/dream11/od/service/v1/service.pb.go index 9f078ea5..1009d6c1 100644 --- a/proto/gen/go/dream11/od/service/v1/service.pb.go +++ b/proto/gen/go/dream11/od/service/v1/service.pb.go @@ -20,52 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type DeployServiceResponse_TYPE int32 - -const ( - DeployServiceResponse_INFO DeployServiceResponse_TYPE = 0 - DeployServiceResponse_STATUS DeployServiceResponse_TYPE = 1 -) - -// Enum value maps for DeployServiceResponse_TYPE. -var ( - DeployServiceResponse_TYPE_name = map[int32]string{ - 0: "INFO", - 1: "STATUS", - } - DeployServiceResponse_TYPE_value = map[string]int32{ - "INFO": 0, - "STATUS": 1, - } -) - -func (x DeployServiceResponse_TYPE) Enum() *DeployServiceResponse_TYPE { - p := new(DeployServiceResponse_TYPE) - *p = x - return p -} - -func (x DeployServiceResponse_TYPE) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DeployServiceResponse_TYPE) Descriptor() protoreflect.EnumDescriptor { - return file_dream11_od_service_v1_service_proto_enumTypes[0].Descriptor() -} - -func (DeployServiceResponse_TYPE) Type() protoreflect.EnumType { - return &file_dream11_od_service_v1_service_proto_enumTypes[0] -} - -func (x DeployServiceResponse_TYPE) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DeployServiceResponse_TYPE.Descriptor instead. -func (DeployServiceResponse_TYPE) EnumDescriptor() ([]byte, []int) { - return file_dream11_od_service_v1_service_proto_rawDescGZIP(), []int{1, 0} -} - type DeployServiceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -134,8 +88,9 @@ type DeployServiceResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type DeployServiceResponse_TYPE `protobuf:"varint,2,opt,name=type,proto3,enum=dream11.od.service.v1.DeployServiceResponse_TYPE" json:"type,omitempty"` - Body *Body `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` + ServiceStatus *ServiceStatus `protobuf:"bytes,1,opt,name=service_status,json=serviceStatus,proto3" json:"service_status,omitempty"` + ComponentsStatus []*ComponentStatus `protobuf:"bytes,2,rep,name=components_status,json=componentsStatus,proto3" json:"components_status,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` } func (x *DeployServiceResponse) Reset() { @@ -170,129 +125,54 @@ func (*DeployServiceResponse) Descriptor() ([]byte, []int) { return file_dream11_od_service_v1_service_proto_rawDescGZIP(), []int{1} } -func (x *DeployServiceResponse) GetType() DeployServiceResponse_TYPE { - if x != nil { - return x.Type - } - return DeployServiceResponse_INFO -} - -func (x *DeployServiceResponse) GetBody() *Body { +func (x *DeployServiceResponse) GetServiceStatus() *ServiceStatus { if x != nil { - return x.Body - } - return nil -} - -type Body struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ResponseBody: - // - // *Body_StatusBody - // *Body_InfoBody - ResponseBody isBody_ResponseBody `protobuf_oneof:"response_body"` -} - -func (x *Body) Reset() { - *x = Body{} - if protoimpl.UnsafeEnabled { - mi := &file_dream11_od_service_v1_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Body) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Body) ProtoMessage() {} - -func (x *Body) ProtoReflect() protoreflect.Message { - mi := &file_dream11_od_service_v1_service_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 Body.ProtoReflect.Descriptor instead. -func (*Body) Descriptor() ([]byte, []int) { - return file_dream11_od_service_v1_service_proto_rawDescGZIP(), []int{2} -} - -func (m *Body) GetResponseBody() isBody_ResponseBody { - if m != nil { - return m.ResponseBody + return x.ServiceStatus } return nil } -func (x *Body) GetStatusBody() *StatusBody { - if x, ok := x.GetResponseBody().(*Body_StatusBody); ok { - return x.StatusBody +func (x *DeployServiceResponse) GetComponentsStatus() []*ComponentStatus { + if x != nil { + return x.ComponentsStatus } return nil } -func (x *Body) GetInfoBody() *InfoBody { - if x, ok := x.GetResponseBody().(*Body_InfoBody); ok { - return x.InfoBody +func (x *DeployServiceResponse) GetMessage() string { + if x != nil { + return x.Message } - return nil -} - -type isBody_ResponseBody interface { - isBody_ResponseBody() -} - -type Body_StatusBody struct { - StatusBody *StatusBody `protobuf:"bytes,1,opt,name=status_body,json=statusBody,proto3,oneof"` -} - -type Body_InfoBody struct { - InfoBody *InfoBody `protobuf:"bytes,2,opt,name=info_body,json=infoBody,proto3,oneof"` + return "" } -func (*Body_StatusBody) isBody_ResponseBody() {} - -func (*Body_InfoBody) isBody_ResponseBody() {} - -type StatusBody struct { +type ServiceStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` - ComponentStatus []*ComponentStatus `protobuf:"bytes,4,rep,name=component_status,json=componentStatus,proto3" json:"component_status,omitempty"` + ServiceStatus string `protobuf:"bytes,1,opt,name=service_status,json=serviceStatus,proto3" json:"service_status,omitempty"` + ServiceAction string `protobuf:"bytes,2,opt,name=service_action,json=serviceAction,proto3" json:"service_action,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` } -func (x *StatusBody) Reset() { - *x = StatusBody{} +func (x *ServiceStatus) Reset() { + *x = ServiceStatus{} if protoimpl.UnsafeEnabled { - mi := &file_dream11_od_service_v1_service_proto_msgTypes[3] + mi := &file_dream11_od_service_v1_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatusBody) String() string { +func (x *ServiceStatus) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatusBody) ProtoMessage() {} +func (*ServiceStatus) ProtoMessage() {} -func (x *StatusBody) ProtoReflect() protoreflect.Message { - mi := &file_dream11_od_service_v1_service_proto_msgTypes[3] +func (x *ServiceStatus) ProtoReflect() protoreflect.Message { + mi := &file_dream11_od_service_v1_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -303,37 +183,30 @@ func (x *StatusBody) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatusBody.ProtoReflect.Descriptor instead. -func (*StatusBody) Descriptor() ([]byte, []int) { - return file_dream11_od_service_v1_service_proto_rawDescGZIP(), []int{3} -} - -func (x *StatusBody) GetId() int64 { - if x != nil { - return x.Id - } - return 0 +// Deprecated: Use ServiceStatus.ProtoReflect.Descriptor instead. +func (*ServiceStatus) Descriptor() ([]byte, []int) { + return file_dream11_od_service_v1_service_proto_rawDescGZIP(), []int{2} } -func (x *StatusBody) GetStatus() string { +func (x *ServiceStatus) GetServiceStatus() string { if x != nil { - return x.Status + return x.ServiceStatus } return "" } -func (x *StatusBody) GetAction() string { +func (x *ServiceStatus) GetServiceAction() string { if x != nil { - return x.Action + return x.ServiceAction } return "" } -func (x *StatusBody) GetComponentStatus() []*ComponentStatus { +func (x *ServiceStatus) GetError() string { if x != nil { - return x.ComponentStatus + return x.Error } - return nil + return "" } type ComponentStatus struct { @@ -341,16 +214,16 @@ type ComponentStatus struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ComponentId int64 `protobuf:"varint,1,opt,name=component_id,json=componentId,proto3" json:"component_id,omitempty"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` - Response string `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` + ComponentName string `protobuf:"bytes,1,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"` + ComponentStatus string `protobuf:"bytes,2,opt,name=component_status,json=componentStatus,proto3" json:"component_status,omitempty"` + ComponentAction string `protobuf:"bytes,3,opt,name=component_action,json=componentAction,proto3" json:"component_action,omitempty"` + Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` } func (x *ComponentStatus) Reset() { *x = ComponentStatus{} if protoimpl.UnsafeEnabled { - mi := &file_dream11_od_service_v1_service_proto_msgTypes[4] + mi := &file_dream11_od_service_v1_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -363,7 +236,7 @@ func (x *ComponentStatus) String() string { func (*ComponentStatus) ProtoMessage() {} func (x *ComponentStatus) ProtoReflect() protoreflect.Message { - mi := &file_dream11_od_service_v1_service_proto_msgTypes[4] + mi := &file_dream11_od_service_v1_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -376,104 +249,33 @@ func (x *ComponentStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use ComponentStatus.ProtoReflect.Descriptor instead. func (*ComponentStatus) Descriptor() ([]byte, []int) { - return file_dream11_od_service_v1_service_proto_rawDescGZIP(), []int{4} -} - -func (x *ComponentStatus) GetComponentId() int64 { - if x != nil { - return x.ComponentId - } - return 0 -} - -func (x *ComponentStatus) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *ComponentStatus) GetAction() string { - if x != nil { - return x.Action - } - return "" + return file_dream11_od_service_v1_service_proto_rawDescGZIP(), []int{3} } -func (x *ComponentStatus) GetResponse() string { +func (x *ComponentStatus) GetComponentName() string { if x != nil { - return x.Response + return x.ComponentName } return "" } -type InfoBody struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"` - InfoMessage string `protobuf:"bytes,4,opt,name=info_message,json=infoMessage,proto3" json:"info_message,omitempty"` -} - -func (x *InfoBody) Reset() { - *x = InfoBody{} - if protoimpl.UnsafeEnabled { - mi := &file_dream11_od_service_v1_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InfoBody) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InfoBody) ProtoMessage() {} - -func (x *InfoBody) ProtoReflect() protoreflect.Message { - mi := &file_dream11_od_service_v1_service_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 InfoBody.ProtoReflect.Descriptor instead. -func (*InfoBody) Descriptor() ([]byte, []int) { - return file_dream11_od_service_v1_service_proto_rawDescGZIP(), []int{5} -} - -func (x *InfoBody) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *InfoBody) GetStatus() string { +func (x *ComponentStatus) GetComponentStatus() string { if x != nil { - return x.Status + return x.ComponentStatus } return "" } -func (x *InfoBody) GetAction() string { +func (x *ComponentStatus) GetComponentAction() string { if x != nil { - return x.Action + return x.ComponentAction } return "" } -func (x *InfoBody) GetInfoMessage() string { +func (x *ComponentStatus) GetError() string { if x != nil { - return x.InfoMessage + return x.Error } return "" } @@ -494,65 +296,50 @@ var file_dream11_od_service_v1_service_proto_rawDesc = []byte{ 0x2f, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x22, 0xad, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, - 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x59, 0x50, 0x45, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, - 0x64, 0x79, 0x22, 0x1c, 0x0a, 0x04, 0x54, 0x59, 0x50, 0x45, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, - 0x46, 0x4f, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x01, - 0x22, 0x9d, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x44, 0x0a, 0x0b, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x6f, 0x64, - 0x79, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x3e, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x42, - 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x6f, 0x64, 0x79, 0x42, - 0x0f, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, 0x79, - 0x22, 0x9f, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x51, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x72, 0x65, 0x61, - 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x0a, 0x08, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x6f, 0x64, - 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x32, 0x80, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, - 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, - 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2f, 0x6f, 0x64, - 0x69, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, - 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2f, 0x6f, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0xd3, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x53, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x22, 0x73, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xa4, 0x01, 0x0a, 0x0f, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x32, 0x80, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2b, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, + 0x2e, 0x6f, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2e, 0x6f, 0x64, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x72, 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2f, 0x6f, 0x64, 0x69, 0x6e, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x64, 0x72, + 0x65, 0x61, 0x6d, 0x31, 0x31, 0x2f, 0x6f, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -567,30 +354,23 @@ func file_dream11_od_service_v1_service_proto_rawDescGZIP() []byte { return file_dream11_od_service_v1_service_proto_rawDescData } -var file_dream11_od_service_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_dream11_od_service_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_dream11_od_service_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_dream11_od_service_v1_service_proto_goTypes = []interface{}{ - (DeployServiceResponse_TYPE)(0), // 0: dream11.od.service.v1.DeployServiceResponse.TYPE - (*DeployServiceRequest)(nil), // 1: dream11.od.service.v1.DeployServiceRequest - (*DeployServiceResponse)(nil), // 2: dream11.od.service.v1.DeployServiceResponse - (*Body)(nil), // 3: dream11.od.service.v1.Body - (*StatusBody)(nil), // 4: dream11.od.service.v1.StatusBody - (*ComponentStatus)(nil), // 5: dream11.od.service.v1.ComponentStatus - (*InfoBody)(nil), // 6: dream11.od.service.v1.InfoBody + (*DeployServiceRequest)(nil), // 0: dream11.od.service.v1.DeployServiceRequest + (*DeployServiceResponse)(nil), // 1: dream11.od.service.v1.DeployServiceResponse + (*ServiceStatus)(nil), // 2: dream11.od.service.v1.ServiceStatus + (*ComponentStatus)(nil), // 3: dream11.od.service.v1.ComponentStatus } var file_dream11_od_service_v1_service_proto_depIdxs = []int32{ - 0, // 0: dream11.od.service.v1.DeployServiceResponse.type:type_name -> dream11.od.service.v1.DeployServiceResponse.TYPE - 3, // 1: dream11.od.service.v1.DeployServiceResponse.body:type_name -> dream11.od.service.v1.Body - 4, // 2: dream11.od.service.v1.Body.status_body:type_name -> dream11.od.service.v1.StatusBody - 6, // 3: dream11.od.service.v1.Body.info_body:type_name -> dream11.od.service.v1.InfoBody - 5, // 4: dream11.od.service.v1.StatusBody.component_status:type_name -> dream11.od.service.v1.ComponentStatus - 1, // 5: dream11.od.service.v1.ServiceService.DeployService:input_type -> dream11.od.service.v1.DeployServiceRequest - 2, // 6: dream11.od.service.v1.ServiceService.DeployService:output_type -> dream11.od.service.v1.DeployServiceResponse - 6, // [6:7] is the sub-list for method output_type - 5, // [5:6] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 2, // 0: dream11.od.service.v1.DeployServiceResponse.service_status:type_name -> dream11.od.service.v1.ServiceStatus + 3, // 1: dream11.od.service.v1.DeployServiceResponse.components_status:type_name -> dream11.od.service.v1.ComponentStatus + 0, // 2: dream11.od.service.v1.ServiceService.DeployService:input_type -> dream11.od.service.v1.DeployServiceRequest + 1, // 3: dream11.od.service.v1.ServiceService.DeployService:output_type -> dream11.od.service.v1.DeployServiceResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] 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_dream11_od_service_v1_service_proto_init() } @@ -624,7 +404,7 @@ func file_dream11_od_service_v1_service_proto_init() { } } file_dream11_od_service_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Body); i { + switch v := v.(*ServiceStatus); i { case 0: return &v.state case 1: @@ -636,18 +416,6 @@ func file_dream11_od_service_v1_service_proto_init() { } } file_dream11_od_service_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_dream11_od_service_v1_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ComponentStatus); i { case 0: return &v.state @@ -659,36 +427,19 @@ func file_dream11_od_service_v1_service_proto_init() { return nil } } - file_dream11_od_service_v1_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InfoBody); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_dream11_od_service_v1_service_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*Body_StatusBody)(nil), - (*Body_InfoBody)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dream11_od_service_v1_service_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, + NumEnums: 0, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_dream11_od_service_v1_service_proto_goTypes, DependencyIndexes: file_dream11_od_service_v1_service_proto_depIdxs, - EnumInfos: file_dream11_od_service_v1_service_proto_enumTypes, MessageInfos: file_dream11_od_service_v1_service_proto_msgTypes, }.Build() File_dream11_od_service_v1_service_proto = out.File