Documentation ¶
Index ¶
Constants ¶
const ( Path = "~/.qscamel" ConfigPath = Path + "/qscamel.yaml" DatabasePath = Path + "/db" LogPath = Path + "/qscamel.log" PIDPath = Path + "/qscamel.pid" )
Path store all path related constants.
const ( EndpointAliyun = "aliyun" EndpointFileList = "filelist" EndpointFs = "fs" EndpointGCS = "gcs" EndpointQingStor = "qingstor" EndpointQiniu = "qiniu" EndpointS3 = "s3" EndpointUpyun = "upyun" )
Endpoint the const for all supported endpoint.
const ( SourceEndpoint uint8 = iota DestinationEndpoint )
Constants for endpoint type.
const ( TaskTypeCopy = "copy" TaskTypeDelete = "delete" TaskTypeFetch = "fetch" )
Constants for task type.
const ( TaskStatusCreated = "created" TaskStatusRunning = "running" TaskStatusFinished = "finished" )
Constants for task status.
const ( TaskIgnoreExistingLastModified = "last_modified" TaskIgnoreExistingMD5Sum = "md5sum" )
Constants for task ignore existing config.
const ( ObjectTypeDirectory = "directory" ObjectTypeSingle = "single" ObjectTypePartial = "partial" )
Constants for object types.
const ( KeyTaskPrefix = "t:" // ObjectPrefixKey `~` is bigger than all ascii printable characters. ObjectPrefixKey = "~" KeyDirectoryObjectPrefix = "do:" KeySingleObjectPrefix = "so:" KeyPartialObjectPrefix = "po:" )
Constants for database key.
const ( Name = "qscamel" ShortDescription = "A command line tool to migrate data" LongDescription = "qscamel is a command line tool to migrate data between different endpoint efficiently." )
Name stores all name related const.
const DefaultConfigContent = `` /* 126-byte string literal not displayed */
DefaultConfigContent is the default config config.
const DefaultMultipartBoundarySize = 2147483648
DefaultMultipartBoundarySize is the default multipart boundary size. 2 * 1024 * 1024 * 1024 = 2147483648 B = 2 GB
const Version = "2.0.5"
Version number string.
Variables ¶
var ( // ErrTaskInvalid is returned when this task is invalid. ErrTaskInvalid = errors.New("task is invalid") // ErrTaskMismatch is returned when task content has been changed. ErrTaskMismatch = errors.New("task content mismatch") // ErrTaskNotFinished is returned when task is not finished. ErrTaskNotFinished = errors.New("task not finished") // ErrTaskNotFound is returned when task is not found. ErrTaskNotFound = errors.New("task not found") // ErrEndpointInvalid is returned when this endpoint is invalid. ErrEndpointInvalid = errors.New("endpoint is invalid") // ErrEndpointNotSupported is returned when this endpoint is not supported. ErrEndpointNotSupported = errors.New("endpoint type is not supported") // ErrEndpointFuncNotImplemented is return when a not implement function is called. ErrEndpointFuncNotImplemented = errors.New("endpoint does not implement this function") // ErrObjectTooLarge is returned when the object is too large. ErrObjectTooLarge = errors.New("object is too large") // ErrObjectInvalid is returned when the object is invalid. ErrObjectInvalid = errors.New("object is invalid") )
These errors can be returned when handle task.
var ( // DefaultConcurrency is default num of objects being migrated concurrently. DefaultConcurrency = runtime.NumCPU() * 10 )
Functions ¶
func FormatDirectoryObjectKey ¶
FormatDirectoryObjectKey will format a directory object key.
func FormatPartialObjectKey ¶
FormatPartialObjectKey will format a partial object key.
func FormatSingleObjectKey ¶
FormatSingleObjectKey will format a single object key.
Types ¶
This section is empty.