Documentation
¶
Index ¶
- Constants
- func Base64FromFile(path string) (string, string, error)
- func ConvertFtoS(src float64) string
- func CopyStruct(src, dst interface{})
- func CreateCaptcha(bit int) string
- func DecimalOneDigit(value float64) string
- func EnsureDir(dirName string) error
- func Exists(path string) bool
- func ExternalIP() (res []string)
- func GetCurrentAbPathByCaller() string
- func GetCurrentDirectory() string
- func GetIP() string
- func GetLocalIP()
- func GetParentDirectory(dirctory string) string
- func GetTypeFullName(myvar interface{}) string
- func Getenv(key, fallback string) string
- func HealthCheckHandler(w http.ResponseWriter, r *http.Request)
- func IPS() (ips []string)
- func IsDev() booldeprecated
- func IsMobile(mobile string) bool
- func RandStringBytesMaskImprSrcUnsafe(n int) string
- func RandStringRunes(n int) string
- func Unzip(zipPath, extractDir string) error
- func UploadMultipartFile(client *http.Client, uri, key, path string, headers map[string]string) (*http.Response, error)
- func VerifyEmailFormat(email string) bool
- func VerifyMobileFormat(mobileNum string) bool
- func VerifyMongoErr(err error) booldeprecated
- func Zip(zipPath string, paths ...string) error
- type Configdeprecated
- type ConfigMapdeprecated
- func (c *ConfigMap) Get(key string) stringdeprecated
- func (c *ConfigMap) GetBool(key string) booldeprecated
- func (c *ConfigMap) GetInt(key string) intdeprecated
Constants ¶
View Source
const IPPrefix = "192.168.194"
Variables ¶
This section is empty.
Functions ¶
func Base64FromFile ¶
Base64FromFile 读入文件并使用Base64编码 并且计算MD5
func DecimalOneDigit ¶
DecimalOneDigit 生成报告中格式化一位小数的字符串带百分号
func ExternalIP ¶
func ExternalIP() (res []string)
func GetCurrentAbPathByCaller ¶
func GetCurrentAbPathByCaller() string
GetCurrentAbPathByCaller 获取当前项目绝对路径
func HealthCheckHandler ¶
func HealthCheckHandler(w http.ResponseWriter, r *http.Request)
HealthCheckHandler 构造httptest http头
func UploadMultipartFile ¶
func UploadMultipartFile(client *http.Client, uri, key, path string, headers map[string]string) (*http.Response, error)
UploadMultipartFile 上传文件
func VerifyMobileFormat ¶
VerifyMobileFormat 验证手机号格式是否正确
func VerifyMongoErr
deprecated
Types ¶
type Config
deprecated
Config 旧版配置接口。
Deprecated: 改用 conf.Loader.Scan(&Bootstrap{})。
func ReadConfigMap
deprecated
func ReadConfigMapDev
deprecated
func ReadConfigMapProd
deprecated
type ConfigMap
deprecated
ConfigMap 旧版配置在内存中的存储结构。
Deprecated: 改用 conf.Load。
Click to show internal directories.
Click to hide internal directories.