Documentation ¶
Index ¶
- Constants
- func Contains(str string, a []string) (int, bool)
- func ReadPerm(username string, p Permission, s Section) bool
- func WritePerm(username string, p Permission, s Section) bool
- type Config
- type Page
- type Pages
- type Permission
- type Result
- type Section
- type SectionPage
- type SectionPages
- type Sections
- type Stats
- type UpdatedPages
- type User
- type Users
Constants ¶
View Source
const ( IndexPage = "Index" WikiSection = "wiki" IndexURI = WikiSection + "/" + IndexPage RootURI = "/" WikiURI = "/wiki" LoginURI = "/login" LogoutURI = "/logout" TotpURI = "/totp" SectionsURI = "/sections" SectionURI = "/section" SearchURI = "/search" StatsURI = "/stats" NewURI = "/new" BlacklistURI = "/blacklist" UsersURI = "/users" UserURI = "/user" ViewURI = "/view" StaticURI = "/static" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { DataDir string `json:"data_dir,omitempty"` User string `json:"user,omitempty"` Group string `json:"group,omitempty"` ListenAddr string `json:"listen_addr,omitempty"` LogFile string `json:"log_file,omitempty"` Version string `json:"-"` Secret string `json:"secret,omitempty"` Admin bool `json:"admin,omitempty"` Foreground bool `json:"foreground,omitempty"` SecureCookie bool `json:"secure_cookie,omitempty"` Debug bool `json:"debug,omitempty"` }
type Permission ¶
type Permission int
const ( Invalid Permission = iota Public Private )
func ParsePermString ¶
func ParsePermString(p string) Permission
type SectionPage ¶
type SectionPage struct { Section string Pages UpdatedPages }
type SectionPages ¶
type SectionPages []SectionPage
func (SectionPages) Len ¶
func (s SectionPages) Len() int
func (SectionPages) Less ¶
func (s SectionPages) Less(i, j int) bool
func (SectionPages) Swap ¶
func (s SectionPages) Swap(i, j int)
type UpdatedPages ¶
type UpdatedPages []Page
func (UpdatedPages) Len ¶
func (p UpdatedPages) Len() int
func (UpdatedPages) Less ¶
func (p UpdatedPages) Less(i, j int) bool
func (UpdatedPages) Swap ¶
func (p UpdatedPages) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.