Documentation
¶
Index ¶
Constants ¶
View Source
const ( QUEUES = "queues" ORDERLIST = "orders" // Orders list database bucket HISTORY = "history" // History database bucket ORDERCOUNTER = "order_counter" // Indicates the last order id V1 = "v1" // Current API version // Command set CREATE_Q_CMD = "create-q" DELETE_Q_CMD = "delete-q" CREATE_ORDER_CMD = "create-order" FINISH_ORDER_CMD = "finish-order" LIST_CMD = "list" HISTORY_CMD = "history" SUCCESS_RESPONSE = "success" ERROR_RESPONSE = "error" )
View Source
const ( ARG_ERR = iota // Wrong command arguments error CMD_ERR // Command logic error )
Error types
View Source
const API_PREFIX = "/api"
Variables ¶
This section is empty.
Functions ¶
func NonExistentQueue ¶
func WrongArgsError ¶
func WrongArgsError() error
Types ¶
type APIErrorResponse ¶
type Order ¶
type Orderup ¶
type Orderup struct {
// contains filtered or unexported fields
}
func NewOrderup ¶
func (*Orderup) BasicAuth ¶
func (o *Orderup) BasicAuth(pass http.HandlerFunc) http.HandlerFunc
Basic Auth decorate. Decorate API route handler to protect endpoint with token.
func (*Orderup) MakeRequestHandler ¶
Serve Slack API.
type OrderupError ¶
type OrderupError struct { ErrType int // contains filtered or unexported fields }
func NewOrderupError ¶
func NewOrderupError(msg string, errType int) *OrderupError
func (*OrderupError) Error ¶
func (e *OrderupError) Error() string
Click to show internal directories.
Click to hide internal directories.