Documentation ¶
Index ¶
- type DB
- func (db *DB) Add(sig string, exp int64) error
- func (db *DB) AdminUpdateUser(username, password string, admin bool) error
- func (db *DB) Check(sig string) (ok bool)
- func (db *DB) Close() (err error)
- func (db *DB) CreatePage(title, section, markdown, username string, p core.Permission) (page *core.Page, err error)
- func (db *DB) CreateSection(section string, members []string, user bool) error
- func (db *DB) CreateUser(username, password string, admin bool) error
- func (db *DB) DeletePage(title, section, username string) (err error)
- func (db *DB) DeleteSection(section string) error
- func (db *DB) DeleteUser(username string) error
- func (db *DB) Dump(w io.Writer) error
- func (db *DB) GetAllSectionPages(section, username string, admin bool) (pages core.Pages, err error)
- func (db *DB) GetAllSections(username string, admin bool) (sections core.SectionPages)
- func (db *DB) GetPage(section, title, username string) (p *core.Page, err error)
- func (db *DB) GetSection(section string) (s core.Section, err error)
- func (db *DB) GetSections() (secs core.Sections, err error)
- func (db *DB) GetUser(username string) (u *core.User, err error)
- func (db *DB) GetUserSecret(username string) (secret string, err error)
- func (db *DB) GetUserSections(username string) (sections map[string]bool, err error)
- func (db *DB) GetUserWithoutPassword(username string) (u *core.User, err error)
- func (db *DB) GetUsers() (users core.Users, err error)
- func (db *DB) LockedOut(username, created string) bool
- func (db *DB) Login(username, password string) (u *core.User, err error)
- func (db *DB) Map() (list jwt.BlacklistMap, err error)
- func (db *DB) ReadPerm(st, username string, p core.Permission) bool
- func (db *DB) Remove(sig string) error
- func (db *DB) ResetAdmin() error
- func (db *DB) Restore(r io.Reader) (err error)
- func (db *DB) RunMigrations() (err error)
- func (db *DB) SectionExists(section string) error
- func (db *DB) Totp(username, pin string) (u *core.User, err error)
- func (db *DB) UnlockUser(username string) (err error)
- func (db *DB) UpdatePage(title, section, markdown, username string, p core.Permission) (err error)
- func (db *DB) UpdateSection(section string, members []string, user bool) error
- func (db *DB) UpdateUserPassword(username, password string) error
- func (db *DB) UpdateUserSecret(username, secret string) error
- func (db *DB) UserExists(username string) error
- func (db *DB) ValidatePage(st, username string) bool
- func (db *DB) WritePerm(st, username string, p core.Permission) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) AdminUpdateUser ¶
func (*DB) CreatePage ¶
func (*DB) CreateSection ¶
func (*DB) DeletePage ¶
func (*DB) DeleteSection ¶
func (*DB) DeleteUser ¶
func (*DB) GetAllSectionPages ¶
func (*DB) GetAllSections ¶
func (db *DB) GetAllSections(username string, admin bool) (sections core.SectionPages)
func (*DB) GetUserSections ¶
func (*DB) GetUserWithoutPassword ¶
func (*DB) ResetAdmin ¶
func (*DB) RunMigrations ¶
func (*DB) SectionExists ¶
func (*DB) UnlockUser ¶
func (*DB) UpdatePage ¶
func (db *DB) UpdatePage(title, section, markdown, username string, p core.Permission) (err error)
func (*DB) UpdateSection ¶
func (*DB) UpdateUserPassword ¶
func (*DB) UpdateUserSecret ¶
func (*DB) UserExists ¶
func (*DB) ValidatePage ¶
Click to show internal directories.
Click to hide internal directories.