testpb

package
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	Enum_name = map[int32]string{
		0:  "ENUM_UNSPECIFIED",
		1:  "ENUM_ONE",
		2:  "ENUM_TWO",
		5:  "ENUM_FIVE",
		-3: "ENUM_NEG_THREE",
	}
	Enum_value = map[string]int32{
		"ENUM_UNSPECIFIED": 0,
		"ENUM_ONE":         1,
		"ENUM_TWO":         2,
		"ENUM_FIVE":        5,
		"ENUM_NEG_THREE":   -3,
	}
)

Enum value maps for Enum.

View Source
var File_testpb_msg_proto protoreflect.FileDescriptor
View Source
var File_testpb_query_proto protoreflect.FileDescriptor
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "testpb.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Send",
			Handler:    _Msg_Send_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "testpb/msg.proto",
}

Msg_ServiceDesc is the grpc.ServiceDesc for Msg 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 Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "testpb.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _Query_Echo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "testpb/query.proto",
}

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

Functions

func RegisterMsgServer

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

Types

type AMessage

type AMessage struct {
	Bar string `protobuf:"bytes,1,opt,name=bar,proto3" json:"bar,omitempty"`
	Baz int32  `protobuf:"varint,2,opt,name=baz,proto3" json:"baz,omitempty"`
	// contains filtered or unexported fields
}

func (*AMessage) Descriptor deprecated

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

Deprecated: Use AMessage.ProtoReflect.Descriptor instead.

func (*AMessage) GetBar

func (x *AMessage) GetBar() string

func (*AMessage) GetBaz

func (x *AMessage) GetBaz() int32

func (*AMessage) ProtoMessage

func (*AMessage) ProtoMessage()

func (*AMessage) ProtoReflect

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

func (*AMessage) Reset

func (x *AMessage) Reset()

func (*AMessage) String

func (x *AMessage) String() string

type EchoRequest

