diff --git a/Makefile b/Makefile index 6ccfa01..d656854 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,10 @@ +MODULE="github.com/gopaytech/istio-upgrade-proto" + .PHONY: build.proto build.proto: - mkdir -p model - protoc --proto_path=./proto --go_out=paths=source_relative:model ./proto/*.proto \ No newline at end of file + mkdir -p ./upgrade + protoc \ + --proto_path=. \ + --go_out=./upgrade \ + --go_opt=module=${MODULE} \ + ./*.proto \ No newline at end of file diff --git a/model/go.mod b/model/go.mod deleted file mode 100644 index 1077fcd..0000000 --- a/model/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/gopaytech/istio-upgrade-proto/model - -go 1.22 - -require google.golang.org/protobuf v1.34.2 diff --git a/model/go.sum b/model/go.sum deleted file mode 100644 index 8ce2672..0000000 --- a/model/go.sum +++ /dev/null @@ -1,6 +0,0 @@ -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= diff --git a/proto/upgrade.proto b/upgrade.proto similarity index 53% rename from proto/upgrade.proto rename to upgrade.proto index c34cd33..d8daa49 100644 --- a/proto/upgrade.proto +++ b/upgrade.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package model; -option go_package = "github.com/gopaytech/istio-upgrade-proto/model"; +package upgrade; +option go_package = "github.com/gopaytech/istio-upgrade-proto;upgrade"; message Upgrade { string istio_version = 1; diff --git a/model/upgrade.pb.go b/upgrade/upgrade.pb.go similarity index 80% rename from model/upgrade.pb.go rename to upgrade/upgrade.pb.go index 675c4c1..acd7350 100644 --- a/model/upgrade.pb.go +++ b/upgrade/upgrade.pb.go @@ -4,7 +4,7 @@ // protoc v5.28.2 // source: upgrade.proto -package model +package upgrade import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -79,16 +79,16 @@ var File_upgrade_proto protoreflect.FileDescriptor var file_upgrade_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x51, 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x70, 0x61, 0x79, 0x74, 0x65, 0x63, - 0x68, 0x2f, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2d, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x51, 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x73, 0x74, 0x69, + 0x6f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x32, 0x5a, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x70, 0x61, 0x79, 0x74, + 0x65, 0x63, 0x68, 0x2f, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -105,7 +105,7 @@ func file_upgrade_proto_rawDescGZIP() []byte { var file_upgrade_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_upgrade_proto_goTypes = []any{ - (*Upgrade)(nil), // 0: model.Upgrade + (*Upgrade)(nil), // 0: upgrade.Upgrade } var file_upgrade_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type