Documentation ¶
Index ¶
- Constants
- Variables
- func StatusCode(code int) string
- func StatusText(code int) string
- type ContextKey
- func (c ContextKey) Bool(ctx context.Context) (bool, error)
- func (c ContextKey) Error(ctx context.Context) error
- func (c ContextKey) Float64(ctx context.Context) (float64, error)
- func (c ContextKey) Int(ctx context.Context) (int, error)
- func (c ContextKey) Int64(ctx context.Context) (int64, error)
- func (c ContextKey) String(ctx context.Context) (string, error)
- func (c ContextKey) Time(ctx context.Context) (time.Time, error)
- func (c ContextKey) ToString() string
Constants ¶
View Source
const ( DoHUB = 12600 DoLineHaul = 12650 DoSortir = 2600 OnProgress = 2000 OutBranch = 3005 OutHUB = 3010 OutLineHaul = 3050 InHUB = 4500 InLineHaul = 4550 InBranch = 3500 InFilter = 12800 Antss = 14000 BA = 22000 CODA = 23000 CODB = 26500 CODOC = 26550 DLV = 30000 DoneHO = 30100 BROKE = 24000 RTN = 24500 RTC = 24550 RTS = 25000 THP = 28500 InSortir = 13000 Cancel = 1800 CancelDLV = 21800 Lost = 23500 )
awb satus
View Source
const ( //strict equal SE = "==" EQ = "=" GT = ">" GE = ">=" LT = "<" LE = "<=" //regex RE = "~" NE = "!=" SN = "!==" IN = "[]" EM = "{}" )
View Source
const ( // AppName AppName = "poc-go-ulid" HeaderXTraceID = "X-Trace-Id" // Default DefaultPort int = 8080 DefaultLogLevel = "info" MaxBodyLimit = 1024 * 1024 * 12 // 12MB MaxReadTimeOut = 60 // 60 seconds MaxWriteTimeOut = 60 // 60 seconds )
View Source
const ( TxKey = dbConstKey("TxKey") MYSQL = "mysql" POSTGRES = "postgres" POSTGRES_CONN = `host=%s port=%d user=%s password=%s dbname=%s sslmode=disable` )
View Source
const ( StatusCtxKey = 0 StatusSuccess = http.StatusOK StatusErrorForm = http.StatusBadRequest StatusErrorUnknown = http.StatusBadGateway StatusInternalError = http.StatusInternalServerError StatusCreated = http.StatusCreated StatusAccepted = http.StatusAccepted StatusForbidden = http.StatusForbidden StatusInvalidAuthentication = http.StatusProxyAuthRequired StatusNotFound = http.StatusNotFound )
View Source
const ( UIDNodeBits = 10 UIDSequenceBits = 12 )
View Source
const (
GRPCport = ":33339"
)
Variables ¶
View Source
var ( // Error Context ErrCtxDataNotExist = errors.New("the data not exist") ErrNotSupportedDisplayPayload = errors.New("not supported to display payload") )
Functions ¶
func StatusCode ¶
func StatusText ¶
Types ¶
type ContextKey ¶
type ContextKey string
const ( // Context Key ContextKeyLatency ContextKey = "latency" ContextKeyRequestID ContextKey = "request_id" ContextKeyErrorResp ContextKey = "error_response" )
func (ContextKey) ToString ¶
func (c ContextKey) ToString() string
Click to show internal directories.
Click to hide internal directories.