https://github.com/microlib/usermanager
https://github.com/microlib/usermanager
microservice
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/microlib/usermanager
- Owner: microlib
- License: apache-2.0
- Created: 2016-10-09T20:53:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-13T07:26:05.000Z (almost 9 years ago)
- Last Synced: 2024-06-20T15:02:46.243Z (almost 2 years ago)
- Topics: microservice
- Language: Go
- Size: 2.8 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# User Manager
[](https://travis-ci.org/microlib/usermanager)
[](https://codecov.io/gh/microlib/usermanager)
[](https://goreportcard.com/report/github.com/microlib/usermanager)
[](https://godoc.org/github.com/microlib/usermanager)
- [Request](#request)
- [POST: create](#post-create)
- [GET: read](#get-read)
- [DELETE: delete](#delete-delete)
- [PUT: update \(replacement\)](#put-update-replacement)
- [PATCH: partial update](#patch-partial-update)
- [Response](#response)
- [Installation](#installation)
Endpoint: `/users`
HTTP verbs: http://www.restapitutorial.com/lessons/httpmethods.html
### required fields
- name
- email
- password
### optional fields
none
- single user: `/users/{id}`
- users: `/users`
### required fields
none
### optional fields
- name
- email
- single user: `/users/{id}`
- users: `/users`
### required fields
none
### optional fields
- name
- email
- single user: `/users/{id}`
### required fields
- id
- name
- email
- password
### optional fields
none
- single user: `/users/{id}`
### required fields
- id
### optional fields
- name
- email
- password
**single resource**
```json
{
"data": {
"type": "users",
"id": "1",
"attributes": {
"name": "john",
"email": "john@thesmithcompany.com",
"password": "ja8q\+Y!?FCD3":P"
}
}
}
```
**multiple resources**
```json
{
"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"
}
}]
}
```
***
The dependencies of this project are stored inside the `vendor/` folder. While we use [gvt](https://github.com/FiloSottile/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`](https://blog.filippo.io/most-go-tools-now-work-with-go15vendorexperiment/) and set it to `1`.