protobuf

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_protobuf_hyper_proto protoreflect.FileDescriptor
View Source
var Hyper_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Hyper",
	HandlerType: (*HyperServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Call",
			Handler:    _Hyper_Call_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ServerCall",
			Handler:       _Hyper_ServerCall_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "protobuf/hyper.proto",
}

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

Functions

func RegisterHyperServer

func RegisterHyperServer(s grpc.ServiceRegistrar, srv HyperServer)

Types

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    *structpb.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() *structpb.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 HyperClient

type HyperClient 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) (Hyper_ServerCallClient, error)
}

HyperClient is the client API for Hyper 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 NewHyperClient

func NewHyperClient(cc grpc.ClientConnInterface) HyperClient

type HyperServer

type HyperServer 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(Hyper_ServerCallServer) error
	// contains filtered or unexported methods
}

HyperServer is the server API for Hyper service. All implementations must embed UnimplementedHyperServer for forward compatibility

type Hyper_ServerCallClient

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

type Hyper_ServerCallServer

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

type Request

type Request struct {
	Method     string           `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	Params     *structpb.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

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() *structpb.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 *structpb.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() *structpb.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 UnimplementedHyperServer

type UnimplementedHyperServer struct {
}

UnimplementedHyperServer must be embedded to have forward compatible implementations.

func (UnimplementedHyperServer) Call

func (UnimplementedHyperServer) ServerCall

type UnsafeHyperServer

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

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

Jump to

Keyboard shortcuts

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