Documentation
¶
Index ¶
- Constants
- type Server
- func (s *Server) Comment() http.HandlerFunc
- func (s *Server) ControversialComments() http.HandlerFunc
- func (s *Server) ControversialLinks() http.HandlerFunc
- func (s *Server) CreateLink() http.HandlerFunc
- func (s *Server) CreateLinkPage() http.HandlerFunc
- func (s *Server) Downvote() http.HandlerFunc
- func (s *Server) LatestComments() http.HandlerFunc
- func (s *Server) LatestLinks() http.HandlerFunc
- func (s *Server) Like() http.HandlerFunc
- func (s *Server) LinkPage() http.HandlerFunc
- func (s *Server) LogIn() http.HandlerFunc
- func (s *Server) LogInPage() http.HandlerFunc
- func (s *Server) LogOut() http.HandlerFunc
- func (s *Server) PopularComments() http.HandlerFunc
- func (s *Server) PopularLinks() http.HandlerFunc
- func (s *Server) Redirect(w http.ResponseWriter, r *http.Request, path string)
- func (s *Server) RedirectIfLoggedIn(next http.Handler) http.Handler
- func (s *Server) RefreshPage(w http.ResponseWriter, r *http.Request)
- func (s *Server) Reply() http.HandlerFunc
- func (s *Server) ReplyTextbox() http.HandlerFunc
- func (s *Server) RequireUser(next http.Handler) http.Handler
- func (s *Server) RetargetPage(ctx context.Context, w http.ResponseWriter, page templ.Component)
- func (s *Server) Router() http.Handler
- func (s *Server) SettingsPage() http.HandlerFunc
- func (s *Server) SignUp() http.HandlerFunc
- func (s *Server) SignUpPage() http.HandlerFunc
- func (s *Server) Unlike() http.HandlerFunc
- func (s *Server) Upvote() http.HandlerFunc
- func (s *Server) UserFromContext(ctx context.Context) session.User
- func (s *Server) UserFromSession(next http.Handler) http.Handler
- func (s *Server) UserPage() http.HandlerFunc
Constants ¶
View Source
const ErrorInternalServer = "Sorry, something went wrong. Please try again later."
ErrorInternalServer is the error message to display when something goes wrong on the server
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the server of the application
func (*Server) Comment ¶
func (s *Server) Comment() http.HandlerFunc
func (*Server) ControversialComments ¶
func (s *Server) ControversialComments() http.HandlerFunc
func (*Server) ControversialLinks ¶
func (s *Server) ControversialLinks() http.HandlerFunc
func (*Server) CreateLink ¶
func (s *Server) CreateLink() http.HandlerFunc
func (*Server) CreateLinkPage ¶
func (s *Server) CreateLinkPage() http.HandlerFunc
func (*Server) Downvote ¶
func (s *Server) Downvote() http.HandlerFunc
func (*Server) LatestComments ¶
func (s *Server) LatestComments() http.HandlerFunc
func (*Server) LatestLinks ¶
func (s *Server) LatestLinks() http.HandlerFunc
func (*Server) Like ¶
func (s *Server) Like() http.HandlerFunc
func (*Server) LinkPage ¶
func (s *Server) LinkPage() http.HandlerFunc
func (*Server) LogIn ¶
func (s *Server) LogIn() http.HandlerFunc
func (*Server) LogInPage ¶
func (s *Server) LogInPage() http.HandlerFunc
func (*Server) LogOut ¶
func (s *Server) LogOut() http.HandlerFunc
func (*Server) PopularComments ¶
func (s *Server) PopularComments() http.HandlerFunc
func (*Server) PopularLinks ¶
func (s *Server) PopularLinks() http.HandlerFunc
func (*Server) RedirectIfLoggedIn ¶
func (*Server) RefreshPage ¶
func (s *Server) RefreshPage(w http.ResponseWriter, r *http.Request)
RefreshPage is a helper function that makes refreshing the whole page easier
func (*Server) Reply ¶
func (s *Server) Reply() http.HandlerFunc
func (*Server) ReplyTextbox ¶
func (s *Server) ReplyTextbox() http.HandlerFunc
func (*Server) RetargetPage ¶
RetargetPage is a helper function that makes retargeting to the whole page easier
func (*Server) Router ¶
Router returns the http.Handler for the server This is where we define all of our routes
func (*Server) SettingsPage ¶
func (s *Server) SettingsPage() http.HandlerFunc
func (*Server) SignUp ¶
func (s *Server) SignUp() http.HandlerFunc
func (*Server) SignUpPage ¶
func (s *Server) SignUpPage() http.HandlerFunc
func (*Server) Unlike ¶
func (s *Server) Unlike() http.HandlerFunc
func (*Server) Upvote ¶
func (s *Server) Upvote() http.HandlerFunc
func (*Server) UserPage ¶
func (s *Server) UserPage() http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.