samplepb

package
v0.0.0-...-0871eb3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthSample = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSample   = fmt.Errorf("proto: integer overflow")
)
View Source
var EnumType_name = map[int32]string{
	0: "SOMETHING_TYPE_A",
	1: "SOMETHING_TYPE_B",
	2: "SOMETHING_TYPE_C",
}
View Source
var EnumType_value = map[string]int32{
	"SOMETHING_TYPE_A": 0,
	"SOMETHING_TYPE_B": 1,
	"SOMETHING_TYPE_C": 2,
}

Functions

func RegisterSampleServiceServer

func RegisterSampleServiceServer(s *grpc.Server, srv SampleServiceServer)

Types

type Answer

type Answer struct {
	Code   int64  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"`
}

func (*Answer) Descriptor

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

func (*Answer) Equal

func (this *Answer) Equal(that interface{}) bool

func (*Answer) GetAnswer

func (m *Answer) GetAnswer() string

func (*Answer) GetCode

func (m *Answer) GetCode() int64

func (*Answer) GoString

func (this *Answer) GoString() string

func (*Answer) Marshal

func (m *Answer) Marshal() (dAtA []byte, err error)

func (*Answer) MarshalTo

func (m *Answer) MarshalTo(dAtA []byte) (int, error)

func (*Answer) MarshalToSizedBuffer

func (m *Answer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Answer) ProtoMessage

func (*Answer) ProtoMessage()

func (*Answer) Reset

func (m *Answer) Reset()

func (*Answer) Size

func (m *Answer) Size() (n int)

func (*Answer) String

func (this *Answer) String() string

func (*Answer) Unmarshal

func (m *Answer) Unmarshal(dAtA []byte) error

func (*Answer) XXX_DiscardUnknown

func (m *Answer) XXX_DiscardUnknown()

func (*Answer) XXX_Marshal

func (m *Answer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Answer) XXX_Merge

func (m *Answer) XXX_Merge(src proto.Message)

func (*Answer) XXX_Size

func (m *Answer) XXX_Size() int

func (*Answer) XXX_Unmarshal

func (m *Answer) XXX_Unmarshal(b []byte) error

type Client

type Client struct {
	QuestionCode int64  `protobuf:"varint,1,opt,name=question_code,json=questionCode,proto3" json:"question_code,omitempty"`
	Name         string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}

func (*Client) Descriptor

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

func (*Client) Equal

func (this *Client) Equal(that interface{}) bool

func (*Client) GetName

func (m *Client) GetName() string

func (*Client) GetQuestionCode

func (m *Client) GetQuestionCode() int64

func (*Client) GoString

func (this *Client) GoString() string

func (*Client) Marshal

func (m *Client) Marshal() (dAtA []byte, err error)

func (*Client) MarshalTo

func (m *Client) MarshalTo(dAtA []byte) (int, error)

func (*Client) MarshalToSizedBuffer

func (m *Client) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) Reset

func (m *Client) Reset()

func (*Client) Size

func (m *Client) Size() (n int)

func (*Client) String

func (this *Client) String() string

func (*Client) Unmarshal

func (m *Client) Unmarshal(dAtA []byte) error

func (*Client) XXX_DiscardUnknown

func (m *Client) XXX_DiscardUnknown()

func (*Client) XXX_Marshal

func (m *Client) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Client) XXX_Merge

func (m *Client) XXX_Merge(src proto.Message)

func (*Client) XXX_Size

func (m *Client) XXX_Size() int

func (*Client) XXX_Unmarshal

func (m *Client) XXX_Unmarshal(b []byte) error

type EnumType

type EnumType int32
const (
	SOMETHING_TYPE_A EnumType = 0
	SOMETHING_TYPE_B EnumType = 1
	SOMETHING_TYPE_C EnumType = 2
)

func (EnumType) EnumDescriptor

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

func (EnumType) String

func (x EnumType) String() string

type ExtensionType

