handlers

package
v0.0.0-...-f3f7782 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API

func API(db *sqlx.DB) http.Handler

Types

type GraphQL

type GraphQL struct {
	GqlSchema *graphql.Schema
}

func (*GraphQL) GraphQL

func (g *GraphQL) GraphQL(w http.ResponseWriter, r *http.Request)

type Login

type Login struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type User

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

User represents the User API method handler set.

func (*User) GetUser

func (u *User) GetUser(w http.ResponseWriter, r *http.Request)

GetUser returns the specified user from the system.

func (*User) List

func (u *User) List(w http.ResponseWriter, r *http.Request)

List returns all the existing users in the system.

func (*User) SignIn

func (u *User) SignIn(w http.ResponseWriter, r *http.Request)

SignIn authenticate a user. It expects a request using Basic Auth with a user's email and password. It responds with a JWT.

func (*User) SignOut

func (u *User) SignOut(w http.ResponseWriter, r *http.Request)

SignOut disconnect user from system

func (*User) SignUp

func (u *User) SignUp(w http.ResponseWriter, r *http.Request)

SignUp inserts a new user into the system.

Jump to

Keyboard shortcuts

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