model

package
v0.0.0-...-993f245 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Pair) GetKey

func (m *Pair) GetKey() int32

func (*Pair) GetValues

func (m *Pair) GetValues() string

func (*Pair) ProtoMessage

func (*Pair) ProtoMessage()

func (*Pair) Reset

func (m *Pair) Reset()

func (*Pair) String

func (m *Pair) String() string

func (*Pair) XXX_DiscardUnknown

func (m *Pair) XXX_DiscardUnknown()

func (*Pair) XXX_Marshal

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

func (*Pair) XXX_Merge

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

func (*Pair) XXX_Size

func (m *Pair) XXX_Size() int

func (*Pair) XXX_Unmarshal

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

type RespType

type RespType int32
const (
	RespType_NONE    RespType = 0
	RespType_ASCEND  RespType = 1
	RespType_DESCEND RespType = 2
)

func (RespType) EnumDescriptor

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

func (RespType) String

func (x RespType) String() string

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) Descriptor() ([]byte, []int)

func (*SayParam) GetMsg

func (m *SayParam) GetMsg() string

func (*SayParam) ProtoMessage

func (*SayParam) ProtoMessage()

func (*SayParam) Reset

func (m *SayParam) Reset()

func (*SayParam) String

func (m *SayParam) String() string

func (*SayParam) XXX_DiscardUnknown

func (m *SayParam) XXX_DiscardUnknown()

func (*SayParam) XXX_Marshal

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

func (*SayParam) XXX_Merge

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

func (*SayParam) XXX_Size

func (m *SayParam) XXX_Size() int

func (*SayParam) XXX_Unmarshal

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

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

Jump to

Keyboard shortcuts

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