Documentation
¶
Index ¶
Constants ¶
View Source
const ( ApiUrl string = "/api" RegistUrl string = "/regist" LoginUrl string = "/login" GetUserInfoByIdUrl string = "/getuserinfobyid" PostIdeaUrl string = "/postidea" DeleteIdeaUrl string = "/deleteidea" ShowNewestIdeasUrl string = "/shownewestideas" ShowAllIdeasByUserInfoUrl string = "/showallideasbyuserinfo" SearchIdeaByTitleUrl string = "/searchideabytitle" SearchIdeaByTextUrl string = "/searchideabytext" )
所有URL
View Source
const (
DefaultCost int = 10
)
用户密码加密COST
View Source
const (
IdeasNum int64 = 30
)
每次返回帖子数量
Variables ¶
允许直接通过的URL
Functions ¶
func GetCommentCollection ¶
func GetCommentCollection() *mongo.Collection
func GetIdeaCollection ¶
func GetIdeaCollection() *mongo.Collection
func GetUserCollection ¶
func GetUserCollection() *mongo.Collection
Types ¶
type ControllerSet ¶
type ControllerSet struct {
// contains filtered or unexported fields
}
func NewControllerSet ¶
func NewControllerSet() *ControllerSet
func (*ControllerSet) ADD ¶
func (c *ControllerSet) ADD(p string, m MethodType, f func(*gin.Context))
type MethodType ¶
type MethodType string
const ( Method_GET MethodType = "GET" Method_POST MethodType = "POST" Method_DELETE MethodType = "DELETE" )
请求方式
Click to show internal directories.
Click to hide internal directories.