cheerlib

package
v0.0.0-...-03aceed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationBaseDirectory

func ApplicationBaseDirectory() string

func ApplicationFileName

func ApplicationFileName() string

func ApplicationFullPath

func ApplicationFullPath() string

func ApplicationWriteHeapFile

func ApplicationWriteHeapFile(fileName string)

func DirectoryCreateDirectory

func DirectoryCreateDirectory(path string) bool

func DirectoryDeleteDirectory

func DirectoryDeleteDirectory(path string) bool

func DirectoryExists

func DirectoryExists(path string) bool

func EncryptAesDecrypt

func EncryptAesDecrypt(data string, aesKey string) ([]byte, error)

func EncryptAesDecryptData

func EncryptAesDecryptData(data []byte, key []byte) ([]byte, error)

func EncryptAesEncrypt

func EncryptAesEncrypt(data []byte, aesKey string) (string, error)

func EncryptAesEncryptData

func EncryptAesEncryptData(data []byte, key []byte) ([]byte, error)

func EncryptBase64Decode

func EncryptBase64Decode(data string) string

func EncryptBase64Encode

func EncryptBase64Encode(data string) string

func EncryptFileMd5

func EncryptFileMd5(filePath string) string

func EncryptMd5

func EncryptMd5(data string) string

func EncryptNewId

func EncryptNewId() string

func EncryptUrlDecode

func EncryptUrlDecode(data string) string

func EncryptUrlEncode

func EncryptUrlEncode(data string) string

func FileCopy

func FileCopy(srcPath string, desPath string) bool

func FileDelete

func FileDelete(path string) bool

func FileExists

func FileExists(path string) bool

func FileReadAllText

func FileReadAllText(path string) string

func FileRename

func FileRename(oldPath string, newPath string) bool

func FileWriteAllText

func FileWriteAllText(path string, data string) bool

func FileZip

func FileZip(desZipPath string, srcFilePath string, passwd string) error

func FlatMapToStruct

func FlatMapToStruct(srcDataMap map[string]interface{}, desData interface{}) error

func FlatStructCopy

func FlatStructCopy(srcData interface{}, desData interface{}) error

func GetGlobalAppDescription

func GetGlobalAppDescription() string

func GetGlobalAppName

func GetGlobalAppName() string

func LogError

func LogError(logContent string)

func LogInfo

func LogInfo(logContent string)

func LogWarn

func LogWarn(logContent string)

func NetHttpDo

func NetHttpDo(method string, url string, data string, contentType string, authData string) (error, string)

func NetHttpDownloadFile

func NetHttpDownloadFile(url string, filePath string) (error, int64)

func NetHttpGet

func NetHttpGet(url string) (error, string)

func NetHttpGetWithAuth

func NetHttpGetWithAuth(url string, authData string) (error, string)

func NetHttpPostForm

func NetHttpPostForm(url string, formData string, authData string) (error, string)

func NetHttpPostJson

func NetHttpPostJson(url string, jsonData string, authData string) (error, string)

func OSName

func OSName() string

func OSUserName

func OSUserName() string

func OsAllIPV4

func OsAllIPV4() (ipv4s []string)

func OsHostName

func OsHostName() string

func OsIPV4

func OsIPV4() string

func OsProcessNo

func OsProcessNo() string

func SetGlobalAppInfo

func SetGlobalAppInfo(appName string, appDescription string)

func SetGlobalCheerLogFileMaxAge

func SetGlobalCheerLogFileMaxAge(maxAge time.Duration)

func SetGlobalCheerLogger

func SetGlobalCheerLogger(cheerLog *CheerLog)

func StdError

func StdError(logContent string)

func StdInfo

func StdInfo(logContent string)

func TextGetMapColumn

func TextGetMapColumn(dataMapList []map[string]interface{}, colName string) []interface{}

func TextGetString

func TextGetString(data []byte, encoding encoding.Encoding) string

func TextStructFromJson

func TextStructFromJson(data interface{}, dataJson string) error

func TextStructToJson

func TextStructToJson(data interface{}) string

func TimeGetNow

func TimeGetNow() string

func TimeGetTime

func TimeGetTime(t time.Time) string

func TimeStrToTime

func TimeStrToTime(timeStr string) time.Time

func TimeTimestamp

func TimeTimestamp() int64

func TimeUtcTimestamp

func TimeUtcTimestamp() int64

func WebGetContentType

func WebGetContentType(urlPath string) string

func WebReadStaticFile

func WebReadStaticFile(urlPath string) (error, []byte)

Types

type CheerLog

type CheerLog struct {
	// contains filtered or unexported fields
}

func NewCheerLogOnFile

func NewCheerLogOnFile() *CheerLog

func (*CheerLog) InitWithLogWriter

func (this *CheerLog) InitWithLogWriter(logWriterForInfo zapcore.WriteSyncer, logWriterForWarn zapcore.WriteSyncer, logWriterForError zapcore.WriteSyncer) error

func (*CheerLog) LogError

func (this *CheerLog) LogError(logContent string)

func (*CheerLog) LogInfo

func (this *CheerLog) LogInfo(logContent string)

func (*CheerLog) LogWarn

func (this *CheerLog) LogWarn(logContent string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL