handlers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2018 License: AGPL-3.0, AGPL-3.0-or-later Imports: 15 Imported by: 0

README

Handlers

The HTTP handlers should be kept as small as possible: ideally they should only extract data from the incoming request, and write output to the response.

Perhaps, to make endpoints (see endpoints package) more sensible, the handlers should also resolve the token coming from the frontend.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handlers

type Handlers struct {
	// contains filtered or unexported fields
}

func NewHandlers

func NewHandlers(db *gorm.DB, rc *redis.Client) *Handlers

func (*Handlers) ChangePassword

func (h *Handlers) ChangePassword(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) Charge

func (h *Handlers) Charge(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) CreateComment

func (h *Handlers) CreateComment(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) CreateIssue

func (h *Handlers) CreateIssue(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) CreatePost

func (h *Handlers) CreatePost(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) CreateProject

func (h *Handlers) CreateProject(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) CreateToken

func (h *Handlers) CreateToken(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) DeleteStar

func (h *Handlers) DeleteStar(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetCallerId

func (h *Handlers) GetCallerId(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetIssue

func (h *Handlers) GetIssue(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetIssues

func (h *Handlers) GetIssues(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetLogs

func (h *Handlers) GetLogs(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetPost

func (h *Handlers) GetPost(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetPosts

func (h *Handlers) GetPosts(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetProject

func (h *Handlers) GetProject(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetProjects

func (h *Handlers) GetProjects(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) GetUser

func (h *Handlers) GetUser(w http.ResponseWriter, r *http.Request, p httpr.Params)

We either get sent a nick, or a nick + token We get a token when we want to read the user by token We get a nick + token when either viewing our own profile or other peoples' profile

func (*Handlers) Login

func (h *Handlers) Login(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) PutStar

func (h *Handlers) PutStar(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) QuotaTransfer

func (h *Handlers) QuotaTransfer(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) Register

func (h *Handlers) Register(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) ResetPassword

func (h *Handlers) ResetPassword(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) RunSql

func (h *Handlers) RunSql(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) SendResetEmail

func (h *Handlers) SendResetEmail(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) UpdateComment

func (h *Handlers) UpdateComment(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) UpdateIssue

func (h *Handlers) UpdateIssue(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) UpdatePost

func (h *Handlers) UpdatePost(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) UpdateProject

func (h *Handlers) UpdateProject(w http.ResponseWriter, r *http.Request, p httpr.Params)

func (*Handlers) UpdateUser

func (h *Handlers) UpdateUser(w http.ResponseWriter, r *http.Request, p httpr.Params)

Jump to

Keyboard shortcuts

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