example

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_example_proto protoreflect.FileDescriptor

Functions

func RegisterDemoApiServer

func RegisterDemoApiServer(s *grpc.Server, srv DemoApiServer)

Types

type DemoApiClient

type DemoApiClient interface {
	SayHello(ctx context.Context, in *SayHelloReq, opts ...grpc.CallOption) (*SayHelloRsp, error)
}

DemoApiClient is the client API for DemoApi service.

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

func NewDemoApiClient

func NewDemoApiClient(cc grpc.ClientConnInterface) DemoApiClient

type DemoApiServer

type DemoApiServer interface {
	SayHello(context.Context, *SayHelloReq) (*SayHelloRsp, error)
}

DemoApiServer is the server API for DemoApi service.

type SayHelloReq

type SayHelloReq struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*SayHelloReq) Descriptor deprecated

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

Deprecated: Use SayHelloReq.ProtoReflect.Descriptor instead.

func (*SayHelloReq) GetName

func (x *SayHelloReq) GetName() string

func (*SayHelloReq) ProtoMessage

func (*SayHelloReq) ProtoMessage()

func (*SayHelloReq) ProtoReflect

func (x *SayHelloReq) ProtoReflect() protoreflect.Message

func (*SayHelloReq) Reset

func (x *SayHelloReq) Reset()

func (*SayHelloReq) String

func (x *SayHelloReq) String() string

type SayHelloRsp

type SayHelloRsp struct {
	Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*SayHelloRsp) Descriptor deprecated

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

Deprecated: Use SayHelloRsp.ProtoReflect.Descriptor instead.

func (*SayHelloRsp) GetResult

func (x *SayHelloRsp) GetResult() string

func (*SayHelloRsp) ProtoMessage

func (*SayHelloRsp) ProtoMessage()

func (*SayHelloRsp) ProtoReflect

func (x *SayHelloRsp) ProtoReflect() protoreflect.Message

func (*SayHelloRsp) Reset

func (x *SayHelloRsp) Reset()

func (*SayHelloRsp) String

func (x *SayHelloRsp) String() string

type UnimplementedDemoApiServer

type UnimplementedDemoApiServer struct {
}

UnimplementedDemoApiServer can be embedded to have forward compatible implementations.

func (*UnimplementedDemoApiServer) SayHello

Jump to

Keyboard shortcuts

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