DBアドレスをセットアップします
a。 SRC/Aircto/Model/init.goファイルで適切なDB接続アドレスを指定します。
b。 sql.Open("mysql", "homestead:secret@tcp([192.168.11.11]:3306)/")
c。ここでDB接続アドレスを交換してください。
最初の瞬間にDB移行を実行します
a。 mani@Mani:~/aircto-assignments-16_08/src$プロジェクトディレクトリに移動します。
b。 Run go run aircto/migration/run_migration.go
c。現在、データベースとuser 、一部のユーザーで作成されたテーブルissues 、シードデータを発行します。 d。ユーザーを作成するAPIはありません。シードユーザーデータを使用してください。ここからすべてのユーザーリストを見つけることができますhttp://localhost:3011/api/users
コードを実行します。
a。 mani@Mani:~/aircto-assignments-16_08/src$プロジェクトディレクトリに移動します。
b。 Run go run aircto/main.go
b。これでサーバーはhttp://localhost:3011/api/で提供され始めました
テストするために利用可能なAPI。
# 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. APIの詳細が必要で、次のPostmanドキュメントを参照してください。
注:このドキュメントに限られた寿命。
詳細 @ [email protected]、9578628779、skype:manigandan.dharmalingamについては、私に連絡してください
設計:システムには、ユーザーと問題と呼ばれる2つのモデルがあります。次の情報で
#1。ユーザー
a。メールb。ユーザー名c。 FirstName d。 lastName e。パスワードf。 AccessToken
#2。問題
問題のステートメント:RESTFUL APIを公開して、問題リソースのCRUD操作を行います。
注記: