Documentation ¶
Index ¶
- Variables
- func CORSMiddleware() gin.HandlerFunc
- func ChangeReputation(c *gin.Context)
- func CheckToken(c *gin.Context)
- func CheckTokenUtility(token string) int
- func CreateThread(c *gin.Context)
- func GenerateCategory()
- func GenerateToken(strlen int) string
- func GetAllCategories(c *gin.Context)
- func GetAllThreads(c *gin.Context)
- func GetTargetUser(c *gin.Context)
- func GetThread(c *gin.Context)
- func GetUser(c *gin.Context)
- func Login(c *gin.Context)
- func Logout(c *gin.Context)
- func Registration(c *gin.Context)
- func SendPost(c *gin.Context)
- func Start(args []string)
- type CategoryReq
- type CategoryStruct
- type GetThreadReq
- type IDReq
- type LoginReq
- type PostReq
- type PostStruct
- type PublicPostStruct
- type PublicThreadStruct
- type PublicUserStruct
- type RegistrationReq
- type ReputationReq
- type ThreadReq
- type ThreadStruct
- type TokenReq
- type UserStruct
Constants ¶
This section is empty.
Variables ¶
View Source
var CategoryList []CategoryStruct
View Source
var CategoryNum int = 1
View Source
var ThreadList []ThreadStruct
View Source
var ThreadNum int = 1
View Source
var UserList []UserStruct
View Source
var UserNum int = 1
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
CORSMiddleware middleware headers for any RESTful requests {{{
func ChangeReputation ¶
func CheckToken ¶
func CheckTokenUtility ¶
func CreateThread ¶
func GenerateCategory ¶
func GenerateCategory()
func GenerateToken ¶
func GetAllCategories ¶
func GetAllThreads ¶
func GetTargetUser ¶
func Registration ¶
Types ¶
type CategoryReq ¶
type CategoryReq struct {
Category int `form:"category" binding:"required"`
}
type CategoryStruct ¶
type GetThreadReq ¶
type GetThreadReq struct {
Thread int `form:"thread" binding:"required"`
}
type PostStruct ¶
type PublicPostStruct ¶
type PublicPostStruct struct { ID int Author PublicUserStruct Text string }
type PublicThreadStruct ¶
type PublicThreadStruct struct { ID int Category int Title string PostNum int Posts []PublicPostStruct }
func ThreadToPublicThread ¶
func ThreadToPublicThread(thread ThreadStruct) (error, PublicThreadStruct)
type PublicUserStruct ¶
func GetUserUtility ¶
func GetUserUtility(id int) (error, PublicUserStruct)
type RegistrationReq ¶
type ReputationReq ¶
type ThreadStruct ¶
type ThreadStruct struct { ID int Category int Title string PostNum int Posts []PostStruct }
Click to show internal directories.
Click to hide internal directories.