hello

package
v0.0.0-...-4cd5156 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package hello is a generated protocol buffer package.

It is generated from these files:

hello/hello.proto

It has these top-level messages:

HelloRequest
HelloResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHelloServer

func RegisterHelloServer(s *grpc.Server, srv HelloServer)

Types

type HelloClient

type HelloClient interface {
	// 定义SayHello方法
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
}

func NewHelloClient

func NewHelloClient(cc *grpc.ClientConn) HelloClient

type HelloRequest

type HelloRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

HelloRequest 请求结构

func (*HelloRequest) Descriptor

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

func (*HelloRequest) GetName

func (m *HelloRequest) GetName() string

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) String

func (m *HelloRequest) String() string

type HelloResponse

type HelloResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

HelloResponse 响应结构

func (*HelloResponse) Descriptor

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

func (*HelloResponse) GetMessage

func (m *HelloResponse) GetMessage() string

func (*HelloResponse) ProtoMessage

func (*HelloResponse) ProtoMessage()

func (*HelloResponse) Reset

func (m *HelloResponse) Reset()

func (*HelloResponse) String

func (m *HelloResponse) String() string

type HelloServer

type HelloServer interface {
	// 定义SayHello方法
	SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
}

Jump to

Keyboard shortcuts

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