Documentation
¶
Index ¶
- Variables
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func CleanExtraCharacters(a string, b string) string
- func CleanSuperfluousSpace(s string) string
- func CreateUUID() string
- func DefaultAesDecrypt(crypted []byte) ([]byte, error)
- func DefaultAesEncrypt(origData []byte) ([]byte, error)
- func Get(url string, p string) string
- func GetConfig(key string) interface{}
- func GetConsulClientId() string
- func GetFreePort() int
- func GetLocalIP() string
- func GetSelfFilePath() string
- func GetStructByDb(tableName string, packageName string, structName string) (string, error)
- func InArray(t string, arr []string) bool
- func Interface2Interface(in interface{}) (out interface{})
- func Interface2Map(in interface{}, out map[string]interface{})
- func Interface2Struct(in interface{}, out interface{})
- func IsUseConsul() bool
- func JsonByFile(file string, v interface{})
- func JsonDbDriver() *db.Driver
- func JsonDbDriverOpen(parent db.Entity) *db.Driver
- func JsonEncode(v interface{}) string
- func JsonToFile(file string, v interface{}) bool
- func LoadConfig(key string, i interface{})
- func Md5(data string) string
- func Md5ToString(data string) string
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func PathExists(path string) bool
- func Post(url string, p string) string
- func PostRaw(url string, data string) (string, error)
- func RandomInt(length int) int
- func RandomStr(length int) string
- func SaveConfig(key string, i interface{})
- func SetConsulClientId(id string)
- func StartLogToFile(dir string)
- func Unzip(file string, path string) error
- func UseConsul()
- type HttpDo
- type JsonDb
- type Log
Constants ¶
This section is empty.
Variables ¶
View Source
var AesKey = []byte("0123456789abcdef")
View Source
var ConfigFile = "config.json"
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func CleanExtraCharacters ¶
func CleanSuperfluousSpace ¶
func CreateUUID ¶
func CreateUUID() string
func DefaultAesDecrypt ¶
func DefaultAesEncrypt ¶
func GetConsulClientId ¶
func GetConsulClientId() string
func GetFreePort ¶
func GetFreePort() int
func GetLocalIP ¶
func GetLocalIP() string
func GetSelfFilePath ¶
func GetSelfFilePath() string
func GetStructByDb ¶
func Interface2Interface ¶
func Interface2Interface(in interface{}) (out interface{})
func Interface2Map ¶
func Interface2Map(in interface{}, out map[string]interface{})
func Interface2Struct ¶
func Interface2Struct(in interface{}, out interface{})
func IsUseConsul ¶
func IsUseConsul() bool
func JsonByFile ¶
func JsonByFile(file string, v interface{})
func JsonDbDriver ¶
func JsonEncode ¶
func JsonEncode(v interface{}) string
func JsonToFile ¶
func LoadConfig ¶
func LoadConfig(key string, i interface{})
func Md5ToString ¶
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func PathExists ¶
func SaveConfig ¶
func SaveConfig(key string, i interface{})
func SetConsulClientId ¶
func SetConsulClientId(id string)
func StartLogToFile ¶
func StartLogToFile(dir string)
Types ¶
type HttpDo ¶
Click to show internal directories.
Click to hide internal directories.