Documentation ¶
Index ¶
- Variables
- func RegisterRestfulServiceServer(s grpc.ServiceRegistrar, srv RestfulServiceServer)
- type RMeta
- func (*RMeta) Descriptor() ([]byte, []int)deprecated
- func (x *RMeta) GetAddress() string
- func (x *RMeta) GetCode() int32
- func (x *RMeta) GetData() []byte
- func (x *RMeta) GetError() string
- func (x *RMeta) GetMessage() string
- func (x *RMeta) GetStatus() string
- func (*RMeta) ProtoMessage()
- func (x *RMeta) ProtoReflect() protoreflect.Message
- func (x *RMeta) Reset()
- func (x *RMeta) String() string
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetAction() string
- func (x *Request) GetHeader() map[string]*structpb.Value
- func (x *Request) GetPayload() map[string]*structpb.Value
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- type RestfulServiceClient
- type RestfulServiceServer
- type UnimplementedRestfulServiceServer
- type UnsafeRestfulServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_server_proto_src_restful_proto protoreflect.FileDescriptor
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) GetAddress ¶
func (*RMeta) GetMessage ¶
func (*RMeta) ProtoMessage ¶
func (*RMeta) ProtoMessage()
func (*RMeta) ProtoReflect ¶
func (x *RMeta) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
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) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
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.
func NewRestfulServiceClient ¶
func NewRestfulServiceClient(cc grpc.ClientConnInterface) RestfulServiceClient
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.
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.