type ExtensionType struct {
	Data   []string         `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	Mp     map[string]int64 `` /* 146-byte string literal not displayed */
	Ts     *types.Timestamp `protobuf:"bytes,3,opt,name=ts,proto3" json:"ts,omitempty"`
	Struct *types.Struct    `protobuf:"bytes,4,opt,name=struct,proto3" json:"struct,omitempty"`
	Any    *types.Any       `protobuf:"bytes,5,opt,name=any,proto3" json:"any,omitempty"`
	// at least one of field should be used
	//
	// Types that are valid to be assigned to OneofData:
	//	*ExtensionType_I32
	//	*ExtensionType_St
	OneofData isExtensionType_OneofData `protobuf_oneof:"oneof_data"`
	Type      EnumType                  `protobuf:"varint,8,opt,name=type,proto3,enum=sample.EnumType" json:"type,omitempty"`
	Client    *Client                   `protobuf:"bytes,9,opt,name=client,proto3" json:"client,omitempty"`
}

func (*ExtensionType) Descriptor

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

func (*ExtensionType) Equal

func (this *ExtensionType) Equal(that interface{}) bool

func (*ExtensionType) GetAny

func (m *ExtensionType) GetAny() *types.Any

func (*ExtensionType) GetClient

func (m *ExtensionType) GetClient() *Client

func (*ExtensionType) GetData

func (m *ExtensionType) GetData() []string

func (*ExtensionType) GetI32

func (m *ExtensionType) GetI32() int32

func (*ExtensionType) GetMp

func (m *ExtensionType) GetMp() map[string]int64

func (*ExtensionType) GetOneofData

func (m *ExtensionType) GetOneofData() isExtensionType_OneofData

func (*ExtensionType) GetSt

func (m *ExtensionType) GetSt() string

func (*ExtensionType) GetStruct

func (m *ExtensionType) GetStruct() *types.Struct

func (*ExtensionType) GetTs

func (m *ExtensionType) GetTs() *types.Timestamp

func (*ExtensionType) GetType

func (m *ExtensionType) GetType() EnumType

func (*ExtensionType) GoString

func (this *ExtensionType) GoString() string

func (*ExtensionType) Marshal

func (m *ExtensionType) Marshal() (dAtA []byte, err error)

func (*ExtensionType) MarshalTo

func (m *ExtensionType) MarshalTo(dAtA []byte) (int, error)

func (*ExtensionType) MarshalToSizedBuffer

func (m *ExtensionType) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExtensionType) ProtoMessage

func (*ExtensionType) ProtoMessage()

func (*ExtensionType) Reset

func (m *ExtensionType) Reset()

func (*ExtensionType) Size

func (m *ExtensionType) Size() (n int)

func (*ExtensionType) String

func (this *ExtensionType) String() string

func (*ExtensionType) Unmarshal

func (m *ExtensionType) Unmarshal(dAtA []byte) error

func (*ExtensionType) XXX_DiscardUnknown

func (m *ExtensionType) XXX_DiscardUnknown()

func (*ExtensionType) XXX_Marshal

func (m *ExtensionType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExtensionType) XXX_Merge

func (m *ExtensionType) XXX_Merge(src proto.Message)

func (*ExtensionType) XXX_OneofWrappers

func (*ExtensionType) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ExtensionType) XXX_Size

func (m *ExtensionType) XXX_Size() int

func (*ExtensionType) XXX_Unmarshal

func (m *ExtensionType) XXX_Unmarshal(b []byte) error

type ExtensionType_I32

type ExtensionType_I32 struct {
	I32 int32 `protobuf:"varint,6,opt,name=i32,proto3,oneof"`
}

func (*ExtensionType_I32) Equal

func (this *ExtensionType_I32) Equal(that interface{}) bool

func (*ExtensionType_I32) GoString

func (this *ExtensionType_I32) GoString() string

func (*ExtensionType_I32) MarshalTo

func (m *ExtensionType_I32) MarshalTo(dAtA []byte) (int, error)

func (*ExtensionType_I32) MarshalToSizedBuffer

func (m *ExtensionType_I32) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExtensionType_I32) Size

func (m *ExtensionType_I32) Size() (n int)

func (*ExtensionType_I32) String

func (this *ExtensionType_I32) String() string

type ExtensionType_St

type ExtensionType_St struct {
	St string `protobuf:"bytes,7,opt,name=st,proto3,oneof"`
}

func (*ExtensionType_St) Equal

func (this *ExtensionType_St) Equal(that interface{}) bool

func (*ExtensionType_St) GoString

func (this *ExtensionType_St) GoString() string

func (*ExtensionType_St) MarshalTo

func (m *ExtensionType_St) MarshalTo(dAtA []byte) (int, error)

func (*ExtensionType_St) MarshalToSizedBuffer

func (m *ExtensionType_St) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExtensionType_St) Size

func (m *ExtensionType_St) Size() (n int)

func (*ExtensionType_St) String

func (this *ExtensionType_St) String() string

type ManyAnswers

type ManyAnswers struct {
	Answers []*Answer `protobuf:"bytes,1,rep,name=answers,proto3" json:"answers,omitempty"`
}

func (*ManyAnswers) Descriptor

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

func (*ManyAnswers) Equal

func (this *ManyAnswers) Equal(that interface{}) bool

func (*ManyAnswers) GetAnswers

func (m *ManyAnswers) GetAnswers() []*Answer

func (*ManyAnswers) GoString

func (this *ManyAnswers) GoString() string

func (*ManyAnswers) Marshal

func (m *ManyAnswers) Marshal() (dAtA []byte, err error)

func (*ManyAnswers) MarshalTo

func (m *ManyAnswers) MarshalTo(dAtA []byte) (int, error)

func (*ManyAnswers) MarshalToSizedBuffer

func (m *ManyAnswers) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ManyAnswers) ProtoMessage

func (*ManyAnswers) ProtoMessage()

func (*ManyAnswers) Reset

func (m *ManyAnswers) Reset()

func (*ManyAnswers) Size

func (m *ManyAnswers) Size() (n int)

func (*ManyAnswers) String

func (this *ManyAnswers) String() string

func (*ManyAnswers) Unmarshal

func (m *ManyAnswers) Unmarshal(dAtA []byte) error

func (*ManyAnswers) XXX_DiscardUnknown

func (m *ManyAnswers) XXX_DiscardUnknown()

func (*ManyAnswers) XXX_Marshal

func (m *ManyAnswers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ManyAnswers) XXX_Merge

func (m *ManyAnswers) XXX_Merge(src proto.Message)

func (*ManyAnswers) XXX_Size

func (m *ManyAnswers) XXX_Size() int

func (*ManyAnswers) XXX_Unmarshal

func (m *ManyAnswers) XXX_Unmarshal(b []byte) error

type ManyClients

type ManyClients struct {
	Clients []*Client `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"`
}

