Documentation ¶
Overview ¶
group.go -- each group gets its own collection, this is just how we resolve permissions
notification.go -- each group gets its own collection, this is just how we resolve permissions
post.go -- models for post operations
thread.go -- models for thread operations
user.go -- models for user operations
Index ¶
- type AuthUser
- type AuthedUser
- type ChangePW
- type CreateGroup
- type CreateUser
- type DeletePost
- type EditPost
- type Friend
- type GetFriends
- type GetGroup
- type GetNotifications
- type GetPop
- type GetThread
- type GetUser
- type GetUserFeed
- type Group
- type GroupAdmin
- type GroupInfo
- type Grp
- type Mthread
- type Name
- type NewPost
- type NewThread
- type Notification
- type Permission
- type PopularPost
- type PopularPosts
- type Post
- type Recovery
- type RemoveThread
- type ResThread
- type Saved
- type Search
- type SearchUsers
- type SendGroup
- type SendGroupSearch
- type SendPost
- type SendUserSearch
- type Thread
- type ThreadLen
- type User
- type Username
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthedUser ¶
type AuthedUser struct {
Token string `json:"token"`
}
type CreateGroup ¶
type CreateUser ¶
type DeletePost ¶
type GetFriends ¶
type GetFriends struct {
Friends []string `json:"friends"`
}
type GetNotifications ¶
type GetNotifications struct {
Notifications []Notification `json:"notifications"`
}
JSON Handling
type GetUserFeed ¶
type GetUserFeed struct {
Page int `json:"page"`
}
type GroupAdmin ¶
type Mthread ¶
type Mthread struct { Id bson.ObjectId `bson:"_id,omitempty" json:"-"` SId string `bson:"id" json:"id"` Created time.Time `bson:"created" json:"created"` Thread bson.ObjectId `bson:"thread" json:"-"` ThreadId string `bson:"threadId" json:"thread"` Head *Post `bson:"head" json:"head"` Group string `bson:"group" json:"group"` Size int `bson:"-" json:"size"` }
For the Group View
type Notification ¶
type Permission ¶
type PopularPost ¶
type PopularPost struct { Id bson.ObjectId `bson:"_id,omitempty" json:"-"` SId string `bson:"id,omitempty" json:"id"` Thread bson.ObjectId `bson:"thread,omitempty" json:"-"` ThreadId string `bson:"-" json:"thread"` Created time.Time `bson:"created" json:"created"` Author string `bson:"author" json:"author"` AuthorId bson.ObjectId `bson:"authorId,omitempty" json:"-"` Replies []bson.ObjectId `bson:"replies" json:"replies"` ResponseTo []bson.ObjectId `bson:"responseTo" json:"responseTo"` Content string `bson:"content,omitempty" json:"content"` ContentType string `bson:"contentType,omitempty" json:"contentType"` Body string `bson:"body" json:"body"` Group string `bson:"-" json:"group"` Size int `bson:"-" json:"size"` }
pretty much a post, just with a group and size field attached
type PopularPosts ¶
type PopularPosts struct {
Posts []PopularPost `json:"posts"`
}
type Post ¶
type Post struct { Id bson.ObjectId `bson:"_id,omitempty" json:"-"` SId string `bson:"id,omitempty" json:"id"` Thread bson.ObjectId `bson:"thread,omitempty" json:"-"` Created time.Time `bson:"created" json:"created"` Author string `bson:"author" json:"author"` AuthorId bson.ObjectId `bson:"authorId,omitempty" json:"-"` Replies []bson.ObjectId `bson:"replies" json:"replies"` ResponseTo []bson.ObjectId `bson:"responseTo" json:"responseTo"` Content string `bson:"content,omitempty" json:"content"` ContentType string `bson:"contentType,omitempty" json:"contentType"` Body string `bson:"body" json:"body"` }
type RemoveThread ¶
type ResThread ¶
type ResThread struct { Id bson.ObjectId `json:"-" bson:"_id,omitempty"` SId string `json:"id,omitempty" bson:"-"` Created time.Time `json:"created" bson:"created"` Posts []Post `json:"posts" bson:"posts"` Alive bool `json:"-" bson:"alive"` Group string `json:"group" bson:"group"` Mthread string `json:"mthread" bson:"-"` }
type SearchUsers ¶
type SearchUsers struct {
Username string `bson:"username"`
}
type SendGroupSearch ¶
type SendGroupSearch struct {
Groups []string `json:"groups"`
}
type SendUserSearch ¶
type SendUserSearch struct {
Usernames []string `json:"usernames"`
}
type User ¶
type User struct { Id bson.ObjectId `bson:"_id,omitempty"` Created time.Time `bson:"created"` Username string `bson:"username"` Usernames []string `bson:"usernames"` Name string `bson:"name",omitempty` Email string `bson:"email"` Password string `bson:"password"` Friends []bson.ObjectId `bson:"friends"` Notifications []bson.ObjectId `bson:"notifications"` Unread int `bson:"unread"` Requests []bson.ObjectId `bson:"requests"` Activated bool `bson:"activated"` Suspended bool `bson:"suspended"` Saved []bson.ObjectId `bson:"saved"` Description string `bson:"description,omitempty"` }
Click to show internal directories.
Click to hide internal directories.