Compare commits

..
3 Commits
Author SHA1 Message Date
beejay 489b6463fc Merge pull request 'refactor Deployment message structure in deployment.proto' (#2) from feat/refactor into main
Reviewed-on: #2
2026-11-13 16:19:14 +09:00
actions[bot] 3769aa87a6 Update generated Protobufs 2026-11-13 06:20:19 +00:00
beejay ccac19a1b0 refactor Deployment message structure in deployment.proto
Build protos / Build Protobufs (pull_request) Successful in 27s
2026-11-13 15:19:39 +09:00
2 changed files with 20 additions and 181 deletions

No files matched your search

+18 -166
View File
@@ -70,132 +70,18 @@ func (DeploymentAction) EnumDescriptor() ([]byte, []int) {
return file_deployment_proto_rawDescGZIP(), []int{0} return file_deployment_proto_rawDescGZIP(), []int{0}
} }
type GlobalEnvironment struct {
state protoimpl.MessageState `protogen:"open.v1"`
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
Variables map[string]string `protobuf:"bytes,2,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GlobalEnvironment) Reset() {
*x = GlobalEnvironment{}
mi := &file_deployment_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GlobalEnvironment) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GlobalEnvironment) ProtoMessage() {}
func (x *GlobalEnvironment) ProtoReflect() protoreflect.Message {
mi := &file_deployment_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GlobalEnvironment.ProtoReflect.Descriptor instead.
func (*GlobalEnvironment) Descriptor() ([]byte, []int) {
return file_deployment_proto_rawDescGZIP(), []int{0}
}
func (x *GlobalEnvironment) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *GlobalEnvironment) GetVariables() map[string]string {
if x != nil {
return x.Variables
}
return nil
}
type ConfigFile struct {
state protoimpl.MessageState `protogen:"open.v1"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
Mode uint32 `protobuf:"varint,3,opt,name=mode,proto3" json:"mode,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ConfigFile) Reset() {
*x = ConfigFile{}
mi := &file_deployment_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ConfigFile) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ConfigFile) ProtoMessage() {}
func (x *ConfigFile) ProtoReflect() protoreflect.Message {
mi := &file_deployment_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ConfigFile.ProtoReflect.Descriptor instead.
func (*ConfigFile) Descriptor() ([]byte, []int) {
return file_deployment_proto_rawDescGZIP(), []int{1}
}
func (x *ConfigFile) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *ConfigFile) GetContent() []byte {
if x != nil {
return x.Content
}
return nil
}
func (x *ConfigFile) GetMode() uint32 {
if x != nil {
return x.Mode
}
return 0
}
type Deployment struct { type Deployment struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Env *GlobalEnvironment `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"` Action DeploymentAction `protobuf:"varint,2,opt,name=action,proto3,enum=proto.DeploymentAction" json:"action,omitempty"`
Action DeploymentAction `protobuf:"varint,3,opt,name=action,proto3,enum=proto.DeploymentAction" json:"action,omitempty"` Hcl []byte `protobuf:"bytes,3,opt,name=hcl,proto3" json:"hcl,omitempty"`
Hcl []byte `protobuf:"bytes,4,opt,name=hcl,proto3" json:"hcl,omitempty"`
ConfigFiles []*ConfigFile `protobuf:"bytes,10,rep,name=config_files,json=configFiles,proto3" json:"config_files,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *Deployment) Reset() { func (x *Deployment) Reset() {
*x = Deployment{} *x = Deployment{}
mi := &file_deployment_proto_msgTypes[2] mi := &file_deployment_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -207,7 +93,7 @@ func (x *Deployment) String() string {
func (*Deployment) ProtoMessage() {} func (*Deployment) ProtoMessage() {}
func (x *Deployment) ProtoReflect() protoreflect.Message { func (x *Deployment) ProtoReflect() protoreflect.Message {
mi := &file_deployment_proto_msgTypes[2] mi := &file_deployment_proto_msgTypes[0]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -220,7 +106,7 @@ func (x *Deployment) ProtoReflect() protoreflect.Message {
// Deprecated: Use Deployment.ProtoReflect.Descriptor instead. // Deprecated: Use Deployment.ProtoReflect.Descriptor instead.
func (*Deployment) Descriptor() ([]byte, []int) { func (*Deployment) Descriptor() ([]byte, []int) {
return file_deployment_proto_rawDescGZIP(), []int{2} return file_deployment_proto_rawDescGZIP(), []int{0}
} }
func (x *Deployment) GetId() string { func (x *Deployment) GetId() string {
@@ -230,13 +116,6 @@ func (x *Deployment) GetId() string {
return "" return ""
} }
func (x *Deployment) GetEnv() *GlobalEnvironment {
if x != nil {
return x.Env
}
return nil
}
func (x *Deployment) GetAction() DeploymentAction { func (x *Deployment) GetAction() DeploymentAction {
if x != nil { if x != nil {
return x.Action return x.Action
@@ -251,37 +130,16 @@ func (x *Deployment) GetHcl() []byte {
return nil return nil
} }
func (x *Deployment) GetConfigFiles() []*ConfigFile {
if x != nil {
return x.ConfigFiles
}
return nil
}
var File_deployment_proto protoreflect.FileDescriptor var File_deployment_proto protoreflect.FileDescriptor
const file_deployment_proto_rawDesc = "" + const file_deployment_proto_rawDesc = "" +
"\n" + "\n" +
"\x10deployment.proto\x12\x05proto\"\xb2\x01\n" + "\x10deployment.proto\x12\x05proto\"_\n" +
"\x11GlobalEnvironment\x12\x18\n" +
"\aversion\x18\x01 \x01(\tR\aversion\x12E\n" +
"\tvariables\x18\x02 \x03(\v2'.proto.GlobalEnvironment.VariablesEntryR\tvariables\x1a<\n" +
"\x0eVariablesEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"N\n" +
"\n" +
"ConfigFile\x12\x12\n" +
"\x04path\x18\x01 \x01(\tR\x04path\x12\x18\n" +
"\acontent\x18\x02 \x01(\fR\acontent\x12\x12\n" +
"\x04mode\x18\x03 \x01(\rR\x04mode\"\xc1\x01\n" +
"\n" + "\n" +
"Deployment\x12\x0e\n" + "Deployment\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12*\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12/\n" +
"\x03env\x18\x02 \x01(\v2\x18.proto.GlobalEnvironmentR\x03env\x12/\n" + "\x06action\x18\x02 \x01(\x0e2\x17.proto.DeploymentActionR\x06action\x12\x10\n" +
"\x06action\x18\x03 \x01(\x0e2\x17.proto.DeploymentActionR\x06action\x12\x10\n" + "\x03hcl\x18\x03 \x01(\fR\x03hcl*4\n" +
"\x03hcl\x18\x04 \x01(\fR\x03hcl\x124\n" +
"\fconfig_files\x18\n" +
" \x03(\v2\x11.proto.ConfigFileR\vconfigFiles*4\n" +
"\x10DeploymentAction\x12\b\n" + "\x10DeploymentAction\x12\b\n" +
"\x04STOP\x10\x00\x12\t\n" + "\x04STOP\x10\x00\x12\t\n" +
"\x05START\x10\x01\x12\v\n" + "\x05START\x10\x01\x12\v\n" +
@@ -300,24 +158,18 @@ func file_deployment_proto_rawDescGZIP() []byte {
} }
var file_deployment_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_deployment_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_deployment_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_deployment_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_deployment_proto_goTypes = []any{ var file_deployment_proto_goTypes = []any{
(DeploymentAction)(0), // 0: proto.DeploymentAction (DeploymentAction)(0), // 0: proto.DeploymentAction
(*GlobalEnvironment)(nil), // 1: proto.GlobalEnvironment (*Deployment)(nil), // 1: proto.Deployment
(*ConfigFile)(nil), // 2: proto.ConfigFile
(*Deployment)(nil), // 3: proto.Deployment
nil, // 4: proto.GlobalEnvironment.VariablesEntry
} }
var file_deployment_proto_depIdxs = []int32{ var file_deployment_proto_depIdxs = []int32{
4, // 0: proto.GlobalEnvironment.variables:type_name -> proto.GlobalEnvironment.VariablesEntry 0, // 0: proto.Deployment.action:type_name -> proto.DeploymentAction
1, // 1: proto.Deployment.env:type_name -> proto.GlobalEnvironment 1, // [1:1] is the sub-list for method output_type
0, // 2: proto.Deployment.action:type_name -> proto.DeploymentAction 1, // [1:1] is the sub-list for method input_type
2, // 3: proto.Deployment.config_files:type_name -> proto.ConfigFile 1, // [1:1] is the sub-list for extension type_name
4, // [4:4] is the sub-list for method output_type 1, // [1:1] is the sub-list for extension extendee
4, // [4:4] is the sub-list for method input_type 0, // [0:1] is the sub-list for field type_name
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
} }
func init() { file_deployment_proto_init() } func init() { file_deployment_proto_init() }
@@ -331,7 +183,7 @@ func file_deployment_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_deployment_proto_rawDesc), len(file_deployment_proto_rawDesc)), RawDescriptor: unsafe.Slice(unsafe.StringData(file_deployment_proto_rawDesc), len(file_deployment_proto_rawDesc)),
NumEnums: 1, NumEnums: 1,
NumMessages: 4, NumMessages: 1,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
+2 -15
View File
@@ -9,21 +9,8 @@ enum DeploymentAction {
CLEANUP = 2; CLEANUP = 2;
} }
message GlobalEnvironment {
string version = 1;
map<string, string> variables = 2;
}
message ConfigFile {
string path = 1;
bytes content = 2;
uint32 mode = 3;
}
message Deployment { message Deployment {
string id = 1; string id = 1;
GlobalEnvironment env = 2; DeploymentAction action = 2;
DeploymentAction action = 3; bytes hcl = 3;
bytes hcl = 4;
repeated ConfigFile config_files = 10;
} }