Documentation ¶
Index ¶
- Variables
- type Config
- type Server
- func (s *Server) BoardHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) CommentFeed(w http.ResponseWriter, r *http.Request)
- func (s *Server) CreateCommentHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) CreatePostHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) DownvoteHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) GetAddress(r *http.Request) (*models.Address, error)
- func (s *Server) InternalError(w *http.ResponseWriter, err error)
- func (s *Server) PostFeed(w http.ResponseWriter, r *http.Request)
- func (s *Server) PostViewHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) RedirectBack(w http.ResponseWriter, r *http.Request)
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) UpvoteHandler(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var Version string
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SiteURL string SitePath string SiteName string BindAddress string DatabaseURL string TemplatesPath string StaticPath string StaticURL string ServeStatic bool IpfsAPI []string IpfsGateway string IpfsPin bool MaxFileSize int64 AllowedContentTypes []string Premoderation bool EnableComments bool EnableVotes bool }
func LoadConfig ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) BoardHandler ¶
func (s *Server) BoardHandler(w http.ResponseWriter, r *http.Request)
func (*Server) CommentFeed ¶
func (s *Server) CommentFeed(w http.ResponseWriter, r *http.Request)
func (*Server) CreateCommentHandler ¶
func (s *Server) CreateCommentHandler(w http.ResponseWriter, r *http.Request)
func (*Server) CreatePostHandler ¶
func (s *Server) CreatePostHandler(w http.ResponseWriter, r *http.Request)
func (*Server) DownvoteHandler ¶
func (s *Server) DownvoteHandler(w http.ResponseWriter, r *http.Request)
func (*Server) InternalError ¶
func (s *Server) InternalError(w *http.ResponseWriter, err error)
Log an error and display a generic message
func (*Server) PostViewHandler ¶
func (s *Server) PostViewHandler(w http.ResponseWriter, r *http.Request)
func (*Server) RedirectBack ¶
func (s *Server) RedirectBack(w http.ResponseWriter, r *http.Request)
func (*Server) UpvoteHandler ¶
func (s *Server) UpvoteHandler(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.