diff options
| author | Xe Iaso <me@xeiaso.net> | 2025-04-26 19:47:00 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2025-04-26 19:47:00 -0400 |
| commit | b02d2ba479446de6f38fce1e25cec8564ef9010a (patch) | |
| tree | a60d001dda18187552591f70224bea38cc2000de /cmd/xedn | |
| parent | 4d27a5e7c416e2a6cab039684037681cdac63a19 (diff) | |
| download | x-b02d2ba479446de6f38fce1e25cec8564ef9010a.tar.xz x-b02d2ba479446de6f38fce1e25cec8564ef9010a.zip | |
chore(templ): fix go generate commands
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/xedn')
| -rw-r--r-- | cmd/xedn/uplodr/pb/uplodr.pb.go | 190 | ||||
| -rw-r--r-- | cmd/xedn/uplodr/pb/uplodr_grpc.pb.go | 27 |
2 files changed, 74 insertions, 143 deletions
diff --git a/cmd/xedn/uplodr/pb/uplodr.pb.go b/cmd/xedn/uplodr/pb/uplodr.pb.go index 9c3c731..a69fad3 100644 --- a/cmd/xedn/uplodr/pb/uplodr.pb.go +++ b/cmd/xedn/uplodr/pb/uplodr.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.1 +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: uplodr.proto package pb @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + unsafe "unsafe" ) const ( @@ -21,22 +22,19 @@ const ( ) type UploadReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Folder string `protobuf:"bytes,3,opt,name=folder,proto3" json:"folder,omitempty"` unknownFields protoimpl.UnknownFields - - FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Folder string `protobuf:"bytes,3,opt,name=folder,proto3" json:"folder,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UploadReq) Reset() { *x = UploadReq{} - if protoimpl.UnsafeEnabled { - mi := &file_uplodr_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_uplodr_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadReq) String() string { @@ -47,7 +45,7 @@ func (*UploadReq) ProtoMessage() {} func (x *UploadReq) ProtoReflect() protoreflect.Message { mi := &file_uplodr_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -84,20 +82,17 @@ func (x *UploadReq) GetFolder() string { } type UploadResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Variants []*Variant `protobuf:"bytes,1,rep,name=variants,proto3" json:"variants,omitempty"` unknownFields protoimpl.UnknownFields - - Variants []*Variant `protobuf:"bytes,1,rep,name=variants,proto3" json:"variants,omitempty"` + sizeCache protoimpl.SizeCache } func (x *UploadResp) Reset() { *x = UploadResp{} - if protoimpl.UnsafeEnabled { - mi := &file_uplodr_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_uplodr_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UploadResp) String() string { @@ -108,7 +103,7 @@ func (*UploadResp) ProtoMessage() {} func (x *UploadResp) ProtoReflect() protoreflect.Message { mi := &file_uplodr_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -131,21 +126,18 @@ func (x *UploadResp) GetVariants() []*Variant { } type Variant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Variant) Reset() { *x = Variant{} - if protoimpl.UnsafeEnabled { - mi := &file_uplodr_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_uplodr_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Variant) String() string { @@ -156,7 +148,7 @@ func (*Variant) ProtoMessage() {} func (x *Variant) ProtoReflect() protoreflect.Message { mi := &file_uplodr_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -186,20 +178,17 @@ func (x *Variant) GetMimeType() string { } type Echo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Nonce string `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` unknownFields protoimpl.UnknownFields - - Nonce string `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Echo) Reset() { *x = Echo{} - if protoimpl.UnsafeEnabled { - mi := &file_uplodr_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_uplodr_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Echo) String() string { @@ -210,7 +199,7 @@ func (*Echo) ProtoMessage() {} func (x *Echo) ProtoReflect() protoreflect.Message { mi := &file_uplodr_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -234,51 +223,33 @@ func (x *Echo) GetNonce() string { var File_uplodr_proto protoreflect.FileDescriptor -var file_uplodr_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, - 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x78, - 0x2e, 0x78, 0x65, 0x64, 0x6e, 0x2e, 0x75, 0x70, 0x6c, 0x6f, 0x64, 0x72, 0x22, 0x54, 0x0a, 0x09, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, - 0x6c, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x6c, 0x64, - 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x41, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x2e, 0x77, 0x65, 0x62, 0x73, - 0x69, 0x74, 0x65, 0x2e, 0x78, 0x2e, 0x78, 0x65, 0x64, 0x6e, 0x2e, 0x75, 0x70, 0x6c, 0x6f, 0x64, - 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x52, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x6e, 0x74, 0x73, 0x22, 0x38, 0x0a, 0x07, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, - 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x1c, 0x0a, - 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x32, 0xb4, 0x01, 0x0a, 0x05, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x4e, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x2e, - 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x78, - 0x2e, 0x78, 0x65, 0x64, 0x6e, 0x2e, 0x75, 0x70, 0x6c, 0x6f, 0x64, 0x72, 0x2e, 0x45, 0x63, 0x68, - 0x6f, 0x1a, 0x22, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x69, - 0x74, 0x65, 0x2e, 0x78, 0x2e, 0x78, 0x65, 0x64, 0x6e, 0x2e, 0x75, 0x70, 0x6c, 0x6f, 0x64, 0x72, - 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x5b, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x27, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, - 0x2e, 0x78, 0x2e, 0x78, 0x65, 0x64, 0x6e, 0x2e, 0x75, 0x70, 0x6c, 0x6f, 0x64, 0x72, 0x2e, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x69, - 0x6e, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x78, 0x2e, 0x78, 0x65, 0x64, 0x6e, - 0x2e, 0x75, 0x70, 0x6c, 0x6f, 0x64, 0x72, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x42, 0x25, 0x5a, 0x23, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x2e, 0x77, 0x65, 0x62, - 0x73, 0x69, 0x74, 0x65, 0x2f, 0x78, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x78, 0x65, 0x64, 0x6e, 0x2f, - 0x75, 0x70, 0x6c, 0x6f, 0x64, 0x72, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} +const file_uplodr_proto_rawDesc = "" + + "\n" + + "\fuplodr.proto\x12\x1cwithin.website.x.xedn.uplodr\"T\n" + + "\tUploadReq\x12\x1b\n" + + "\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\x12\x16\n" + + "\x06folder\x18\x03 \x01(\tR\x06folder\"O\n" + + "\n" + + "UploadResp\x12A\n" + + "\bvariants\x18\x01 \x03(\v2%.within.website.x.xedn.uplodr.VariantR\bvariants\"8\n" + + "\aVariant\x12\x10\n" + + "\x03url\x18\x01 \x01(\tR\x03url\x12\x1b\n" + + "\tmime_type\x18\x02 \x01(\tR\bmimeType\"\x1c\n" + + "\x04Echo\x12\x14\n" + + "\x05nonce\x18\x01 \x01(\tR\x05nonce2\xb4\x01\n" + + "\x05Image\x12N\n" + + "\x04Ping\x12\".within.website.x.xedn.uplodr.Echo\x1a\".within.website.x.xedn.uplodr.Echo\x12[\n" + + "\x06Upload\x12'.within.website.x.xedn.uplodr.UploadReq\x1a(.within.website.x.xedn.uplodr.UploadRespB%Z#within.website/x/cmd/xedn/uplodr/pbb\x06proto3" var ( file_uplodr_proto_rawDescOnce sync.Once - file_uplodr_proto_rawDescData = file_uplodr_proto_rawDesc + file_uplodr_proto_rawDescData []byte ) func file_uplodr_proto_rawDescGZIP() []byte { file_uplodr_proto_rawDescOnce.Do(func() { - file_uplodr_proto_rawDescData = protoimpl.X.CompressGZIP(file_uplodr_proto_rawDescData) + file_uplodr_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_uplodr_proto_rawDesc), len(file_uplodr_proto_rawDesc))) }) return file_uplodr_proto_rawDescData } @@ -308,61 +279,11 @@ func file_uplodr_proto_init() { if File_uplodr_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_uplodr_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*UploadReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_uplodr_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*UploadResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_uplodr_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Variant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_uplodr_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Echo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_uplodr_proto_rawDesc, + RawDescriptor: unsafe.Slice(unsafe.StringData(file_uplodr_proto_rawDesc), len(file_uplodr_proto_rawDesc)), NumEnums: 0, NumMessages: 4, NumExtensions: 0, @@ -373,7 +294,6 @@ func file_uplodr_proto_init() { MessageInfos: file_uplodr_proto_msgTypes, }.Build() File_uplodr_proto = out.File - file_uplodr_proto_rawDesc = nil file_uplodr_proto_goTypes = nil file_uplodr_proto_depIdxs = nil } diff --git a/cmd/xedn/uplodr/pb/uplodr_grpc.pb.go b/cmd/xedn/uplodr/pb/uplodr_grpc.pb.go index 5cbcad1..0b98a95 100644 --- a/cmd/xedn/uplodr/pb/uplodr_grpc.pb.go +++ b/cmd/xedn/uplodr/pb/uplodr_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v5.27.1 +// - protoc-gen-go-grpc v1.5.1 +// - protoc v5.29.3 // source: uplodr.proto package pb @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Image_Ping_FullMethodName = "/within.website.x.xedn.uplodr.Image/Ping" @@ -61,16 +61,19 @@ func (c *imageClient) Upload(ctx context.Context, in *UploadReq, opts ...grpc.Ca // ImageServer is the server API for Image service. // All implementations must embed UnimplementedImageServer -// for forward compatibility +// for forward compatibility. type ImageServer interface { Ping(context.Context, *Echo) (*Echo, error) Upload(context.Context, *UploadReq) (*UploadResp, error) mustEmbedUnimplementedImageServer() } -// UnimplementedImageServer must be embedded to have forward compatible implementations. -type UnimplementedImageServer struct { -} +// UnimplementedImageServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedImageServer struct{} func (UnimplementedImageServer) Ping(context.Context, *Echo) (*Echo, error) { return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") @@ -79,6 +82,7 @@ func (UnimplementedImageServer) Upload(context.Context, *UploadReq) (*UploadResp return nil, status.Errorf(codes.Unimplemented, "method Upload not implemented") } func (UnimplementedImageServer) mustEmbedUnimplementedImageServer() {} +func (UnimplementedImageServer) testEmbeddedByValue() {} // UnsafeImageServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ImageServer will @@ -88,6 +92,13 @@ type UnsafeImageServer interface { } func RegisterImageServer(s grpc.ServiceRegistrar, srv ImageServer) { + // If the following call pancis, it indicates UnimplementedImageServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Image_ServiceDesc, srv) } |
