Documentation ¶
Index ¶
- Constants
- Variables
- func FilterOwner(value map[string]OwnableItem, owner string) map[string]OwnableItem
- func ProvideHandlers() fx.Option
- func Sha256HexDigest(message string) string
- type BadRequestErr
- type ForbiddenRequestErr
- type Handler
- type InternalError
- type KeyItemPairRequest
- type KeyNotFoundError
- type OwnableItem
- type S
Constants ¶
View Source
const ( BucketFormatRegexSource = "^[0-9a-z][0-9a-z-]{1,61}[0-9a-z]$" OwnerFormatRegexSource = "^.{10,60}$" )
default input field validation regular expressions. Note: these values are configurable so please check the argus.yaml file if you're interested.
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 ( ItemOwnerHeaderKey = "X-Midt-Owner" XmidtErrorHeaderKey = "X-Midt-Error" )
Request and Response Headers.
View Source
const ElevatedAccessLevel = 1
ElevatedAccessLevel is the bascule attribute value found in requests that should be granted priviledged access to operations.
View Source
const IDFormatRegexSource = "^[0-9a-f]{64}$"
IDFormatRegexSource helps validate the ID on incoming requests.
Variables ¶
View Source
var ErrCasting = errors.New("casting error due to middleware wiring mistake")
ErrCasting indicates there was (most likely) a middleware wiring mistake with the go-kit style encoders/decoders.
Functions ¶
func FilterOwner ¶ added in v0.2.0
func FilterOwner(value map[string]OwnableItem, owner string) map[string]OwnableItem
func ProvideHandlers ¶ added in v0.3.10
ProvideHandlers fetches all dependencies and builds the four main handlers for this store.
func Sha256HexDigest ¶ added in v0.3.10
Sha256HexDigest returns the SHA-256 hex digest of the given input.
Types ¶
type BadRequestErr ¶ added in v0.3.6
type BadRequestErr struct {
Message string
}
func (BadRequestErr) Error ¶ added in v0.3.6
func (bre BadRequestErr) Error() string
func (BadRequestErr) StatusCode ¶ added in v0.3.6
func (bre BadRequestErr) StatusCode() int
type ForbiddenRequestErr ¶ added in v0.3.8
type ForbiddenRequestErr struct {
Message string
}
func (ForbiddenRequestErr) Error ¶ added in v0.3.8
func (f ForbiddenRequestErr) Error() string
func (ForbiddenRequestErr) StatusCode ¶ added in v0.3.8
func (f ForbiddenRequestErr) StatusCode() int
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) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.