Documentation ¶
Index ¶
- func CheckAuth(username, password string) bool
- func CheckMessageAuth(username, messageIdStr string) (code int, err error, msg string)
- func DeleteMessage(messageIdStr string) (code int, err error, msg string)
- func DeleteUser(username string) (code int, err error, msg string)
- func Login(username string, password string) (code int, err error, msg string)
- func ModifyUser(username, newUsername, newPassword string) (code int, err error, msg string)
- func Register(username, password string) (code int, err error, msg string)
- func Setup()
- type Auth
- type Message
- func AddMessage(username, title, content, imageUrl string) (message Message, code int, err error, msg string)
- func GetMessageById(messageIdStr string) (message Message, code int, err error, msg string)
- func GetMessages(pageStr, perPageStr string) (messages []Message, code int, err error, msg string)
- func ModifyMessage(messageIdStr, title, content, imageUrl string) (message Message, code int, err error, msg string)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMessageAuth ¶
func ModifyUser ¶
Types ¶
type Message ¶
type Message struct { MessageId int `json:"message_id"` Username string `json:"username"` Title string `json:"title"` Content string `json:"content"` ImageUrl string `json:"image_url"` CreatedOn int `json:"created_on"` ModifiedOn int `json:"modified_on"` }
func AddMessage ¶
func GetMessageById ¶
func GetMessages ¶
Click to show internal directories.
Click to hide internal directories.