proto

package
v1.3.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_simple_proto protoreflect.FileDescriptor

Functions

func RegisterSimpleServer

func RegisterSimpleServer(s *grpc.Server, srv SimpleServer)

Types

type SimpleClient

type SimpleClient interface {
	GetSimpleInfo(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
}

SimpleClient is the client API for Simple service.

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

func NewSimpleClient

func NewSimpleClient(cc grpc.ClientConnInterface) SimpleClient

type SimpleRequest

type SimpleRequest struct {

	// 参数类型 参数名称 标志号
	Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Num  int32  `protobuf:"varint,2,opt,name=num,proto3" json:"num,omitempty"`
	// contains filtered or unexported fields
}

定义发送请求信息

func (*SimpleRequest) Descriptor deprecated

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

Deprecated: Use SimpleRequest.ProtoReflect.Descriptor instead.

func (*SimpleRequest) GetData

func (x *SimpleRequest) GetData() string

func (*SimpleRequest) GetNum

func (x *SimpleRequest) GetNum() int32

func (*SimpleRequest) ProtoMessage

func (*SimpleRequest) ProtoMessage()

func (*SimpleRequest) ProtoReflect

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

func (*SimpleRequest) Reset

func (x *SimpleRequest) Reset()

func (*SimpleRequest) String

func (x *SimpleRequest) String() string

type SimpleResponse

type SimpleResponse struct {
	Code  int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*SimpleResponse) Descriptor deprecated

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

Deprecated: Use SimpleResponse.ProtoReflect.Descriptor instead.

func (*SimpleResponse) GetCode

func (x *SimpleResponse) GetCode() int32

func (*SimpleResponse) GetValue

func (x *SimpleResponse) GetValue() string

func (*SimpleResponse) ProtoMessage

func (*SimpleResponse) ProtoMessage()

func (*SimpleResponse) ProtoReflect

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

func (*SimpleResponse) Reset

func (x *SimpleResponse) Reset()

func (*SimpleResponse) String

func (x *SimpleResponse) String() string

type SimpleServer

type SimpleServer interface {
	GetSimpleInfo(context.Context, *SimpleRequest) (*SimpleResponse, error)
}

SimpleServer is the server API for Simple service.

type UnimplementedSimpleServer

type UnimplementedSimpleServer struct {
}

UnimplementedSimpleServer can be embedded to have forward compatible implementations.

func (*UnimplementedSimpleServer) GetSimpleInfo

Jump to

Keyboard shortcuts

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