From 17cffa789a534112c57b6cebdfd8283fa16f9d1f Mon Sep 17 00:00:00 2001 From: root Date: Mon, 20 Apr 2026 19:54:33 +0000 Subject: [PATCH] Update protobuf definitions: 7f6a3e117e0eeef6c7ddcc8d567d5f84a7d38e6d --- pkg/test/v1/test_v1.pb.go | 155 +++++++++++++++++++++++++++++++++ pkg/test/v1/test_v1_grpc.pb.go | 125 ++++++++++++++++++++++++++ 2 files changed, 280 insertions(+) create mode 100644 pkg/test/v1/test_v1.pb.go create mode 100644 pkg/test/v1/test_v1_grpc.pb.go diff --git a/pkg/test/v1/test_v1.pb.go b/pkg/test/v1/test_v1.pb.go new file mode 100644 index 0000000..466f722 --- /dev/null +++ b/pkg/test/v1/test_v1.pb.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: test/v1/test_v1.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + mi := &file_test_v1_test_v1_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_v1_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 PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_test_v1_test_v1_proto_rawDescGZIP(), []int{0} +} + +type PingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PingResponse) Reset() { + *x = PingResponse{} + mi := &file_test_v1_test_v1_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_test_v1_test_v1_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 PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_test_v1_test_v1_proto_rawDescGZIP(), []int{1} +} + +var File_test_v1_test_v1_proto protoreflect.FileDescriptor + +const file_test_v1_test_v1_proto_rawDesc = "" + + "\n" + + "\x15test/v1/test_v1.proto\x12\atest.v1\"\r\n" + + "\vPingRequest\"\x0e\n" + + "\fPingResponse2D\n" + + "\vTestService\x125\n" + + "\x04Ping\x12\x14.test.v1.PingRequest\x1a\x15.test.v1.PingResponse\"\x00BEZCgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/test/v1b\x06proto3" + +var ( + file_test_v1_test_v1_proto_rawDescOnce sync.Once + file_test_v1_test_v1_proto_rawDescData []byte +) + +func file_test_v1_test_v1_proto_rawDescGZIP() []byte { + file_test_v1_test_v1_proto_rawDescOnce.Do(func() { + file_test_v1_test_v1_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_test_v1_test_v1_proto_rawDesc), len(file_test_v1_test_v1_proto_rawDesc))) + }) + return file_test_v1_test_v1_proto_rawDescData +} + +var file_test_v1_test_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_test_v1_test_v1_proto_goTypes = []any{ + (*PingRequest)(nil), // 0: test.v1.PingRequest + (*PingResponse)(nil), // 1: test.v1.PingResponse +} +var file_test_v1_test_v1_proto_depIdxs = []int32{ + 0, // 0: test.v1.TestService.Ping:input_type -> test.v1.PingRequest + 1, // 1: test.v1.TestService.Ping:output_type -> test.v1.PingResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_test_v1_test_v1_proto_init() } +func file_test_v1_test_v1_proto_init() { + if File_test_v1_test_v1_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_test_v1_test_v1_proto_rawDesc), len(file_test_v1_test_v1_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_test_v1_test_v1_proto_goTypes, + DependencyIndexes: file_test_v1_test_v1_proto_depIdxs, + MessageInfos: file_test_v1_test_v1_proto_msgTypes, + }.Build() + File_test_v1_test_v1_proto = out.File + file_test_v1_test_v1_proto_goTypes = nil + file_test_v1_test_v1_proto_depIdxs = nil +} diff --git a/pkg/test/v1/test_v1_grpc.pb.go b/pkg/test/v1/test_v1_grpc.pb.go new file mode 100644 index 0000000..5024fa3 --- /dev/null +++ b/pkg/test/v1/test_v1_grpc.pb.go @@ -0,0 +1,125 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.1 +// - protoc (unknown) +// source: test/v1/test_v1.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + TestService_Ping_FullMethodName = "/test.v1.TestService/Ping" +) + +// TestServiceClient is the client API for TestService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// * +// Service for handling environments +type TestServiceClient interface { + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) +} + +type testServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient { + return &testServiceClient{cc} +} + +func (c *testServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PingResponse) + err := c.cc.Invoke(ctx, TestService_Ping_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TestServiceServer is the server API for TestService service. +// All implementations should embed UnimplementedTestServiceServer +// for forward compatibility. +// +// * +// Service for handling environments +type TestServiceServer interface { + Ping(context.Context, *PingRequest) (*PingResponse, error) +} + +// UnimplementedTestServiceServer should 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 UnimplementedTestServiceServer struct{} + +func (UnimplementedTestServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Error(codes.Unimplemented, "method Ping not implemented") +} +func (UnimplementedTestServiceServer) testEmbeddedByValue() {} + +// UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TestServiceServer will +// result in compilation errors. +type UnsafeTestServiceServer interface { + mustEmbedUnimplementedTestServiceServer() +} + +func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) { + // If the following call panics, it indicates UnimplementedTestServiceServer 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(&TestService_ServiceDesc, srv) +} + +func _TestService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TestServiceServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TestService_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TestServiceServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TestService_ServiceDesc is the grpc.ServiceDesc for TestService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TestService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "test.v1.TestService", + HandlerType: (*TestServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _TestService_Ping_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "test/v1/test_v1.proto", +}