grpc
Some checks failed
Go Tests / build (1.22.x) (push) Failing after 1m43s

This commit is contained in:
2024-11-17 12:32:29 -05:00
parent 4d2a7418cb
commit 0ab36c5ea6
5 changed files with 70 additions and 68 deletions

View File

@@ -1,10 +1,7 @@
version: '3' version: '3'
tasks: tasks:
proto-build-php:
cmds:
- protoc --php_out=. --plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin grpc/imgurl.proto
proto-build: proto-build:
cmds: cmds:
- protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative grpc/imgurl.proto - protoc --go_out=grpc --proto_path=grpc --go_opt=paths=source_relative --php_out=grpc/php/src --go-grpc_out=grpc --go-grpc_opt=paths=source_relative $(find grpc -iname "*.proto")
silent: true silent: true

View File

@@ -2,7 +2,7 @@
// versions: // versions:
// protoc-gen-go v1.34.1 // protoc-gen-go v1.34.1
// protoc v5.28.3 // protoc v5.28.3
// source: grpc/imgurl.proto // source: imgurl.proto
package grpc package grpc
@@ -62,11 +62,11 @@ func (x Format) String() string {
} }
func (Format) Descriptor() protoreflect.EnumDescriptor { func (Format) Descriptor() protoreflect.EnumDescriptor {
return file_grpc_imgurl_proto_enumTypes[0].Descriptor() return file_imgurl_proto_enumTypes[0].Descriptor()
} }
func (Format) Type() protoreflect.EnumType { func (Format) Type() protoreflect.EnumType {
return &file_grpc_imgurl_proto_enumTypes[0] return &file_imgurl_proto_enumTypes[0]
} }
func (x Format) Number() protoreflect.EnumNumber { func (x Format) Number() protoreflect.EnumNumber {
@@ -75,7 +75,7 @@ func (x Format) Number() protoreflect.EnumNumber {
// Deprecated: Use Format.Descriptor instead. // Deprecated: Use Format.Descriptor instead.
func (Format) EnumDescriptor() ([]byte, []int) { func (Format) EnumDescriptor() ([]byte, []int) {
return file_grpc_imgurl_proto_rawDescGZIP(), []int{0} return file_imgurl_proto_rawDescGZIP(), []int{0}
} }
type UrlRequest struct { type UrlRequest struct {
@@ -91,7 +91,7 @@ type UrlRequest struct {
func (x *UrlRequest) Reset() { func (x *UrlRequest) Reset() {
*x = UrlRequest{} *x = UrlRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_grpc_imgurl_proto_msgTypes[0] mi := &file_imgurl_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -104,7 +104,7 @@ func (x *UrlRequest) String() string {
func (*UrlRequest) ProtoMessage() {} func (*UrlRequest) ProtoMessage() {}
func (x *UrlRequest) ProtoReflect() protoreflect.Message { func (x *UrlRequest) ProtoReflect() protoreflect.Message {
mi := &file_grpc_imgurl_proto_msgTypes[0] mi := &file_imgurl_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -117,7 +117,7 @@ func (x *UrlRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UrlRequest.ProtoReflect.Descriptor instead. // Deprecated: Use UrlRequest.ProtoReflect.Descriptor instead.
func (*UrlRequest) Descriptor() ([]byte, []int) { func (*UrlRequest) Descriptor() ([]byte, []int) {
return file_grpc_imgurl_proto_rawDescGZIP(), []int{0} return file_imgurl_proto_rawDescGZIP(), []int{0}
} }
func (x *UrlRequest) GetImage() string { func (x *UrlRequest) GetImage() string {
@@ -152,7 +152,7 @@ type UrlResponse struct {
func (x *UrlResponse) Reset() { func (x *UrlResponse) Reset() {
*x = UrlResponse{} *x = UrlResponse{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_grpc_imgurl_proto_msgTypes[1] mi := &file_imgurl_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -165,7 +165,7 @@ func (x *UrlResponse) String() string {
func (*UrlResponse) ProtoMessage() {} func (*UrlResponse) ProtoMessage() {}
func (x *UrlResponse) ProtoReflect() protoreflect.Message { func (x *UrlResponse) ProtoReflect() protoreflect.Message {
mi := &file_grpc_imgurl_proto_msgTypes[1] mi := &file_imgurl_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -178,7 +178,7 @@ func (x *UrlResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use UrlResponse.ProtoReflect.Descriptor instead. // Deprecated: Use UrlResponse.ProtoReflect.Descriptor instead.
func (*UrlResponse) Descriptor() ([]byte, []int) { func (*UrlResponse) Descriptor() ([]byte, []int) {
return file_grpc_imgurl_proto_rawDescGZIP(), []int{1} return file_imgurl_proto_rawDescGZIP(), []int{1}
} }
func (x *UrlResponse) GetUrl() string { func (x *UrlResponse) GetUrl() string {
@@ -188,55 +188,58 @@ func (x *UrlResponse) GetUrl() string {
return "" return ""
} }
var File_grpc_imgurl_proto protoreflect.FileDescriptor var File_imgurl_proto protoreflect.FileDescriptor
var file_grpc_imgurl_proto_rawDesc = []byte{ var file_imgurl_proto_rawDesc = []byte{
0x0a, 0x11, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6d, 0x67, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x72, 0x0a, 0x0c, 0x69, 0x6d, 0x67, 0x75, 0x72, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b,
0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x0a, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x0a, 0x0a, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61,
0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x06, 0x66, 0x6f,
0x24, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x46, 0x6f, 0x72,
0x07, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x6d, 0x61, 0x74, 0x48, 0x00, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x88, 0x01, 0x01,
0x61, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x1f, 0x0a, 0x0b, 0x55,
0x22, 0x1f, 0x0a, 0x0b, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x2a, 0x3f, 0x0a, 0x06,
0x6c, 0x2a, 0x3f, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x50, 0x47, 0x10, 0x00, 0x12,
0x50, 0x47, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x07, 0x0a, 0x03, 0x50, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x4d, 0x50, 0x10,
0x03, 0x42, 0x4d, 0x50, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x45, 0x42, 0x50, 0x10, 0x03, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x45, 0x42, 0x50, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x47,
0x12, 0x07, 0x0a, 0x03, 0x47, 0x49, 0x46, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x43, 0x4f, 0x49, 0x46, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x43, 0x4f, 0x10, 0x05, 0x32, 0x34, 0x0a,
0x10, 0x05, 0x32, 0x34, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x08, 0x47, 0x65,
0x27, 0x0a, 0x08, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x2e, 0x55, 0x72, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x2e, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75,
0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x5e, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x65, 0x22, 0x00, 0x42, 0x90, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x77, 0x6f, 0x72, 0x78, 0x70, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x77, 0x6f, 0x72, 0x78, 0x70, 0x72, 0x6f, 0x2f, 0x69,
0x72, 0x6f, 0x2f, 0x69, 0x6d, 0x67, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x75, 0x72, 0x6c, 0x6d, 0x67, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x75, 0x72, 0x6c, 0x2d, 0x67, 0x65, 0x6e,
0x2d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x67, 0x72, 0x70, 0x63, 0xca, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x67, 0x72, 0x70, 0x63, 0xca, 0x02, 0x26, 0x53, 0x69,
0x02, 0x26, 0x53, 0x69, 0x74, 0x65, 0x77, 0x6f, 0x72, 0x78, 0x5c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x74, 0x65, 0x77, 0x6f, 0x72, 0x78, 0x5c, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5c, 0x49,
0x72, 0x79, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5c, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5c, 0x49, 0x6d, 0x67, 0x50,
0x49, 0x6d, 0x67, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x72, 0x6f, 0x78, 0x79, 0xe2, 0x02, 0x2f, 0x53, 0x69, 0x74, 0x65, 0x77, 0x6f, 0x72, 0x78, 0x5c,
0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x5c, 0x49, 0x6d, 0x67, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x5c, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
file_grpc_imgurl_proto_rawDescOnce sync.Once file_imgurl_proto_rawDescOnce sync.Once
file_grpc_imgurl_proto_rawDescData = file_grpc_imgurl_proto_rawDesc file_imgurl_proto_rawDescData = file_imgurl_proto_rawDesc
) )
func file_grpc_imgurl_proto_rawDescGZIP() []byte { func file_imgurl_proto_rawDescGZIP() []byte {
file_grpc_imgurl_proto_rawDescOnce.Do(func() { file_imgurl_proto_rawDescOnce.Do(func() {
file_grpc_imgurl_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_imgurl_proto_rawDescData) file_imgurl_proto_rawDescData = protoimpl.X.CompressGZIP(file_imgurl_proto_rawDescData)
}) })
return file_grpc_imgurl_proto_rawDescData return file_imgurl_proto_rawDescData
} }
var file_grpc_imgurl_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_imgurl_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_grpc_imgurl_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_imgurl_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_grpc_imgurl_proto_goTypes = []interface{}{ var file_imgurl_proto_goTypes = []interface{}{
(Format)(0), // 0: Format (Format)(0), // 0: Format
(*UrlRequest)(nil), // 1: UrlRequest (*UrlRequest)(nil), // 1: UrlRequest
(*UrlResponse)(nil), // 2: UrlResponse (*UrlResponse)(nil), // 2: UrlResponse
} }
var file_grpc_imgurl_proto_depIdxs = []int32{ var file_imgurl_proto_depIdxs = []int32{
0, // 0: UrlRequest.format:type_name -> Format 0, // 0: UrlRequest.format:type_name -> Format
1, // 1: Generator.Generate:input_type -> UrlRequest 1, // 1: Generator.Generate:input_type -> UrlRequest
2, // 2: Generator.Generate:output_type -> UrlResponse 2, // 2: Generator.Generate:output_type -> UrlResponse
@@ -247,13 +250,13 @@ var file_grpc_imgurl_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name 0, // [0:1] is the sub-list for field type_name
} }
func init() { file_grpc_imgurl_proto_init() } func init() { file_imgurl_proto_init() }
func file_grpc_imgurl_proto_init() { func file_imgurl_proto_init() {
if File_grpc_imgurl_proto != nil { if File_imgurl_proto != nil {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_grpc_imgurl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_imgurl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UrlRequest); i { switch v := v.(*UrlRequest); i {
case 0: case 0:
return &v.state return &v.state
@@ -265,7 +268,7 @@ func file_grpc_imgurl_proto_init() {
return nil return nil
} }
} }
file_grpc_imgurl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_imgurl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UrlResponse); i { switch v := v.(*UrlResponse); i {
case 0: case 0:
return &v.state return &v.state
@@ -278,24 +281,24 @@ func file_grpc_imgurl_proto_init() {
} }
} }
} }
file_grpc_imgurl_proto_msgTypes[0].OneofWrappers = []interface{}{} file_imgurl_proto_msgTypes[0].OneofWrappers = []interface{}{}
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_grpc_imgurl_proto_rawDesc, RawDescriptor: file_imgurl_proto_rawDesc,
NumEnums: 1, NumEnums: 1,
NumMessages: 2, NumMessages: 2,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },
GoTypes: file_grpc_imgurl_proto_goTypes, GoTypes: file_imgurl_proto_goTypes,
DependencyIndexes: file_grpc_imgurl_proto_depIdxs, DependencyIndexes: file_imgurl_proto_depIdxs,
EnumInfos: file_grpc_imgurl_proto_enumTypes, EnumInfos: file_imgurl_proto_enumTypes,
MessageInfos: file_grpc_imgurl_proto_msgTypes, MessageInfos: file_imgurl_proto_msgTypes,
}.Build() }.Build()
File_grpc_imgurl_proto = out.File File_imgurl_proto = out.File
file_grpc_imgurl_proto_rawDesc = nil file_imgurl_proto_rawDesc = nil
file_grpc_imgurl_proto_goTypes = nil file_imgurl_proto_goTypes = nil
file_grpc_imgurl_proto_depIdxs = nil file_imgurl_proto_depIdxs = nil
} }

View File

@@ -1,7 +1,9 @@
syntax = "proto3"; syntax = "proto3";
option go_package = "github.com/siteworxpro/img-proxy-url-generator/grpc"; option go_package = "github.com/siteworxpro/img-proxy-url-generator/grpc";
option php_namespace = "Siteworx\\Library\\Integrations\\ImgProxy"; option php_namespace = "SomeNamespace\\ImgProxy";
option php_metadata_namespace = "SomeNamespace\\ImgProxy\\Metadata";
message UrlRequest { message UrlRequest {
string image = 1; string image = 1;

View File

@@ -2,7 +2,7 @@
// versions: // versions:
// - protoc-gen-go-grpc v1.5.1 // - protoc-gen-go-grpc v1.5.1
// - protoc v5.28.3 // - protoc v5.28.3
// source: grpc/imgurl.proto // source: imgurl.proto
package grpc package grpc
@@ -117,5 +117,5 @@ var Generator_ServiceDesc = grpc.ServiceDesc{
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "grpc/imgurl.proto", Metadata: "imgurl.proto",
} }

0
grpc/php/src/.gitkeep Normal file
View File