v0.1.31-0...-b1e5c7a Latest Latest

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

Go to latest
Published: Jun 16, 2018 License: ISC Imports: 13 Imported by: 0



Package users provides the JSON handlers to handle users data in gonawin app.



This section is empty.


This section is empty.


func AllowInvitation

func AllowInvitation(w http.ResponseWriter, r *http.Request, u *mdl.User) error

AllowInvitation handler, use it to allow an invitation to a team.

func DenyInvitation

func DenyInvitation(w http.ResponseWriter, r *http.Request, u *mdl.User) error

DenyInvitation handler, use it to deny an invitation to a team.

func Destroy

func Destroy(w http.ResponseWriter, r *http.Request, u *mdl.User) error

Destroy hander, use this to remove a user from gonawin.

POST	/j/user/destroy/[0-9]+/		Destroys the user with the given id.

func Index

func Index(w http.ResponseWriter, r *http.Request, u *mdl.User) error

Index user handler, returns an http response with the information of the current user.

func Score

func Score(w http.ResponseWriter, r *http.Request, u *mdl.User) error

Score handler, returns the score data of the requested user.

func Search(w http.ResponseWriter, r *http.Request, u *mdl.User) error

Search handler returns the result of a user search in a JSON format. It uses parameter 'q' to make the query.

GET	/j/user/search/			Search for all users respecting the query "q"

func Show

func Show(w http.ResponseWriter, r *http.Request, u *mdl.User) error

Show User handler, use it to get the user JSON data. including parameter: {teams, tournaments, teamrequests} 'count' parameter: default 25 'page' parameter: default 1

func Teams

func Teams(w http.ResponseWriter, r *http.Request, u *mdl.User) error

Teams handler, use this to retrieve the teams of the current user. count parameter: default 12 page parameter: default 1

func Tournaments

func Tournaments(w http.ResponseWriter, r *http.Request, u *mdl.User) error

Tournaments user handler, use this to retrieve the JSON data of the tournaments of the user. count parameter: default 25 page parameter: default 1

func Update

func Update(w http.ResponseWriter, r *http.Request, u *mdl.User) error

Update user handler, use this handler to update a user entity.


This section is empty.

Jump to

Keyboard shortcuts

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