demo_protobuf

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_example_proto protoreflect.FileDescriptor

Functions

func RegisterExampleServiceServer

func RegisterExampleServiceServer(s *grpc.Server, srv ExampleServiceServer)

Types

type ExampleRequest

type ExampleRequest struct {
	One   uint32   `protobuf:"varint,1,opt,name=one,proto3" json:"one,omitempty"`
	Two   string   `protobuf:"bytes,2,opt,name=two,proto3" json:"two,omitempty"`
	Three []uint32 `protobuf:"varint,3,rep,packed,name=three,proto3" json:"three,omitempty"`
	// contains filtered or unexported fields
}

func (*ExampleRequest) Descriptor deprecated

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

Deprecated: Use ExampleRequest.ProtoReflect.Descriptor instead.

func (*ExampleRequest) GetOne

func (x *ExampleRequest) GetOne() uint32

func (*ExampleRequest) GetThree

func (x *ExampleRequest) GetThree() []uint32

func (*ExampleRequest) GetTwo

func (x *ExampleRequest) GetTwo() string

func (*ExampleRequest) ProtoMessage

func (*ExampleRequest) ProtoMessage()

func (*ExampleRequest) ProtoReflect

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

func (*ExampleRequest) Reset

func (x *ExampleRequest) Reset()

func (*ExampleRequest) String

func (x *ExampleRequest) String() string

type ExampleResponse

type ExampleResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Code    uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*ExampleResponse) Descriptor deprecated

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

Deprecated: Use ExampleResponse.ProtoReflect.Descriptor instead.

func (*ExampleResponse) GetCode

func (x *ExampleResponse) GetCode() uint32

func (*ExampleResponse) GetMessage

func (x *ExampleResponse) GetMessage() string

func (*ExampleResponse) ProtoMessage

func (*ExampleResponse) ProtoMessage()

func (*ExampleResponse) ProtoReflect

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

func (*ExampleResponse) Reset

func (x *ExampleResponse) Reset()

func (*ExampleResponse) String

func (x *ExampleResponse) String() string

type ExampleServiceClient

type ExampleServiceClient interface {
	ExampleMethod(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error)
}

ExampleServiceClient is the client API for ExampleService service.

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

type ExampleServiceServer

type ExampleServiceServer interface {
	ExampleMethod(context.Context, *ExampleRequest) (*ExampleResponse, error)
}

ExampleServiceServer is the server API for ExampleService service.

type UnimplementedExampleServiceServer

type UnimplementedExampleServiceServer struct {
}

UnimplementedExampleServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedExampleServiceServer) ExampleMethod

Jump to

Keyboard shortcuts

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