proto

package
v0.0.0-...-a864060 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2018 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHelloServiceServer

func RegisterHelloServiceServer(s *grpc.Server, srv HelloServiceServer)

Types

type HelloRequest

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

* 请求对象

func (*HelloRequest) Descriptor

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

func (*HelloRequest) GetGreeting

func (m *HelloRequest) GetGreeting() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) String

func (m *HelloRequest) String() string

func (*HelloRequest) XXX_DiscardUnknown

func (m *HelloRequest) XXX_DiscardUnknown()

func (*HelloRequest) XXX_Marshal

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

func (*HelloRequest) XXX_Merge

func (dst *HelloRequest) XXX_Merge(src proto.Message)

func (*HelloRequest) XXX_Size

func (m *HelloRequest) XXX_Size() int

func (*HelloRequest) XXX_Unmarshal

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

type HelloResponse

type HelloResponse struct {
	Reply                string   `protobuf:"bytes,1,opt,name=reply,proto3" json:"reply,omitempty"`
	Number               []int32  `protobuf:"varint,4,rep,packed,name=number,proto3" json:"number,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

* 请求返回值

func (*HelloResponse) Descriptor

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

func (*HelloResponse) GetNumber

func (m *HelloResponse) GetNumber() []int32

func (*HelloResponse) GetReply

func (m *HelloResponse) GetReply() string

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) Reset

func (m *HelloResponse) Reset()

func (*HelloResponse) String

func (m *HelloResponse) String() string

func (*HelloResponse) XXX_DiscardUnknown

func (m *HelloResponse) XXX_DiscardUnknown()

func (*HelloResponse) XXX_Marshal

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

func (*HelloResponse) XXX_Merge

func (dst *HelloResponse) XXX_Merge(src proto.Message)

func (*HelloResponse) XXX_Size

func (m *HelloResponse) XXX_Size() int

func (*HelloResponse) XXX_Unmarshal

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

type HelloServiceClient

type HelloServiceClient interface {
	// 输出hello
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
}

HelloServiceClient is the client API for HelloService service.

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

func NewHelloServiceClient

func NewHelloServiceClient(cc *grpc.ClientConn) HelloServiceClient

type HelloServiceServer

type HelloServiceServer interface {
	// 输出hello
	SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
}

HelloServiceServer is the server API for HelloService service.

Jump to

Keyboard shortcuts

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