Documentation ¶
Overview ¶
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterFlsInterpreterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFlsInterpreterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FlsInterpreterClient) error
- func RegisterFlsInterpreterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFlsInterpreterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FlsInterpreterServer) error
- func RegisterFlsInterpreterServer(s grpc.ServiceRegistrar, srv FlsInterpreterServer)
- type FlsInterpreterClient
- type FlsInterpreterServer
- type ResetResponse
- func (*ResetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ResetResponse) GetMessage() string
- func (x *ResetResponse) GetStatus() int32
- func (*ResetResponse) ProtoMessage()
- func (x *ResetResponse) ProtoReflect() protoreflect.Message
- func (x *ResetResponse) Reset()
- func (x *ResetResponse) String() string
- func (m *ResetResponse) Validate() error
- type ResetResponseValidationError
- func (e ResetResponseValidationError) Cause() error
- func (e ResetResponseValidationError) Error() string
- func (e ResetResponseValidationError) ErrorName() string
- func (e ResetResponseValidationError) Field() string
- func (e ResetResponseValidationError) Key() bool
- func (e ResetResponseValidationError) Reason() string
- type ScriptRequest
- func (*ScriptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ScriptRequest) GetScript() *structpb.Struct
- func (*ScriptRequest) ProtoMessage()
- func (x *ScriptRequest) ProtoReflect() protoreflect.Message
- func (x *ScriptRequest) Reset()
- func (x *ScriptRequest) String() string
- func (m *ScriptRequest) Validate() error
- type ScriptRequestValidationError
- func (e ScriptRequestValidationError) Cause() error
- func (e ScriptRequestValidationError) Error() string
- func (e ScriptRequestValidationError) ErrorName() string
- func (e ScriptRequestValidationError) Field() string
- func (e ScriptRequestValidationError) Key() bool
- func (e ScriptRequestValidationError) Reason() string
- type ScriptResponse
- func (*ScriptResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ScriptResponse) GetResult() []*structpb.Value
- func (*ScriptResponse) ProtoMessage()
- func (x *ScriptResponse) ProtoReflect() protoreflect.Message
- func (x *ScriptResponse) Reset()
- func (x *ScriptResponse) String() string
- func (m *ScriptResponse) Validate() error
- type ScriptResponseValidationError
- func (e ScriptResponseValidationError) Cause() error
- func (e ScriptResponseValidationError) Error() string
- func (e ScriptResponseValidationError) ErrorName() string
- func (e ScriptResponseValidationError) Field() string
- func (e ScriptResponseValidationError) Key() bool
- func (e ScriptResponseValidationError) Reason() string
- type UnimplementedFlsInterpreterServer
- func (UnimplementedFlsInterpreterServer) GetVersion(context.Context, *emptypb.Empty) (*VersionResponse, error)
- func (UnimplementedFlsInterpreterServer) Reset(context.Context, *emptypb.Empty) (*ResetResponse, error)
- func (UnimplementedFlsInterpreterServer) ScriptExecute(context.Context, *ScriptRequest) (*ScriptResponse, error)
- type UnsafeFlsInterpreterServer
- type VersionResponse
- func (*VersionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VersionResponse) GetVersion() string
- func (*VersionResponse) ProtoMessage()
- func (x *VersionResponse) ProtoReflect() protoreflect.Message
- func (x *VersionResponse) Reset()
- func (x *VersionResponse) String() string
- func (m *VersionResponse) Validate() error
- type VersionResponseValidationError
- func (e VersionResponseValidationError) Cause() error
- func (e VersionResponseValidationError) Error() string
- func (e VersionResponseValidationError) ErrorName() string
- func (e VersionResponseValidationError) Field() string
- func (e VersionResponseValidationError) Key() bool
- func (e VersionResponseValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_github_com_alavrovinfb_fls_interpreter_pkg_pb_service_proto protoreflect.FileDescriptor
var FlsInterpreter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "flsinterpreter.FlsInterpreter", HandlerType: (*FlsInterpreterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetVersion", Handler: _FlsInterpreter_GetVersion_Handler, }, { MethodName: "ScriptExecute", Handler: _FlsInterpreter_ScriptExecute_Handler, }, { MethodName: "Reset", Handler: _FlsInterpreter_Reset_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/alavrovinfb/fls-interpreter/pkg/pb/service.proto", }
FlsInterpreter_ServiceDesc is the grpc.ServiceDesc for FlsInterpreter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFlsInterpreterHandler ¶
func RegisterFlsInterpreterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterFlsInterpreterHandler registers the http handlers for service FlsInterpreter to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFlsInterpreterHandlerClient ¶
func RegisterFlsInterpreterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FlsInterpreterClient) error
RegisterFlsInterpreterHandlerClient registers the http handlers for service FlsInterpreter to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FlsInterpreterClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FlsInterpreterClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FlsInterpreterClient" to call the correct interceptors.
func RegisterFlsInterpreterHandlerFromEndpoint ¶
func RegisterFlsInterpreterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFlsInterpreterHandlerFromEndpoint is same as RegisterFlsInterpreterHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFlsInterpreterHandlerServer ¶
func RegisterFlsInterpreterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FlsInterpreterServer) error
RegisterFlsInterpreterHandlerServer registers the http handlers for service FlsInterpreter to "mux". UnaryRPC :call FlsInterpreterServer 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 RegisterFlsInterpreterHandlerFromEndpoint instead.
func RegisterFlsInterpreterServer ¶
func RegisterFlsInterpreterServer(s grpc.ServiceRegistrar, srv FlsInterpreterServer)
Types ¶
type FlsInterpreterClient ¶
type FlsInterpreterClient interface { // //Return service version GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) // //Execute FLS scrips ScriptExecute(ctx context.Context, in *ScriptRequest, opts ...grpc.CallOption) (*ScriptResponse, error) // //Return service version Reset(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ResetResponse, error) }
FlsInterpreterClient is the client API for FlsInterpreter 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 NewFlsInterpreterClient ¶
func NewFlsInterpreterClient(cc grpc.ClientConnInterface) FlsInterpreterClient
type FlsInterpreterServer ¶
type FlsInterpreterServer interface { // //Return service version GetVersion(context.Context, *emptypb.Empty) (*VersionResponse, error) // //Execute FLS scrips ScriptExecute(context.Context, *ScriptRequest) (*ScriptResponse, error) // //Return service version Reset(context.Context, *emptypb.Empty) (*ResetResponse, error) }
FlsInterpreterServer is the server API for FlsInterpreter service. All implementations should embed UnimplementedFlsInterpreterServer for forward compatibility
type ResetResponse ¶
type ResetResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*ResetResponse) Descriptor
deprecated
func (*ResetResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResetResponse.ProtoReflect.Descriptor instead.
func (*ResetResponse) GetMessage ¶
func (x *ResetResponse) GetMessage() string
func (*ResetResponse) GetStatus ¶
func (x *ResetResponse) GetStatus() int32
func (*ResetResponse) ProtoMessage ¶
func (*ResetResponse) ProtoMessage()
func (*ResetResponse) ProtoReflect ¶
func (x *ResetResponse) ProtoReflect() protoreflect.Message
func (*ResetResponse) Reset ¶
func (x *ResetResponse) Reset()
func (*ResetResponse) String ¶
func (x *ResetResponse) String() string
func (*ResetResponse) Validate ¶
func (m *ResetResponse) Validate() error
Validate checks the field values on ResetResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ResetResponseValidationError ¶
type ResetResponseValidationError struct {
// contains filtered or unexported fields
}
ResetResponseValidationError is the validation error returned by ResetResponse.Validate if the designated constraints aren't met.
func (ResetResponseValidationError) Cause ¶
func (e ResetResponseValidationError) Cause() error
Cause function returns cause value.
func (ResetResponseValidationError) Error ¶
func (e ResetResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ResetResponseValidationError) ErrorName ¶
func (e ResetResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ResetResponseValidationError) Field ¶
func (e ResetResponseValidationError) Field() string
Field function returns field value.
func (ResetResponseValidationError) Key ¶
func (e ResetResponseValidationError) Key() bool
Key function returns key value.
func (ResetResponseValidationError) Reason ¶
func (e ResetResponseValidationError) Reason() string
Reason function returns reason value.
type ScriptRequest ¶
type ScriptRequest struct { Script *structpb.Struct `protobuf:"bytes,1,opt,name=script,proto3" json:"script,omitempty"` // contains filtered or unexported fields }
func (*ScriptRequest) Descriptor
deprecated
func (*ScriptRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScriptRequest.ProtoReflect.Descriptor instead.
func (*ScriptRequest) GetScript ¶
func (x *ScriptRequest) GetScript() *structpb.Struct
func (*ScriptRequest) ProtoMessage ¶
func (*ScriptRequest) ProtoMessage()
func (*ScriptRequest) ProtoReflect ¶
func (x *ScriptRequest) ProtoReflect() protoreflect.Message
func (*ScriptRequest) Reset ¶
func (x *ScriptRequest) Reset()
func (*ScriptRequest) String ¶
func (x *ScriptRequest) String() string
func (*ScriptRequest) Validate ¶
func (m *ScriptRequest) Validate() error
Validate checks the field values on ScriptRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ScriptRequestValidationError ¶
type ScriptRequestValidationError struct {
// contains filtered or unexported fields
}
ScriptRequestValidationError is the validation error returned by ScriptRequest.Validate if the designated constraints aren't met.
func (ScriptRequestValidationError) Cause ¶
func (e ScriptRequestValidationError) Cause() error
Cause function returns cause value.
func (ScriptRequestValidationError) Error ¶
func (e ScriptRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ScriptRequestValidationError) ErrorName ¶
func (e ScriptRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ScriptRequestValidationError) Field ¶
func (e ScriptRequestValidationError) Field() string
Field function returns field value.
func (ScriptRequestValidationError) Key ¶
func (e ScriptRequestValidationError) Key() bool
Key function returns key value.
func (ScriptRequestValidationError) Reason ¶
func (e ScriptRequestValidationError) Reason() string
Reason function returns reason value.
type ScriptResponse ¶
type ScriptResponse struct { // FLS script execution results Result []*structpb.Value `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func OutToPB ¶
func OutToPB(in *[]interface{}) (*ScriptResponse, error)
func (*ScriptResponse) Descriptor
deprecated
func (*ScriptResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScriptResponse.ProtoReflect.Descriptor instead.
func (*ScriptResponse) GetResult ¶
func (x *ScriptResponse) GetResult() []*structpb.Value
func (*ScriptResponse) ProtoMessage ¶
func (*ScriptResponse) ProtoMessage()
func (*ScriptResponse) ProtoReflect ¶
func (x *ScriptResponse) ProtoReflect() protoreflect.Message
func (*ScriptResponse) Reset ¶
func (x *ScriptResponse) Reset()
func (*ScriptResponse) String ¶
func (x *ScriptResponse) String() string
func (*ScriptResponse) Validate ¶
func (m *ScriptResponse) Validate() error
Validate checks the field values on ScriptResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ScriptResponseValidationError ¶
type ScriptResponseValidationError struct {
// contains filtered or unexported fields
}
ScriptResponseValidationError is the validation error returned by ScriptResponse.Validate if the designated constraints aren't met.
func (ScriptResponseValidationError) Cause ¶
func (e ScriptResponseValidationError) Cause() error
Cause function returns cause value.
func (ScriptResponseValidationError) Error ¶
func (e ScriptResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ScriptResponseValidationError) ErrorName ¶
func (e ScriptResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ScriptResponseValidationError) Field ¶
func (e ScriptResponseValidationError) Field() string
Field function returns field value.
func (ScriptResponseValidationError) Key ¶
func (e ScriptResponseValidationError) Key() bool
Key function returns key value.
func (ScriptResponseValidationError) Reason ¶
func (e ScriptResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedFlsInterpreterServer ¶
type UnimplementedFlsInterpreterServer struct { }
UnimplementedFlsInterpreterServer should be embedded to have forward compatible implementations.
func (UnimplementedFlsInterpreterServer) GetVersion ¶
func (UnimplementedFlsInterpreterServer) GetVersion(context.Context, *emptypb.Empty) (*VersionResponse, error)
func (UnimplementedFlsInterpreterServer) Reset ¶
func (UnimplementedFlsInterpreterServer) Reset(context.Context, *emptypb.Empty) (*ResetResponse, error)
func (UnimplementedFlsInterpreterServer) ScriptExecute ¶
func (UnimplementedFlsInterpreterServer) ScriptExecute(context.Context, *ScriptRequest) (*ScriptResponse, error)
type UnsafeFlsInterpreterServer ¶
type UnsafeFlsInterpreterServer interface {
// contains filtered or unexported methods
}
UnsafeFlsInterpreterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FlsInterpreterServer will result in compilation errors.
type VersionResponse ¶
type VersionResponse struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
TODO: Structure your own protobuf messages. Each protocol buffer message is a small logical record of information, containing a series of name-value pairs.
func (*VersionResponse) Descriptor
deprecated
func (*VersionResponse) Descriptor() ([]byte, []int)
Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) GetVersion ¶
func (x *VersionResponse) GetVersion() string
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) ProtoReflect ¶
func (x *VersionResponse) ProtoReflect() protoreflect.Message
func (*VersionResponse) Reset ¶
func (x *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (x *VersionResponse) String() string
func (*VersionResponse) Validate ¶
func (m *VersionResponse) Validate() error
Validate checks the field values on VersionResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type VersionResponseValidationError ¶
type VersionResponseValidationError struct {
// contains filtered or unexported fields
}
VersionResponseValidationError is the validation error returned by VersionResponse.Validate if the designated constraints aren't met.
func (VersionResponseValidationError) Cause ¶
func (e VersionResponseValidationError) Cause() error
Cause function returns cause value.
func (VersionResponseValidationError) Error ¶
func (e VersionResponseValidationError) Error() string
Error satisfies the builtin error interface
func (VersionResponseValidationError) ErrorName ¶
func (e VersionResponseValidationError) ErrorName() string
ErrorName returns error name.
func (VersionResponseValidationError) Field ¶
func (e VersionResponseValidationError) Field() string
Field function returns field value.
func (VersionResponseValidationError) Key ¶
func (e VersionResponseValidationError) Key() bool
Key function returns key value.
func (VersionResponseValidationError) Reason ¶
func (e VersionResponseValidationError) Reason() string
Reason function returns reason value.