func (*ManyClients) Descriptor

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

func (*ManyClients) Equal

func (this *ManyClients) Equal(that interface{}) bool

func (*ManyClients) GetClients

func (m *ManyClients) GetClients() []*Client

func (*ManyClients) GoString

func (this *ManyClients) GoString() string

func (*ManyClients) Marshal

func (m *ManyClients) Marshal() (dAtA []byte, err error)

func (*ManyClients) MarshalTo

func (m *ManyClients) MarshalTo(dAtA []byte) (int, error)

func (*ManyClients) MarshalToSizedBuffer

func (m *ManyClients) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ManyClients) ProtoMessage

func (*ManyClients) ProtoMessage()

func (*ManyClients) Reset

func (m *ManyClients) Reset()

func (*ManyClients) Size

func (m *ManyClients) Size() (n int)

func (*ManyClients) String

func (this *ManyClients) String() string

func (*ManyClients) Unmarshal

func (m *ManyClients) Unmarshal(dAtA []byte) error

func (*ManyClients) XXX_DiscardUnknown

func (m *ManyClients) XXX_DiscardUnknown()

func (*ManyClients) XXX_Marshal

func (m *ManyClients) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ManyClients) XXX_Merge

func (m *ManyClients) XXX_Merge(src proto.Message)

func (*ManyClients) XXX_Size

func (m *ManyClients) XXX_Size() int

func (*ManyClients) XXX_Unmarshal

func (m *ManyClients) XXX_Unmarshal(b []byte) error

type NormalType

type NormalType struct {
	I32 int32   `protobuf:"varint,1,opt,name=i32,proto3" json:"i32,omitempty"`
	I64 int64   `protobuf:"varint,2,opt,name=i64,proto3" json:"i64,omitempty"`
	U32 uint32  `protobuf:"varint,3,opt,name=u32,proto3" json:"u32,omitempty"`
	U64 uint64  `protobuf:"varint,4,opt,name=u64,proto3" json:"u64,omitempty"`
	Fl  float32 `protobuf:"fixed32,5,opt,name=fl,proto3" json:"fl,omitempty"`
	Db  float64 `protobuf:"fixed64,6,opt,name=db,proto3" json:"db,omitempty"`
	Bl  bool    `protobuf:"varint,7,opt,name=bl,proto3" json:"bl,omitempty"`
	St  string  `protobuf:"bytes,8,opt,name=st,proto3" json:"st,omitempty"`
	Bt  []byte  `protobuf:"bytes,9,opt,name=bt,proto3" json:"bt,omitempty"`
}

func (*NormalType) Descriptor

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

func (*NormalType) Equal

func (this *NormalType) Equal(that interface{}) bool

func (*NormalType) GetBl

func (m *NormalType) GetBl() bool

func (*NormalType) GetBt

func (m *NormalType) GetBt() []byte

func (*NormalType) GetDb

func (m *NormalType) GetDb() float64

func (*NormalType) GetFl

func (m *NormalType) GetFl() float32

func (*NormalType) GetI32

func (m *NormalType) GetI32() int32

func (*NormalType) GetI64

func (m *NormalType) GetI64() int64

func (*NormalType) GetSt

func (m *NormalType) GetSt() string

func (*NormalType) GetU32

func (m *NormalType) GetU32() uint32

