Documentation ¶
Index ¶
- Constants
- func AesCBCDecrypt(rawData string, key []byte) (string, error)
- func AesCBCEncrypt(rawData, key []byte) (string, error)
- func ColorText(color int, str string) string
- func CryptoJSAESDecrypt(rawData string, key []byte) (result string, err error)
- func CryptoJSAESEncrypt(rawData string, key []byte) (result string, err error)
- func DBModel2View[Source base.IDBModel, DEST base.IViewModel](model Source) (result DEST, err error)
- func DBModelList2ViewList[Source base.IDBModel, DEST base.IViewModel](models []Source) (result []DEST, err error)
- func GetExecutorContext(executor string) context.Context
- func GetModelDBFieldNames(module interface{}) (result map[string]*Field, err error)
- func GetObjProperty(obj interface{}, fieldName string) (interface{}, error)
- func GetRndUnUsePortNumber() (result int, err error)
- func ImageZoom(url string, width uint, m image.Image) (image.Image, error)
- func Md5Hash(source string) string
- func NewGuid() (result uuid.UUID)
- func NewGuidString() (result string)
- func NewHexId() (result string)
- func NewId() (result uint64)
- func PathExists(path string) (bool, error)
- func PortCanUse(portNumber int) bool
- func PrintErrorInfo(str string)
- func PrintInfo(str string)
- func ProcessSwaggerTemplate(template string, placeholder string, realPath string) (result string)
- func ReadBody(ctx iris.Context, vModel base.IViewModel) (err error)
- func ResizeImage(imgData []byte, width, height uint) (result []byte, err error)
- func ResizeImageByData(imgData []byte, width, height uint) (result []byte, err error)
- func SHA1(data string) string
- func ServiceLoadInfo(serviceName string, enable bool, loadTime time.Time)
- func WriteJson(ctx iris.Context, v interface{})
- func WriteWithFileWrite(filePath, fileName, content string)
- type Field
Constants ¶
View Source
const ( TextBlack = iota + 30 TextRed TextGreen TextYellow TextBlue TextPurple TextCyan TextWhite )
Variables ¶
This section is empty.
Functions ¶
func AesCBCEncrypt ¶
func CryptoJSAESDecrypt ¶
CryptoJS解密(适配CryptoJS, CBC+pKCS7)
func CryptoJSAESEncrypt ¶
CryptoJS加密(适配CryptoJS, CBC+pKCS7)
func DBModel2View ¶
func DBModel2View[Source base.IDBModel, DEST base.IViewModel](model Source) (result DEST, err error)
func DBModelList2ViewList ¶
func DBModelList2ViewList[Source base.IDBModel, DEST base.IViewModel](models []Source) (result []DEST, err error)
func GetExecutorContext ¶
func GetModelDBFieldNames ¶
通过反射转换,反向通过字段Tag信息查找字段名,然后转换成实际数据库字段名称,此方法在系统启动时运行,不影响运行效率
func GetObjProperty ¶
func GetRndUnUsePortNumber ¶
GetRndUnUsePortNumber 获取未使用随机端口
func NewGuidString ¶
func NewGuidString() (result string)
func PathExists ¶
func PrintErrorInfo ¶
func PrintErrorInfo(str string)
func ProcessSwaggerTemplate ¶
处理Swagger模版,替换其中接口访问占位符为当前挂载路径
func ReadBody ¶
func ReadBody(ctx iris.Context, vModel base.IViewModel) (err error)
func ResizeImage ¶ added in v0.0.3
缩放图片imgType:jpg/png
func ResizeImageByData ¶ added in v0.0.3
缩放图片imgType:jpg/png
func WriteWithFileWrite ¶
func WriteWithFileWrite(filePath, fileName, content string)
Types ¶
Click to show internal directories.
Click to hide internal directories.