Documentation ¶
Index ¶
- Constants
- func ClearChunks(srcDirPath string, n int) error
- func FileMD5(file *os.File) string
- func FileSha1(file *os.File) string
- func GenSimpleRespStream(code int, msg string) []byte
- func GenSimpleRespString(code int, msg string) string
- func GenToken(nickname string) string
- func GenUploadID(nickname string) string
- func GetFileSize(filename string) int64
- func Hex2Dec(val string) int64
- func MD5(data []byte) string
- func MergeChunks(desDirPath string, srcDirPath string, fileName string, n int) error
- func PathExists(path string) (bool, error)
- func Sha1(data []byte) string
- type ErrorCode
- type RespMsg
- type Sha1Stream
Constants ¶
View Source
const ( StatusOK int32 StatusParamInvalid StatusServerError StatusRegisterFailed StatusLoginFailed StatusInvalidToken )
Variables ¶
This section is empty.
Functions ¶
func ClearChunks ¶
func GenSimpleRespStream ¶
func GenSimpleRespString ¶
func GenUploadID ¶
func GetFileSize ¶
func MergeChunks ¶
func PathExists ¶
Types ¶
type RespMsg ¶
type RespMsg struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
func NewRespMsg ¶
func (*RespMsg) JSONString ¶
type Sha1Stream ¶
type Sha1Stream struct {
// contains filtered or unexported fields
}
func (*Sha1Stream) Sum ¶
func (obj *Sha1Stream) Sum() string
func (*Sha1Stream) Update ¶
func (obj *Sha1Stream) Update(data []byte)
Click to show internal directories.
Click to hide internal directories.