func (*NormalType) GetU64

func (m *NormalType) GetU64() uint64

func (*NormalType) GoString

func (this *NormalType) GoString() string

func (*NormalType) Marshal

func (m *NormalType) Marshal() (dAtA []byte, err error)

func (*NormalType) MarshalTo

func (m *NormalType) MarshalTo(dAtA []byte) (int, error)

func (*NormalType) MarshalToSizedBuffer

func (m *NormalType) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NormalType) ProtoMessage

func (*NormalType) ProtoMessage()

func (*NormalType) Reset

func (m *NormalType) Reset()

func (*NormalType) Size

func (m *NormalType) Size() (n int)

func (*NormalType) String

func (this *NormalType) String() string

func (*NormalType) Unmarshal

func (m *NormalType) Unmarshal(dAtA []byte) error

func (*NormalType) XXX_DiscardUnknown

func (m *NormalType) XXX_DiscardUnknown()

func (*NormalType) XXX_Marshal

func (m *NormalType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NormalType) XXX_Merge

func (m *NormalType) XXX_Merge(src proto.Message)

func (*NormalType) XXX_Size

func (m *NormalType) XXX_Size() int

func (*NormalType) XXX_Unmarshal

func (m *NormalType) XXX_Unmarshal(b []byte) error

type SampleServiceClient

type SampleServiceClient interface {
	// UnaryAsk is unary ask.
	UnaryAsk(ctx context.Context, in *Client, opts ...grpc.CallOption) (*Answer, error)
	// ServerStreamingRespondManytimes is server side streaming. 1 to many
	ServerStreamingRespondManytimes(ctx context.Context, in *ManyClients, opts ...grpc.CallOption) (SampleService_ServerStreamingRespondManytimesClient, error)
	// ClientStreamingAskManytimes is client side streaming.
	ClientStreamingAskManytimes(ctx context.Context, opts ...grpc.CallOption) (SampleService_ClientStreamingAskManytimesClient, error)
	// BidirectionalStreamingEcho is bidi streaming.
	BidirectionalStreaming(ctx context.Context, opts ...grpc.CallOption) (SampleService_BidirectionalStreamingClient, error)
}

SampleServiceClient is the client API for SampleService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSampleServiceClient

func NewSampleServiceClient(cc *grpc.ClientConn) SampleServiceClient

type SampleServiceServer

type SampleServiceServer interface {
	// UnaryAsk is unary ask.
	UnaryAsk(context.Context, *Client) (*Answer, error)
	// ServerStreamingRespondManytimes is server side streaming. 1 to many
	ServerStreamingRespondManytimes(*ManyClients, SampleService_ServerStreamingRespondManytimesServer) error
	// ClientStreamingAskManytimes is client side streaming.
	ClientStreamingAskManytimes(SampleService_ClientStreamingAskManytimesServer) error
	// BidirectionalStreamingEcho is bidi streaming.
	BidirectionalStreaming(SampleService_BidirectionalStreamingServer) error
}

SampleServiceServer is the server API for SampleService service.

type SampleService_BidirectionalStreamingClient

type SampleService_BidirectionalStreamingClient interface {
	Send(*Client) error
	Recv() (*Answer, error)
	grpc.ClientStream
}

type SampleService_BidirectionalStreamingServer

type SampleService_BidirectionalStreamingServer interface {
	Send(*Answer) error
	Recv() (*Client, error)
	grpc.ServerStream
}

type SampleService_ClientStreamingAskManytimesClient

type SampleService_ClientStreamingAskManytimesClient interface {
	Send(*Client) error
	CloseAndRecv() (*ManyAnswers, error)
	grpc.ClientStream
}

type SampleService_ClientStreamingAskManytimesServer

type SampleService_ClientStreamingAskManytimesServer interface {
	SendAndClose(*ManyAnswers) error
	Recv() (*Client, error)
	grpc.ServerStream
}

type SampleService_ServerStreamingRespondManytimesClient

type SampleService_ServerStreamingRespondManytimesClient interface {
	Recv() (*Answer, error)
	grpc.ClientStream
}

type SampleService_ServerStreamingRespondManytimesServer

type SampleService_ServerStreamingRespondManytimesServer interface {
	Send(*Answer) error
	grpc.ServerStream
}

type UnimplementedSampleServiceServer

type UnimplementedSampleServiceServer struct {
}

UnimplementedSampleServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedSampleServiceServer) BidirectionalStreaming

func (*UnimplementedSampleServiceServer) ClientStreamingAskManytimes

func (*UnimplementedSampleServiceServer) ServerStreamingRespondManytimes

func (*UnimplementedSampleServiceServer) UnaryAsk

Jump to

Keyboard shortcuts

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