proto

package
v0.0.0-...-b2602dc Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Api_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Api",
	HandlerType: (*ApiServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RpcApi",
			Handler:    _Api_RpcApi_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/api.proto",
}

Api_ServiceDesc is the grpc.ServiceDesc for Api 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_api_proto protoreflect.FileDescriptor

Functions

func RegisterApiServer

func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer)

Types

type ApiClient

type ApiClient interface {
	RpcApi(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

ApiClient is the client API for Api 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 NewApiClient

func NewApiClient(cc grpc.ClientConnInterface) ApiClient

type ApiServer

type ApiServer interface {
	RpcApi(context.Context, *Request) (*Response, error)
}

ApiServer is the server API for Api service. All implementations must embed UnimplementedApiServer for forward compatibility

type Message

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

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetData

func (x *Message) GetData() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Request

type Request struct {
	Method string `protobuf:"bytes,1,opt,name=Method,proto3" json:"Method,omitempty"`
	Data   string `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetData

func (x *Request) GetData() string

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetData

func (x *Response) GetData() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedApiServer

type UnimplementedApiServer struct {
}

UnimplementedApiServer must be embedded to have forward compatible implementations.

func (UnimplementedApiServer) RpcApi

type UnsafeApiServer

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

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

Jump to

Keyboard shortcuts

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