grf

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_server_proto_src_restful_proto protoreflect.FileDescriptor
View Source
var RestfulService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grf.RestfulService",
	HandlerType: (*RestfulServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Restful",
			Handler:    _RestfulService_Restful_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server/proto/src/restful.proto",
}

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

Functions

func RegisterRestfulServiceServer

func RegisterRestfulServiceServer(s grpc.ServiceRegistrar, srv RestfulServiceServer)

Types

type RMeta

type RMeta struct {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Status  string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	Error   string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	Data    []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*RMeta) Descriptor deprecated

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

Deprecated: Use RMeta.ProtoReflect.Descriptor instead.

func (*RMeta) GetAddress

func (x *RMeta) GetAddress() string

func (*RMeta) GetCode

func (x *RMeta) GetCode() int32

func (*RMeta) GetData

func (x *RMeta) GetData() []byte

func (*RMeta) GetError

func (x *RMeta) GetError() string

func (*RMeta) GetMessage

func (x *RMeta) GetMessage() string

func (*RMeta) GetStatus

func (x *RMeta) GetStatus() string

func (*RMeta) ProtoMessage

func (*RMeta) ProtoMessage()

func (*RMeta) ProtoReflect

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

func (*RMeta) Reset

func (x *RMeta) Reset()

func (*RMeta) String

func (x *RMeta) String() string

type Request

type Request struct {
	Action  string                     `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
	Header  map[string]*structpb.Value `` /* 153-byte string literal not displayed */
	Payload map[string]*structpb.Value `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetAction

func (x *Request) GetAction() string

func (*Request) GetHeader

func (x *Request) GetHeader() map[string]*structpb.Value

func (*Request) GetPayload

func (x *Request) GetPayload() map[string]*structpb.Value

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 []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Meta *RMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,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() []byte

func (*Response) GetMeta

func (x *Response) GetMeta() *RMeta

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 RestfulServiceClient

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

RestfulServiceClient is the client API for RestfulService 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.

type RestfulServiceServer

type RestfulServiceServer interface {
	Restful(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

RestfulServiceServer is the server API for RestfulService service. All implementations must embed UnimplementedRestfulServiceServer for forward compatibility

type UnimplementedRestfulServiceServer

type UnimplementedRestfulServiceServer struct {
}

UnimplementedRestfulServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedRestfulServiceServer) Restful

type UnsafeRestfulServiceServer

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

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

Jump to

Keyboard shortcuts

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