Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSessionsManager ¶
func NewSessionsManager(dataSourceName string) (*scs.SessionManager, error)
Types ¶
type CommentHandler ¶
type CommentHandler struct {
// contains filtered or unexported fields
}
func (*CommentHandler) Store ¶
func (h *CommentHandler) Store() http.HandlerFunc
func (*CommentHandler) Vote ¶
func (h *CommentHandler) Vote() http.HandlerFunc
type CreateCommentForm ¶
type CreateCommentForm struct {
Content string
Errors FormErrors
}
func (*CreateCommentForm) Validate ¶
func (f *CreateCommentForm) Validate() bool
type CreatePostForm ¶
type CreatePostForm struct {
Title string
Content string
Errors FormErrors
}
func (*CreatePostForm) Validate ¶
func (f *CreatePostForm) Validate() bool
type CreateThreadForm ¶
type CreateThreadForm struct {
Title string
Description string
Errors FormErrors
}
func (*CreateThreadForm) Validate ¶
func (f *CreateThreadForm) Validate() bool
type FormErrors ¶
type LoginForm ¶
type LoginForm struct {
Username string
Password string
IncorrectCredentials bool
Errors FormErrors
}
type PostHandler ¶
type PostHandler struct {
// contains filtered or unexported fields
}
func (*PostHandler) Create ¶
func (h *PostHandler) Create() http.HandlerFunc
func (*PostHandler) Show ¶
func (h *PostHandler) Show() http.HandlerFunc
func (*PostHandler) Store ¶
func (h *PostHandler) Store() http.HandlerFunc
func (*PostHandler) Vote ¶
func (h *PostHandler) Vote() http.HandlerFunc
type RegisterForm ¶
type RegisterForm struct {
Username string
Password string
UsernameTaken bool
Errors FormErrors
}
func (*RegisterForm) Validate ¶
func (f *RegisterForm) Validate() bool
type SessionData ¶
type SessionData struct {
FlashMessage string
Form interface{}
}
func GetSessionData ¶
func GetSessionData(session *scs.SessionManager, ctx context.Context) SessionData
type ThreadHandler ¶
type ThreadHandler struct {
// contains filtered or unexported fields
}
func (*ThreadHandler) Create ¶
func (h *ThreadHandler) Create() http.HandlerFunc
func (*ThreadHandler) Delete ¶
func (h *ThreadHandler) Delete() http.HandlerFunc
func (*ThreadHandler) List ¶
func (h *ThreadHandler) List() http.HandlerFunc
func (*ThreadHandler) Show ¶
func (h *ThreadHandler) Show() http.HandlerFunc
func (*ThreadHandler) Store ¶
func (h *ThreadHandler) Store() http.HandlerFunc
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func (*UserHandler) Login ¶
func (h *UserHandler) Login() http.HandlerFunc
func (*UserHandler) LoginSubmit ¶
func (h *UserHandler) LoginSubmit() http.HandlerFunc
func (*UserHandler) Logout ¶
func (h *UserHandler) Logout() http.HandlerFunc
func (*UserHandler) Register ¶
func (h *UserHandler) Register() http.HandlerFunc
func (*UserHandler) RegisterSubmit ¶
func (h *UserHandler) RegisterSubmit() http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.