Documentation
¶
Index ¶
- func DeleteUserMessage(uid int, id int) int64
- func SaveNewGroup(uid int, category string, title string) int64
- func SaveNewUser(fullname string, username string, password string) int64
- func SaveRecipientNewMessage(uid int, msg string) int64
- func SaveSenderNewMessage(uid int, msg string) int64
- type Category
- type DatabaseConnection
- type Group
- type Message
- type User
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteUserMessage ¶
func SaveRecipientNewMessage ¶
func SaveSenderNewMessage ¶
Types ¶
type Category ¶
type Category struct {
Id int `json:"_id,omitempty"`
Uid int `json:"_uid,omitempty"`
Did int `json:"_did,omitempty"`
Rid int `json:"_rid,omitempty"`
Title string `json:"title,omitempty"`
Content []Group `json:"content"`
}
func BuildCategory ¶
func GetAllCategories ¶
func GetCategory ¶
type DatabaseConnection ¶
type DatabaseConnection struct {
}
func NewDatabaseConnection ¶
func NewDatabaseConnection() *DatabaseConnection
type Group ¶
type Group struct {
Id int `json:"_id,omitempty"`
Uid int `json:"_uid,omitempty"`
Did int `json:"_did,omitempty"`
Rid int `json:"_rid,omitempty"`
Title string `json:"title"`
Notifications int `json:"notifications"`
Views []View `json:"views"`
}
func BuildGroup ¶
func GetAllGroups ¶
type Message ¶
type Message struct {
Id int `json:"_id,omitempty"`
Uid int `json:"_uid,omitempty"`
Did int `json:"_did,omitempty"`
Rid int `json:"_rid,omitempty"`
Received string `json:"received,omitempty"`
Sent string `json:"sent,omitempty"`
}
func GetAllMessages ¶
func GetAllMessages() []Message
func GetAllMessagesFromUser ¶
type User ¶
type User struct {
Id int `json:"_id,omitempty"`
Uid int `json:"_uid,omitempty"`
Did int `json:"_did,omitempty"`
Rid int `json:"_rid,omitempty"`
Fullname string `json:"fullname,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Content []Category `json:"content"`
}
func GetAllUsersFromDatabase ¶
func GetAllUsersFromDatabase() []User
func GetUserFromDatabase ¶
type View ¶
type View struct {
Id int `json:"_id,omitempty"`
Uid int `json:"_uid,omitempty"`
Did int `json:"_did,omitempty"`
Rid int `json:"_rid,omitempty"`
User string `json:"user,omitempty"`
Username string `json:"username,omitempty"`
Body string `json:"body,omitempty"`
Content []Message `json:"content"`
Type string `json:"_type,omitempty"`
Status string `json:"_status,omitempty"`
}
func GetAllViews ¶
Click to show internal directories.
Click to hide internal directories.