user

package
v0.0.0-...-e0c21b1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2017 License: MIT Imports: 7 Imported by: 0

README

User API Documentation

/*
Relative API Path:
  api/user/auth
Request:
  {
    "user": "test",
    "pass": "test",
  }
Response(204, 400, 401, 405, 500):
  N/A
*/
func Auth(res http.ResponseWriter, req *http.Request) bool {}

/*
Relative API Path:
  api/user/register
Request:
  {
    "user": "test",
    "pass": "test",
  }
Response (204, 400, 405, 500):
  N/A
*/
func Register(res http.ResponseWriter, req *http.Request) bool {}

/*
Relative API Path:
  api/user/logout
Request:
  N/A
Response (204, 405, 500):
  N/A
*/
func Logout(res http.ResponseWriter, req *http.Request) bool {}

Documentation

Overview

Package user is a child of package api to handle api calls concerning users

Package user is a child of package api to handle api calls concerning users

Package user is a child of package api to handle api calls concerning users

Package user is a child of package api to handle api calls concerning users

Package user is a child of package api to handle api calls concerning users

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(res http.ResponseWriter, req *http.Request) bool

Auth function is accessed by an API call from the webhost root by accessing /user_auth and sending it a post request with userRequestData struct in JSON format.

func GetSecret

func GetSecret(user string) (string, error)

GetSecret is not accessible from the any client side request. It is only used on the server side to help verify users are who they say they are.

func Logout

func Logout(res http.ResponseWriter, req *http.Request) bool

Logout function is accessed by an API call from the webhost root by accessing /user_logout and sending it an empty POST request. This function will delete the user-auth cookie session store

func Register

func Register(res http.ResponseWriter, req *http.Request) bool

Register function is accessed by an API call from the webhost root by accessing /user_register and sending it a post request with userRequestData struct in JSON format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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