Documentation ¶
Index ¶
- type DB
- func (db DB) AddCommunityMembership(user_id, community_id int) (err error)
- func (db DB) ChangePassword(email, newPassword string) error
- func (db DB) ChangeUsername(user_id int, newUsername string) error
- func (db DB) CheckEmailInUse(email string) (err error)
- func (db DB) DeleteCommunityMembership(user_id, community_id int) (err error)
- func (db DB) DeleteOtherSessions(user_id int, sessionid string) (loggedOut int, err error)
- func (db DB) GetEmail(sessionid string) (email string, err error)
- func (db DB) GetPage(categorySlug, pageSlug string) (page common.Page, err error)
- func (db DB) GetPages() (pages []common.Page, err error)
- func (db DB) GetPasswordHash(email string) (hash string, err error)
- func (db DB) GetPostsForPage(userid, pageid int) (posts []common.Post, err error)
- func (db DB) GetSessionUserID(sessionid string) (userid int, err error)
- func (db DB) GetSlugs(pageID int) (categorySlug, pageSlug string, err error)
- func (db DB) GetTopPages() (pages []common.PagePostCount, err error)
- func (db DB) GetUserID(email string, password string) (userid int, err error)
- func (db DB) GetUserInfo(sessionid string) (userInfo common.UserInfo, err error)
- func (db DB) GetUsername(sessionid string) (username string, err error)
- func (db DB) ListCategories() (categories map[string]string, err error)
- func (db DB) ListCommunities(userid int) (communities []common.Community, err error)
- func (db DB) Logout(sessionid string) error
- func (db DB) NewPage(userID int, title, slug, description, address, website string, category int) (pageID int, err error)
- func (db DB) NewPost(userID, pageID int, post string) (err error)
- func (db DB) NewSession(userid int) (sessionid string, err error)
- func (db DB) OpenSessions(user_id int) (numSessions int, err error)
- func (db DB) PasswordChangeRequired(sessionid string) (isRequired bool, err error)
- func (db DB) RegisterUser(username, email, password string) (err error)
- func (db DB) ResetPassword(email string) (password string, err error)
- func (db DB) SearchPages(query string) (pages []common.Page, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (DB) AddCommunityMembership ¶
func (DB) ChangePassword ¶
func (DB) CheckEmailInUse ¶
func (DB) DeleteCommunityMembership ¶
func (DB) DeleteOtherSessions ¶
func (DB) GetPostsForPage ¶
func (DB) GetSessionUserID ¶
func (DB) GetTopPages ¶
func (db DB) GetTopPages() (pages []common.PagePostCount, err error)
func (DB) GetUserInfo ¶
func (DB) ListCommunities ¶
func (DB) PasswordChangeRequired ¶
func (DB) RegisterUser ¶
Click to show internal directories.
Click to hide internal directories.