type EchoRequest struct {

	// u32 is an uint32
	U32                      uint32                   `protobuf:"varint,1,opt,name=u32,proto3" json:"u32,omitempty"`
	U64                      uint64                   `protobuf:"varint,2,opt,name=u64,proto3" json:"u64,omitempty"`
	Str                      string                   `protobuf:"bytes,3,opt,name=str,proto3" json:"str,omitempty"`
	Bz                       []byte                   `protobuf:"bytes,4,opt,name=bz,proto3" json:"bz,omitempty"`
	Timestamp                *timestamppb.Timestamp   `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Duration                 *durationpb.Duration     `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"`
	I32                      int32                    `protobuf:"varint,7,opt,name=i32,proto3" json:"i32,omitempty"`
	I64                      int64                    `protobuf:"varint,10,opt,name=i64,proto3" json:"i64,omitempty"`
	ABool                    bool                     `protobuf:"varint,15,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty"`
	AnEnum                   Enum                     `protobuf:"varint,16,opt,name=an_enum,json=anEnum,proto3,enum=testpb.Enum" json:"an_enum,omitempty"`
	AMessage                 *AMessage                `protobuf:"bytes,17,opt,name=a_message,json=aMessage,proto3" json:"a_message,omitempty"`
	ACoin                    *v1beta1.Coin            `protobuf:"bytes,18,opt,name=a_coin,json=aCoin,proto3" json:"a_coin,omitempty"`
	AnAddress                string                   `protobuf:"bytes,19,opt,name=an_address,json=anAddress,proto3" json:"an_address,omitempty"`
	Page                     *v1beta11.PageRequest    `protobuf:"bytes,20,opt,name=page,proto3" json:"page,omitempty"`
	Bools                    []bool                   `protobuf:"varint,21,rep,packed,name=bools,proto3" json:"bools,omitempty"`
	Uints                    []uint32                 `protobuf:"varint,22,rep,packed,name=uints,proto3" json:"uints,omitempty"`
	Strings                  []string                 `protobuf:"bytes,23,rep,name=strings,proto3" json:"strings,omitempty"`
	Enums                    []Enum                   `protobuf:"varint,24,rep,packed,name=enums,proto3,enum=testpb.Enum" json:"enums,omitempty"`
	Durations                []*durationpb.Duration   `protobuf:"bytes,25,rep,name=durations,proto3" json:"durations,omitempty"`
	SomeMessages             []*AMessage              `protobuf:"bytes,26,rep,name=some_messages,json=someMessages,proto3" json:"some_messages,omitempty"`
	Positional1              int32                    `protobuf:"varint,27,opt,name=positional1,proto3" json:"positional1,omitempty"`
	Positional2              string                   `protobuf:"bytes,28,opt,name=positional2,proto3" json:"positional2,omitempty"`
	Positional3Varargs       []*v1beta1.Coin          `protobuf:"bytes,29,rep,name=positional3_varargs,json=positional3Varargs,proto3" json:"positional3_varargs,omitempty"`
	DeprecatedField          string                   `protobuf:"bytes,30,opt,name=deprecated_field,json=deprecatedField,proto3" json:"deprecated_field,omitempty"`
	ShorthandDeprecatedField string                   `` /* 136-byte string literal not displayed */
	HiddenBool               bool                     `protobuf:"varint,32,opt,name=hidden_bool,json=hiddenBool,proto3" json:"hidden_bool,omitempty"`
	MapStringString          map[string]string        `` /* 197-byte string literal not displayed */
	MapStringUint32          map[string]uint32        `` /* 198-byte string literal not displayed */
	MapStringCoin            map[string]*v1beta1.Coin `` /* 191-byte string literal not displayed */
	AValidatorAddress        string                   `protobuf:"bytes,36,opt,name=a_validator_address,json=aValidatorAddress,proto3" json:"a_validator_address,omitempty"`
	AConsensusAddress        string                   `protobuf:"bytes,37,opt,name=a_consensus_address,json=aConsensusAddress,proto3" json:"a_consensus_address,omitempty"`
	Coins                    []*v1beta1.Coin          `protobuf:"bytes,38,rep,name=coins,proto3" json:"coins,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoRequest) Descriptor deprecated

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetABool

func (x *EchoRequest) GetABool() bool

func (*EchoRequest) GetACoin

func (x *EchoRequest) GetACoin() *v1beta1.Coin

func (*EchoRequest) GetAConsensusAddress

func (x *EchoRequest) GetAConsensusAddress() string

func (*EchoRequest) GetAMessage

func (x *EchoRequest) GetAMessage() *AMessage

func (*EchoRequest) GetAValidatorAddress

func (x *EchoRequest) GetAValidatorAddress() string

func (*EchoRequest) GetAnAddress

func (x *EchoRequest) GetAnAddress() string

func (*EchoRequest) GetAnEnum

func (x *EchoRequest) GetAnEnum() Enum

func (*EchoRequest) GetBools

func (x *EchoRequest) GetBools() []bool

func (*EchoRequest) GetBz

func (x *EchoRequest) GetBz() []byte

func (*EchoRequest) GetCoins

func (x *EchoRequest) GetCoins() []*v1beta1.Coin

func (*EchoRequest) GetDeprecatedField

func (x *EchoRequest) GetDeprecatedField() string

func (*EchoRequest) GetDuration

func (x *EchoRequest) GetDuration() *durationpb.Duration

func (*EchoRequest) GetDurations

func (x *EchoRequest) GetDurations() []*durationpb.Duration

func (*EchoRequest) GetEnums

func (x *EchoRequest) GetEnums() []Enum

func (*EchoRequest) GetHiddenBool

func (x *EchoRequest) GetHiddenBool() bool

func (*EchoRequest) GetI32

func (x *EchoRequest) GetI32() int32

func (*EchoRequest) GetI64

func (x *EchoRequest) GetI64() int64

func (*EchoRequest) GetMapStringCoin

func (x *EchoRequest) GetMapStringCoin() map[string]*v1beta1.Coin

func (*EchoRequest) GetMapStringString

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

func (*EchoRequest) GetMapStringUint32

func (x *EchoRequest) GetMapStringUint32() map[string]uint32

func (*EchoRequest) GetPage

func (x *EchoRequest) GetPage() *v1beta11.PageRequest

func (*EchoRequest) GetPositional1

func (x *EchoRequest) GetPositional1() int32

func (*EchoRequest) GetPositional2

func (x *EchoRequest) GetPositional2() string

func (*EchoRequest) GetPositional3Varargs

func (x *EchoRequest) GetPositional3Varargs() []*v1beta1.Coin

func (*EchoRequest) GetShorthandDeprecatedField

func (x *EchoRequest) GetShorthandDeprecatedField() string

func (*EchoRequest) GetSomeMessages

func (x *EchoRequest) GetSomeMessages() []*AMessage

func (*EchoRequest) GetStr

func (x *EchoRequest) GetStr() string

func (*EchoRequest) GetStrings

func (x *EchoRequest) GetStrings() []string

func (*EchoRequest) GetTimestamp

func (x *EchoRequest) GetTimestamp() *timestamppb.Timestamp

func (*EchoRequest) GetU32

func (x *EchoRequest) GetU32() uint32

func (*EchoRequest) GetU64

func (x *EchoRequest) GetU64() uint64

func (*EchoRequest) GetUints

func (x *EchoRequest) GetUints() []uint32

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) ProtoReflect

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

func (*EchoRequest) Reset

func (x *EchoRequest) Reset()

func (*EchoRequest) String

func (x *EchoRequest) String() string

type EchoResponse

type EchoResponse struct {
	Request *EchoRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoResponse) Descriptor deprecated

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

Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.

func (*EchoResponse) GetRequest

func (x *EchoResponse) GetRequest() *EchoRequest

func (*EchoResponse) ProtoMessage

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) ProtoReflect

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

func (*EchoResponse) Reset

func (x *EchoResponse) Reset()

func (*EchoResponse) String

func (x *EchoResponse) String() string

type Enum

type Enum int32
const (
	Enum_ENUM_UNSPECIFIED Enum = 0
	Enum_ENUM_ONE         Enum = 1
	Enum_ENUM_TWO         Enum = 2
	Enum_ENUM_FIVE        Enum = 5
	Enum_ENUM_NEG_THREE   Enum = -3
)

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 MsgClient

type MsgClient interface {
	// Send a request and returns the request as a response.
	Send(ctx context.Context, in *MsgRequest, opts ...grpc.CallOption) (*MsgResponse, error)
}

MsgClient is the client API for Msg 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 NewMsgClient

func NewMsgClient(cc grpc.ClientConnInterface) MsgClient

type MsgRequest

type MsgRequest struct {

	// u32 is an uint32
	U32                      uint32                 `protobuf:"varint,1,opt,name=u32,proto3" json:"u32,omitempty"`
	U64                      uint64                 `protobuf:"varint,2,opt,name=u64,proto3" json:"u64,omitempty"`
	Str                      string                 `protobuf:"bytes,3,opt,name=str,proto3" json:"str,omitempty"`
	Bz                       []byte                 `protobuf:"bytes,4,opt,name=bz,proto3" json:"bz,omitempty"`
	Timestamp                *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Duration                 *durationpb.Duration   `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"`
	I32                      int32                  `protobuf:"varint,7,opt,name=i32,proto3" json:"i32,omitempty"`
	I64                      int64                  `protobuf:"varint,10,opt,name=i64,proto3" json:"i64,omitempty"`
	ABool                    bool                   `protobuf:"varint,15,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty"`
	AnEnum                   Enum                   `protobuf:"varint,16,opt,name=an_enum,json=anEnum,proto3,enum=testpb.Enum" json:"an_enum,omitempty"`
	AMessage                 *AMessage              `protobuf:"bytes,17,opt,name=a_message,json=aMessage,proto3" json:"a_message,omitempty"`
	ACoin                    *v1beta1.Coin          `protobuf:"bytes,18,opt,name=a_coin,json=aCoin,proto3" json:"a_coin,omitempty"`
	AnAddress                string                 `protobuf:"bytes,19,opt,name=an_address,json=anAddress,proto3" json:"an_address,omitempty"`
	Page                     *v1beta11.PageRequest  `protobuf:"bytes,20,opt,name=page,proto3" json:"page,omitempty"`
	Bools                    []bool                 `protobuf:"varint,21,rep,packed,name=bools,proto3" json:"bools,omitempty"`
	Uints                    []uint32               `protobuf:"varint,22,rep,packed,name=uints,proto3" json:"uints,omitempty"`
	Strings                  []string               `protobuf:"bytes,23,rep,name=strings,proto3" json:"strings,omitempty"`
	Enums                    []Enum                 `protobuf:"varint,24,rep,packed,name=enums,proto3,enum=testpb.Enum" json:"enums,omitempty"`
	Durations                []*durationpb.Duration `protobuf:"bytes,25,rep,name=durations,proto3" json:"durations,omitempty"`
	SomeMessages             []*AMessage            `protobuf:"bytes,26,rep,name=some_messages,json=someMessages,proto3" json:"some_messages,omitempty"`
	Positional1              int32                  `protobuf:"varint,27,opt,name=positional1,proto3" json:"positional1,omitempty"`
	Positional2              string                 `protobuf:"bytes,28,opt,name=positional2,proto3" json:"positional2,omitempty"`
	Positional3Varargs       []*v1beta1.Coin        `protobuf:"bytes,29,rep,name=positional3_varargs,json=positional3Varargs,proto3" json:"positional3_varargs,omitempty"`
	DeprecatedField          string                 `protobuf:"bytes,30,opt,name=deprecated_field,json=deprecatedField,proto3" json:"deprecated_field,omitempty"`
	ShorthandDeprecatedField string                 `` /* 136-byte string literal not displayed */
	HiddenBool               bool                   `protobuf:"varint,32,opt,name=hidden_bool,json=hiddenBool,proto3" json:"hidden_bool,omitempty"`
	AValidatorAddress        string                 `protobuf:"bytes,33,opt,name=a_validator_address,json=aValidatorAddress,proto3" json:"a_validator_address,omitempty"`
	// contains filtered or unexported fields
}

