Update protobuf definitions: 53c5c443

By allanger

Commit link: 53c5c44307

Pipeline link: https://ci.badhouseplants.net/repos/34/pipeline/68
This commit is contained in:
2026-05-14 09:12:25 +00:00
parent 0f4959475d
commit 600a2eb804
4 changed files with 211 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: accounts/v1/accounts_v1.proto

View File

@@ -9,6 +9,7 @@ package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
@@ -165,19 +166,115 @@ func (*PongResponse) Descriptor() ([]byte, []int) {
return file_test_v1_test_v1_proto_rawDescGZIP(), []int{3}
}
type PingStreamResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Dummy string `protobuf:"bytes,1,opt,name=dummy,proto3" json:"dummy,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PingStreamResponse) Reset() {
*x = PingStreamResponse{}
mi := &file_test_v1_test_v1_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PingStreamResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PingStreamResponse) ProtoMessage() {}
func (x *PingStreamResponse) ProtoReflect() protoreflect.Message {
mi := &file_test_v1_test_v1_proto_msgTypes[4]
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 PingStreamResponse.ProtoReflect.Descriptor instead.
func (*PingStreamResponse) Descriptor() ([]byte, []int) {
return file_test_v1_test_v1_proto_rawDescGZIP(), []int{4}
}
func (x *PingStreamResponse) GetDummy() string {
if x != nil {
return x.Dummy
}
return ""
}
type PongStreamResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Dummy string `protobuf:"bytes,1,opt,name=dummy,proto3" json:"dummy,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PongStreamResponse) Reset() {
*x = PongStreamResponse{}
mi := &file_test_v1_test_v1_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PongStreamResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PongStreamResponse) ProtoMessage() {}
func (x *PongStreamResponse) ProtoReflect() protoreflect.Message {
mi := &file_test_v1_test_v1_proto_msgTypes[5]
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 PongStreamResponse.ProtoReflect.Descriptor instead.
func (*PongStreamResponse) Descriptor() ([]byte, []int) {
return file_test_v1_test_v1_proto_rawDescGZIP(), []int{5}
}
func (x *PongStreamResponse) GetDummy() string {
if x != nil {
return x.Dummy
}
return ""
}
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" +
"\x15test/v1/test_v1.proto\x12\atest.v1\x1a\x1bgoogle/protobuf/empty.proto\"\r\n" +
"\vPingRequest\"\x0e\n" +
"\fPingResponse\"\r\n" +
"\vPongRequest\"\x0e\n" +
"\fPongResponse2J\n" +
"\fPongResponse\"*\n" +
"\x12PingStreamResponse\x12\x14\n" +
"\x05dummy\x18\x01 \x01(\tR\x05dummy\"*\n" +
"\x12PongStreamResponse\x12\x14\n" +
"\x05dummy\x18\x01 \x01(\tR\x05dummy2\x91\x01\n" +
"\x11PublicTestService\x125\n" +
"\x04Ping\x12\x14.test.v1.PingRequest\x1a\x15.test.v1.PingResponse\"\x002D\n" +
"\x04Ping\x12\x14.test.v1.PingRequest\x1a\x15.test.v1.PingResponse\"\x00\x12E\n" +
"\n" +
"PingStream\x12\x16.google.protobuf.Empty\x1a\x1b.test.v1.PingStreamResponse\"\x000\x012\x8b\x01\n" +
"\vTestService\x125\n" +
"\x04Pong\x12\x14.test.v1.PongRequest\x1a\x15.test.v1.PongResponse\"\x00BEZCgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/test/v1b\x06proto3"
"\x04Pong\x12\x14.test.v1.PongRequest\x1a\x15.test.v1.PongResponse\"\x00\x12E\n" +
"\n" +
"PongStream\x12\x16.google.protobuf.Empty\x1a\x1b.test.v1.PongStreamResponse\"\x000\x01BEZCgitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/test/v1b\x06proto3"
var (
file_test_v1_test_v1_proto_rawDescOnce sync.Once
@@ -191,20 +288,27 @@ func file_test_v1_test_v1_proto_rawDescGZIP() []byte {
return file_test_v1_test_v1_proto_rawDescData
}
var file_test_v1_test_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_test_v1_test_v1_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_test_v1_test_v1_proto_goTypes = []any{
(*PingRequest)(nil), // 0: test.v1.PingRequest
(*PingResponse)(nil), // 1: test.v1.PingResponse
(*PongRequest)(nil), // 2: test.v1.PongRequest
(*PongResponse)(nil), // 3: test.v1.PongResponse
(*PingRequest)(nil), // 0: test.v1.PingRequest
(*PingResponse)(nil), // 1: test.v1.PingResponse
(*PongRequest)(nil), // 2: test.v1.PongRequest
(*PongResponse)(nil), // 3: test.v1.PongResponse
(*PingStreamResponse)(nil), // 4: test.v1.PingStreamResponse
(*PongStreamResponse)(nil), // 5: test.v1.PongStreamResponse
(*emptypb.Empty)(nil), // 6: google.protobuf.Empty
}
var file_test_v1_test_v1_proto_depIdxs = []int32{
0, // 0: test.v1.PublicTestService.Ping:input_type -> test.v1.PingRequest
2, // 1: test.v1.TestService.Pong:input_type -> test.v1.PongRequest
1, // 2: test.v1.PublicTestService.Ping:output_type -> test.v1.PingResponse
3, // 3: test.v1.TestService.Pong:output_type -> test.v1.PongResponse
2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type
6, // 1: test.v1.PublicTestService.PingStream:input_type -> google.protobuf.Empty
2, // 2: test.v1.TestService.Pong:input_type -> test.v1.PongRequest
6, // 3: test.v1.TestService.PongStream:input_type -> google.protobuf.Empty
1, // 4: test.v1.PublicTestService.Ping:output_type -> test.v1.PingResponse
4, // 5: test.v1.PublicTestService.PingStream:output_type -> test.v1.PingStreamResponse
3, // 6: test.v1.TestService.Pong:output_type -> test.v1.PongResponse
5, // 7: test.v1.TestService.PongStream:output_type -> test.v1.PongStreamResponse
4, // [4:8] is the sub-list for method output_type
0, // [0:4] 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
@@ -221,7 +325,7 @@ func file_test_v1_test_v1_proto_init() {
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: 4,
NumMessages: 6,
NumExtensions: 0,
NumServices: 2,
},

View File

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: test/v1/test_v1.proto
@@ -11,6 +11,7 @@ import (
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
@@ -19,7 +20,8 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
PublicTestService_Ping_FullMethodName = "/test.v1.PublicTestService/Ping"
PublicTestService_Ping_FullMethodName = "/test.v1.PublicTestService/Ping"
PublicTestService_PingStream_FullMethodName = "/test.v1.PublicTestService/PingStream"
)
// PublicTestServiceClient is the client API for PublicTestService service.
@@ -30,6 +32,7 @@ const (
// Service for handling environments
type PublicTestServiceClient interface {
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
PingStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PingStreamResponse], error)
}
type publicTestServiceClient struct {
@@ -50,6 +53,25 @@ func (c *publicTestServiceClient) Ping(ctx context.Context, in *PingRequest, opt
return out, nil
}
func (c *publicTestServiceClient) PingStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PingStreamResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &PublicTestService_ServiceDesc.Streams[0], PublicTestService_PingStream_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[emptypb.Empty, PingStreamResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PublicTestService_PingStreamClient = grpc.ServerStreamingClient[PingStreamResponse]
// PublicTestServiceServer is the server API for PublicTestService service.
// All implementations should embed UnimplementedPublicTestServiceServer
// for forward compatibility.
@@ -58,6 +80,7 @@ func (c *publicTestServiceClient) Ping(ctx context.Context, in *PingRequest, opt
// Service for handling environments
type PublicTestServiceServer interface {
Ping(context.Context, *PingRequest) (*PingResponse, error)
PingStream(*emptypb.Empty, grpc.ServerStreamingServer[PingStreamResponse]) error
}
// UnimplementedPublicTestServiceServer should be embedded to have
@@ -70,6 +93,9 @@ type UnimplementedPublicTestServiceServer struct{}
func (UnimplementedPublicTestServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedPublicTestServiceServer) PingStream(*emptypb.Empty, grpc.ServerStreamingServer[PingStreamResponse]) error {
return status.Error(codes.Unimplemented, "method PingStream not implemented")
}
func (UnimplementedPublicTestServiceServer) testEmbeddedByValue() {}
// UnsafePublicTestServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -108,6 +134,17 @@ func _PublicTestService_Ping_Handler(srv interface{}, ctx context.Context, dec f
return interceptor(ctx, in, info, handler)
}
func _PublicTestService_PingStream_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(emptypb.Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(PublicTestServiceServer).PingStream(m, &grpc.GenericServerStream[emptypb.Empty, PingStreamResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PublicTestService_PingStreamServer = grpc.ServerStreamingServer[PingStreamResponse]
// PublicTestService_ServiceDesc is the grpc.ServiceDesc for PublicTestService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -120,12 +157,19 @@ var PublicTestService_ServiceDesc = grpc.ServiceDesc{
Handler: _PublicTestService_Ping_Handler,
},
},
Streams: []grpc.StreamDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "PingStream",
Handler: _PublicTestService_PingStream_Handler,
ServerStreams: true,
},
},
Metadata: "test/v1/test_v1.proto",
}
const (
TestService_Pong_FullMethodName = "/test.v1.TestService/Pong"
TestService_Pong_FullMethodName = "/test.v1.TestService/Pong"
TestService_PongStream_FullMethodName = "/test.v1.TestService/PongStream"
)
// TestServiceClient is the client API for TestService service.
@@ -133,6 +177,7 @@ const (
// 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.
type TestServiceClient interface {
Pong(ctx context.Context, in *PongRequest, opts ...grpc.CallOption) (*PongResponse, error)
PongStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PongStreamResponse], error)
}
type testServiceClient struct {
@@ -153,11 +198,31 @@ func (c *testServiceClient) Pong(ctx context.Context, in *PongRequest, opts ...g
return out, nil
}
func (c *testServiceClient) PongStream(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PongStreamResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &TestService_ServiceDesc.Streams[0], TestService_PongStream_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[emptypb.Empty, PongStreamResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type TestService_PongStreamClient = grpc.ServerStreamingClient[PongStreamResponse]
// TestServiceServer is the server API for TestService service.
// All implementations should embed UnimplementedTestServiceServer
// for forward compatibility.
type TestServiceServer interface {
Pong(context.Context, *PongRequest) (*PongResponse, error)
PongStream(*emptypb.Empty, grpc.ServerStreamingServer[PongStreamResponse]) error
}
// UnimplementedTestServiceServer should be embedded to have
@@ -170,6 +235,9 @@ type UnimplementedTestServiceServer struct{}
func (UnimplementedTestServiceServer) Pong(context.Context, *PongRequest) (*PongResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Pong not implemented")
}
func (UnimplementedTestServiceServer) PongStream(*emptypb.Empty, grpc.ServerStreamingServer[PongStreamResponse]) error {
return status.Error(codes.Unimplemented, "method PongStream not implemented")
}
func (UnimplementedTestServiceServer) testEmbeddedByValue() {}
// UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -208,6 +276,17 @@ func _TestService_Pong_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler)
}
func _TestService_PongStream_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(emptypb.Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(TestServiceServer).PongStream(m, &grpc.GenericServerStream[emptypb.Empty, PongStreamResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type TestService_PongStreamServer = grpc.ServerStreamingServer[PongStreamResponse]
// 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)
@@ -220,6 +299,12 @@ var TestService_ServiceDesc = grpc.ServiceDesc{
Handler: _TestService_Pong_Handler,
},
},
Streams: []grpc.StreamDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "PongStream",
Handler: _TestService_PongStream_Handler,
ServerStreams: true,
},
},
Metadata: "test/v1/test_v1.proto",
}

View File

@@ -2,7 +2,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc-gen-go-grpc v1.6.2
// - protoc (unknown)
// source: tokens/v1/tokens_v1.proto