usermanager

command module
v0.0.0-...-a65c9d9 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

README

User Manager

Build Status codecov Go Report Card GoDoc

Endpoint: /users

Request

HTTP verbs: http://www.restapitutorial.com/lessons/httpmethods.html

POST: create

required fields
  • name
  • email
  • password
optional fields

none

GET: read

  • single user: /users/{id}
  • users: /users
required fields

none

optional fields
  • name
  • email

DELETE: delete

  • single user: /users/{id}
  • users: /users
required fields

none

optional fields
  • name
  • email

PUT: update (replacement)

  • single user: /users/{id}
required fields
  • id
  • name
  • email
  • password
optional fields

none

PATCH: partial update

  • single user: /users/{id}
required fields
  • id
optional fields
  • name
  • email
  • password

Response

single resource

{
  "data": {
    "type": "users",
    "id": "1",
    "attributes": {
      "name": "john",
      "email": "john@thesmithcompany.com",
      "password": "ja8q\+Y!?FCD3":P"
    }
  }
}

multiple resources

{
  "data": [{
    "type": "users",
    "id": "1",
    "attributes": {
      "name": "john",
      "email": "john@thesmithcompany.com",
      "password": "ja8q\+Y!?FCD3\":P"
    }
  }, 
  {
    "type": "users",
    "id": "2",
    "attributes": {
      "name": "bob",
      "email": "bob@hello.co.uk",
      "password": "ja8q\+Y!?FCD3(:P"
    }
  }]
}

Installation

The dependencies of this project are stored inside the vendor/ folder. While we use gvt to manage the dependencies, we're also pushing them anyway, so that users can feel free to simply run go get to get the dependencies.

Keep in mind that the vendor/ folder can only be used for dependencies out-of-the-box if you're running Go 1.6 or higher. It is also available on Go 1.5 but you will need to enable the environment variable GO15VENDOREXPERIMENT and set it to 1.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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