Documentation ¶
Index ¶
- func AllIsInvisibleCharacter(str string) bool
- func CheckContent(str string) bool
- func CheckEmail(email string) bool
- func CheckPassword(password string) bool
- func CheckPhoneNumber(phoneNumber string) bool
- func CheckUsername(username string) bool
- func CloseDB()
- func DB() *gorm.DB
- func DeletePreAndSufSpace(str string) string
- func GetHTMLText(html string) string
- func GetRedis() *redis.Client
- func IsBlank(str string) bool
- func MarkdownToHTML(markdownStr string) string
- func MaxInt(a int, b int) int
- func MaxInt64(a int64, b int64) int64
- func MinInt(a int, b int) int
- func MinInt64(a int64, b int64) int64
- func NowTimestamp() int64
- func OpenDB(dsn string, config *gorm.Config, maxIdleConns, maxOpenConns int, ...) (err error)
- func OpenRedis(host string, port string, password string) error
- func RandomAvatarURL(str string) string
- func SubString(str string, start int, end int) string
- func Timestamp(t time.Time) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllIsInvisibleCharacter ¶
AllIsInvisibleCharacter return true if str is full of space
func CheckEmail ¶
CheckEmail return ture if the email is valid or false if invalid
func CheckPassword ¶
CheckPassword return ture if the password is valid or false if invalid
func CheckPhoneNumber ¶
CheckPhoneNumber return ture if the phoneNumber is valid or false if invalid
func CheckUsername ¶
CheckUsername return ture if the username is valid or false if invalid
func DeletePreAndSufSpace ¶
DeletePreAndSufSpace delete the space before and after str
func OpenDB ¶
func OpenDB(dsn string, config *gorm.Config, maxIdleConns, maxOpenConns int, models ...interface{}) (err error)
OpenDB create a connection of db
func RandomAvatarURL ¶
RandomAvatarURL return random profile photo url str to md5 thanks to https://robohash.org
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.