Documentation ¶
Index ¶
- Constants
- Variables
- func FilterOwner(value map[string]OwnableItem, owner string) map[string]OwnableItem
- func NewGetAllEndpoint(s S) endpoint.Endpoint
- func NewGetEndpoint(s S) endpoint.Endpoint
- func NewSetEndpoint(s S) endpoint.Endpoint
- type BadRequestError
- type Handler
- type InternalError
- type KeyItemPairRequest
- type KeyNotFoundError
- type OwnableItem
- type S
- type StoreIn
- type StoreOut
Constants ¶
View Source
const ( // TypeLabel is for labeling metrics; if there is a single metric for // successful queries, the typeLabel and corresponding type can be used // when incrementing the metric. TypeLabel = "type" InsertType = "insert" DeleteType = "delete" ReadType = "read" PingType = "ping" )
View Source
const DefaultTTL = 60 * 5
5 minutes
Variables ¶
View Source
var (
ErrNoBucketVariable = errors.New("No bucket variable in URI definition")
)
Functions ¶
func FilterOwner ¶ added in v0.2.0
func FilterOwner(value map[string]OwnableItem, owner string) map[string]OwnableItem
func NewGetAllEndpoint ¶
func NewGetEndpoint ¶
func NewSetEndpoint ¶
Types ¶
type BadRequestError ¶
type BadRequestError struct {
Request interface{}
}
func (BadRequestError) Error ¶
func (bre BadRequestError) Error() string
func (BadRequestError) StatusCode ¶
func (bre BadRequestError) StatusCode() int
type Handler ¶
func NewHandler ¶
type InternalError ¶ added in v0.2.1
type InternalError struct { Reason interface{} Retryable bool }
func (InternalError) Error ¶ added in v0.2.1
func (ie InternalError) Error() string
func (InternalError) StatusCode ¶ added in v0.2.1
func (ie InternalError) StatusCode() int
type KeyItemPairRequest ¶ added in v0.2.0
type KeyItemPairRequest struct { model.Key OwnableItem Method string }
type KeyNotFoundError ¶
func (KeyNotFoundError) Error ¶
func (knfe KeyNotFoundError) Error() string
func (KeyNotFoundError) StatusCode ¶
func (knfe KeyNotFoundError) StatusCode() int
type OwnableItem ¶ added in v0.2.0
type S ¶
type S interface { Push(key model.Key, item OwnableItem) error Get(key model.Key) (OwnableItem, error) Delete(key model.Key) (OwnableItem, error) GetAll(bucket string) (map[string]OwnableItem, error) }
type StoreOut ¶
type StoreOut struct { fx.Out // SetKeyHandler is the http.Handler which can update the Registry SetKeyHandler Handler `name:"setHandler"` // SetKeyHandler is the http.Handler which can update the Registry GetKeyHandler Handler `name:"getHandler"` // SetKeyHandler is the http.Handler which can update the Registry AllKeyHandler Handler `name:"getAllHandler"` }
StoreOut is the set of components emitted by this package
Click to show internal directories.
Click to hide internal directories.