pbs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PersonReply_Sex_name = map[int32]string{
	0: "FEMALE",
	1: "MALE",
}
View Source
var PersonReply_Sex_value = map[string]int32{
	"FEMALE": 0,
	"MALE":   1,
}

Functions

func RegisterPersonServer

func RegisterPersonServer(s *grpc.Server, srv PersonServer)

Types

type Append

type Append struct {
	Educational          []*Append_Educational `protobuf:"bytes,1,rep,name=educational,proto3" json:"educational,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

附加信息

func (*Append) Descriptor

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

func (*Append) GetEducational

func (m *Append) GetEducational() []*Append_Educational

func (*Append) ProtoMessage

func (*Append) ProtoMessage()

func (*Append) Reset

func (m *Append) Reset()

func (*Append) String

func (m *Append) String() string

func (*Append) XXX_DiscardUnknown

func (m *Append) XXX_DiscardUnknown()

func (*Append) XXX_Marshal

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

func (*Append) XXX_Merge

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

func (*Append) XXX_Size

func (m *Append) XXX_Size() int

func (*Append) XXX_Unmarshal

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

type Append_Educational

type Append_Educational struct {
	University           string   `protobuf:"bytes,1,opt,name=university,proto3" json:"university,omitempty"`
	Specialty            []string `protobuf:"bytes,2,rep,name=specialty,proto3" json:"specialty,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Append_Educational) Descriptor

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

func (*Append_Educational) GetSpecialty

func (m *Append_Educational) GetSpecialty() []string

func (*Append_Educational) GetUniversity

func (m *Append_Educational) GetUniversity() string

func (*Append_Educational) ProtoMessage

func (*Append_Educational) ProtoMessage()

func (*Append_Educational) Reset

func (m *Append_Educational) Reset()

func (*Append_Educational) String

func (m *Append_Educational) String() string

func (*Append_Educational) XXX_DiscardUnknown

func (m *Append_Educational) XXX_DiscardUnknown()

func (*Append_Educational) XXX_Marshal

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

func (*Append_Educational) XXX_Merge

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

func (*Append_Educational) XXX_Size

func (m *Append_Educational) XXX_Size() int

func (*Append_Educational) XXX_Unmarshal

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

type ChatMsg

type ChatMsg struct {
	Talker  *string `protobuf:"bytes,1,req,name=talker" json:"talker,omitempty"`
	Content *string `protobuf:"bytes,2,req,name=content" json:"content,omitempty"`
	// 必传 1:文本消息. 2:图片URL 3:视频URL 4:语音URL 5:名片 6:文章 7:位置 8:红包
	MsgType              *int32   `protobuf:"varint,3,req,name=msgType" json:"msgType,omitempty"`
	ReceiveWxId          *string  `protobuf:"bytes,4,req,name=receiveWxId" json:"receiveWxId,omitempty"`
	ThImgVideo           *string  `protobuf:"bytes,5,opt,name=thImgVideo" json:"thImgVideo,omitempty"`
	Videolength          *int32   `protobuf:"varint,6,opt,name=videolength" json:"videolength,omitempty"`
	CreateTime           *int64   `protobuf:"varint,7,req,name=createTime" json:"createTime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

消息实体

func (*ChatMsg) Descriptor

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

func (*ChatMsg) GetContent

func (m *ChatMsg) GetContent() string

func (*ChatMsg) GetCreateTime

func (m *ChatMsg) GetCreateTime() int64

func (*ChatMsg) GetMsgType

func (m *ChatMsg) GetMsgType() int32

func (*ChatMsg) GetReceiveWxId

func (m *ChatMsg) GetReceiveWxId() string

func (*ChatMsg) GetTalker

func (m *ChatMsg) GetTalker() string

func (*ChatMsg) GetThImgVideo

func (m *ChatMsg) GetThImgVideo() string

func (*ChatMsg) GetVideolength

func (m *ChatMsg) GetVideolength() int32

func (*ChatMsg) ProtoMessage

func (*ChatMsg) ProtoMessage()

func (*ChatMsg) Reset

func (m *ChatMsg) Reset()

func (*ChatMsg) String

func (m *ChatMsg) String() string

func (*ChatMsg) XXX_DiscardUnknown

func (m *ChatMsg) XXX_DiscardUnknown()

func (*ChatMsg) XXX_Marshal

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

func (*ChatMsg) XXX_Merge

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

func (*ChatMsg) XXX_Size

func (m *ChatMsg) XXX_Size() int

func (*ChatMsg) XXX_Unmarshal

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

type Identity

type Identity struct {
	ShopId               *int32   `protobuf:"varint,1,req,name=shopId" json:"shopId,omitempty"`
	UserId               *int32   `protobuf:"varint,2,req,name=userId" json:"userId,omitempty"`
	Token                *string  `protobuf:"bytes,3,req,name=token" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Identity) Descriptor

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

func (*Identity) GetShopId

func (m *Identity) GetShopId() int32

func (*Identity) GetToken

func (m *Identity) GetToken() string

func (*Identity) GetUserId

func (m *Identity) GetUserId() int32

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) Reset

func (m *Identity) Reset()

func (*Identity) String

func (m *Identity) String() string

func (*Identity) XXX_DiscardUnknown

func (m *Identity) XXX_DiscardUnknown()