func (*MsgRequest) Descriptor deprecated

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

Deprecated: Use MsgRequest.ProtoReflect.Descriptor instead.

func (*MsgRequest) GetABool

func (x *MsgRequest) GetABool() bool

func (*MsgRequest) GetACoin

func (x *MsgRequest) GetACoin() *v1beta1.Coin

func (*MsgRequest) GetAMessage

func (x *MsgRequest) GetAMessage() *AMessage

func (*MsgRequest) GetAValidatorAddress

func (x *MsgRequest) GetAValidatorAddress() string

func (*MsgRequest) GetAnAddress

func (x *MsgRequest) GetAnAddress() string

func (*MsgRequest) GetAnEnum

func (x *MsgRequest) GetAnEnum() Enum

func (*MsgRequest) GetBools

func (x *MsgRequest) GetBools() []bool

func (*MsgRequest) GetBz

func (x *MsgRequest) GetBz() []byte

func (*MsgRequest) GetDeprecatedField

func (x *MsgRequest) GetDeprecatedField() string

func (*MsgRequest) GetDuration

func (x *MsgRequest) GetDuration() *durationpb.Duration

func (*MsgRequest) GetDurations

func (x *MsgRequest) GetDurations() []*durationpb.Duration

func (*MsgRequest) GetEnums

