testpb

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FooService_GetFoo_FullMethodName  = "/test.v1.FooService/GetFoo"
	FooService_PostFoo_FullMethodName = "/test.v1.FooService/PostFoo"
)
View Source
const (
	FooTopic_Foo_FullMethodName = "/test.v1.FooTopic/Foo"
)

Variables

View Source
var (
	Enum_name = map[int32]string{
		0: "ENUM_UNSPECIFIED",
		1: "ENUM_VALUE1",
		2: "ENUM_VALUE2",
	}
	Enum_value = map[string]int32{
		"ENUM_UNSPECIFIED": 0,
		"ENUM_VALUE1":      1,
		"ENUM_VALUE2":      2,
	}
)

Enum value maps for Enum.

View Source
var File_test_v1_test_proto protoreflect.FileDescriptor
View Source
var FooService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "test.v1.FooService",
	HandlerType: (*FooServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFoo",
			Handler:    _FooService_GetFoo_Handler,
		},
		{
			MethodName: "PostFoo",
			Handler:    _FooService_PostFoo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "test/v1/test.proto",
}

FooService_ServiceDesc is the grpc.ServiceDesc for FooService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var FooTopic_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "test.v1.FooTopic",
	HandlerType: (*FooTopicServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Foo",
			Handler:    _FooTopic_Foo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "test/v1/test.proto",
}

FooTopic_ServiceDesc is the grpc.ServiceDesc for FooTopic service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterFooServiceServer

func RegisterFooServiceServer(s grpc.ServiceRegistrar, srv FooServiceServer)

func RegisterFooTopicServer

func RegisterFooTopicServer(s grpc.ServiceRegistrar, srv FooTopicServer)

Types

type Bar

type Bar struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*Bar) Descriptor deprecated

func (*Bar) Descriptor() ([]byte, []int)

Deprecated: Use Bar.ProtoReflect.Descriptor instead.

func (*Bar) GetField

func (x *Bar) GetField() string

func (*Bar) GetId

func (x *Bar) GetId() string

func (*Bar) GetName

func (x *Bar) GetName() string

func (*Bar) ProtoMessage

func (*Bar) ProtoMessage()

func (*Bar) ProtoReflect

func (x *Bar) ProtoReflect() protoreflect.Message

func (*Bar) Reset

func (x *Bar) Reset()

func (*Bar) String

func (x *Bar) String() string

type Enum

type Enum int32
const (
	Enum_ENUM_UNSPECIFIED Enum = 0
	Enum_ENUM_VALUE1      Enum = 1
	Enum_ENUM_VALUE2      Enum = 2
)

func (Enum) Descriptor

func (Enum) Descriptor() protoreflect.EnumDescriptor

func (Enum) Enum

func (x Enum) Enum() *Enum

func (Enum) EnumDescriptor deprecated

func (Enum) EnumDescriptor() ([]byte, []int)

Deprecated: Use Enum.Descriptor instead.

func (Enum) Number

func (x Enum) Number() protoreflect.EnumNumber

func (Enum) String

func (x Enum) String() string

func (Enum) Type

func (Enum) Type() protoreflect.EnumType

type FooMessage

type FooMessage struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*FooMessage) Descriptor deprecated

func (*FooMessage) Descriptor() ([]byte, []int)

Deprecated: Use FooMessage.ProtoReflect.Descriptor instead.

func (*FooMessage) GetField

func (x *FooMessage) GetField() string

func (*FooMessage) GetId

func (x *FooMessage) GetId() string

func (*FooMessage) GetName

func (x *FooMessage) GetName() string

func (*FooMessage) ProtoMessage

func (*FooMessage) ProtoMessage()

func (*FooMessage) ProtoReflect

func (x *FooMessage) ProtoReflect() protoreflect.Message

func (*FooMessage) Reset

func (x *FooMessage) Reset()

func (*FooMessage) String

func (x *FooMessage) String() string

type FooServiceClient

type FooServiceClient interface {
	GetFoo(ctx context.Context, in *GetFooRequest, opts ...grpc.CallOption) (*GetFooResponse, error)
	PostFoo(ctx context.Context, in *PostFooRequest, opts ...grpc.CallOption) (*PostFooResponse, error)
}

