utils

package
v0.0.0-...-c96783f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaiduUrlPush

func BaiduUrlPush(urls []string)

百度链接推送

func BuildAbsUrl

func BuildAbsUrl(path string) string

func BuildArticleUrl

func BuildArticleUrl(articleId int64) string

文章详情

func BuildArticlesUrl

func BuildArticlesUrl(page int) string

首页文章列表

func BuildCategoryArticlesUrl

func BuildCategoryArticlesUrl(categoryId int64, page int) string

分类文章列表

func BuildMessagesUrl

func BuildMessagesUrl(page int) string

消息列表

func BuildTagArticlesUrl

func BuildTagArticlesUrl(tagId int64, page int) string

标签文章列表

func BuildTagTopicsUrl

func BuildTagTopicsUrl(tagId int64, page int) string

标签话题列表

func BuildTagsUrl

func BuildTagsUrl(page int) string

标签列表

func BuildTopicUrl

func BuildTopicUrl(topicId int64) string

话题详情

func BuildTopicsUrl

func BuildTopicsUrl(page int) string

话题列表

func BuildUserArticlesUrl

func BuildUserArticlesUrl(userId int64, page int) string

用户文章列表

func BuildUserFavoritesUrl

func BuildUserFavoritesUrl(userId int64, page int) string

用户收藏列表

func BuildUserTopicsUrl

func BuildUserTopicsUrl(userId int64, page int) string

用户主题列表

func BuildUserUrl

func BuildUserUrl(userId int64) string

用户主页

func GetMarkdownSummary

func GetMarkdownSummary(markdown string) string

截取markdown摘要

func GetUserRoles

func GetUserRoles(roles string) []string

获取用户角色

func IndexOf

func IndexOf(userIds []int64, userId int64) int

index of

func InitEmail

func InitEmail()

func IsProd

func IsProd() bool

是否是正式环境

func IsValidateUsername

func IsValidateUsername(username string) bool

验证用户名合法性,用户名必须由5-12位(数字、字母、_、-)组成,且必须以字母开头。

func SendEmail

func SendEmail(to string, subject, html string) error

func SendTemplateEmail

func SendTemplateEmail(to, subject, title, content, quoteContent, url string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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