func (x *MsgRequest) GetEnums() []Enum

func (*MsgRequest) GetHiddenBool

func (x *MsgRequest) GetHiddenBool() bool

func (*MsgRequest) GetI32

func (x *MsgRequest) GetI32() int32

func (*MsgRequest) GetI64

func (x *MsgRequest) GetI64() int64

func (*MsgRequest) GetPage

func (x *MsgRequest) GetPage() *v1beta11.PageRequest

func (*MsgRequest) GetPositional1

func (x *MsgRequest) GetPositional1() int32

func (*MsgRequest) GetPositional2

func (x *MsgRequest) GetPositional2() string

func (*MsgRequest) GetPositional3Varargs

func (x *MsgRequest) GetPositional3Varargs() []*v1beta1.Coin

func (*MsgRequest) GetShorthandDeprecatedField

func (x *MsgRequest) GetShorthandDeprecatedField() string

func (*MsgRequest) GetSomeMessages

func (x *MsgRequest) GetSomeMessages() []*AMessage

func (*MsgRequest) GetStr

func (x *MsgRequest) GetStr() string

func (*MsgRequest) GetStrings

func (x *MsgRequest) GetStrings() []string

func (*MsgRequest) GetTimestamp

func (x *MsgRequest) GetTimestamp() *timestamppb.Timestamp

func (*MsgRequest) GetU32

func (x *MsgRequest) GetU32() uint32

func (*MsgRequest) GetU64

func (x *MsgRequest) GetU64() uint64

func (*MsgRequest) GetUints

func (x *MsgRequest) GetUints() []uint32

func (*MsgRequest) ProtoMessage

func (*MsgRequest) ProtoMessage()

func (*MsgRequest) ProtoReflect

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

func (*MsgRequest) Reset

func (x *MsgRequest) Reset()

func (*MsgRequest) String

func (x *MsgRequest) String() string

type MsgResponse

type MsgResponse struct {
	Request *MsgRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
	// contains filtered or unexported fields
}

func (*MsgResponse) Descriptor deprecated

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

Deprecated: Use MsgResponse.ProtoReflect.Descriptor instead.

func (*MsgResponse) GetRequest

func (x *MsgResponse) GetRequest() *MsgRequest

func (*MsgResponse) ProtoMessage

func (*MsgResponse) ProtoMessage()

func (*MsgResponse) ProtoReflect

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

func (*MsgResponse) Reset

func (x *MsgResponse) Reset()

func (*MsgResponse) String

func (x *MsgResponse) String() string

type MsgServer

type MsgServer interface {
	// Send a request and returns the request as a response.
	Send(context.Context, *MsgRequest) (*MsgResponse, error)
	// contains filtered or unexported methods
}

MsgServer is the server API for Msg service. All implementations must embed UnimplementedMsgServer for forward compatibility

type QueryClient

type QueryClient interface {
	// Echo returns the request in the response
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
}

QueryClient is the client API for Query 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 NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryServer

type QueryServer interface {
	// Echo returns the request in the response
	Echo(context.Context, *EchoRequest) (*EchoResponse, error)
	// contains filtered or unexported methods
}

QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer must be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) Send

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Echo

type UnsafeMsgServer

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

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

type UnsafeQueryServer

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

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

Jump to

Keyboard shortcuts

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