Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSessionManager ¶
Types ¶
type CommentsHandler ¶
type CommentsHandler struct {
// contains filtered or unexported fields
}
func (*CommentsHandler) Store ¶
func (h *CommentsHandler) Store() http.HandlerFunc
func (*CommentsHandler) Vote ¶
func (h *CommentsHandler) Vote() http.HandlerFunc
type CreateCommentForm ¶
type CreateCommentForm struct { Content string Errors FormErrors }
func (*CreateCommentForm) Validate ¶
func (f *CreateCommentForm) Validate() bool
Validate validates the comment form with Content
type CreatePostForm ¶
type CreatePostForm struct { Title string Content string Errors FormErrors }
func (*CreatePostForm) Validate ¶
func (f *CreatePostForm) Validate() bool
Validate validates the post form with Title and Content
type CreateThreadForm ¶
type CreateThreadForm struct { Title string Description string Errors FormErrors }
func (*CreateThreadForm) Validate ¶
func (f *CreateThreadForm) Validate() bool
Validate validates the thread form with Title and Description
type FormErrors ¶
type Handler ¶
type Handler struct { *chi.Mux // contains filtered or unexported fields }
func NewHandler ¶
func (*Handler) Home ¶
func (h *Handler) Home() http.HandlerFunc
type LoginForm ¶
type LoginForm struct { Username string Password string IncorrectCredentials bool Errors FormErrors }
type PostsHandler ¶
type PostsHandler struct {
// contains filtered or unexported fields
}
func (*PostsHandler) Create ¶
func (h *PostsHandler) Create() http.HandlerFunc
func (*PostsHandler) Show ¶
func (h *PostsHandler) Show() http.HandlerFunc
func (*PostsHandler) Store ¶
func (h *PostsHandler) Store() http.HandlerFunc
func (*PostsHandler) Vote ¶
func (h *PostsHandler) Vote() http.HandlerFunc
type RegisterForm ¶
type RegisterForm struct { Username string Password string UsernameTaken bool Errors FormErrors }
func (*RegisterForm) Validate ¶
func (f *RegisterForm) Validate() bool
Validate validates the user registration form with Username and Password
type SessionData ¶
func GetSessionData ¶
func GetSessionData(session *scs.SessionManager, ctx context.Context) SessionData
type ThreadsHandler ¶
type ThreadsHandler struct {
// contains filtered or unexported fields
}
func (*ThreadsHandler) Create ¶
func (h *ThreadsHandler) Create() http.HandlerFunc
func (*ThreadsHandler) Delete ¶
func (h *ThreadsHandler) Delete() http.HandlerFunc
func (*ThreadsHandler) List ¶
func (h *ThreadsHandler) List() http.HandlerFunc
func (*ThreadsHandler) Show ¶
func (h *ThreadsHandler) Show() http.HandlerFunc
func (*ThreadsHandler) Store ¶
func (h *ThreadsHandler) 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.