Documentation ¶
Index ¶
- Variables
- func RegisterSayHandler(s server.Server, hdlr SayHandler, opts ...server.HandlerOption) error
- type Pair
- func (*Pair) Descriptor() ([]byte, []int)
- func (m *Pair) GetKey() int32
- func (m *Pair) GetValues() string
- func (*Pair) ProtoMessage()
- func (m *Pair) Reset()
- func (m *Pair) String() string
- func (m *Pair) XXX_DiscardUnknown()
- func (m *Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pair) XXX_Merge(src proto.Message)
- func (m *Pair) XXX_Size() int
- func (m *Pair) XXX_Unmarshal(b []byte) error
- type RespType
- type SayHandler
- type SayParam
- func (*SayParam) Descriptor() ([]byte, []int)
- func (m *SayParam) GetMsg() string
- func (*SayParam) ProtoMessage()
- func (m *SayParam) Reset()
- func (m *SayParam) String() string
- func (m *SayParam) XXX_DiscardUnknown()
- func (m *SayParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SayParam) XXX_Merge(src proto.Message)
- func (m *SayParam) XXX_Size() int
- func (m *SayParam) XXX_Unmarshal(b []byte) error
- type SayResponse
- func (*SayResponse) Descriptor() ([]byte, []int)
- func (m *SayResponse) GetHeader() map[string]*Pair
- func (m *SayResponse) GetMsg() string
- func (m *SayResponse) GetType() RespType
- func (m *SayResponse) GetValues() []string
- func (*SayResponse) ProtoMessage()
- func (m *SayResponse) Reset()
- func (m *SayResponse) String() string
- func (m *SayResponse) XXX_DiscardUnknown()
- func (m *SayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SayResponse) XXX_Merge(src proto.Message)
- func (m *SayResponse) XXX_Size() int
- func (m *SayResponse) XXX_Unmarshal(b []byte) error
- type SayService
Constants ¶
This section is empty.
Variables ¶
View Source
var RespType_name = map[int32]string{
0: "NONE",
1: "ASCEND",
2: "DESCEND",
}
View Source
var RespType_value = map[string]int32{
"NONE": 0,
"ASCEND": 1,
"DESCEND": 2,
}
Functions ¶
func RegisterSayHandler ¶
func RegisterSayHandler(s server.Server, hdlr SayHandler, opts ...server.HandlerOption) error
Types ¶
type Pair ¶
type Pair struct { Key int32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` Values string `protobuf:"bytes,2,opt,name=values,proto3" json:"values,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Pair) Descriptor ¶
func (*Pair) ProtoMessage ¶
func (*Pair) ProtoMessage()
func (*Pair) XXX_DiscardUnknown ¶
func (m *Pair) XXX_DiscardUnknown()
func (*Pair) XXX_Unmarshal ¶
type SayHandler ¶
type SayHandler interface {
Hello(context.Context, *SayParam, *SayResponse) error
}
type SayParam ¶
type SayParam struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SayParam) Descriptor ¶
func (*SayParam) ProtoMessage ¶
func (*SayParam) ProtoMessage()
func (*SayParam) XXX_DiscardUnknown ¶
func (m *SayParam) XXX_DiscardUnknown()
func (*SayParam) XXX_Marshal ¶
func (*SayParam) XXX_Unmarshal ¶
type SayResponse ¶
type SayResponse struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` // 数组 Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` // map Header map[string]*Pair `` /* 153-byte string literal not displayed */ Type RespType `protobuf:"varint,4,opt,name=type,proto3,enum=model.RespType" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SayResponse) Descriptor ¶
func (*SayResponse) Descriptor() ([]byte, []int)
func (*SayResponse) GetHeader ¶
func (m *SayResponse) GetHeader() map[string]*Pair
func (*SayResponse) GetMsg ¶
func (m *SayResponse) GetMsg() string
func (*SayResponse) GetType ¶
func (m *SayResponse) GetType() RespType
func (*SayResponse) GetValues ¶
func (m *SayResponse) GetValues() []string
func (*SayResponse) ProtoMessage ¶
func (*SayResponse) ProtoMessage()
func (*SayResponse) Reset ¶
func (m *SayResponse) Reset()
func (*SayResponse) String ¶
func (m *SayResponse) String() string
func (*SayResponse) XXX_DiscardUnknown ¶
func (m *SayResponse) XXX_DiscardUnknown()
func (*SayResponse) XXX_Marshal ¶
func (m *SayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SayResponse) XXX_Merge ¶
func (m *SayResponse) XXX_Merge(src proto.Message)
func (*SayResponse) XXX_Size ¶
func (m *SayResponse) XXX_Size() int
func (*SayResponse) XXX_Unmarshal ¶
func (m *SayResponse) XXX_Unmarshal(b []byte) error
type SayService ¶
type SayService interface {
Hello(ctx context.Context, in *SayParam, opts ...client.CallOption) (*SayResponse, error)
}
func NewSayService ¶
func NewSayService(name string, c client.Client) SayService
Click to show internal directories.
Click to hide internal directories.