Setup DB address
a. Give the proper db connection address in src/aircto/model/init.go file.
b. sql.Open("mysql", "homestead:secret@tcp([192.168.11.11]:3306)/")
c. Replace your db connection address here.
Run the DB Migration at first instant
a. Navigate to mani@Mani:~/aircto-assignments-16_08/src$ project directory.
b. Run go run aircto/migration/run_migration.go
c. Now the Database and user, issues tables created with some user and issue seed data.
d. There is no API to create user, please use the seed user data. You can find all the user list from here http://localhost:3011/api/users
Run the code.
a. Navigate to mani@Mani:~/aircto-assignments-16_08/src$ project directory.
b. Run go run aircto/main.go
b. Now the server started to serve in http://localhost:3011/api/
Available API to test.
# The following API's no need of any authendication/access token
1. http://localhost:3011/api/
2. http://localhost:3011/api/users
3. http://localhost:3011/api/login
<br />
# After login access token will be provided for the user, need to send access token along with the request.
1. http://localhost:3011/api/issues // get - all issues
2. http://localhost:3011/api/issue/{issueID:[0-9]+} // get - issue details
3. http://localhost:3011/api/issue // post - create issue
4. http://localhost:3011/api/issue/{issueID:[0-9]+} // put - update issue info
5. http://localhost:3011/api/issue/{issueID:[0-9]+} // delete - delete issue
6. http://localhost:3011/api/issues-by-me
7. http://localhost:3011/api/issues-for-me
Every issue created or updated mail will send to the assigned user with issue info.
Cron Job for generate report mail to all the user.Need more info on the API, please refer the following Postman Document.
Note: Limited lifetime to this document.
Please reach me out for more clarification @ [email protected], 9578628779, Skype: manigandan.dharmalingam
Design: System will have two models called User and Issue. With following information
#1. User
a. Email b. Username c. FirstName d. LastName e. Password f. AccessToken
#2. Issue
Problem Statement: Expose a RESTful API to make CRUD operation of Issue resource.
Note: