Documentation ¶
Overview ¶
Package functionpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterFunctionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFunctionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FunctionServiceClient) error
- func RegisterFunctionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFunctionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FunctionServiceServer) error
- func RegisterFunctionServiceServer(s grpc.ServiceRegistrar, srv FunctionServiceServer)
- type FunctionServiceClient
- type FunctionServiceServer
- type UnimplementedFunctionServiceServer
- type UnsafeFunctionServiceServer
- type VerifySignatureRequest
- func (*VerifySignatureRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifySignatureRequest) GetMsg() []byte
- func (x *VerifySignatureRequest) GetSender() []byte
- func (x *VerifySignatureRequest) GetSignature() *v1.Signature
- func (*VerifySignatureRequest) ProtoMessage()
- func (x *VerifySignatureRequest) ProtoReflect() protoreflect.Message
- func (x *VerifySignatureRequest) Reset()
- func (x *VerifySignatureRequest) String() string
- type VerifySignatureResponse
- func (*VerifySignatureResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifySignatureResponse) GetError() string
- func (x *VerifySignatureResponse) GetValid() bool
- func (*VerifySignatureResponse) ProtoMessage()
- func (x *VerifySignatureResponse) ProtoReflect() protoreflect.Message
- func (x *VerifySignatureResponse) Reset()
- func (x *VerifySignatureResponse) String() string
Constants ¶
const (
FunctionService_VerifySignature_FullMethodName = "/function.FunctionService/VerifySignature"
)
Variables ¶
var File_kwil_function_v0_messages_proto protoreflect.FileDescriptor
var File_kwil_function_v0_service_proto protoreflect.FileDescriptor
var FunctionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "function.FunctionService", HandlerType: (*FunctionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "VerifySignature", Handler: _FunctionService_VerifySignature_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "kwil/function/v0/service.proto", }
FunctionService_ServiceDesc is the grpc.ServiceDesc for FunctionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFunctionServiceHandler ¶
func RegisterFunctionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterFunctionServiceHandler registers the http handlers for service FunctionService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFunctionServiceHandlerClient ¶
func RegisterFunctionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FunctionServiceClient) error
RegisterFunctionServiceHandlerClient registers the http handlers for service FunctionService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FunctionServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FunctionServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FunctionServiceClient" to call the correct interceptors.
func RegisterFunctionServiceHandlerFromEndpoint ¶
func RegisterFunctionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFunctionServiceHandlerFromEndpoint is same as RegisterFunctionServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFunctionServiceHandlerServer ¶
func RegisterFunctionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FunctionServiceServer) error
RegisterFunctionServiceHandlerServer registers the http handlers for service FunctionService to "mux". UnaryRPC :call FunctionServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFunctionServiceHandlerFromEndpoint instead.
func RegisterFunctionServiceServer ¶
func RegisterFunctionServiceServer(s grpc.ServiceRegistrar, srv FunctionServiceServer)
Types ¶
type FunctionServiceClient ¶
type FunctionServiceClient interface {
VerifySignature(ctx context.Context, in *VerifySignatureRequest, opts ...grpc.CallOption) (*VerifySignatureResponse, error)
}
FunctionServiceClient is the client API for FunctionService 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 NewFunctionServiceClient ¶
func NewFunctionServiceClient(cc grpc.ClientConnInterface) FunctionServiceClient
type FunctionServiceServer ¶
type FunctionServiceServer interface { VerifySignature(context.Context, *VerifySignatureRequest) (*VerifySignatureResponse, error) // contains filtered or unexported methods }
FunctionServiceServer is the server API for FunctionService service. All implementations must embed UnimplementedFunctionServiceServer for forward compatibility
type UnimplementedFunctionServiceServer ¶
type UnimplementedFunctionServiceServer struct { }
UnimplementedFunctionServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFunctionServiceServer) VerifySignature ¶
func (UnimplementedFunctionServiceServer) VerifySignature(context.Context, *VerifySignatureRequest) (*VerifySignatureResponse, error)
type UnsafeFunctionServiceServer ¶
type UnsafeFunctionServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFunctionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FunctionServiceServer will result in compilation errors.
type VerifySignatureRequest ¶
type VerifySignatureRequest struct { Signature *v1.Signature `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` Sender []byte `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` Msg []byte `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*VerifySignatureRequest) Descriptor
deprecated
func (*VerifySignatureRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifySignatureRequest.ProtoReflect.Descriptor instead.
func (*VerifySignatureRequest) GetMsg ¶
func (x *VerifySignatureRequest) GetMsg() []byte
func (*VerifySignatureRequest) GetSender ¶
func (x *VerifySignatureRequest) GetSender() []byte
func (*VerifySignatureRequest) GetSignature ¶
func (x *VerifySignatureRequest) GetSignature() *v1.Signature
func (*VerifySignatureRequest) ProtoMessage ¶
func (*VerifySignatureRequest) ProtoMessage()
func (*VerifySignatureRequest) ProtoReflect ¶
func (x *VerifySignatureRequest) ProtoReflect() protoreflect.Message
func (*VerifySignatureRequest) Reset ¶
func (x *VerifySignatureRequest) Reset()
func (*VerifySignatureRequest) String ¶
func (x *VerifySignatureRequest) String() string
type VerifySignatureResponse ¶
type VerifySignatureResponse struct { Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*VerifySignatureResponse) Descriptor
deprecated
func (*VerifySignatureResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifySignatureResponse.ProtoReflect.Descriptor instead.
func (*VerifySignatureResponse) GetError ¶
func (x *VerifySignatureResponse) GetError() string
func (*VerifySignatureResponse) GetValid ¶
func (x *VerifySignatureResponse) GetValid() bool
func (*VerifySignatureResponse) ProtoMessage ¶
func (*VerifySignatureResponse) ProtoMessage()
func (*VerifySignatureResponse) ProtoReflect ¶
func (x *VerifySignatureResponse) ProtoReflect() protoreflect.Message
func (*VerifySignatureResponse) Reset ¶
func (x *VerifySignatureResponse) Reset()
func (*VerifySignatureResponse) String ¶
func (x *VerifySignatureResponse) String() string