Documentation ¶
Overview ¶
Package store provides store commands.
Index ¶
- Constants
- type Command
- func (c *Command) Delete(rw io.Writer, req io.Reader) command.Error
- func (c *Command) Flush(rw io.Writer, req io.Reader) command.Error
- func (c *Command) Get(rw io.Writer, req io.Reader) command.Error
- func (c *Command) GetHandlers() []command.Handler
- func (c *Command) Iterator(rw io.Writer, req io.Reader) command.Error
- func (c *Command) Put(rw io.Writer, req io.Reader) command.Error
- type DeleteRequest
- type GetRequest
- type GetResponse
- type IteratorRequest
- type IteratorResponse
- type Provider
- type PutRequest
Constants ¶
View Source
const ( // CommandName package command name. CommandName = "store" // GetCommandMethod command method. GetCommandMethod = "Get" // PutCommandMethod command method. PutCommandMethod = "Put" // IteratorCommandMethod command method. IteratorCommandMethod = "Iterator" // DeleteCommandMethod command method. DeleteCommandMethod = "Delete" // FlushCommandMethod command method. FlushCommandMethod = "Flush" )
View Source
const ( // InvalidRequestErrorCode is typically a code for validation errors. InvalidRequestErrorCode = command.Code(iota + command.Store) // GetErrorCode is typically a code for Get errors. GetErrorCode // PutErrorCode is typically a code for Put errors. PutErrorCode // IteratorErrorCode is typically a code for Iterator errors. IteratorErrorCode // DeleteErrorCode is typically a code for Delete errors. DeleteErrorCode )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is controller command for store.
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
type DeleteRequest ¶
type DeleteRequest struct {
Key string `json:"key"`
}
DeleteRequest model
This is used for deleting data from the store
type GetRequest ¶
type GetRequest struct {
Key string `json:"key"`
}
GetRequest model
This is used for getting data from the store
type GetResponse ¶
type GetResponse struct {
Result []byte `json:"result"`
}
GetResponse model
Represents a response of Get command.
type IteratorResponse ¶
type IteratorResponse struct {
Results [][]byte `json:"results"`
}
IteratorResponse model
Represents a response of Iterator command.
Click to show internal directories.
Click to hide internal directories.