proto

package
v0.0.0-...-632f8f1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWriteServiceServer

func RegisterWriteServiceServer(s *grpc.Server, srv WriteServiceServer)

Types

type ClientRequest

type ClientRequest struct {
	Item                 *Profile `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	Index                string   `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"`
	ElkType              string   `protobuf:"bytes,3,opt,name=elkType,proto3" json:"elkType,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

/ message 对应生成代码的 struct / 定义客户端请求的数据格式

func (*ClientRequest) Descriptor

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

func (*ClientRequest) GetElkType

func (m *ClientRequest) GetElkType() string

func (*ClientRequest) GetIndex

func (m *ClientRequest) GetIndex() string

func (*ClientRequest) GetItem

func (m *ClientRequest) GetItem() *Profile

func (*ClientRequest) ProtoMessage

func (*ClientRequest) ProtoMessage()

func (*ClientRequest) Reset

func (m *ClientRequest) Reset()

func (*ClientRequest) String

func (m *ClientRequest) String() string

func (*ClientRequest) XXX_DiscardUnknown

func (m *ClientRequest) XXX_DiscardUnknown()

func (*ClientRequest) XXX_Marshal

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

func (*ClientRequest) XXX_Merge

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

func (*ClientRequest) XXX_Size

func (m *ClientRequest) XXX_Size() int

func (*ClientRequest) XXX_Unmarshal

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

type ClientResponse

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

定义服务端响应的数据格式

func (*ClientResponse) Descriptor

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

func (*ClientResponse) GetReply

func (m *ClientResponse) GetReply() string

func (*ClientResponse) ProtoMessage

func (*ClientResponse) ProtoMessage()

func (*ClientResponse) Reset

func (m *ClientResponse) Reset()

func (*ClientResponse) String

func (m *ClientResponse) String() string

func (*ClientResponse) XXX_DiscardUnknown

func (m *ClientResponse) XXX_DiscardUnknown()

func (*ClientResponse) XXX_Marshal

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

func (*ClientResponse) XXX_Merge

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

func (*ClientResponse) XXX_Size

func (m *ClientResponse) XXX_Size() int

func (*ClientResponse) XXX_Unmarshal

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

type Profile

type Profile struct {
	Name                 string   `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Province             string   `protobuf:"bytes,2,opt,name=Province,proto3" json:"Province,omitempty"`
	Age                  string   `protobuf:"bytes,3,opt,name=Age,proto3" json:"Age,omitempty"`
	Constellation        string   `protobuf:"bytes,4,opt,name=Constellation,proto3" json:"Constellation,omitempty"`
	MarriedOrNot         string   `protobuf:"bytes,5,opt,name=MarriedOrNot,proto3" json:"MarriedOrNot,omitempty"`
	Height               string   `protobuf:"bytes,6,opt,name=Height,proto3" json:"Height,omitempty"`
	Profession           string   `protobuf:"bytes,7,opt,name=Profession,proto3" json:"Profession,omitempty"`
	Weight               string   `protobuf:"bytes,8,opt,name=Weight,proto3" json:"Weight,omitempty"`
	WorkPlace            string   `protobuf:"bytes,9,opt,name=WorkPlace,proto3" json:"WorkPlace,omitempty"`
	Income               string   `protobuf:"bytes,10,opt,name=Income,proto3" json:"Income,omitempty"`
	DegreeOfEducation    string   `protobuf:"bytes,11,opt,name=DegreeOfEducation,proto3" json:"DegreeOfEducation,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Profile) Descriptor

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

func (*Profile) GetAge

func (m *Profile) GetAge() string

func (*Profile) GetConstellation

func (m *Profile) GetConstellation() string

func (*Profile) GetDegreeOfEducation

func (m *Profile) GetDegreeOfEducation() string

func (*Profile) GetHeight

func (m *Profile) GetHeight() string

func (*Profile) GetIncome

func (m *Profile) GetIncome() string

func (*Profile) GetMarriedOrNot

func (m *Profile) GetMarriedOrNot() string

func (*Profile) GetName

func (m *Profile) GetName() string

func (*Profile) GetProfession

func (m *Profile) GetProfession() string

func (*Profile) GetProvince

func (m *Profile) GetProvince() string

func (*Profile) GetWeight

func (m *Profile) GetWeight() string

func (*Profile) GetWorkPlace

func (m *Profile) GetWorkPlace() string

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) Reset

func (m *Profile) Reset()

func (*Profile) String

func (m *Profile) String() string

func (*Profile) XXX_DiscardUnknown

func (m *Profile) XXX_DiscardUnknown()

func (*Profile) XXX_Marshal

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

func (*Profile) XXX_Merge

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

func (*Profile) XXX_Size

func (m *Profile) XXX_Size() int

func (*Profile) XXX_Unmarshal

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

type UnimplementedWriteServiceServer

type UnimplementedWriteServiceServer struct {
}

UnimplementedWriteServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedWriteServiceServer) GrpcWrite

type WriteServiceClient

type WriteServiceClient interface {
	// rpc 定义服务内的 GrpcWrite 远程调用
	GrpcWrite(ctx context.Context, in *ClientRequest, opts ...grpc.CallOption) (*ClientResponse, error)
}

WriteServiceClient is the client API for WriteService service.

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

func NewWriteServiceClient

func NewWriteServiceClient(cc *grpc.ClientConn) WriteServiceClient

type WriteServiceServer

type WriteServiceServer interface {
	// rpc 定义服务内的 GrpcWrite 远程调用
	GrpcWrite(context.Context, *ClientRequest) (*ClientResponse, error)
}

WriteServiceServer is the server API for WriteService service.

Jump to

Keyboard shortcuts

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