handlers

package
v0.0.0-...-86d22a7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API

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

API returns a handler for a set of routes.

Types

type User

type User struct {
	MasterDB *db.DB
}

User represents the User API method handler set.

func (*User) Create

func (u *User) Create(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error

Create inserts a new user into the system. 200 OK, 400 Bad Request, 500 Internal

func (*User) Delete

func (u *User) Delete(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error

Delete removed the specified user from the system. 200 Success, 400 Bad Request, 500 Internal

func (*User) List

func (u *User) List(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error

List returns all the existing users in the system. 200 Success, 404 Not Found, 500 Internal

func (*User) Retrieve

func (u *User) Retrieve(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error

Retrieve returns the specified user from the system. 200 Success, 400 Bad Request, 404 Not Found, 500 Internal

func (*User) Update

func (u *User) Update(ctx context.Context, w http.ResponseWriter, r *http.Request, params map[string]string) error

Update updates the specified user in the system. 200 Success, 400 Bad Request, 500 Internal

Jump to

Keyboard shortcuts

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