handlers

package
v0.0.0-...-d41341d Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2018 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MoodEmoji map[string]string
View Source
var MoodStates map[string]int
View Source
var WebAppRoot = os.Getenv("GOPHERFACE_APP_ROOT")

Functions

func DisplayConfirmation

func DisplayConfirmation(w http.ResponseWriter, r *http.Request, s *SignUpForm)

func DisplayLoginForm

func DisplayLoginForm(w http.ResponseWriter, r *http.Request, l *LoginForm)

DisplayLoginForm displays the Sign Up form

func DisplayPostForm

func DisplayPostForm(w http.ResponseWriter, r *http.Request, p *PostForm)

DisplaySignUpForm displays the Sign Up form

func DisplayPostPreview

func DisplayPostPreview(w http.ResponseWriter, r *http.Request, p *PostForm)

func DisplaySignUpForm

func DisplaySignUpForm(w http.ResponseWriter, r *http.Request, s *SignUpForm)

DisplaySignUpForm displays the Sign Up form

func DisplayUploadImageForm

func DisplayUploadImageForm(w http.ResponseWriter, r *http.Request, u *UploadImageForm)

func DisplayUploadVideoForm

func DisplayUploadVideoForm(w http.ResponseWriter, r *http.Request, u *UploadVideoForm)

func FeedHandler

func FeedHandler(env *common.Env) http.HandlerFunc

func FindHandler

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

func FooHandler

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

func FriendsHandler

func FriendsHandler(env *common.Env) http.HandlerFunc

func HomeHandler

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

func LoginHandler

func LoginHandler(e *common.Env) http.Handler

func LogoutHandler

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

func MyProfileHandler

func MyProfileHandler(env *common.Env) http.HandlerFunc

func PopulateFormFields

func PopulateFormFields(r *http.Request, s *SignUpForm)

func PopulateLoginFormFields

func PopulateLoginFormFields(r *http.Request, l *LoginForm)

func PopulatePostFormFields

func PopulatePostFormFields(r *http.Request, p *PostForm)

func PostPreviewHandler

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

func ProcessLoginForm

func ProcessLoginForm(w http.ResponseWriter, r *http.Request, l *LoginForm, e *common.Env)

ProcessLoginForm

func ProcessSignUpForm

func ProcessSignUpForm(w http.ResponseWriter, r *http.Request, s *SignUpForm, e *common.Env)

ProcessSignUpForm

func ProcessUploadImage

func ProcessUploadImage(w http.ResponseWriter, r *http.Request, u *UploadImageForm)

func ProcessUploadVideo

func ProcessUploadVideo(w http.ResponseWriter, r *http.Request, u *UploadVideoForm)

func ProfileHandler

func ProfileHandler(env *common.Env) http.HandlerFunc

func RegisterHandler

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

func RenderGatedTemplate

func RenderGatedTemplate(w http.ResponseWriter, templateFile string, templateData interface{})

func RenderTemplate

func RenderTemplate(w http.ResponseWriter, templateFile string, templateData interface{})

Template rendering function

func SignUpHandler

func SignUpHandler(e *common.Env) http.Handler

func TemplateBundleHandler

func TemplateBundleHandler(env *common.Env) http.Handler

func TriggerPanicHandler

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

func UploadImageHandler

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

func UploadVideoHandler

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

func ValidateLoginForm

func ValidateLoginForm(w http.ResponseWriter, r *http.Request, l *LoginForm, e *common.Env)

ValidateLoginForm validates the Sign Up form's fields

func ValidatePostForm

func ValidatePostForm(w http.ResponseWriter, r *http.Request, p *PostForm)

ValidateSignUpForm validates the Sign Up form's fields

func ValidateSignUpForm

func ValidateSignUpForm(w http.ResponseWriter, r *http.Request, s *SignUpForm, e *common.Env)

ValidateSignUpForm validates the Sign Up form's fields

func ValidateUploadImageForm

func ValidateUploadImageForm(w http.ResponseWriter, r *http.Request, u *UploadImageForm)

func ValidateUploadVideoForm

func ValidateUploadVideoForm(w http.ResponseWriter, r *http.Request, u *UploadVideoForm)

Types

type LoginForm

type LoginForm struct {
	PageTitle  string
	FieldNames []string
	Fields     map[string]string
	Errors     map[string]string
}

type PostForm

type PostForm struct {
	FieldNames  []string
	Fields      map[string]string
	Errors      map[string]string
	Moods       map[string]int
	MoodEmoji   map[string]string
	CurrentMood int
}

type SignUpForm

type SignUpForm struct {
	PageTitle  string
	FieldNames []string
	Fields     map[string]string
	Errors     map[string]string
}

type UploadImageForm

type UploadImageForm struct {
	PageTitle  string
	FieldNames []string
	Fields     map[string]string
	Errors     map[string]string
}

type UploadVideoForm

type UploadVideoForm struct {
	FieldNames []string
	Fields     map[string]string
	Errors     map[string]string
}

Jump to

Keyboard shortcuts

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