models

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ForumName              string = "forum_name"
	HeaderMsg              string = "header_msg"
	LoginMsg               string = "login_msg"
	SignupMsg              string = "signup_msg"
	CensoredWords          string = "censored_words"
	SignupDisabled         string = "signup_disabled"
	GroupCreationDisabled  string = "group_creation_disabled"
	ImageUploadEnabled     string = "image_upload_enabled"
	AllowGroupSubscription string = "allow_group_subscription"
	AllowTopicSubscription string = "allow_topic_subscription"
	ReadOnlyMode           string = "read_only"
	DataDir                string = "data_dir"
	BodyAppendage          string = "body_appendage"
	DefaultFromMail        string = "default_from_mail"
	SMTPHost               string = "smtp_host"
	SMTPPort               string = "smtp_port"
	SMTPUser               string = "smtp_user"
	SMTPPass               string = "smtp_pass"
	Version                string = "version"
)
View Source
const ModelVersion = 4

Variables

This section is empty.

Functions

func Config

func Config(key string) string

func ConfigAllVals

func ConfigAllVals() map[string]interface{}

func CreateGroupAdmin added in v1.1.0

func CreateGroupAdmin(userName string, groupID string)

func CreateGroupMod added in v1.1.0

func CreateGroupMod(userName string, groupID string)

func CreateSuperUser

func CreateSuperUser(userName string, passwd string) error

func CreateUser

func CreateUser(userName string, passwd string, email string) error

func IsMigrationNeeded

func IsMigrationNeeded() bool

func IsUserGroupAdmin

func IsUserGroupAdmin(userID string, groupID string) bool

func Migrate

func Migrate()

func Migration1 added in v1.1.0

func Migration1()

func Migration2 added in v1.1.0

func Migration2()

func Migration3 added in v1.2.0

func Migration3()

func Migration4 added in v1.4.0

func Migration4()

func NumComments

func NumComments() int64

func NumGroups

func NumGroups() int64

func NumTopics

func NumTopics() int64

func NumUsers

func NumUsers() int64

func ProbeUser

func ProbeUser(userName string) bool

func ReadAdmins

func ReadAdmins(groupID string) []string

func ReadGroupIDByName

func ReadGroupIDByName(name string) string

func ReadMods

func ReadMods(groupID string) []string

func ReadUserEmail

func ReadUserEmail(userName string) string

func ReadUserIDByName

func ReadUserIDByName(userName string) (int, error)

func ReadUserNameByToken

func ReadUserNameByToken(resetToken string) (string, error)

func UpdateUserPasswd

func UpdateUserPasswd(userName string, passwd string) error

func WriteConfig

func WriteConfig(key string, val string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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