Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
CheckPassword compares bcrypt hash and plain password. CheckPassword 比较 bcrypt 哈希与明文密码。
func HashPassword ¶
HashPassword hashes a plain password using bcrypt. HashPassword 使用 bcrypt 对明文密码进行哈希。
Types ¶
type PageQuery ¶
PageQuery is a common pagination query. PageQuery 是通用分页查询参数。
func ParsePageQuery ¶
ParsePageQuery parses ?page=&page_size= with sane defaults. ParsePageQuery 解析分页参数并提供合理默认值。
func (PageQuery) OffsetLimit ¶
OffsetLimit calculates SQL offset/limit. OffsetLimit 计算 SQL 的 offset/limit。
Click to show internal directories.
Click to hide internal directories.