FooServiceClient is the client API for FooService 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.

func NewFooServiceClient

func NewFooServiceClient(cc grpc.ClientConnInterface) FooServiceClient

type FooServiceServer

type FooServiceServer interface {
	GetFoo(context.Context, *GetFooRequest) (*GetFooResponse, error)
	PostFoo(context.Context, *PostFooRequest) (*PostFooResponse, error)
	// contains filtered or unexported methods
}

FooServiceServer is the server API for FooService service. All implementations must embed UnimplementedFooServiceServer for forward compatibility

type FooTopicClient

type FooTopicClient interface {
	Foo(ctx context.Context, in *FooMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

FooTopicClient is the client API for FooTopic 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.

func NewFooTopicClient

func NewFooTopicClient(cc grpc.ClientConnInterface) FooTopicClient

type FooTopicServer

type FooTopicServer interface {
	Foo(context.Context, *FooMessage) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

FooTopicServer is the server API for FooTopic service. All implementations must embed UnimplementedFooTopicServer for forward compatibility

type GetFooRequest

type GetFooRequest struct {
	Id           string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Number       int64         `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
	Numbers      []float32     `protobuf:"fixed32,3,rep,packed,name=numbers,proto3" json:"numbers,omitempty"`
	Query        *QueryMessage `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"`
	MultipleWord string        `protobuf:"bytes,5,opt,name=multiple_word,json=multipleWord,proto3" json:"multiple_word,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFooRequest) Descriptor deprecated

func (*GetFooRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetFooRequest.ProtoReflect.Descriptor instead.

func (*GetFooRequest) GetId

func (x *GetFooRequest) GetId() string

func (*GetFooRequest) GetMultipleWord added in v0.0.6

func (x *GetFooRequest) GetMultipleWord() string

func (*GetFooRequest) GetNumber

func (x *GetFooRequest) GetNumber() int64

func (*GetFooRequest) GetNumbers

func (x *GetFooRequest) GetNumbers() []float32

func (*GetFooRequest) GetQuery added in v0.0.6

func (x *GetFooRequest) GetQuery() *QueryMessage

func (*GetFooRequest) ProtoMessage

func (*GetFooRequest) ProtoMessage()

func (*GetFooRequest) ProtoReflect

func (x *GetFooRequest) ProtoReflect() protoreflect.Message

func (*GetFooRequest) Reset

func (x *GetFooRequest) Reset()

func (*GetFooRequest) String

func (x *GetFooRequest) String() string

type GetFooResponse

type GetFooResponse struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFooResponse) Descriptor deprecated

func (*GetFooResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetFooResponse.ProtoReflect.Descriptor instead.

func (*GetFooResponse) GetField

func (x *GetFooResponse) GetField() string

func (*GetFooResponse) GetId

func (x *GetFooResponse) GetId() string

func (*GetFooResponse) GetName

func (x *GetFooResponse) GetName() string

func (*GetFooResponse) ProtoMessage

func (*GetFooResponse) ProtoMessage()

func (*GetFooResponse) ProtoReflect

func (x *GetFooResponse) ProtoReflect() protoreflect.Message

func (*GetFooResponse) Reset

func (x *GetFooResponse) Reset()

func (*GetFooResponse) String

func (x *GetFooResponse) String() string

type PostFooRequest

type PostFooRequest struct {
	SString         string                   `protobuf:"bytes,1,opt,name=s_string,json=sString,proto3" json:"s_string,omitempty"`
	OString         *string                  `protobuf:"bytes,2,opt,name=o_string,json=oString,proto3,oneof" json:"o_string,omitempty"`
	RString         []string                 `protobuf:"bytes,3,rep,name=r_string,json=rString,proto3" json:"r_string,omitempty"`
	SFloat          float32                  `protobuf:"fixed32,4,opt,name=s_float,json=sFloat,proto3" json:"s_float,omitempty"`
	OFloat          *float32                 `protobuf:"fixed32,5,opt,name=o_float,json=oFloat,proto3,oneof" json:"o_float,omitempty"`
	RFloat          []float32                `protobuf:"fixed32,6,rep,packed,name=r_float,json=rFloat,proto3" json:"r_float,omitempty"`
	Ts              *timestamppb.Timestamp   `protobuf:"bytes,7,opt,name=ts,proto3" json:"ts,omitempty"`
	RTs             []*timestamppb.Timestamp `protobuf:"bytes,8,rep,name=r_ts,json=rTs,proto3" json:"r_ts,omitempty"`
	SBar            *Bar                     `protobuf:"bytes,9,opt,name=s_bar,json=sBar,proto3" json:"s_bar,omitempty"`
	RBars           []*Bar                   `protobuf:"bytes,10,rep,name=r_bars,json=rBars,proto3" json:"r_bars,omitempty"`
	Enum            Enum                     `protobuf:"varint,11,opt,name=enum,proto3,enum=test.v1.Enum" json:"enum,omitempty"`
	REnum           []Enum                   `protobuf:"varint,12,rep,packed,name=r_enum,json=rEnum,proto3,enum=test.v1.Enum" json:"r_enum,omitempty"`
	SBytes          []byte                   `protobuf:"bytes,13,opt,name=s_bytes,json=sBytes,proto3" json:"s_bytes,omitempty"`
	RBytes          [][]byte                 `protobuf:"bytes,14,rep,name=r_bytes,json=rBytes,proto3" json:"r_bytes,omitempty"`
	MapStringString map[string]string        `` /* 197-byte string literal not displayed */
	// Types that are assignable to NakedOneof:
	//
	//	*PostFooRequest_OneofString
	//	*PostFooRequest_OneBar
	//	*PostFooRequest_OneofFloat
	//	*PostFooRequest_OneofEnum
	NakedOneof isPostFooRequest_NakedOneof `protobuf_oneof:"naked_oneof"`
	// contains filtered or unexported fields
}

func (*PostFooRequest) Descriptor deprecated

func (*PostFooRequest) Descriptor() ([]byte, []int)

Deprecated: Use PostFooRequest.ProtoReflect.Descriptor instead.

func (*PostFooRequest) GetEnum

func (x *PostFooRequest) GetEnum() Enum

func (*PostFooRequest) GetMapStringString added in v0.0.6

func (x *PostFooRequest) GetMapStringString() map[string]string

func (*PostFooRequest) GetNakedOneof

func (m *PostFooRequest) GetNakedOneof() isPostFooRequest_NakedOneof

func (*PostFooRequest) GetOFloat

func (x *PostFooRequest) GetOFloat() float32

func (*PostFooRequest) GetOString

func (x *PostFooRequest) GetOString() string

func (*PostFooRequest) GetOneBar

func (x *PostFooRequest) GetOneBar() *Bar

func (*PostFooRequest) GetOneofEnum

func (x *PostFooRequest) GetOneofEnum() Enum

func (*PostFooRequest) GetOneofFloat

func (x *PostFooRequest) GetOneofFloat() float32

func (*PostFooRequest) GetOneofString

func (x *PostFooRequest) GetOneofString() string

func (*PostFooRequest) GetRBars

func (x *PostFooRequest) GetRBars() []*Bar

func (*PostFooRequest) GetRBytes added in v0.0.6

func (x *PostFooRequest) GetRBytes() [][]byte

func (*PostFooRequest) GetREnum

func (x *PostFooRequest) GetREnum() []Enum

func (*PostFooRequest) GetRFloat

func (x *PostFooRequest) GetRFloat() []float32

func (*PostFooRequest) GetRString

func (x *PostFooRequest) GetRString() []string

func (*PostFooRequest) GetRTs

func (x *PostFooRequest) GetRTs() []*timestamppb.Timestamp

func (*PostFooRequest) GetSBar

func (x *PostFooRequest) GetSBar() *Bar

func (*PostFooRequest) GetSBytes added in v0.0.6

func (x *PostFooRequest) GetSBytes() []byte

func (*PostFooRequest) GetSFloat

func (x *PostFooRequest) GetSFloat() float32

func (*PostFooRequest) GetSString

func (x *PostFooRequest) GetSString() string

func (*PostFooRequest) GetTs

func (x *PostFooRequest) GetTs() *timestamppb.Timestamp

func (*PostFooRequest) ProtoMessage

func (*PostFooRequest) ProtoMessage()

func (*PostFooRequest) ProtoReflect

func (x *PostFooRequest) ProtoReflect() protoreflect.Message

func (*PostFooRequest) Reset

func (x *PostFooRequest) Reset()

func (*PostFooRequest) String

func (x *PostFooRequest) String() string

type PostFooRequest_OneBar

type PostFooRequest_OneBar struct {
	OneBar *Bar `protobuf:"bytes,101,opt,name=one_bar,json=oneBar,proto3,oneof"`
}

type PostFooRequest_OneofEnum

type PostFooRequest_OneofEnum struct {
	OneofEnum Enum `protobuf:"varint,103,opt,name=oneof_enum,json=oneofEnum,proto3,enum=test.v1.Enum,oneof"`
}

type PostFooRequest_OneofFloat

type PostFooRequest_OneofFloat struct {
	OneofFloat float32 `protobuf:"fixed32,102,opt,name=oneof_float,json=oneofFloat,proto3,oneof"`
}

type PostFooRequest_OneofString

type PostFooRequest_OneofString struct {
	OneofString string `protobuf:"bytes,100,opt,name=oneof_string,json=oneofString,proto3,oneof"`
}

type PostFooResponse

type PostFooResponse struct {
	Id    string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"`
	// contains filtered or unexported fields
}

func (*PostFooResponse) Descriptor deprecated

func (*PostFooResponse) Descriptor() ([]byte, []int)

Deprecated: Use PostFooResponse.ProtoReflect.Descriptor instead.

func (*PostFooResponse) GetField

func (x *PostFooResponse) GetField() string

func (*PostFooResponse) GetId

func (x *PostFooResponse) GetId() string

func (*PostFooResponse) GetName

func (x *PostFooResponse) GetName() string

func (*PostFooResponse) ProtoMessage

func (*PostFooResponse) ProtoMessage()

func (*PostFooResponse) ProtoReflect

func (x *PostFooResponse) ProtoReflect() protoreflect.Message

func (*PostFooResponse) Reset

func (x *PostFooResponse) Reset()

func (*PostFooResponse) String

func (x *PostFooResponse) String() string

type QueryMessage added in v0.0.6

type QueryMessage struct {
	A string `protobuf:"bytes,1,opt,name=a,proto3" json:"a,omitempty"`
	B string `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryMessage) Descriptor deprecated added in v0.0.6

func (*QueryMessage) Descriptor() ([]byte, []int)

Deprecated: Use QueryMessage.ProtoReflect.Descriptor instead.

func (*QueryMessage) GetA added in v0.0.6

func (x *QueryMessage) GetA() string

func (*QueryMessage) GetB added in v0.0.6

func (x *QueryMessage) GetB() string

func (*QueryMessage) ProtoMessage added in v0.0.6

func (*QueryMessage) ProtoMessage()

func (*QueryMessage) ProtoReflect added in v0.0.6

func (x *QueryMessage) ProtoReflect() protoreflect.Message

func (*QueryMessage) Reset added in v0.0.6

func (x *QueryMessage) Reset()

func (*QueryMessage) String added in v0.0.6

func (x *QueryMessage) String() string

type UnimplementedFooServiceServer

type UnimplementedFooServiceServer struct {
}

UnimplementedFooServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFooServiceServer) GetFoo

func (UnimplementedFooServiceServer) PostFoo

type UnimplementedFooTopicServer

type UnimplementedFooTopicServer struct {
}

UnimplementedFooTopicServer must be embedded to have forward compatible implementations.

func (UnimplementedFooTopicServer) Foo

type UnsafeFooServiceServer

type UnsafeFooServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeFooServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FooServiceServer will result in compilation errors.

type UnsafeFooTopicServer

type UnsafeFooTopicServer interface {
	// contains filtered or unexported methods
}

UnsafeFooTopicServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FooTopicServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL