constants

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Success represents the request is success.
	Success = 200

	CodeSystemError    = 500
	CodeParamError     = 501
	CodeTargetNotFound = 502

	CodePeerFinish      = 600
	CodePeerContinue    = 601
	CodePeerWait        = 602
	CodePeerLimited     = 603
	CodeSuperFail       = 604
	CodeUnknownError    = 605
	CodeTaskConflict    = 606
	CodeURLNotReachable = 607
	CodeNeedAuth        = 608
	CodeWaitAuth        = 609
	CodeSourceError     = 610
	CodeGetPieceReport  = 611
	CodeGetPeerDown     = 612
)

the response code returned by supernode

View Source
const (
	ResultFail    = 500
	ResultSuc     = 501
	ResultInvalid = 502
	// ResultSemiSuc represents the result is partial successful.
	ResultSemiSuc = 503
)

the code of task result that dfget will report to supernode

View Source
const (
	TaskStatusStart   = 700
	TaskStatusRunning = 701
	TaskStatusFinish  = 702
)

the code of task status that dfget will report to supernode

View Source
const (
	ClientErrorFileNotExist    = "FILE_NOT_EXIST"
	ClientErrorFileMd5NotMatch = "FILE_MD5_NOT_MATCH"
)

the client error when downloading from supernode that dfget will report to supernode

View Source
const (
	// HTTPError represents that there is an error between client and server.
	HTTPError = -100
)

Variables

This section is empty.

Functions

func GetMsgByCode

func GetMsgByCode(code int) string

GetMsgByCode gets the description of the code.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL