apidemo: github.com/shiloa/apidemo/api.v1 Index | Files

package v1

import "github.com/shiloa/apidemo/api.v1"

Index

Package Files

user_handlers.go

Variables

var DB gorm.DB

func GetUserHandler Uses

func GetUserHandler(w http.ResponseWriter, req *http.Request)

GET /users/:id:w

func GetUsersHandler Uses

func GetUsersHandler(w http.ResponseWriter, req *http.Request)

func HomeHandler Uses

func HomeHandler(w http.ResponseWriter, req *http.Request)

just a place holder for the root URL

func PatchUserHandler Uses

func PatchUserHandler(w http.ResponseWriter, req *http.Request)

* curl -H "Content-Type: application/json" \

     -X PATCH -d '{"subscribed": true}' \
	 http://localhost:3000/users/02b41766-2292-473b-bb7d-0bfd9f4f10f5

PATCH /users/:id

func PostUserHandler Uses

func PostUserHandler(w http.ResponseWriter, req *http.Request)

POST /users

type SignupForm Uses

type SignupForm struct {
    Name     string `json:"name"`
    Email    string `json:"email"`
    Password string `json:"password"`
}

Package v1 imports 7 packages (graph) and is imported by 1 packages. Updated 2016-07-15. Refresh now. Tools for package owners.