Files
be.ems/lib/global/global.go
2023-08-14 17:02:50 +08:00

59 lines
1.7 KiB
Go

package global
import "errors"
// 跨package引用的首字母大写
const (
RequestBodyMaxLen = 2000000
ApiVersionV1 = "v1"
ApiVersionV2 = "v2"
LineBreak = "\n"
)
const (
DateTime = "2006-01-02 15:04:05"
DateData = "20060102150405"
DateHour = "2006010215"
)
const (
MaxInt32Number = 2147483647
)
const (
MaxLimitData = 1000
)
var (
Version string
BuildTime string
GoVer string
)
var (
ErrParamsNotAdapted = errors.New("the number of params is not adapted")
// PM module error message
ErrPMNotFoundData = errors.New("not found PM data")
// CM module error message
ErrCMNotFoundTargetNE = errors.New("not found target NE")
ErrCMCannotDeleteActiveNE = errors.New("can not delete an active NE")
ErrCMInvalidBackupFile = errors.New("invalid backup file")
ErrCMNotMatchMD5File = errors.New("md5 not match between file and url")
ErrCMNotMatchSignFile = errors.New("digests signatures not match in the file")
ErrCMExistSoftwareFile = errors.New("exist the same software package file")
ErrCMNotFoundTargetSoftware = errors.New("not found the target software package")
ErrCMNotFoundTargetNeVersion = errors.New("not found the target NE version")
ErrCMNotFoundRollbackNeVersion = errors.New("not found the rollback NE version")
ErrCMNotFoundTargetBackupFile = errors.New("not found the target NE backup")
// TRACE module error message
ErrTraceFailedDistributeToNEs = errors.New("failed to distribute trace task to target NEs")
ErrTraceNotCarriedTaskID = errors.New("not carried task id in request url")
// MML module error define
ErrMmlInvalidCommandFormat = errors.New("invalid mml command format")
)