Documentation ¶
Overview ¶
Package litterboxsvc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterLitterBoxHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterLitterBoxHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LitterBoxClient) error
- func RegisterLitterBoxHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterLitterBoxHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LitterBoxServer) error
- func RegisterLitterBoxServer(s grpc.ServiceRegistrar, srv LitterBoxServer)
- type LitterBoxClient
- type LitterBoxServer
- type LitterBox_RunClient
- type LitterBox_RunServer
- type RunRequest
- func (*RunRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RunRequest) GetEvent() *SyntheticEvent
- func (x *RunRequest) GetId() string
- func (x *RunRequest) GetSource() string
- func (*RunRequest) ProtoMessage()
- func (x *RunRequest) ProtoReflect() protoreflect.Message
- func (x *RunRequest) Reset()
- func (x *RunRequest) String() string
- func (m *RunRequest) Validate() error
- type RunRequestValidationError
- type RunUpdate
- func (*RunUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *RunUpdate) GetId() string
- func (x *RunUpdate) GetState() *lang.RunState
- func (x *RunUpdate) GetT() *timestamppb.Timestamp
- func (*RunUpdate) ProtoMessage()
- func (x *RunUpdate) ProtoReflect() protoreflect.Message
- func (x *RunUpdate) Reset()
- func (x *RunUpdate) String() string
- func (m *RunUpdate) Validate() error
- type RunUpdateValidationError
- type ScoopRequest
- func (*ScoopRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ScoopRequest) GetId() string
- func (*ScoopRequest) ProtoMessage()
- func (x *ScoopRequest) ProtoReflect() protoreflect.Message
- func (x *ScoopRequest) Reset()
- func (x *ScoopRequest) String() string
- func (m *ScoopRequest) Validate() error
- type ScoopRequestValidationError
- func (e ScoopRequestValidationError) Cause() error
- func (e ScoopRequestValidationError) Error() string
- func (e ScoopRequestValidationError) ErrorName() string
- func (e ScoopRequestValidationError) Field() string
- func (e ScoopRequestValidationError) Key() bool
- func (e ScoopRequestValidationError) Reason() string
- type ScoopResponse
- type ScoopResponseValidationError
- func (e ScoopResponseValidationError) Cause() error
- func (e ScoopResponseValidationError) Error() string
- func (e ScoopResponseValidationError) ErrorName() string
- func (e ScoopResponseValidationError) Field() string
- func (e ScoopResponseValidationError) Key() bool
- func (e ScoopResponseValidationError) Reason() string
- type SetupRequest
- type SetupRequestValidationError
- func (e SetupRequestValidationError) Cause() error
- func (e SetupRequestValidationError) Error() string
- func (e SetupRequestValidationError) ErrorName() string
- func (e SetupRequestValidationError) Field() string
- func (e SetupRequestValidationError) Key() bool
- func (e SetupRequestValidationError) Reason() string
- type SetupResponse
- func (*SetupResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetupResponse) GetId() string
- func (*SetupResponse) ProtoMessage()
- func (x *SetupResponse) ProtoReflect() protoreflect.Message
- func (x *SetupResponse) Reset()
- func (x *SetupResponse) String() string
- func (m *SetupResponse) Validate() error
- type SetupResponseValidationError
- func (e SetupResponseValidationError) Cause() error
- func (e SetupResponseValidationError) Error() string
- func (e SetupResponseValidationError) ErrorName() string
- func (e SetupResponseValidationError) Field() string
- func (e SetupResponseValidationError) Key() bool
- func (e SetupResponseValidationError) Reason() string
- type SyntheticEvent
- func (*SyntheticEvent) Descriptor() ([]byte, []int)deprecated
- func (x *SyntheticEvent) GetData() map[string]*values.Value
- func (x *SyntheticEvent) GetOriginalId() string
- func (x *SyntheticEvent) GetSrcBinding() string
- func (x *SyntheticEvent) GetType() string
- func (*SyntheticEvent) ProtoMessage()
- func (x *SyntheticEvent) ProtoReflect() protoreflect.Message
- func (x *SyntheticEvent) Reset()
- func (x *SyntheticEvent) String() string
- func (m *SyntheticEvent) Validate() error
- type SyntheticEventValidationError
- func (e SyntheticEventValidationError) Cause() error
- func (e SyntheticEventValidationError) Error() string
- func (e SyntheticEventValidationError) ErrorName() string
- func (e SyntheticEventValidationError) Field() string
- func (e SyntheticEventValidationError) Key() bool
- func (e SyntheticEventValidationError) Reason() string
- type UnimplementedLitterBoxServer
- type UnsafeLitterBoxServer
Constants ¶
This section is empty.
Variables ¶
var File_litterboxsvc_svc_proto protoreflect.FileDescriptor
var LitterBox_ServiceDesc = grpc.ServiceDesc{ ServiceName: "autokitteh.litterbox.LitterBox", HandlerType: (*LitterBoxServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Setup", Handler: _LitterBox_Setup_Handler, }, { MethodName: "Scoop", Handler: _LitterBox_Scoop_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Run", Handler: _LitterBox_Run_Handler, ServerStreams: true, }, }, Metadata: "litterboxsvc/svc.proto", }
LitterBox_ServiceDesc is the grpc.ServiceDesc for LitterBox service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLitterBoxHandler ¶
func RegisterLitterBoxHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterLitterBoxHandler registers the http handlers for service LitterBox to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterLitterBoxHandlerClient ¶
func RegisterLitterBoxHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LitterBoxClient) error
RegisterLitterBoxHandlerClient registers the http handlers for service LitterBox to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LitterBoxClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LitterBoxClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "LitterBoxClient" to call the correct interceptors.
func RegisterLitterBoxHandlerFromEndpoint ¶
func RegisterLitterBoxHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterLitterBoxHandlerFromEndpoint is same as RegisterLitterBoxHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterLitterBoxHandlerServer ¶
func RegisterLitterBoxHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LitterBoxServer) error
RegisterLitterBoxHandlerServer registers the http handlers for service LitterBox to "mux". UnaryRPC :call LitterBoxServer 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 RegisterLitterBoxHandlerFromEndpoint instead.
func RegisterLitterBoxServer ¶
func RegisterLitterBoxServer(s grpc.ServiceRegistrar, srv LitterBoxServer)
Types ¶
type LitterBoxClient ¶
type LitterBoxClient interface { Setup(ctx context.Context, in *SetupRequest, opts ...grpc.CallOption) (*SetupResponse, error) Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (LitterBox_RunClient, error) Scoop(ctx context.Context, in *ScoopRequest, opts ...grpc.CallOption) (*ScoopResponse, error) }
LitterBoxClient is the client API for LitterBox 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 NewLitterBoxClient ¶
func NewLitterBoxClient(cc grpc.ClientConnInterface) LitterBoxClient
type LitterBoxServer ¶
type LitterBoxServer interface { Setup(context.Context, *SetupRequest) (*SetupResponse, error) Run(*RunRequest, LitterBox_RunServer) error Scoop(context.Context, *ScoopRequest) (*ScoopResponse, error) // contains filtered or unexported methods }
LitterBoxServer is the server API for LitterBox service. All implementations must embed UnimplementedLitterBoxServer for forward compatibility
type LitterBox_RunClient ¶
type LitterBox_RunClient interface { Recv() (*RunUpdate, error) grpc.ClientStream }
type LitterBox_RunServer ¶
type LitterBox_RunServer interface { Send(*RunUpdate) error grpc.ServerStream }
type RunRequest ¶
type RunRequest struct { // If id is empty, run will setup, use and scoop the litterbox by itself. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` Event *SyntheticEvent `protobuf:"bytes,3,opt,name=event,proto3" json:"event,omitempty"` // contains filtered or unexported fields }
func (*RunRequest) Descriptor
deprecated
func (*RunRequest) Descriptor() ([]byte, []int)
Deprecated: Use RunRequest.ProtoReflect.Descriptor instead.
func (*RunRequest) GetEvent ¶
func (x *RunRequest) GetEvent() *SyntheticEvent
func (*RunRequest) GetId ¶
func (x *RunRequest) GetId() string
func (*RunRequest) GetSource ¶
func (x *RunRequest) GetSource() string
func (*RunRequest) ProtoMessage ¶
func (*RunRequest) ProtoMessage()
func (*RunRequest) ProtoReflect ¶
func (x *RunRequest) ProtoReflect() protoreflect.Message
func (*RunRequest) Reset ¶
func (x *RunRequest) Reset()
func (*RunRequest) String ¶
func (x *RunRequest) String() string
func (*RunRequest) Validate ¶
func (m *RunRequest) Validate() error
Validate checks the field values on RunRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RunRequestValidationError ¶
type RunRequestValidationError struct {
// contains filtered or unexported fields
}
RunRequestValidationError is the validation error returned by RunRequest.Validate if the designated constraints aren't met.
func (RunRequestValidationError) Cause ¶
func (e RunRequestValidationError) Cause() error
Cause function returns cause value.
func (RunRequestValidationError) Error ¶
func (e RunRequestValidationError) Error() string
Error satisfies the builtin error interface
func (RunRequestValidationError) ErrorName ¶
func (e RunRequestValidationError) ErrorName() string
ErrorName returns error name.
func (RunRequestValidationError) Field ¶
func (e RunRequestValidationError) Field() string
Field function returns field value.
func (RunRequestValidationError) Key ¶
func (e RunRequestValidationError) Key() bool
Key function returns key value.
func (RunRequestValidationError) Reason ¶
func (e RunRequestValidationError) Reason() string
Reason function returns reason value.
type RunUpdate ¶
type RunUpdate struct { T *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=t,proto3" json:"t,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` State *lang.RunState `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` // contains filtered or unexported fields }
func (*RunUpdate) Descriptor
deprecated
func (*RunUpdate) GetT ¶
func (x *RunUpdate) GetT() *timestamppb.Timestamp
func (*RunUpdate) ProtoMessage ¶
func (*RunUpdate) ProtoMessage()
func (*RunUpdate) ProtoReflect ¶
func (x *RunUpdate) ProtoReflect() protoreflect.Message
type RunUpdateValidationError ¶
type RunUpdateValidationError struct {
// contains filtered or unexported fields
}
RunUpdateValidationError is the validation error returned by RunUpdate.Validate if the designated constraints aren't met.
func (RunUpdateValidationError) Cause ¶
func (e RunUpdateValidationError) Cause() error
Cause function returns cause value.
func (RunUpdateValidationError) Error ¶
func (e RunUpdateValidationError) Error() string
Error satisfies the builtin error interface
func (RunUpdateValidationError) ErrorName ¶
func (e RunUpdateValidationError) ErrorName() string
ErrorName returns error name.
func (RunUpdateValidationError) Field ¶
func (e RunUpdateValidationError) Field() string
Field function returns field value.
func (RunUpdateValidationError) Key ¶
func (e RunUpdateValidationError) Key() bool
Key function returns key value.
func (RunUpdateValidationError) Reason ¶
func (e RunUpdateValidationError) Reason() string
Reason function returns reason value.
type ScoopRequest ¶
type ScoopRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ScoopRequest) Descriptor
deprecated
func (*ScoopRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScoopRequest.ProtoReflect.Descriptor instead.
func (*ScoopRequest) GetId ¶
func (x *ScoopRequest) GetId() string
func (*ScoopRequest) ProtoMessage ¶
func (*ScoopRequest) ProtoMessage()
func (*ScoopRequest) ProtoReflect ¶
func (x *ScoopRequest) ProtoReflect() protoreflect.Message
func (*ScoopRequest) Reset ¶
func (x *ScoopRequest) Reset()
func (*ScoopRequest) String ¶
func (x *ScoopRequest) String() string
func (*ScoopRequest) Validate ¶
func (m *ScoopRequest) Validate() error
Validate checks the field values on ScoopRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ScoopRequestValidationError ¶
type ScoopRequestValidationError struct {
// contains filtered or unexported fields
}
ScoopRequestValidationError is the validation error returned by ScoopRequest.Validate if the designated constraints aren't met.
func (ScoopRequestValidationError) Cause ¶
func (e ScoopRequestValidationError) Cause() error
Cause function returns cause value.
func (ScoopRequestValidationError) Error ¶
func (e ScoopRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ScoopRequestValidationError) ErrorName ¶
func (e ScoopRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ScoopRequestValidationError) Field ¶
func (e ScoopRequestValidationError) Field() string
Field function returns field value.
func (ScoopRequestValidationError) Key ¶
func (e ScoopRequestValidationError) Key() bool
Key function returns key value.
func (ScoopRequestValidationError) Reason ¶
func (e ScoopRequestValidationError) Reason() string
Reason function returns reason value.
type ScoopResponse ¶
type ScoopResponse struct {
// contains filtered or unexported fields
}
func (*ScoopResponse) Descriptor
deprecated
func (*ScoopResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScoopResponse.ProtoReflect.Descriptor instead.
func (*ScoopResponse) ProtoMessage ¶
func (*ScoopResponse) ProtoMessage()
func (*ScoopResponse) ProtoReflect ¶
func (x *ScoopResponse) ProtoReflect() protoreflect.Message
func (*ScoopResponse) Reset ¶
func (x *ScoopResponse) Reset()
func (*ScoopResponse) String ¶
func (x *ScoopResponse) String() string
func (*ScoopResponse) Validate ¶
func (m *ScoopResponse) Validate() error
Validate checks the field values on ScoopResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ScoopResponseValidationError ¶
type ScoopResponseValidationError struct {
// contains filtered or unexported fields
}
ScoopResponseValidationError is the validation error returned by ScoopResponse.Validate if the designated constraints aren't met.
func (ScoopResponseValidationError) Cause ¶
func (e ScoopResponseValidationError) Cause() error
Cause function returns cause value.
func (ScoopResponseValidationError) Error ¶
func (e ScoopResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ScoopResponseValidationError) ErrorName ¶
func (e ScoopResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ScoopResponseValidationError) Field ¶
func (e ScoopResponseValidationError) Field() string
Field function returns field value.
func (ScoopResponseValidationError) Key ¶
func (e ScoopResponseValidationError) Key() bool
Key function returns key value.
func (ScoopResponseValidationError) Reason ¶
func (e ScoopResponseValidationError) Reason() string
Reason function returns reason value.
type SetupRequest ¶
type SetupRequest struct {
// contains filtered or unexported fields
}
func (*SetupRequest) Descriptor
deprecated
func (*SetupRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetupRequest.ProtoReflect.Descriptor instead.
func (*SetupRequest) ProtoMessage ¶
func (*SetupRequest) ProtoMessage()
func (*SetupRequest) ProtoReflect ¶
func (x *SetupRequest) ProtoReflect() protoreflect.Message
func (*SetupRequest) Reset ¶
func (x *SetupRequest) Reset()
func (*SetupRequest) String ¶
func (x *SetupRequest) String() string
func (*SetupRequest) Validate ¶
func (m *SetupRequest) Validate() error
Validate checks the field values on SetupRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type SetupRequestValidationError ¶
type SetupRequestValidationError struct {
// contains filtered or unexported fields
}
SetupRequestValidationError is the validation error returned by SetupRequest.Validate if the designated constraints aren't met.
func (SetupRequestValidationError) Cause ¶
func (e SetupRequestValidationError) Cause() error
Cause function returns cause value.
func (SetupRequestValidationError) Error ¶
func (e SetupRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SetupRequestValidationError) ErrorName ¶
func (e SetupRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SetupRequestValidationError) Field ¶
func (e SetupRequestValidationError) Field() string
Field function returns field value.
func (SetupRequestValidationError) Key ¶
func (e SetupRequestValidationError) Key() bool
Key function returns key value.
func (SetupRequestValidationError) Reason ¶
func (e SetupRequestValidationError) Reason() string
Reason function returns reason value.
type SetupResponse ¶
type SetupResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*SetupResponse) Descriptor
deprecated
func (*SetupResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetupResponse.ProtoReflect.Descriptor instead.
func (*SetupResponse) GetId ¶
func (x *SetupResponse) GetId() string
func (*SetupResponse) ProtoMessage ¶
func (*SetupResponse) ProtoMessage()
func (*SetupResponse) ProtoReflect ¶
func (x *SetupResponse) ProtoReflect() protoreflect.Message
func (*SetupResponse) Reset ¶
func (x *SetupResponse) Reset()
func (*SetupResponse) String ¶
func (x *SetupResponse) String() string
func (*SetupResponse) Validate ¶
func (m *SetupResponse) Validate() error
Validate checks the field values on SetupResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type SetupResponseValidationError ¶
type SetupResponseValidationError struct {
// contains filtered or unexported fields
}
SetupResponseValidationError is the validation error returned by SetupResponse.Validate if the designated constraints aren't met.
func (SetupResponseValidationError) Cause ¶
func (e SetupResponseValidationError) Cause() error
Cause function returns cause value.
func (SetupResponseValidationError) Error ¶
func (e SetupResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SetupResponseValidationError) ErrorName ¶
func (e SetupResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SetupResponseValidationError) Field ¶
func (e SetupResponseValidationError) Field() string
Field function returns field value.
func (SetupResponseValidationError) Key ¶
func (e SetupResponseValidationError) Key() bool
Key function returns key value.
func (SetupResponseValidationError) Reason ¶
func (e SetupResponseValidationError) Reason() string
Reason function returns reason value.
type SyntheticEvent ¶
type SyntheticEvent struct { SrcBinding string `protobuf:"bytes,1,opt,name=src_binding,json=srcBinding,proto3" json:"src_binding,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Data map[string]*values.Value `` /* 149-byte string literal not displayed */ OriginalId string `protobuf:"bytes,4,opt,name=original_id,json=originalId,proto3" json:"original_id,omitempty"` // contains filtered or unexported fields }
func (*SyntheticEvent) Descriptor
deprecated
func (*SyntheticEvent) Descriptor() ([]byte, []int)
Deprecated: Use SyntheticEvent.ProtoReflect.Descriptor instead.
func (*SyntheticEvent) GetOriginalId ¶
func (x *SyntheticEvent) GetOriginalId() string
func (*SyntheticEvent) GetSrcBinding ¶
func (x *SyntheticEvent) GetSrcBinding() string
func (*SyntheticEvent) GetType ¶
func (x *SyntheticEvent) GetType() string
func (*SyntheticEvent) ProtoMessage ¶
func (*SyntheticEvent) ProtoMessage()
func (*SyntheticEvent) ProtoReflect ¶
func (x *SyntheticEvent) ProtoReflect() protoreflect.Message
func (*SyntheticEvent) Reset ¶
func (x *SyntheticEvent) Reset()
func (*SyntheticEvent) String ¶
func (x *SyntheticEvent) String() string
func (*SyntheticEvent) Validate ¶
func (m *SyntheticEvent) Validate() error
Validate checks the field values on SyntheticEvent with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type SyntheticEventValidationError ¶
type SyntheticEventValidationError struct {
// contains filtered or unexported fields
}
SyntheticEventValidationError is the validation error returned by SyntheticEvent.Validate if the designated constraints aren't met.
func (SyntheticEventValidationError) Cause ¶
func (e SyntheticEventValidationError) Cause() error
Cause function returns cause value.
func (SyntheticEventValidationError) Error ¶
func (e SyntheticEventValidationError) Error() string
Error satisfies the builtin error interface
func (SyntheticEventValidationError) ErrorName ¶
func (e SyntheticEventValidationError) ErrorName() string
ErrorName returns error name.
func (SyntheticEventValidationError) Field ¶
func (e SyntheticEventValidationError) Field() string
Field function returns field value.
func (SyntheticEventValidationError) Key ¶
func (e SyntheticEventValidationError) Key() bool
Key function returns key value.
func (SyntheticEventValidationError) Reason ¶
func (e SyntheticEventValidationError) Reason() string
Reason function returns reason value.
type UnimplementedLitterBoxServer ¶
type UnimplementedLitterBoxServer struct { }
UnimplementedLitterBoxServer must be embedded to have forward compatible implementations.
func (UnimplementedLitterBoxServer) Run ¶
func (UnimplementedLitterBoxServer) Run(*RunRequest, LitterBox_RunServer) error
func (UnimplementedLitterBoxServer) Scoop ¶
func (UnimplementedLitterBoxServer) Scoop(context.Context, *ScoopRequest) (*ScoopResponse, error)
func (UnimplementedLitterBoxServer) Setup ¶
func (UnimplementedLitterBoxServer) Setup(context.Context, *SetupRequest) (*SetupResponse, error)
type UnsafeLitterBoxServer ¶
type UnsafeLitterBoxServer interface {
// contains filtered or unexported methods
}
UnsafeLitterBoxServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LitterBoxServer will result in compilation errors.