Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/armingodiz/gook-users-api
users API for Gook
https://github.com/armingodiz/gook-users-api
golang mvc-architecture mysql rest-api
Last synced: 29 days ago
JSON representation
users API for Gook
- Host: GitHub
- URL: https://github.com/armingodiz/gook-users-api
- Owner: Armingodiz
- Created: 2021-02-11T12:34:18.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-21T12:05:40.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T12:38:38.455Z (7 months ago)
- Topics: golang, mvc-architecture, mysql, rest-api
- Language: Go
- Homepage:
- Size: 33.2 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gook-Users-API
This is one of the [Gook](https://github.com/Armingodiz/Gook) services which provide DB for saving users and intractions with oauth api for login and creating access token which follow mvc design pattern .
## Features
* Signup user
* Find user with specefic id
* Update users information
* Search for users
* Delete user
* An end point for oauth api to login user## Dependencies
name | repo
------------- | -------------
gin-gonic | https://github.com/gin-gonic/gin
mysql driver| github.com/go-sql-driver/mysql
crypto/md5 | https://golang.org/pkg/crypto/md5/
## Installation
First make sure you have installed all dependencies ,
create a scheme in your mysql connection and a table for users then go to `Gook-Users-API/datasources/mysql/users_db/users_db.go`
and set your mysql configurations .
Then just simply clone this repository and start service with `go run main.go` (your service will be running on `localhost:1111`)## EndPoints
POST == > /users (create or signup the user with given informations as json)
GET ==> /users/:user_id (return user with given id)
PUT == > /users/:user_id (update)
PATCH ==> /users/:user_id (partial update)
DELETE ==> /users/:user_id (Delete user with given id)
GET == > /internal/users/search (Search for users)
POST ==> /users/login (oauth API use this endpoint for Login)