testproto

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package testproto is a generated protocol buffer package.

It is generated from these files:

hello.proto

It has these top-level messages:

HelloRequest
HelloReply

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthHello = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHello   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterGreeterServer

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

Types

type GreeterClient

type GreeterClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
	// A bidirectional streaming RPC call recvice HelloRequest return HelloReply
	StreamHello(ctx context.Context, opts ...grpc.CallOption) (Greeter_StreamHelloClient, error)
}

func NewGreeterClient

func NewGreeterClient(cc *grpc.ClientConn) GreeterClient

type GreeterServer

type GreeterServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloRequest) (*HelloReply, error)
	// A bidirectional streaming RPC call recvice HelloRequest return HelloReply
	StreamHello(Greeter_StreamHelloServer) error
}

type Greeter_StreamHelloClient

type Greeter_StreamHelloClient interface {
	Send(*HelloRequest) error
	Recv() (*HelloReply, error)
	grpc.ClientStream
}

type Greeter_StreamHelloServer

type Greeter_StreamHelloServer interface {
	Send(*HelloReply) error
	Recv() (*HelloRequest, error)
	grpc.ServerStream
}

type HelloReply

type HelloReply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Success bool   `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
}

The response message containing the greetings

func (*HelloReply) Descriptor

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

func (*HelloReply) Marshal

func (m *HelloReply) Marshal() (dAtA []byte, err error)

func (*HelloReply) MarshalTo

func (m *HelloReply) MarshalTo(dAtA []byte) (int, error)

func (*HelloReply) ProtoMessage

func (*HelloReply) ProtoMessage()

func (*HelloReply) Reset

func (m *HelloReply) Reset()

func (*HelloReply) Size

func (m *HelloReply) Size() (n int)

func (*HelloReply) String

func (m *HelloReply) String() string

func (*HelloReply) Unmarshal

func (m *HelloReply) Unmarshal(dAtA []byte) error

type HelloRequest

type HelloRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" validate:"required"`
	Age  int32  `protobuf:"varint,2,opt,name=age,proto3" json:"age" validate:"min=0"`
}

The request message containing the user's name.

func (*HelloRequest) Descriptor

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

func (*HelloRequest) Marshal

func (m *HelloRequest) Marshal() (dAtA []byte, err error)

func (*HelloRequest) MarshalTo

func (m *HelloRequest) MarshalTo(dAtA []byte) (int, error)

func (*HelloRequest) ProtoMessage

func (*HelloRequest) ProtoMessage()

func (*HelloRequest) Reset

func (m *HelloRequest) Reset()

func (*HelloRequest) Size

func (m *HelloRequest) Size() (n int)

func (*HelloRequest) String

func (m *HelloRequest) String() string

func (*HelloRequest) Unmarshal

func (m *HelloRequest) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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