From e36c4bdb4cf1b29291d29f783f38cf68439b14b5 Mon Sep 17 00:00:00 2001 From: Chen Shou Date: Wed, 4 Jan 2023 18:42:01 +0000 Subject: [PATCH] chore: support using Go generate to generate proto code --- apis/v0/cert_action_request.pb.go | 117 ++++++++++++------------- apis/v0/cert_action_service.pb.go | 97 ++++++++++---------- apis/v0/cert_action_service_grpc.pb.go | 2 +- apis/v0/doc.go | 18 ++++ apis/v0/jvs_request.pb.go | 111 ++++++++++++----------- apis/v0/jvs_service.pb.go | 95 ++++++++++---------- apis/v0/jvs_service_grpc.pb.go | 2 +- protos/v0/cert_action_service.proto | 2 +- protos/v0/jvs_service.proto | 2 +- scripts/gen_protos.sh | 20 ----- 10 files changed, 230 insertions(+), 236 deletions(-) create mode 100644 apis/v0/doc.go delete mode 100755 scripts/gen_protos.sh diff --git a/apis/v0/cert_action_request.pb.go b/apis/v0/cert_action_request.pb.go index 10a6e9ab..76d56f2d 100644 --- a/apis/v0/cert_action_request.pb.go +++ b/apis/v0/cert_action_request.pb.go @@ -14,9 +14,9 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.19.4 -// source: protos/v0/cert_action_request.proto +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: cert_action_request.proto package v0 @@ -80,11 +80,11 @@ func (x Action_ACTION) String() string { } func (Action_ACTION) Descriptor() protoreflect.EnumDescriptor { - return file_protos_v0_cert_action_request_proto_enumTypes[0].Descriptor() + return file_cert_action_request_proto_enumTypes[0].Descriptor() } func (Action_ACTION) Type() protoreflect.EnumType { - return &file_protos_v0_cert_action_request_proto_enumTypes[0] + return &file_cert_action_request_proto_enumTypes[0] } func (x Action_ACTION) Number() protoreflect.EnumNumber { @@ -93,7 +93,7 @@ func (x Action_ACTION) Number() protoreflect.EnumNumber { // Deprecated: Use Action_ACTION.Descriptor instead. func (Action_ACTION) EnumDescriptor() ([]byte, []int) { - return file_protos_v0_cert_action_request_proto_rawDescGZIP(), []int{1, 0} + return file_cert_action_request_proto_rawDescGZIP(), []int{1, 0} } // CertificateActionRequest is a request to do a manual action on a certificate. @@ -108,7 +108,7 @@ type CertificateActionRequest struct { func (x *CertificateActionRequest) Reset() { *x = CertificateActionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_v0_cert_action_request_proto_msgTypes[0] + mi := &file_cert_action_request_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -121,7 +121,7 @@ func (x *CertificateActionRequest) String() string { func (*CertificateActionRequest) ProtoMessage() {} func (x *CertificateActionRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_v0_cert_action_request_proto_msgTypes[0] + mi := &file_cert_action_request_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -134,7 +134,7 @@ func (x *CertificateActionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CertificateActionRequest.ProtoReflect.Descriptor instead. func (*CertificateActionRequest) Descriptor() ([]byte, []int) { - return file_protos_v0_cert_action_request_proto_rawDescGZIP(), []int{0} + return file_cert_action_request_proto_rawDescGZIP(), []int{0} } func (x *CertificateActionRequest) GetActions() []*Action { @@ -157,7 +157,7 @@ type Action struct { func (x *Action) Reset() { *x = Action{} if protoimpl.UnsafeEnabled { - mi := &file_protos_v0_cert_action_request_proto_msgTypes[1] + mi := &file_cert_action_request_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -170,7 +170,7 @@ func (x *Action) String() string { func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { - mi := &file_protos_v0_cert_action_request_proto_msgTypes[1] + mi := &file_cert_action_request_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -183,7 +183,7 @@ func (x *Action) ProtoReflect() protoreflect.Message { // Deprecated: Use Action.ProtoReflect.Descriptor instead. func (*Action) Descriptor() ([]byte, []int) { - return file_protos_v0_cert_action_request_proto_rawDescGZIP(), []int{1} + return file_cert_action_request_proto_rawDescGZIP(), []int{1} } func (x *Action) GetVersion() string { @@ -200,51 +200,50 @@ func (x *Action) GetAction() Action_ACTION { return Action_ROTATE } -var File_protos_v0_cert_action_request_proto protoreflect.FileDescriptor - -var file_protos_v0_cert_action_request_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x65, 0x72, 0x74, - 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, - 0x73, 0x22, 0x48, 0x0a, 0x18, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, - 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x06, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x31, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x19, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x52, 0x06, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x12, 0x0a, 0x0a, - 0x06, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4f, 0x52, - 0x43, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, - 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x10, 0x02, 0x42, - 0x1f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x62, - 0x63, 0x78, 0x79, 0x7a, 0x2f, 0x6a, 0x76, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x30, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_cert_action_request_proto protoreflect.FileDescriptor + +var file_cert_action_request_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x62, 0x63, + 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x22, 0x48, 0x0a, 0x18, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, + 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x91, 0x01, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, + 0x6a, 0x76, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x06, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x4f, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, + 0x11, 0x0a, 0x0d, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, + 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x53, 0x54, + 0x52, 0x4f, 0x59, 0x10, 0x02, 0x42, 0x1f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2f, 0x6a, 0x76, 0x73, 0x2f, 0x61, + 0x70, 0x69, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_protos_v0_cert_action_request_proto_rawDescOnce sync.Once - file_protos_v0_cert_action_request_proto_rawDescData = file_protos_v0_cert_action_request_proto_rawDesc + file_cert_action_request_proto_rawDescOnce sync.Once + file_cert_action_request_proto_rawDescData = file_cert_action_request_proto_rawDesc ) -func file_protos_v0_cert_action_request_proto_rawDescGZIP() []byte { - file_protos_v0_cert_action_request_proto_rawDescOnce.Do(func() { - file_protos_v0_cert_action_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_v0_cert_action_request_proto_rawDescData) +func file_cert_action_request_proto_rawDescGZIP() []byte { + file_cert_action_request_proto_rawDescOnce.Do(func() { + file_cert_action_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_cert_action_request_proto_rawDescData) }) - return file_protos_v0_cert_action_request_proto_rawDescData + return file_cert_action_request_proto_rawDescData } -var file_protos_v0_cert_action_request_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_protos_v0_cert_action_request_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_protos_v0_cert_action_request_proto_goTypes = []interface{}{ +var file_cert_action_request_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_cert_action_request_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cert_action_request_proto_goTypes = []interface{}{ (Action_ACTION)(0), // 0: abcxyz.jvs.Action.ACTION (*CertificateActionRequest)(nil), // 1: abcxyz.jvs.CertificateActionRequest (*Action)(nil), // 2: abcxyz.jvs.Action } -var file_protos_v0_cert_action_request_proto_depIdxs = []int32{ +var file_cert_action_request_proto_depIdxs = []int32{ 2, // 0: abcxyz.jvs.CertificateActionRequest.actions:type_name -> abcxyz.jvs.Action 0, // 1: abcxyz.jvs.Action.action:type_name -> abcxyz.jvs.Action.ACTION 2, // [2:2] is the sub-list for method output_type @@ -254,13 +253,13 @@ var file_protos_v0_cert_action_request_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_protos_v0_cert_action_request_proto_init() } -func file_protos_v0_cert_action_request_proto_init() { - if File_protos_v0_cert_action_request_proto != nil { +func init() { file_cert_action_request_proto_init() } +func file_cert_action_request_proto_init() { + if File_cert_action_request_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_protos_v0_cert_action_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cert_action_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CertificateActionRequest); i { case 0: return &v.state @@ -272,7 +271,7 @@ func file_protos_v0_cert_action_request_proto_init() { return nil } } - file_protos_v0_cert_action_request_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_cert_action_request_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Action); i { case 0: return &v.state @@ -289,19 +288,19 @@ func file_protos_v0_cert_action_request_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protos_v0_cert_action_request_proto_rawDesc, + RawDescriptor: file_cert_action_request_proto_rawDesc, NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_protos_v0_cert_action_request_proto_goTypes, - DependencyIndexes: file_protos_v0_cert_action_request_proto_depIdxs, - EnumInfos: file_protos_v0_cert_action_request_proto_enumTypes, - MessageInfos: file_protos_v0_cert_action_request_proto_msgTypes, + GoTypes: file_cert_action_request_proto_goTypes, + DependencyIndexes: file_cert_action_request_proto_depIdxs, + EnumInfos: file_cert_action_request_proto_enumTypes, + MessageInfos: file_cert_action_request_proto_msgTypes, }.Build() - File_protos_v0_cert_action_request_proto = out.File - file_protos_v0_cert_action_request_proto_rawDesc = nil - file_protos_v0_cert_action_request_proto_goTypes = nil - file_protos_v0_cert_action_request_proto_depIdxs = nil + File_cert_action_request_proto = out.File + file_cert_action_request_proto_rawDesc = nil + file_cert_action_request_proto_goTypes = nil + file_cert_action_request_proto_depIdxs = nil } diff --git a/apis/v0/cert_action_service.pb.go b/apis/v0/cert_action_service.pb.go index a7142aea..61d34696 100644 --- a/apis/v0/cert_action_service.pb.go +++ b/apis/v0/cert_action_service.pb.go @@ -14,9 +14,9 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.19.4 -// source: protos/v0/cert_action_service.proto +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: cert_action_service.proto package v0 @@ -44,7 +44,7 @@ type CertificateActionResponse struct { func (x *CertificateActionResponse) Reset() { *x = CertificateActionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_protos_v0_cert_action_service_proto_msgTypes[0] + mi := &file_cert_action_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -57,7 +57,7 @@ func (x *CertificateActionResponse) String() string { func (*CertificateActionResponse) ProtoMessage() {} func (x *CertificateActionResponse) ProtoReflect() protoreflect.Message { - mi := &file_protos_v0_cert_action_service_proto_msgTypes[0] + mi := &file_cert_action_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70,50 +70,49 @@ func (x *CertificateActionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CertificateActionResponse.ProtoReflect.Descriptor instead. func (*CertificateActionResponse) Descriptor() ([]byte, []int) { - return file_protos_v0_cert_action_service_proto_rawDescGZIP(), []int{0} + return file_cert_action_service_proto_rawDescGZIP(), []int{0} } -var File_protos_v0_cert_action_service_proto protoreflect.FileDescriptor - -var file_protos_v0_cert_action_service_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x65, 0x72, 0x74, - 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, - 0x73, 0x1a, 0x23, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x63, 0x65, 0x72, - 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0x7c, 0x0a, 0x18, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x60, 0x0a, 0x11, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, - 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x62, 0x63, - 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x1f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2f, 0x6a, 0x76, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_cert_action_service_proto protoreflect.FileDescriptor + +var file_cert_action_service_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x62, 0x63, + 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x1a, 0x19, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0x7c, 0x0a, 0x18, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x11, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x24, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x2e, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, + 0x6a, 0x76, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1f, 0x5a, + 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x62, 0x63, 0x78, + 0x79, 0x7a, 0x2f, 0x6a, 0x76, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_protos_v0_cert_action_service_proto_rawDescOnce sync.Once - file_protos_v0_cert_action_service_proto_rawDescData = file_protos_v0_cert_action_service_proto_rawDesc + file_cert_action_service_proto_rawDescOnce sync.Once + file_cert_action_service_proto_rawDescData = file_cert_action_service_proto_rawDesc ) -func file_protos_v0_cert_action_service_proto_rawDescGZIP() []byte { - file_protos_v0_cert_action_service_proto_rawDescOnce.Do(func() { - file_protos_v0_cert_action_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_v0_cert_action_service_proto_rawDescData) +func file_cert_action_service_proto_rawDescGZIP() []byte { + file_cert_action_service_proto_rawDescOnce.Do(func() { + file_cert_action_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_cert_action_service_proto_rawDescData) }) - return file_protos_v0_cert_action_service_proto_rawDescData + return file_cert_action_service_proto_rawDescData } -var file_protos_v0_cert_action_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_protos_v0_cert_action_service_proto_goTypes = []interface{}{ +var file_cert_action_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cert_action_service_proto_goTypes = []interface{}{ (*CertificateActionResponse)(nil), // 0: abcxyz.jvs.CertificateActionResponse (*CertificateActionRequest)(nil), // 1: abcxyz.jvs.CertificateActionRequest } -var file_protos_v0_cert_action_service_proto_depIdxs = []int32{ +var file_cert_action_service_proto_depIdxs = []int32{ 1, // 0: abcxyz.jvs.CertificateActionService.CertificateAction:input_type -> abcxyz.jvs.CertificateActionRequest 0, // 1: abcxyz.jvs.CertificateActionService.CertificateAction:output_type -> abcxyz.jvs.CertificateActionResponse 1, // [1:2] is the sub-list for method output_type @@ -123,14 +122,14 @@ var file_protos_v0_cert_action_service_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_protos_v0_cert_action_service_proto_init() } -func file_protos_v0_cert_action_service_proto_init() { - if File_protos_v0_cert_action_service_proto != nil { +func init() { file_cert_action_service_proto_init() } +func file_cert_action_service_proto_init() { + if File_cert_action_service_proto != nil { return } - file_protos_v0_cert_action_request_proto_init() + file_cert_action_request_proto_init() if !protoimpl.UnsafeEnabled { - file_protos_v0_cert_action_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_cert_action_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CertificateActionResponse); i { case 0: return &v.state @@ -147,18 +146,18 @@ func file_protos_v0_cert_action_service_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protos_v0_cert_action_service_proto_rawDesc, + RawDescriptor: file_cert_action_service_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_protos_v0_cert_action_service_proto_goTypes, - DependencyIndexes: file_protos_v0_cert_action_service_proto_depIdxs, - MessageInfos: file_protos_v0_cert_action_service_proto_msgTypes, + GoTypes: file_cert_action_service_proto_goTypes, + DependencyIndexes: file_cert_action_service_proto_depIdxs, + MessageInfos: file_cert_action_service_proto_msgTypes, }.Build() - File_protos_v0_cert_action_service_proto = out.File - file_protos_v0_cert_action_service_proto_rawDesc = nil - file_protos_v0_cert_action_service_proto_goTypes = nil - file_protos_v0_cert_action_service_proto_depIdxs = nil + File_cert_action_service_proto = out.File + file_cert_action_service_proto_rawDesc = nil + file_cert_action_service_proto_goTypes = nil + file_cert_action_service_proto_depIdxs = nil } diff --git a/apis/v0/cert_action_service_grpc.pb.go b/apis/v0/cert_action_service_grpc.pb.go index f2360918..079f283b 100644 --- a/apis/v0/cert_action_service_grpc.pb.go +++ b/apis/v0/cert_action_service_grpc.pb.go @@ -98,5 +98,5 @@ var CertificateActionService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "protos/v0/cert_action_service.proto", + Metadata: "cert_action_service.proto", } diff --git a/apis/v0/doc.go b/apis/v0/doc.go new file mode 100644 index 00000000..ccdc9455 --- /dev/null +++ b/apis/v0/doc.go @@ -0,0 +1,18 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate protoc -I../../protos/v0 --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative jvs_request.proto jvs_service.proto cert_action_request.proto cert_action_service.proto + +// Package v0 contains versioned JVS contracts, e.g. service definition. +package v0 diff --git a/apis/v0/jvs_request.pb.go b/apis/v0/jvs_request.pb.go index e36211a2..f87051b2 100644 --- a/apis/v0/jvs_request.pb.go +++ b/apis/v0/jvs_request.pb.go @@ -14,9 +14,9 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.19.4 -// source: protos/v0/jvs_request.proto +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: jvs_request.proto package v0 @@ -51,7 +51,7 @@ type CreateJustificationRequest struct { func (x *CreateJustificationRequest) Reset() { *x = CreateJustificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protos_v0_jvs_request_proto_msgTypes[0] + mi := &file_jvs_request_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -64,7 +64,7 @@ func (x *CreateJustificationRequest) String() string { func (*CreateJustificationRequest) ProtoMessage() {} func (x *CreateJustificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_protos_v0_jvs_request_proto_msgTypes[0] + mi := &file_jvs_request_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -77,7 +77,7 @@ func (x *CreateJustificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateJustificationRequest.ProtoReflect.Descriptor instead. func (*CreateJustificationRequest) Descriptor() ([]byte, []int) { - return file_protos_v0_jvs_request_proto_rawDescGZIP(), []int{0} + return file_jvs_request_proto_rawDescGZIP(), []int{0} } func (x *CreateJustificationRequest) GetJustifications() []*Justification { @@ -115,7 +115,7 @@ type Justification struct { func (x *Justification) Reset() { *x = Justification{} if protoimpl.UnsafeEnabled { - mi := &file_protos_v0_jvs_request_proto_msgTypes[1] + mi := &file_jvs_request_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -128,7 +128,7 @@ func (x *Justification) String() string { func (*Justification) ProtoMessage() {} func (x *Justification) ProtoReflect() protoreflect.Message { - mi := &file_protos_v0_jvs_request_proto_msgTypes[1] + mi := &file_jvs_request_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -141,7 +141,7 @@ func (x *Justification) ProtoReflect() protoreflect.Message { // Deprecated: Use Justification.ProtoReflect.Descriptor instead. func (*Justification) Descriptor() ([]byte, []int) { - return file_protos_v0_jvs_request_proto_rawDescGZIP(), []int{1} + return file_jvs_request_proto_rawDescGZIP(), []int{1} } func (x *Justification) GetCategory() string { @@ -158,53 +158,52 @@ func (x *Justification) GetValue() string { return "" } -var File_protos_v0_jvs_request_proto protoreflect.FileDescriptor +var File_jvs_request_proto protoreflect.FileDescriptor -var file_protos_v0_jvs_request_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x6a, 0x76, 0x73, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, - 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 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, 0xaa, 0x01, 0x0a, 0x1a, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0e, 0x6a, 0x75, 0x73, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x2e, 0x4a, 0x75, - 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6a, 0x75, 0x73, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x74, - 0x74, 0x6c, 0x18, 0x02, 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, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, - 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, - 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x0d, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, - 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, - 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x1f, 0x5a, 0x1d, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2f, 0x6a, - 0x76, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, +var file_jvs_request_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x6a, 0x76, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 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, + 0xaa, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, + 0x0a, 0x0e, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, + 0x6a, 0x76, 0x73, 0x2e, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0e, 0x6a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, 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, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x1c, + 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x0d, + 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x1f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x62, + 0x63, 0x78, 0x79, 0x7a, 0x2f, 0x6a, 0x76, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x30, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_protos_v0_jvs_request_proto_rawDescOnce sync.Once - file_protos_v0_jvs_request_proto_rawDescData = file_protos_v0_jvs_request_proto_rawDesc + file_jvs_request_proto_rawDescOnce sync.Once + file_jvs_request_proto_rawDescData = file_jvs_request_proto_rawDesc ) -func file_protos_v0_jvs_request_proto_rawDescGZIP() []byte { - file_protos_v0_jvs_request_proto_rawDescOnce.Do(func() { - file_protos_v0_jvs_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_v0_jvs_request_proto_rawDescData) +func file_jvs_request_proto_rawDescGZIP() []byte { + file_jvs_request_proto_rawDescOnce.Do(func() { + file_jvs_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_jvs_request_proto_rawDescData) }) - return file_protos_v0_jvs_request_proto_rawDescData + return file_jvs_request_proto_rawDescData } -var file_protos_v0_jvs_request_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_protos_v0_jvs_request_proto_goTypes = []interface{}{ +var file_jvs_request_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_jvs_request_proto_goTypes = []interface{}{ (*CreateJustificationRequest)(nil), // 0: abcxyz.jvs.CreateJustificationRequest (*Justification)(nil), // 1: abcxyz.jvs.Justification (*duration.Duration)(nil), // 2: google.protobuf.Duration } -var file_protos_v0_jvs_request_proto_depIdxs = []int32{ +var file_jvs_request_proto_depIdxs = []int32{ 1, // 0: abcxyz.jvs.CreateJustificationRequest.justifications:type_name -> abcxyz.jvs.Justification 2, // 1: abcxyz.jvs.CreateJustificationRequest.ttl:type_name -> google.protobuf.Duration 2, // [2:2] is the sub-list for method output_type @@ -214,13 +213,13 @@ var file_protos_v0_jvs_request_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_protos_v0_jvs_request_proto_init() } -func file_protos_v0_jvs_request_proto_init() { - if File_protos_v0_jvs_request_proto != nil { +func init() { file_jvs_request_proto_init() } +func file_jvs_request_proto_init() { + if File_jvs_request_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_protos_v0_jvs_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_jvs_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateJustificationRequest); i { case 0: return &v.state @@ -232,7 +231,7 @@ func file_protos_v0_jvs_request_proto_init() { return nil } } - file_protos_v0_jvs_request_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_jvs_request_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Justification); i { case 0: return &v.state @@ -249,18 +248,18 @@ func file_protos_v0_jvs_request_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protos_v0_jvs_request_proto_rawDesc, + RawDescriptor: file_jvs_request_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_protos_v0_jvs_request_proto_goTypes, - DependencyIndexes: file_protos_v0_jvs_request_proto_depIdxs, - MessageInfos: file_protos_v0_jvs_request_proto_msgTypes, + GoTypes: file_jvs_request_proto_goTypes, + DependencyIndexes: file_jvs_request_proto_depIdxs, + MessageInfos: file_jvs_request_proto_msgTypes, }.Build() - File_protos_v0_jvs_request_proto = out.File - file_protos_v0_jvs_request_proto_rawDesc = nil - file_protos_v0_jvs_request_proto_goTypes = nil - file_protos_v0_jvs_request_proto_depIdxs = nil + File_jvs_request_proto = out.File + file_jvs_request_proto_rawDesc = nil + file_jvs_request_proto_goTypes = nil + file_jvs_request_proto_depIdxs = nil } diff --git a/apis/v0/jvs_service.pb.go b/apis/v0/jvs_service.pb.go index dcad5943..a8e272bf 100644 --- a/apis/v0/jvs_service.pb.go +++ b/apis/v0/jvs_service.pb.go @@ -14,9 +14,9 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.19.4 -// source: protos/v0/jvs_service.proto +// protoc-gen-go v1.28.1 +// protoc v3.21.12 +// source: jvs_service.proto package v0 @@ -46,7 +46,7 @@ type CreateJustificationResponse struct { func (x *CreateJustificationResponse) Reset() { *x = CreateJustificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_protos_v0_jvs_service_proto_msgTypes[0] + mi := &file_jvs_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -59,7 +59,7 @@ func (x *CreateJustificationResponse) String() string { func (*CreateJustificationResponse) ProtoMessage() {} func (x *CreateJustificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_protos_v0_jvs_service_proto_msgTypes[0] + mi := &file_jvs_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -72,7 +72,7 @@ func (x *CreateJustificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateJustificationResponse.ProtoReflect.Descriptor instead. func (*CreateJustificationResponse) Descriptor() ([]byte, []int) { - return file_protos_v0_jvs_service_proto_rawDescGZIP(), []int{0} + return file_jvs_service_proto_rawDescGZIP(), []int{0} } func (x *CreateJustificationResponse) GetToken() string { @@ -82,47 +82,46 @@ func (x *CreateJustificationResponse) GetToken() string { return "" } -var File_protos_v0_jvs_service_proto protoreflect.FileDescriptor - -var file_protos_v0_jvs_service_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x6a, 0x76, 0x73, 0x5f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, - 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x1a, 0x1b, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x6a, 0x76, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x74, 0x0a, 0x0a, 0x4a, - 0x56, 0x53, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x26, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, - 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x75, 0x73, 0x74, +var File_jvs_service_proto protoreflect.FileDescriptor + +var file_jvs_service_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x6a, 0x76, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x1a, + 0x11, 0x6a, 0x76, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x1f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2f, 0x6a, 0x76, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x74, 0x0a, 0x0a, 0x4a, 0x56, 0x53, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, + 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x61, + 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x62, 0x63, 0x78, 0x79, 0x7a, 0x2e, 0x6a, 0x76, + 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4a, 0x75, 0x73, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x1f, 0x5a, + 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x62, 0x63, 0x78, + 0x79, 0x7a, 0x2f, 0x6a, 0x76, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_protos_v0_jvs_service_proto_rawDescOnce sync.Once - file_protos_v0_jvs_service_proto_rawDescData = file_protos_v0_jvs_service_proto_rawDesc + file_jvs_service_proto_rawDescOnce sync.Once + file_jvs_service_proto_rawDescData = file_jvs_service_proto_rawDesc ) -func file_protos_v0_jvs_service_proto_rawDescGZIP() []byte { - file_protos_v0_jvs_service_proto_rawDescOnce.Do(func() { - file_protos_v0_jvs_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_protos_v0_jvs_service_proto_rawDescData) +func file_jvs_service_proto_rawDescGZIP() []byte { + file_jvs_service_proto_rawDescOnce.Do(func() { + file_jvs_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_jvs_service_proto_rawDescData) }) - return file_protos_v0_jvs_service_proto_rawDescData + return file_jvs_service_proto_rawDescData } -var file_protos_v0_jvs_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_protos_v0_jvs_service_proto_goTypes = []interface{}{ +var file_jvs_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_jvs_service_proto_goTypes = []interface{}{ (*CreateJustificationResponse)(nil), // 0: abcxyz.jvs.CreateJustificationResponse (*CreateJustificationRequest)(nil), // 1: abcxyz.jvs.CreateJustificationRequest } -var file_protos_v0_jvs_service_proto_depIdxs = []int32{ +var file_jvs_service_proto_depIdxs = []int32{ 1, // 0: abcxyz.jvs.JVSService.CreateJustification:input_type -> abcxyz.jvs.CreateJustificationRequest 0, // 1: abcxyz.jvs.JVSService.CreateJustification:output_type -> abcxyz.jvs.CreateJustificationResponse 1, // [1:2] is the sub-list for method output_type @@ -132,14 +131,14 @@ var file_protos_v0_jvs_service_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_protos_v0_jvs_service_proto_init() } -func file_protos_v0_jvs_service_proto_init() { - if File_protos_v0_jvs_service_proto != nil { +func init() { file_jvs_service_proto_init() } +func file_jvs_service_proto_init() { + if File_jvs_service_proto != nil { return } - file_protos_v0_jvs_request_proto_init() + file_jvs_request_proto_init() if !protoimpl.UnsafeEnabled { - file_protos_v0_jvs_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_jvs_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateJustificationResponse); i { case 0: return &v.state @@ -156,18 +155,18 @@ func file_protos_v0_jvs_service_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protos_v0_jvs_service_proto_rawDesc, + RawDescriptor: file_jvs_service_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_protos_v0_jvs_service_proto_goTypes, - DependencyIndexes: file_protos_v0_jvs_service_proto_depIdxs, - MessageInfos: file_protos_v0_jvs_service_proto_msgTypes, + GoTypes: file_jvs_service_proto_goTypes, + DependencyIndexes: file_jvs_service_proto_depIdxs, + MessageInfos: file_jvs_service_proto_msgTypes, }.Build() - File_protos_v0_jvs_service_proto = out.File - file_protos_v0_jvs_service_proto_rawDesc = nil - file_protos_v0_jvs_service_proto_goTypes = nil - file_protos_v0_jvs_service_proto_depIdxs = nil + File_jvs_service_proto = out.File + file_jvs_service_proto_rawDesc = nil + file_jvs_service_proto_goTypes = nil + file_jvs_service_proto_depIdxs = nil } diff --git a/apis/v0/jvs_service_grpc.pb.go b/apis/v0/jvs_service_grpc.pb.go index 4609549e..fb781490 100644 --- a/apis/v0/jvs_service_grpc.pb.go +++ b/apis/v0/jvs_service_grpc.pb.go @@ -97,5 +97,5 @@ var JVSService_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "protos/v0/jvs_service.proto", + Metadata: "jvs_service.proto", } diff --git a/protos/v0/cert_action_service.proto b/protos/v0/cert_action_service.proto index 9945302f..768e0009 100644 --- a/protos/v0/cert_action_service.proto +++ b/protos/v0/cert_action_service.proto @@ -16,7 +16,7 @@ syntax = "proto3"; package abcxyz.jvs; -import "protos/v0/cert_action_request.proto"; +import "cert_action_request.proto"; option go_package = "github.com/abcxyz/jvs/apis/v0"; diff --git a/protos/v0/jvs_service.proto b/protos/v0/jvs_service.proto index 2d501779..d9bfb78f 100644 --- a/protos/v0/jvs_service.proto +++ b/protos/v0/jvs_service.proto @@ -16,7 +16,7 @@ syntax = "proto3"; package abcxyz.jvs; -import "protos/v0/jvs_request.proto"; +import "jvs_request.proto"; option go_package = "github.com/abcxyz/jvs/apis/v0"; diff --git a/scripts/gen_protos.sh b/scripts/gen_protos.sh deleted file mode 100755 index 3082866f..00000000 --- a/scripts/gen_protos.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -protoc -I. \ - --go_out=. --go-grpc_out=. \ - --go_opt=module=github.com/abcxyz/jvs \ - --go-grpc_opt=module=github.com/abcxyz/jvs \ - protos/v0/*.proto