Documentation ¶
Index ¶
- Variables
- func CheckFileIsExist(filename string) bool
- func DeCompress(zipFile, dest string) error
- func DeleteFile(filePath string) error
- func Dir() (string, error)
- func Expand(path string) (string, error)
- func GetDate() string
- func GetFileSize(filePath string) (int64, error)
- func GetMD5(plainText string) string
- func GetMd5(path string) (string, error)
- func GetMd52(file io.Reader) (io.Reader, string, error)
- func GetParamHmacMD5Sign(secret, params string) (string, error)
- func GetParamHmacSHA1Sign(secret, params string) (string, error)
- func GetParamHmacSHA256Base64Sign(secret, params string) (string, error)
- func GetParamHmacSHA256Sign(secret, params string) (string, error)
- func GetParamHmacSHA512Base64Sign(hmac_key string, hmac_data string) string
- func GetParamHmacSHA512Sign(secret, params string) (string, error)
- func GetParamHmacSha384Sign(secret, params string) (string, error)
- func GetParamMD5Sign(secret, params string) (string, error)
- func GetPath() string
- func GetRandomNumeral(l int) string
- func GetRandomString(l int) string
- func GetRunTime() string
- func GetSHA(text string) (string, error)
- func GzipDecode(msg string) string
- func GzipEncode(msg string) string
- func IsDirExists(path string) bool
- func MkDir(path string) error
- func MkdirFile(path string) error
- func RandInt(min int, max int) int
- func RandInt64(min int64, max int64) int64
- func UploadFile(file *multipart.FileHeader, path string) (string, error)
- func UrlDecode(urls string) (string, error)
- func UrlEncode(urls string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var API_ROOT string
当前项目根目录
View Source
var DisableCache bool
DisableCache will disable caching of the home directory. Caching is enabled by default.
Functions ¶
func DeleteFile ¶ added in v1.1.0
func Dir ¶
Dir returns the home directory for the executing user.
This uses an OS-specific method for discovering the home directory. An error is returned if a home directory cannot be detected.
func Expand ¶
Expand expands the path to include the home directory if the path is prefixed with `~`. If it isn't prefixed with `~`, the path is returned as-is.
func GetFileSize ¶ added in v1.1.0
func GetMd52 ¶ added in v1.1.0
从流中直接读取数据计算md5 并返回流的副本,不能用于计算大文件流否则内存占用很大 @return io.Reader @params file的副本
func GetParamHmacMD5Sign ¶
func GetParamHmacSHA1Sign ¶
func GetParamHmacSHA256Sign ¶
func GetParamHmacSHA512Sign ¶
func GetParamHmacSha384Sign ¶
for bitfinex.com
func GetRandomNumeral ¶
func GetRandomString ¶
func GzipDecode ¶
func GzipEncode ¶
func UploadFile ¶ added in v1.1.0
func UploadFile(file *multipart.FileHeader, path string) (string, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.