models

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2017 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version         = "version"
	PageMasterGroup = "page_master_group"
	FileMasterGroup = "file_master_group"
	ConfigJSON      = "config_json"
	HeaderLinks     = "header_links"
	FooterLinks     = "footer_links"
	NavSections     = "nav_sections"
	IllegalNames    = "illegal_names"
)
View Source
const (
	DefaultConfigJSON = `` /* 157-byte string literal not displayed */

	DefaultPageMasterGroup = EverybodyGroup
	DefaultFileMasterGroup = EverybodyGroup
	DefaultHeaderLinks     = `[
	{"Title": "Home", "URL": "/"},
	{"Title": "Download", "URL": "http://www.goodoldweb.com/"}
]`
	DefaultFooterLinks = `` /* 192-byte string literal not displayed */

	DefaultNavSections = `` /* 279-byte string literal not displayed */

	DefaultIllegalNames = `["shit", "crap"]`
)
View Source
const (
	EverybodyGroup = "everybody"
)
View Source
const ModelVersion = 1

Variables

View Source
var (
	IndexPage = "Home Page"
)

Functions

func CreateSuperUser

func CreateSuperUser(username string, passwd string) error

func CreateUser

func CreateUser(username string, passwd string, email string, isSuperUser bool) error

func IsMigrationNeeded

func IsMigrationNeeded() bool

func IsPageTitleValid

func IsPageTitleValid(title string) error

func IsUserInFileMasterGroup

func IsUserInFileMasterGroup(username string) bool

func IsUserInPageMasterGroup

func IsUserInPageMasterGroup(username string) bool

func Migrate

func Migrate()

func Migration1

func Migration1()

func ReadConfig

func ReadConfig(key string) string

func ReadFileMasterGroup

func ReadFileMasterGroup() string

func ReadPageMasterGroup

func ReadPageMasterGroup() string

func UpdateUserPasswd

func UpdateUserPasswd(username string, passwd string) error

func ValidateName

func ValidateName(name string) error

func ValidatePasswd

func ValidatePasswd(passwd string) error

func VerifyPasswd

func VerifyPasswd(username string, passwd string) error

func WriteConfig

func WriteConfig(key string, val string)

Types

type PagesSearchResult

type PagesSearchResult struct {
	Title   string
	CTitle  string
	Snippet template.HTML
}

func PageSearch

func PageSearch(terms string) []PagesSearchResult

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL