Documentation ¶
Index ¶
- Constants
- Variables
- func Board(data HandlerData) interface{}
- func Boards(data HandlerData) interface{}
- func Conf(data HandlerData) interface{}
- func Data(rw http.ResponseWriter, r *http.Request)
- func DeleteAccount(data HandlerData) interface{}
- func DeletePost(data HandlerData) interface{}
- func DeleteThread(data HandlerData) interface{}
- func EditPassword(data HandlerData) interface{}
- func EditPost(data HandlerData) interface{}
- func EditThread(data HandlerData) interface{}
- func EditUsername(data HandlerData) interface{}
- func ExportData(data HandlerData) interface{}
- func Footer(data HandlerData) interface{}
- func GenerateHandler(handler func(data HandlerData) interface{}) func(http.ResponseWriter, *http.Request)
- func GetUserID(username string) int
- func GetUsername(id int) string
- func Lang(data HandlerData) interface{}
- func LastThreads(data HandlerData) interface{}
- func LastUserThreads(data HandlerData) interface{}
- func Login(data HandlerData) interface{}
- func NewCaptcha(data HandlerData) interface{}
- func NewPost(data HandlerData) interface{}
- func NewThread(data HandlerData) interface{}
- func Page(data HandlerData) interface{}
- func Post(data HandlerData) interface{}
- func Posts(data HandlerData) interface{}
- func Register(data HandlerData) interface{}
- func SecurityHeaders(w http.ResponseWriter, r *http.Request)
- func SetUserData(data HandlerData) interface{}
- func Thread(data HandlerData) interface{}
- func Threads(data HandlerData) interface{}
- func UploadAvatar(w http.ResponseWriter, r *http.Request)
- func User(data HandlerData) interface{}
- func UserData(data HandlerData) interface{}
- func Users(data HandlerData) interface{}
- func Web(rw http.ResponseWriter, r *http.Request)
- type HandlerData
- type Request
Constants ¶
View Source
const ( // TRUE string ("true") TRUE = "true" // FALSE string ("false") FALSE = "false" )
Variables ¶
View Source
var ( // Handlers map Handlers = map[string]func(data HandlerData) interface{}{ "login": Login, "register": Register, "lang": Lang, "conf": Conf, "users": Users, "user": User, "editusername": EditUsername, "editpassword": EditPassword, "deleteaccount": DeleteAccount, "boards": Boards, "board": Board, "threads": Threads, "thread": Thread, "posts": Posts, "newcaptcha": NewCaptcha, "newthread": NewThread, "deletethread": DeleteThread, "newpost": NewPost, "deletepost": DeletePost, "lastthreads": LastThreads, "lastuserthreads": LastUserThreads, "editthread": EditThread, "editpost": EditPost, "post": Post, "footer": Footer, "userdata": UserData, "setuserdata": SetUserData, "exportdata": ExportData, "page": Page, } )
View Source
var ( // Languages map Languages = map[string][]byte{} )
Functions ¶
func DeleteAccount ¶ added in v1.0.11
func DeleteAccount(data HandlerData) interface{}
DeleteAccount handler
func GenerateHandler ¶
func GenerateHandler(handler func(data HandlerData) interface{}) func(http.ResponseWriter, *http.Request)
GenerateHandler add custom variables to handler
func SecurityHeaders ¶
func SecurityHeaders(w http.ResponseWriter, r *http.Request)
SecurityHeaders write CORS and CSP headers
func SetUserData ¶ added in v1.0.13
func SetUserData(data HandlerData) interface{}
SetUserData handler
func UploadAvatar ¶
func UploadAvatar(w http.ResponseWriter, r *http.Request)
UploadAvatar http handler function
Types ¶
type HandlerData ¶ added in v1.0.13
HandlerData structure
type Request ¶ added in v1.0.13
type Request struct {
RequestMap map[string]interface{}
}
Request structure
func (Request) GetStringArray ¶ added in v1.0.13
GetStringArray get string array or nil
Source Files ¶
- board.go
- boards.go
- conf.go
- data.go
- deleteaccount.go
- deletepost.go
- deletethread.go
- editpassword.go
- editpost.go
- editthread.go
- editusername.go
- exportdata.go
- footer.go
- functions.go
- internal.go
- lang.go
- lastthreads.go
- lastuserthreads.go
- login.go
- newcaptcha.go
- newpost.go
- newthread.go
- page.go
- post.go
- posts.go
- register.go
- setuserdata.go
- thread.go
- threads.go
- uploadavatar.go
- user.go
- userdata.go
- users.go
- web.go
Click to show internal directories.
Click to hide internal directories.