semafor

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: 16 Imported by: 1

Documentation

Overview

Page for special rights

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Admin

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

func AdminFuncs

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

func ChangeEmail

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

func ChangePass

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

func ChangePassword

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

func ChangeUserEmail

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

func ConfirmEmail

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

func EmailNotVery

func EmailNotVery(w http.ResponseWriter, r *http.Request, mailsend string)

func FP

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

func ForgotPassword

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

func IndexPage

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

func InsertIntoDB

func InsertIntoDB()

func LogOut

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

func Maintenance

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

func Markdownify

func Markdownify(data interface{}) template.HTML

func NotFound

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

func NotFoundAny

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

func PreEmailNotVery

func PreEmailNotVery(w http.ResponseWriter, r *http.Request, uname string)

func Profile

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

func ReqNewEmail

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

func ReturnFPPage

func ReturnFPPage(w http.ResponseWriter, r *http.Request, title string, content []string)

func SelectFromDB

func SelectFromDB()

func Semafor

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

JSON request

func SendConfMail

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

func SendConfirmationEmail

func SendConfirmationEmail(mail string, uname string)

func Signin

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

func Signup

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

func SysAPI

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

func UpdateDB

func UpdateDB()

func UserAPI

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

Types

type ContentData

type ContentData struct {
	Done  bool
	Title string
	Body  []string
}

type Credentials

type Credentials struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

type ForgotPass

type ForgotPass struct {
	Mail string `json:"mail", db:"mail"`
}

type HTMLContentData

type HTMLContentData struct {
	Done  bool
	Body  []template.HTML
	Title template.HTML
}

type HTMLData

type HTMLData struct {
	Header       HeaderData
	SysMsg       SysMsgData
	Menu         MenuData
	Page         template.HTML
	Content      ContentData
	HTMLContent  HTMLContentData
	Site         SiteStruct
	IsTranslated bool
}

func (*HTMLData) BodyToHTML

func (r *HTMLData) BodyToHTML(body []string)

func (*HTMLData) ContentToData

func (data *HTMLData) ContentToData(r *http.Request)

func (*HTMLData) HTMLBodyToHTML

func (r *HTMLData) HTMLBodyToHTML(body []template.HTML)

func (*HTMLData) HeaderToHTML

func (r *HTMLData) HeaderToHTML(Title string)

func (*HTMLData) JstoHtml

func (r *HTMLData) JstoHtml(files []string)

func (*HTMLData) MenuToHTML

func (r *HTMLData) MenuToHTML(Login bool, Admin bool)

func (*HTMLData) RegDataToHTML

func (r *HTMLData) RegDataToHTML(reg bool)

func (*HTMLData) ServicePage

func (s *HTMLData) ServicePage(name string, w http.ResponseWriter, r *http.Request)

func (*HTMLData) ShowPage

func (data *HTMLData) ShowPage(w http.ResponseWriter, r *http.Request, page string)

func (*HTMLData) StandartInfo

func (r *HTMLData) StandartInfo()

type HeaderData

type HeaderData struct {
	Done bool
	JS   Jsdata
}

type Params map[string]interface{}

type ParamsStruct struct {
	description string
	name string
	custom_css []string
	custom_js []string
	disableFonts bool

}

type Jsdata

type Jsdata struct {
	Done bool
	Body []string
}

type Lang

type Lang struct {
	Lang string
}
type MenuData struct {
	Done           bool
	Login, Admin   bool
	IsRegistration bool
}

type RequestStruct

type RequestStruct struct {
	Method string
}

type Roles

type Roles struct {
	Admin string `db:"admin"`
}

type SignUpCred

type SignUpCred struct {
	Password string `json:"password", db:"password"`
	Username string `json:"username", db:"name"`
	Mail     string `json:"mail", db:"mail"`
}

type SiteSettingsTable

type SiteSettingsTable struct {
	ID               int `db:"id"`
	Maintenance      int `db:"maintenance"`
	MailConfirmation int `db:"mail_confirmation"`
	Registration     int `db:"registration"`
}

type SiteStruct

type SiteStruct struct {
	LanguageCode string
	Title        string
	BaseURL      template.URL
	Params       sf.Params
	Language     Lang
	Menus        sf.Menus
	Data         sf.Data
	Content      template.HTML
}

type SysData

type SysData struct {
	Title   string
	Content string
	Login   bool
	Admin   bool
}

type SysMsgData

type SysMsgData struct {
	Done    bool
	Message string
}

type TimeHash

type TimeHash struct {
	Mail     string `db:"mail"`
	Name     string `db:"name"`
	Deadline int    `db:"deadline"`
}

type User

type User struct {
	ID   int    `db:"id"`
	Name string `db:"name"`
	Age  string `db:"age"`
}

type UsersTable

type UsersTable struct {
	UID           string `db:"id"`
	Name          string `db:"name"`
	Password      string `db:"pass"`
	Mail          string `db:"mail"`
	MailConfirmed int    `db:"mail_confirmed"`
	MailSent      string `db:"mailsent"`
	Created       string `db:"created"`
	Access        string `db:"access"`
	Login         string `db:"login"`
	Status        int    `db:"status"`
	Completed     int    `db:"completed"`
}

Jump to

Keyboard shortcuts

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