handlers

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2016 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorMessage

func ErrorMessage(status int, msg string) string

ErrorMessage return error message as json string

Types

type UserHandler added in v0.1.2

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

UserHandler struct

func NewUserHandler

func NewUserHandler(db *sqlx.DB) *UserHandler

NewUserHandler return new UserHandler object

func (*UserHandler) DeleteUser added in v0.1.2

func (uh *UserHandler) DeleteUser(w http.ResponseWriter, r *http.Request)

DeleteUser delete user

func (*UserHandler) GetUser added in v0.1.2

func (uh *UserHandler) GetUser(w http.ResponseWriter, r *http.Request)

GetUser return user by id

func (*UserHandler) GetUsers added in v0.1.2

func (uh *UserHandler) GetUsers(w http.ResponseWriter, r *http.Request)

GetUsers return all users

func (*UserHandler) InsertUser added in v0.1.2

func (uh *UserHandler) InsertUser(w http.ResponseWriter, r *http.Request)

InsertUser insert new user into database

func (*UserHandler) UpdateUser added in v0.1.2

func (uh *UserHandler) UpdateUser(w http.ResponseWriter, r *http.Request)

UpdateUser update user

Jump to

Keyboard shortcuts

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