Versions in this module Expand all Collapse all v0 v0.3.2 Nov 9, 2018 Changes in this version + const LockBusy + const LockDbErr + const LockSuccess + const ScheduleTypeCron + const TriggerTypeAuto + const TriggerTypeManual + var DefaultLimit = 1000 + var DefaultOffset = 0 + var ERR_CONN_NOT_EXIST = errors.New("connector does not esit") + var ERR_DB_ERR = errors.New("database error") + var ERR_DEST_CONN_NOT_EXIST = errors.New("invalid destination connector") + var ERR_DEST_SRC_CONN_EQUAL = errors.New("source is the same as destination") + var ERR_INNER_ERR = errors.New("inner error") + var ERR_INVALID_CONN_NAME = errors.New("invalid connector name") + var ERR_INVALID_PLAN_NAME = errors.New("invalid plan name") + var ERR_INVALID_POLICY_NAME = errors.New("invalid policy name") + var ERR_IS_USED_BY_PLAN = errors.New("is used by plan") + var ERR_JOB_NOT_EXIST = errors.New("job not exist") + var ERR_PLAN_NOT_EXIST = errors.New("plan does not exist") + var ERR_PLAN_NOT_IN_TRIGGER = errors.New("specified plan is not in trigger") + var ERR_POLICY_NOT_EXIST = errors.New("policy does not exist") + var ERR_RUN_PLAN_BUSY = errors.New("is scheduling") + var ERR_SRC_CONN_NOT_EXIST = errors.New("invalid source connector") + var JOB_STATUS_FAILED = "failed" + var JOB_STATUS_PENDING = "pending" + var JOB_STATUS_RUNNING = "running" + var JOB_STATUS_SUCCEED = "succeed" + var STOR_TYPE_AWS_S3 = "aws-s3" + var STOR_TYPE_AZURE_BLOB = "azure-blob" + var STOR_TYPE_HW_FUSIONCLOUD = "hw-fusioncloud" + var STOR_TYPE_HW_FUSIONSTORAGE = "hw-fusionstorage" + var STOR_TYPE_HW_OBS = "hw-obs" + var STOR_TYPE_OPENSDS = "opensds-obj" + type Backend struct + AccessKey string + Id bson.ObjectId + Location string + SecreteKey string + Type string + type Connector struct + BucketName string + ConnConfig []KeyValue + StorType string + type Filter struct + Prefix string + Tag []KeyValue + type Job struct + CreateTime time.Time + DestLocation string + EndTime time.Time + Id bson.ObjectId + PassedCapacity int64 + PassedCount int64 + PlanId string + PlanName string + Progress int64 + RemainSource bool + SourceLocation string + StartTime time.Time + Status string + Tenant string + TotalCapacity int64 + TotalCount int64 + TriggerType string + Type string + type KeyValue struct + Key string + Value string + type Plan struct + Description string + DestConn Connector + Filter Filter + Id bson.ObjectId + LastSchedTime int64 + Name string + PolicyEnabled bool + PolicyId string + PolicyName string + PolicyRef mgo.DBRef + RemainSource bool + SourceConn Connector + TenantId string + Type string + UserId string + type Policy struct + Description string + Id bson.ObjectId + Name string + Schedule Schedule + Tenant string + type Schedule struct + TriggerProperties string + Type string