-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
44 lines (41 loc) · 1.58 KB
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package pezdispenser
import (
"errors"
"log"
"net/http"
"os"
)
const (
//TaskStatusAvailable - this means the task is in an avaiable state
TaskStatusAvailable = "available"
//TaskStatusRestocking - reclaiming inventory and restocking
TaskStatusRestocking = "restocking"
//TaskStatusUnavailable - unavailable procurement request
TaskStatusUnavailable = "unavailable"
//TaskStatusStarted - started this task
TaskStatusStarted = "started"
//TaskStatusProcurement - task is now in procurement
TaskStatusProcurement = "in_procurement"
//TaskCollectionName - collection name for tasks
TaskCollectionName = "dispenser_tasks"
//SuccessStatusResponseTaskByID - success statuscode for gettaskbyidcontroller
SuccessStatusResponseTaskByID = http.StatusOK
//FailureStatusResponseTaskByID - failure statuscode for gettaskbyidcontroller
FailureStatusResponseTaskByID = http.StatusNotFound
//CallerPostLease --
CallerPostLease = "post_lease"
//LeaseExpiresFieldName ----
LeaseExpiresFieldName = "lease_expires"
//InventoryIDFieldName ---
InventoryIDFieldName = "inventory_id"
)
var (
//ErrNoMatchInStore - error when there is no matching org in the datastore
ErrNoMatchInStore = errors.New("Could not find a matching user org or connection failure")
//ErrCanNotAddOrgRec - error when we can not add a new org record to the datastore
ErrCanNotAddOrgRec = errors.New("Could not add a new org record")
//ErrEmptyBody - no data in request body
ErrEmptyBody = errors.New("request body is empty or invalid")
//GLogger - a global logger
GLogger *log.Logger = log.New(os.Stdout, "[default]", log.LstdFlags)
)