proto

package
v0.0.0-...-160c400 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGreeterServer

func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)

Types

type GreeterClient

type GreeterClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloResp, error)
}

GreeterClient is the client API for Greeter service.

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

func NewGreeterClient

func NewGreeterClient(cc *grpc.ClientConn) GreeterClient

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloReq) (*HelloResp, error)
}

GreeterServer is the server API for Greeter service.

type HelloReq

type HelloReq 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:"-"`
}

The request message containing the user's name.

func (*HelloReq) Descriptor

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

func (*HelloReq) GetName

func (m *HelloReq) GetName() string

func (*HelloReq) ProtoMessage

func (*HelloReq) ProtoMessage()

func (*HelloReq) Reset

func (m *HelloReq) Reset()

func (*HelloReq) String

func (m *HelloReq) String() string

func (*HelloReq) XXX_DiscardUnknown

func (m *HelloReq) XXX_DiscardUnknown()

func (*HelloReq) XXX_Marshal

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

func (*HelloReq) XXX_Merge

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

func (*HelloReq) XXX_Size

func (m *HelloReq) XXX_Size() int

func (*HelloReq) XXX_Unmarshal

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

type HelloResp

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

The response message containing the greetings

func (*HelloResp) Descriptor

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

func (*HelloResp) GetMessage

func (m *HelloResp) GetMessage() string

func (*HelloResp) ProtoMessage

func (*HelloResp) ProtoMessage()

func (*HelloResp) Reset

func (m *HelloResp) Reset()

func (*HelloResp) String

func (m *HelloResp) String() string

func (*HelloResp) XXX_DiscardUnknown

func (m *HelloResp) XXX_DiscardUnknown()

func (*HelloResp) XXX_Marshal

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

func (*HelloResp) XXX_Merge

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

func (*HelloResp) XXX_Size

func (m *HelloResp) XXX_Size() int

func (*HelloResp) XXX_Unmarshal

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

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer can be embedded to have forward compatible implementations.

func (*UnimplementedGreeterServer) SayHello

Jump to

Keyboard shortcuts

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