Documentation ¶
Index ¶
- func AppendToFile(path string, content []byte) error
- func Base64ToImage(imageBase64 string) ([]byte, error)
- func CheckExist(src string) bool
- func CheckPermission(src string) bool
- func GetCurrentTimeStamp() int64
- func GetDirFiles(dir string) ([]string, error)
- func GetExt(fileName string) string
- func GetImgType(p string) (string, error)
- func GetSize(f multipart.File) (int, error)
- func GetType(p string) (string, error)
- func GetUUID() string
- func Hmac(data string) string
- func HmacObj(data interface{}) string
- func IsNotExistMkDir(src string) error
- func IsStringEmpty(str string) bool
- func MkDir(src string) error
- func Open(name string, flag int, perm os.FileMode) (*os.File, error)
- func ParseTemplate(filepath string, args interface{}) ([]byte, error)
- func PathExists(path string) bool
- func RemoveRepByMap(slc []string) []string
- func WriteFile(path string, content []byte) error
- type APIException
- type JSONDate
- type JSONTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToFile ¶
func Base64ToImage ¶
func GetCurrentTimeStamp ¶
func GetCurrentTimeStamp() int64
func GetDirFiles ¶
func IsStringEmpty ¶
func ParseTemplate ¶
func PathExists ¶
Types ¶
type APIException ¶
type APIException struct { Code int `json:"code"` Success bool `json:"success"` Msg string `json:"msg"` Timestamp int64 `json:"timestamp"` Result interface{} `json:"result"` }
api结构体
func ResponseJson ¶
func ResponseJson(message string, data interface{}, success bool) *APIException
200
type JSONDate ¶
JSONDate format json time field by myself
func NewJsonDate ¶
func NewJsonDateNow ¶
func NewJsonDateNow() *JSONDate
func NewJsonDateStr ¶
func (JSONDate) MarshalJSON ¶
MarshalJSON on JSONDate format Time field with %Y-%m-%d %H:%M:%S
func (*JSONDate) UnmarshalJSON ¶
type JSONTime ¶
JSONTime format json time field by myself
func NewJsonStr ¶
func NewJsonTime ¶
func NewJsonTimeNow ¶
func NewJsonTimeNow() *JSONTime
func (JSONTime) MarshalJSON ¶
MarshalJSON on JSONTime format Time field with %Y-%m-%d %H:%M:%S
func (*JSONTime) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.