proto

package
v0.0.0-...-bea6d57 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.AddService",
	HandlerType: (*AddServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Hello",
			Handler:    _AddService_Hello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/service.proto",
}

AddService_ServiceDesc is the grpc.ServiceDesc for AddService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_service_proto protoreflect.FileDescriptor

Functions

func RegisterAddServiceServer

func RegisterAddServiceServer(s grpc.ServiceRegistrar, srv AddServiceServer)

Types

type AddServiceClient

type AddServiceClient interface {
	Hello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloRes, error)
}

AddServiceClient is the client API for AddService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAddServiceClient

func NewAddServiceClient(cc grpc.ClientConnInterface) AddServiceClient

type AddServiceServer

type AddServiceServer interface {
	Hello(context.Context, *HelloReq) (*HelloRes, error)
	// contains filtered or unexported methods
}

AddServiceServer is the server API for AddService service. All implementations must embed UnimplementedAddServiceServer for forward compatibility

type HelloReq

type HelloReq struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	Ip  string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*HelloReq) Descriptor deprecated

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

Deprecated: Use HelloReq.ProtoReflect.Descriptor instead.

func (*HelloReq) GetIp

func (x *HelloReq) GetIp() string

func (*HelloReq) GetMsg

func (x *HelloReq) GetMsg() string

func (*HelloReq) ProtoMessage

func (*HelloReq) ProtoMessage()

func (*HelloReq) ProtoReflect

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

func (*HelloReq) Reset

func (x *HelloReq) Reset()

func (*HelloReq) String

func (x *HelloReq) String() string

type HelloRes

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

func (*HelloRes) Descriptor deprecated

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

Deprecated: Use HelloRes.ProtoReflect.Descriptor instead.

func (*HelloRes) GetMsgRes

func (x *HelloRes) GetMsgRes() string

func (*HelloRes) ProtoMessage

func (*HelloRes) ProtoMessage()

func (*HelloRes) ProtoReflect

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

func (*HelloRes) Reset

func (x *HelloRes) Reset()

func (*HelloRes) String

func (x *HelloRes) String() string

type UnimplementedAddServiceServer

type UnimplementedAddServiceServer struct {
}

UnimplementedAddServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAddServiceServer) Hello

type UnsafeAddServiceServer

type UnsafeAddServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAddServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AddServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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