protobuf

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EPS_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "EPS",
	HandlerType: (*EPSServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Call",
			Handler:    _EPS_Call_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ServerCall",
			Handler:       _EPS_ServerCall_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "protobuf/eps.proto",
}

EPS_ServiceDesc is the grpc.ServiceDesc for EPS 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_protobuf_eps_proto protoreflect.FileDescriptor

Functions

func RegisterEPSServer

func RegisterEPSServer(s grpc.ServiceRegistrar, srv EPSServer)

Types

type EPSClient

type EPSClient interface {
	// client sends a request to the server and receives a response
	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	// client sends a response to the server and receives an acknowledgment
	ServerCall(ctx context.Context, opts ...grpc.CallOption) (EPS_ServerCallClient, error)
}

EPSClient is the client API for EPS service.

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

func NewEPSClient

func NewEPSClient(cc grpc.ClientConnInterface) EPSClient

type EPSServer

type EPSServer interface {
	// client sends a request to the server and receives a response
	Call(context.Context, *Request) (*Response, error)
	// client sends a response to the server and receives an acknowledgment
	ServerCall(EPS_ServerCallServer) error
	// contains filtered or unexported methods
}

EPSServer is the server API for EPS service. All implementations must embed UnimplementedEPSServer for forward compatibility

type EPS_ServerCallClient

type EPS_ServerCallClient interface {
	Send(*Response) error
	Recv() (*Request, error)
	grpc.ClientStream
}

type EPS_ServerCallServer

type EPS_ServerCallServer interface {
	Send(*Request) error
	Recv() (*Response, error)
	grpc.ServerStream
}

type Error

type Error struct {
	Code    int32           `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string          `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data    *_struct.Struct `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetData

func (x *Error) GetData() *_struct.Struct

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type Request

type Request struct {
	Method     string          `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Params     *_struct.Struct `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
	Id         string          `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	ClientName string          `protobuf:"bytes,4,opt,name=clientName,proto3" json:"clientName,omitempty"`
	// contains filtered or unexported fields
}

A JSON-RPC style request

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetClientName added in v0.1.20

func (x *Request) GetClientName() string

func (*Request) GetId

func (x *Request) GetId() string

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) GetParams

func (x *Request) GetParams() *_struct.Struct

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 {
	Id     string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Error  *Error          `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	Result *_struct.Struct `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

A JSON-RPC style response

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetError

func (x *Response) GetError() *Error

func (*Response) GetId

func (x *Response) GetId() string

func (*Response) GetResult

func (x *Response) GetResult() *_struct.Struct

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 UnimplementedEPSServer

type UnimplementedEPSServer struct {
}

UnimplementedEPSServer must be embedded to have forward compatible implementations.

func (UnimplementedEPSServer) Call

func (UnimplementedEPSServer) ServerCall

type UnsafeEPSServer

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

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

Jump to

Keyboard shortcuts

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