handlers

package
v0.0.0-...-bbf8d64 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package handlers provides HTTP handling functions for http.HandleFunc to use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Comment

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

func Css

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

CSS Handler serves static CSS Files

func Js

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

JS Handler serves static JavaScript Files

func Login

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

Login Handler | Handles signups and logins requests

func Logout

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

func NewPost

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

New post handler

func PostView

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

View the requested post

func Profile

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

func ProfileUpdate

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

func Root

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

'/' Root/main page handler, also catches 404 errors

func SubmitPost

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

Post submission handler | Requires a POST request

func VotePostDown

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

Vote Handler | Handles voting down

func VotePostUp

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

Vote Handler | Handles voting up

Types

type VoteType

type VoteType int
const (
	VOTETYPE_UP   VoteType = 0
	VOTETYPE_DOWN VoteType = 1
)

Jump to

Keyboard shortcuts

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