systemfunctions

package
v0.0.0-...-9f8151f Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AesKey = []byte("H4fnCsMf4vbE60nK")

Functions

func AllowRegistration

func AllowRegistration()

func BaseURL

func BaseURL() string

func CheckConfig

func CheckConfig()

func CheckMailConfStatus

func CheckMailConfStatus() bool

func CheckMaintenanceMode

func CheckMaintenanceMode() bool

func CheckRegistration

func CheckRegistration() bool

func CheckSession

func CheckSession(r *http.Request, sesname string) (m bool, v string)

func CountRows

func CountRows(value string, table string, condition string) int

func CreateTable

func CreateTable()

func DBCheck

func DBCheck() bool

func DecryptConfigPasswords

func DecryptConfigPasswords(pwd string) string

func DelSession

func DelSession(w http.ResponseWriter, r *http.Request, sessionname string)

func DeleteRow

func DeleteRow(table string, condition string)

func EmailCheck

func EmailCheck(w http.ResponseWriter, r *http.Request)

func FileExists

func FileExists(filename string) bool

fileExists checks if a file exists and is not a directory before we try using it to prevent further errors.

func ForbidRegistration

func ForbidRegistration()

func GetCustomCSS

func GetCustomCSS() []string

func GetCustomJS

func GetCustomJS() []string

func GetDBString

func GetDBString() []string

func GetDisableFonts

func GetDisableFonts() bool

func GetLogDir

func GetLogDir() string

func GetMemcachedSettings

func GetMemcachedSettings() string

func GetRedisSettings

func GetRedisSettings() string

func GetSS

func GetSS(lg string, param string) string

func GetSiteSettings

func GetSiteSettings(param string) bool

func GetSiteSettingsPath

func GetSiteSettingsPath() []string

func HashConfigPasswords

func HashConfigPasswords()

func InitCache

func InitCache()

func InsertRow

func InsertRow(table string, name []string, value []string)

func IsEmailConfirmation

func IsEmailConfirmation() bool

func IsSession

func IsSession(r *http.Request, sesname string) bool

func LangCode

func LangCode() string

func LoadConfig

func LoadConfig(conf string) []string

func LoadContentDirectory

func LoadContentDirectory() string

func LoadTitle

func LoadTitle() string

func MakeAlive

func MakeAlive()

func OffMailConfirmation

func OffMailConfirmation()

func OnMailConfirmation

func OnMailConfirmation()

func Pad

func Pad(src []byte) []byte

func ParamMaintenance

func ParamMaintenance(w http.ResponseWriter, r *http.Request)

func RandomString

func RandomString(l int) string

func RegStatus

func RegStatus(w http.ResponseWriter, r *http.Request)

func SelectFrom

func SelectFrom(value string, table string, condition string) *sqlx.Rows

func SendEmailNow

func SendEmailNow(to string, uname string, link string, subject string, template string)

func SetErrorLog

func SetErrorLog(value string)

func SetLog

func SetLog(value string)

func SetSession

func SetSession(name string) string

func SysCurl

func SysCurl(method string, curldata [][]string)

func ToMaintenance

func ToMaintenance()

func Unpad

func Unpad(src []byte) ([]byte, error)

func UpdateMailDataFromtDB

func UpdateMailDataFromtDB(Value string)

func UpdateMainDataFromtDB

func UpdateMainDataFromtDB(Value string)

func UpdateRegDataFromtDB

func UpdateRegDataFromtDB(Value string)

func UpdateRow

func UpdateRow(table string, updatedData [][]string, condition string)

func UpdateSession

func UpdateSession(w http.ResponseWriter, r *http.Request, sessionname string)

func UserMailConf

func UserMailConf(uname string) bool

func WriteLog

func WriteLog(value string, p string)

Types

type Data

type Data map[string]interface{}

type MailConfDB

type MailConfDB struct {
	Mail int `db:"mail_confirmed"`
}
type Menus map[string]interface{}
func MenusConfig(lg string) Menus

type Params

type Params map[string]interface{}

func ParamsConfig

func ParamsConfig(lg string) Params

type Request

type Request struct {
	// contains filtered or unexported fields
}

Request struct

func NewRequest

func NewRequest(to []string, subject, body string) *Request

func (*Request) ParseTemplate

func (r *Request) ParseTemplate(templateFileName string, data interface{}) error

func (*Request) SendEmail

func (r *Request) SendEmail() (bool, error)

type SiteSettTable

type SiteSettTable struct {
	Maint    int `db:"maintenance"`
	MailConf int `db:"mail_confirmation"`
	Reg      int `db:"registration"`
}

Jump to

Keyboard shortcuts

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