func (*Identity) XXX_Marshal

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

func (*Identity) XXX_Merge

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

func (*Identity) XXX_Size

func (m *Identity) XXX_Size() int

func (*Identity) XXX_Unmarshal

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

type Operation

type Operation struct {
	Cmd                  *int32   `protobuf:"varint,1,req,name=cmd" json:"cmd,omitempty"`
	Data                 *string  `protobuf:"bytes,2,req,name=data" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Operation) Descriptor

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

func (*Operation) GetCmd

func (m *Operation) GetCmd() int32

func (*Operation) GetData

func (m *Operation) GetData() string

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) Reset

func (m *Operation) Reset()

func (*Operation) String

func (m *Operation) String() string

func (*Operation) XXX_DiscardUnknown

func (m *Operation) XXX_DiscardUnknown()

func (*Operation) XXX_Marshal

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

func (*Operation) XXX_Merge

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

func (*Operation) XXX_Size

func (m *Operation) XXX_Size() int

func (*Operation) XXX_Unmarshal

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

type PersonClient

type PersonClient interface {
	// 传入一个姓名,返回相应的个人信息
	GetPersonInfoHandler(ctx context.Context, in *PersonRequest, opts ...grpc.CallOption) (*PersonReply, error)
}

PersonClient is the client API for Person service.

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

func NewPersonClient

func NewPersonClient(cc *grpc.ClientConn) PersonClient

type PersonReply

type PersonReply struct {
	Name                 string              `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	IdCard               string              `protobuf:"bytes,2,opt,name=id_card,json=idCard,proto3" json:"id_card,omitempty"`
	Age                  int32               `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
	Sex                  PersonReply_Sex     `protobuf:"varint,4,opt,name=sex,proto3,enum=PersonReply_Sex" json:"sex,omitempty"`
	Married              bool                `protobuf:"varint,5,opt,name=married,proto3" json:"married,omitempty"`
	Amount               float64             `protobuf:"fixed64,6,opt,name=amount,proto3" json:"amount,omitempty"`
	Address              []string            `protobuf:"bytes,7,rep,name=address,proto3" json:"address,omitempty"`
	Educational          *Append_Educational `protobuf:"bytes,8,opt,name=educational,proto3" json:"educational,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

相应结果

func (*PersonReply) Descriptor

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

func (*PersonReply) GetAddress

func (m *PersonReply) GetAddress() []string

func (*PersonReply) GetAge

func (m *PersonReply) GetAge() int32

func (*PersonReply) GetAmount

func (m *PersonReply) GetAmount() float64

func (*PersonReply) GetEducational

func (m *PersonReply) GetEducational() *Append_Educational

func (*PersonReply) GetIdCard

func (m *PersonReply) GetIdCard() string

func (*PersonReply) GetMarried

func (m *PersonReply) GetMarried() bool

func (*PersonReply) GetName

func (m *PersonReply) GetName() string

func (*PersonReply) GetSex

func (m *PersonReply) GetSex() PersonReply_Sex

func (*PersonReply) ProtoMessage

func (*PersonReply) ProtoMessage()

func (*PersonReply) Reset

func (m *PersonReply) Reset()

func (*PersonReply) String

func (m *PersonReply) String() string

func (*PersonReply) XXX_DiscardUnknown

func (m *PersonReply) XXX_DiscardUnknown()

func (*PersonReply) XXX_Marshal

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

func (*PersonReply) XXX_Merge

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

func (*PersonReply) XXX_Size

func (m *PersonReply) XXX_Size() int

func (*PersonReply) XXX_Unmarshal

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

type PersonReply_Sex

type PersonReply_Sex int32
const (
	PersonReply_FEMALE PersonReply_Sex = 0
	PersonReply_MALE   PersonReply_Sex = 1
)

func (PersonReply_Sex) EnumDescriptor

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

func (PersonReply_Sex) String

func (x PersonReply_Sex) String() string

type PersonRequest

type PersonRequest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

请求参数

func (*PersonRequest) Descriptor

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

func (*PersonRequest) GetName

func (m *PersonRequest) GetName() string

func (*PersonRequest) ProtoMessage

func (*PersonRequest) ProtoMessage()

func (*PersonRequest) Reset

func (m *PersonRequest) Reset()

func (*PersonRequest) String

func (m *PersonRequest) String() string

func (*PersonRequest) XXX_DiscardUnknown

func (m *PersonRequest) XXX_DiscardUnknown()

func (*PersonRequest) XXX_Marshal

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

func (*PersonRequest) XXX_Merge

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

func (*PersonRequest) XXX_Size

func (m *PersonRequest) XXX_Size() int

func (*PersonRequest) XXX_Unmarshal

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

type PersonServer

type PersonServer interface {
	// 传入一个姓名,返回相应的个人信息
	GetPersonInfoHandler(context.Context, *PersonRequest) (*PersonReply, error)
}

PersonServer is the server API for Person service.

type UnimplementedPersonServer

type UnimplementedPersonServer struct {
}

UnimplementedPersonServer can be embedded to have forward compatible implementations.

func (*UnimplementedPersonServer) GetPersonInfoHandler

func (*UnimplementedPersonServer) GetPersonInfoHandler(ctx context.Context, req *PersonRequest) (*PersonReply, error)

Jump to

Keyboard shortcuts

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