Documentation ¶
Index ¶
- Variables
- func RegisterDemoAPIServer(s *grpc.Server, srv DemoAPIServer)
- type Add2Reply
- type Add2Request
- func (*Add2Request) Descriptor() ([]byte, []int)deprecated
- func (x *Add2Request) GetA() int32
- func (x *Add2Request) GetB() int32
- func (x *Add2Request) GetUserId() string
- func (*Add2Request) ProtoMessage()
- func (x *Add2Request) ProtoReflect() protoreflect.Message
- func (x *Add2Request) Reset()
- func (x *Add2Request) String() string
- type AddReply
- func (*AddReply) Descriptor() ([]byte, []int)deprecated
- func (x *AddReply) GetE() EnumTyp
- func (x *AddReply) GetF() *Nest
- func (x *AddReply) GetSum() int32
- func (*AddReply) ProtoMessage()
- func (x *AddReply) ProtoReflect() protoreflect.Message
- func (x *AddReply) Reset()
- func (x *AddReply) String() string
- type AddRequest
- type DemoAPIClient
- type DemoAPIServer
- type EnumTyp
- type Nest
- func (*Nest) Descriptor() ([]byte, []int)deprecated
- func (x *Nest) GetA() int64
- func (x *Nest) GetB() *Nest
- func (x *Nest) GetD() *Nest_NestMsg
- func (x *Nest) GetE() Nest_NestEnum
- func (*Nest) ProtoMessage()
- func (x *Nest) ProtoReflect() protoreflect.Message
- func (x *Nest) Reset()
- func (x *Nest) String() string
- type Nest_NestEnum
- func (Nest_NestEnum) Descriptor() protoreflect.EnumDescriptor
- func (x Nest_NestEnum) Enum() *Nest_NestEnum
- func (Nest_NestEnum) EnumDescriptor() ([]byte, []int)deprecated
- func (x Nest_NestEnum) Number() protoreflect.EnumNumber
- func (x Nest_NestEnum) String() string
- func (Nest_NestEnum) Type() protoreflect.EnumType
- type Nest_NestMsg
- type RequestBindReq
- func (*RequestBindReq) Descriptor() ([]byte, []int)deprecated
- func (x *RequestBindReq) GetFromCtx() string
- func (x *RequestBindReq) GetFromForm() string
- func (x *RequestBindReq) GetFromHeader() string
- func (x *RequestBindReq) GetFromParams() string
- func (x *RequestBindReq) GetFromQuery() string
- func (*RequestBindReq) ProtoMessage()
- func (x *RequestBindReq) ProtoReflect() protoreflect.Message
- func (x *RequestBindReq) Reset()
- func (x *RequestBindReq) String() string
- type RequestBindResp
- func (*RequestBindResp) Descriptor() ([]byte, []int)deprecated
- func (x *RequestBindResp) GetCtx() string
- func (x *RequestBindResp) GetForm() string
- func (x *RequestBindResp) GetHeader() string
- func (x *RequestBindResp) GetParams() string
- func (x *RequestBindResp) GetQuery() string
- func (*RequestBindResp) ProtoMessage()
- func (x *RequestBindResp) ProtoReflect() protoreflect.Message
- func (x *RequestBindResp) Reset()
- func (x *RequestBindResp) String() string
- type SubReq
- type SubReq2
- type SubResp
- type SubResp2
- type UnimplementedDemoAPIServer
- func (*UnimplementedDemoAPIServer) Add(context.Context, *AddRequest) (*AddReply, error)
- func (*UnimplementedDemoAPIServer) Add2(context.Context, *Add2Request) (*Add2Reply, error)
- func (*UnimplementedDemoAPIServer) RequestBind(context.Context, *RequestBindReq) (*RequestBindResp, error)
- func (*UnimplementedDemoAPIServer) Sub(context.Context, *SubReq) (*SubResp, error)
- func (*UnimplementedDemoAPIServer) Sub2(context.Context, *SubReq2) (*SubResp2, error)
Constants ¶
This section is empty.
Variables ¶
var ( EnumTyp_name = map[int32]string{ 0: "m", 1: "n", } EnumTyp_value = map[string]int32{ "m": 0, "n": 1, } )
Enum value maps for EnumTyp.
var ( Nest_NestEnum_name = map[int32]string{ 0: "i", 1: "j", } Nest_NestEnum_value = map[string]int32{ "i": 0, "j": 1, } )
Enum value maps for Nest_NestEnum.
var File_http_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDemoAPIServer ¶
func RegisterDemoAPIServer(s *grpc.Server, srv DemoAPIServer)
Types ¶
type Add2Reply ¶
type Add2Reply struct { Sum int32 `protobuf:"varint,1,opt,name=sum,proto3" json:"sum,omitempty"` Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
func (*Add2Reply) Descriptor
deprecated
func (*Add2Reply) ProtoMessage ¶
func (*Add2Reply) ProtoMessage()
func (*Add2Reply) ProtoReflect ¶
func (x *Add2Reply) ProtoReflect() protoreflect.Message
type Add2Request ¶
type Add2Request struct { A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` B int32 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` UserId string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"` // contains filtered or unexported fields }
func (*Add2Request) Descriptor
deprecated
func (*Add2Request) Descriptor() ([]byte, []int)
Deprecated: Use Add2Request.ProtoReflect.Descriptor instead.
func (*Add2Request) GetA ¶
func (x *Add2Request) GetA() int32
func (*Add2Request) GetB ¶
func (x *Add2Request) GetB() int32
func (*Add2Request) GetUserId ¶
func (x *Add2Request) GetUserId() string
func (*Add2Request) ProtoMessage ¶
func (*Add2Request) ProtoMessage()
func (*Add2Request) ProtoReflect ¶
func (x *Add2Request) ProtoReflect() protoreflect.Message
func (*Add2Request) Reset ¶
func (x *Add2Request) Reset()
func (*Add2Request) String ¶
func (x *Add2Request) String() string
type AddReply ¶
type AddReply struct { Sum int32 `protobuf:"varint,1,opt,name=sum,proto3" json:"sum,omitempty"` E EnumTyp `protobuf:"varint,2,opt,name=e,proto3,enum=service.demo.EnumTyp" json:"e,omitempty"` F *Nest `protobuf:"bytes,3,opt,name=f,proto3" json:"f,omitempty"` // contains filtered or unexported fields }
func (*AddReply) Descriptor
deprecated
func (*AddReply) ProtoMessage ¶
func (*AddReply) ProtoMessage()
func (*AddReply) ProtoReflect ¶
func (x *AddReply) ProtoReflect() protoreflect.Message
type AddRequest ¶
type AddRequest struct { A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` B int32 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` // contains filtered or unexported fields }
func (*AddRequest) Descriptor
deprecated
func (*AddRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
func (*AddRequest) GetA ¶
func (x *AddRequest) GetA() int32
func (*AddRequest) GetB ¶
func (x *AddRequest) GetB() int32
func (*AddRequest) ProtoMessage ¶
func (*AddRequest) ProtoMessage()
func (*AddRequest) ProtoReflect ¶
func (x *AddRequest) ProtoReflect() protoreflect.Message
func (*AddRequest) Reset ¶
func (x *AddRequest) Reset()
func (*AddRequest) String ¶
func (x *AddRequest) String() string
type DemoAPIClient ¶
type DemoAPIClient interface { Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddReply, error) Add2(ctx context.Context, in *Add2Request, opts ...grpc.CallOption) (*Add2Reply, error) Sub(ctx context.Context, in *SubReq, opts ...grpc.CallOption) (*SubResp, error) Sub2(ctx context.Context, in *SubReq2, opts ...grpc.CallOption) (*SubResp2, error) RequestBind(ctx context.Context, in *RequestBindReq, opts ...grpc.CallOption) (*RequestBindResp, error) }
DemoAPIClient is the client API for DemoAPI service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewDemoAPIClient ¶
func NewDemoAPIClient(cc grpc.ClientConnInterface) DemoAPIClient
type DemoAPIServer ¶
type DemoAPIServer interface { Add(context.Context, *AddRequest) (*AddReply, error) Add2(context.Context, *Add2Request) (*Add2Reply, error) Sub(context.Context, *SubReq) (*SubResp, error) Sub2(context.Context, *SubReq2) (*SubResp2, error) RequestBind(context.Context, *RequestBindReq) (*RequestBindResp, error) }
DemoAPIServer is the server API for DemoAPI service.
type EnumTyp ¶
type EnumTyp int32
func (EnumTyp) Descriptor ¶
func (EnumTyp) Descriptor() protoreflect.EnumDescriptor
func (EnumTyp) EnumDescriptor
deprecated
func (EnumTyp) Number ¶
func (x EnumTyp) Number() protoreflect.EnumNumber
func (EnumTyp) Type ¶
func (EnumTyp) Type() protoreflect.EnumType
type Nest ¶
type Nest struct { A int64 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` B *Nest `protobuf:"bytes,2,opt,name=b,proto3" json:"b,omitempty"` D *Nest_NestMsg `protobuf:"bytes,3,opt,name=d,proto3" json:"d,omitempty"` E Nest_NestEnum `protobuf:"varint,4,opt,name=e,proto3,enum=service.demo.Nest_NestEnum" json:"e,omitempty"` // contains filtered or unexported fields }
func (*Nest) Descriptor
deprecated
func (*Nest) GetD ¶
func (x *Nest) GetD() *Nest_NestMsg
func (*Nest) GetE ¶
func (x *Nest) GetE() Nest_NestEnum
func (*Nest) ProtoMessage ¶
func (*Nest) ProtoMessage()
func (*Nest) ProtoReflect ¶
func (x *Nest) ProtoReflect() protoreflect.Message
type Nest_NestEnum ¶
type Nest_NestEnum int32
const ( Nest_i Nest_NestEnum = 0 Nest_j Nest_NestEnum = 1 )
func (Nest_NestEnum) Descriptor ¶
func (Nest_NestEnum) Descriptor() protoreflect.EnumDescriptor
func (Nest_NestEnum) Enum ¶
func (x Nest_NestEnum) Enum() *Nest_NestEnum
func (Nest_NestEnum) EnumDescriptor
deprecated
func (Nest_NestEnum) EnumDescriptor() ([]byte, []int)
Deprecated: Use Nest_NestEnum.Descriptor instead.
func (Nest_NestEnum) Number ¶
func (x Nest_NestEnum) Number() protoreflect.EnumNumber
func (Nest_NestEnum) String ¶
func (x Nest_NestEnum) String() string
func (Nest_NestEnum) Type ¶
func (Nest_NestEnum) Type() protoreflect.EnumType
type Nest_NestMsg ¶
type Nest_NestMsg struct { C *Nest `protobuf:"bytes,1,opt,name=c,proto3" json:"c,omitempty"` // contains filtered or unexported fields }
func (*Nest_NestMsg) Descriptor
deprecated
func (*Nest_NestMsg) Descriptor() ([]byte, []int)
Deprecated: Use Nest_NestMsg.ProtoReflect.Descriptor instead.
func (*Nest_NestMsg) GetC ¶
func (x *Nest_NestMsg) GetC() *Nest
func (*Nest_NestMsg) ProtoMessage ¶
func (*Nest_NestMsg) ProtoMessage()
func (*Nest_NestMsg) ProtoReflect ¶
func (x *Nest_NestMsg) ProtoReflect() protoreflect.Message
func (*Nest_NestMsg) Reset ¶
func (x *Nest_NestMsg) Reset()
func (*Nest_NestMsg) String ¶
func (x *Nest_NestMsg) String() string
type RequestBindReq ¶
type RequestBindReq struct { FromForm string `protobuf:"bytes,1,opt,name=from_form,json=fromForm,proto3" json:"from_form,omitempty"` FromCtx string `protobuf:"bytes,2,opt,name=from_ctx,json=fromCtx,proto3" json:"from_ctx,omitempty"` FromQuery string `protobuf:"bytes,3,opt,name=from_query,json=fromQuery,proto3" json:"from_query,omitempty"` FromHeader string `protobuf:"bytes,4,opt,name=from_header,json=fromHeader,proto3" json:"from_header,omitempty"` FromParams string `protobuf:"bytes,5,opt,name=from_params,json=fromParams,proto3" json:"from_params,omitempty"` // contains filtered or unexported fields }
func (*RequestBindReq) Descriptor
deprecated
func (*RequestBindReq) Descriptor() ([]byte, []int)
Deprecated: Use RequestBindReq.ProtoReflect.Descriptor instead.
func (*RequestBindReq) GetFromCtx ¶
func (x *RequestBindReq) GetFromCtx() string
func (*RequestBindReq) GetFromForm ¶
func (x *RequestBindReq) GetFromForm() string
func (*RequestBindReq) GetFromHeader ¶
func (x *RequestBindReq) GetFromHeader() string
func (*RequestBindReq) GetFromParams ¶
func (x *RequestBindReq) GetFromParams() string
func (*RequestBindReq) GetFromQuery ¶
func (x *RequestBindReq) GetFromQuery() string
func (*RequestBindReq) ProtoMessage ¶
func (*RequestBindReq) ProtoMessage()
func (*RequestBindReq) ProtoReflect ¶
func (x *RequestBindReq) ProtoReflect() protoreflect.Message
func (*RequestBindReq) Reset ¶
func (x *RequestBindReq) Reset()
func (*RequestBindReq) String ¶
func (x *RequestBindReq) String() string
type RequestBindResp ¶
type RequestBindResp struct { Form string `protobuf:"bytes,1,opt,name=form,proto3" json:"form,omitempty"` Ctx string `protobuf:"bytes,2,opt,name=ctx,proto3" json:"ctx,omitempty"` Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` Header string `protobuf:"bytes,4,opt,name=header,proto3" json:"header,omitempty"` Params string `protobuf:"bytes,5,opt,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*RequestBindResp) Descriptor
deprecated
func (*RequestBindResp) Descriptor() ([]byte, []int)
Deprecated: Use RequestBindResp.ProtoReflect.Descriptor instead.
func (*RequestBindResp) GetCtx ¶
func (x *RequestBindResp) GetCtx() string
func (*RequestBindResp) GetForm ¶
func (x *RequestBindResp) GetForm() string
func (*RequestBindResp) GetHeader ¶
func (x *RequestBindResp) GetHeader() string
func (*RequestBindResp) GetParams ¶
func (x *RequestBindResp) GetParams() string
func (*RequestBindResp) GetQuery ¶
func (x *RequestBindResp) GetQuery() string
func (*RequestBindResp) ProtoMessage ¶
func (*RequestBindResp) ProtoMessage()
func (*RequestBindResp) ProtoReflect ¶
func (x *RequestBindResp) ProtoReflect() protoreflect.Message
func (*RequestBindResp) Reset ¶
func (x *RequestBindResp) Reset()
func (*RequestBindResp) String ¶
func (x *RequestBindResp) String() string
type SubReq ¶
type SubReq struct { A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` B int32 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` // contains filtered or unexported fields }
func (*SubReq) Descriptor
deprecated
func (*SubReq) ProtoMessage ¶
func (*SubReq) ProtoMessage()
func (*SubReq) ProtoReflect ¶
func (x *SubReq) ProtoReflect() protoreflect.Message
type SubReq2 ¶
type SubReq2 struct { A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` B int32 `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"` // contains filtered or unexported fields }
func (*SubReq2) Descriptor
deprecated
func (*SubReq2) ProtoMessage ¶
func (*SubReq2) ProtoMessage()
func (*SubReq2) ProtoReflect ¶
func (x *SubReq2) ProtoReflect() protoreflect.Message
type SubResp ¶
type SubResp struct { Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*SubResp) Descriptor
deprecated
func (*SubResp) ProtoMessage ¶
func (*SubResp) ProtoMessage()
func (*SubResp) ProtoReflect ¶
func (x *SubResp) ProtoReflect() protoreflect.Message
type SubResp2 ¶
type SubResp2 struct { Result int32 `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*SubResp2) Descriptor
deprecated
func (*SubResp2) ProtoMessage ¶
func (*SubResp2) ProtoMessage()
func (*SubResp2) ProtoReflect ¶
func (x *SubResp2) ProtoReflect() protoreflect.Message
type UnimplementedDemoAPIServer ¶
type UnimplementedDemoAPIServer struct { }
UnimplementedDemoAPIServer can be embedded to have forward compatible implementations.
func (*UnimplementedDemoAPIServer) Add ¶
func (*UnimplementedDemoAPIServer) Add(context.Context, *AddRequest) (*AddReply, error)
func (*UnimplementedDemoAPIServer) Add2 ¶
func (*UnimplementedDemoAPIServer) Add2(context.Context, *Add2Request) (*Add2Reply, error)
func (*UnimplementedDemoAPIServer) RequestBind ¶
func (*UnimplementedDemoAPIServer) RequestBind(context.Context, *RequestBindReq) (*RequestBindResp, error)