Skip to content

eminetto/talk-microservices-gokit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

talk-microservices-gokit

How to build

make

Using the services

Auth

curl -X "POST" "http://localhost:8081/v1/auth" \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
     -d $'{
  "email": "[email protected]",
  "password": "1234567"
}'

The result should be a token, like:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTYyOTU3NDcyOCwiaWF0IjoxNjI5NTcxMDk4LCJuYmYiOjE2Mjk1NzEwOTh9.utv_dd0oplgKG-NSwzUN6iOq4p4JDCHrwjNl1k-Yq9w"
}

Feedback

You need to use the token generated by the Auth service:

curl -X "POST" "http://localhost:8082/v1/feedback" \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
	 -H 'Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTYyOTU3NDcyOCwiaWF0IjoxNjI5NTcxMDk4LCJuYmYiOjE2Mjk1NzEwOTh9.utv_dd0oplgKG-NSwzUN6iOq4p4JDCHrwjNl1k-Yq9w' \
     -d $'{
  "title": "Feedback test",
  "body": "Feedback body"
}'

Vote

You need to use the token generated by the Auth service:

curl -X "POST" "http://localhost:8083/v1/vote" \
     -H 'Accept: application/json' \
     -H 'Content-Type: application/json' \
	 -H 'Authorization:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImVtaW5ldHRvQGdtYWlsLmNvbSIsImV4cCI6MTYyOTU3NDcyOCwiaWF0IjoxNjI5NTcxMDk4LCJuYmYiOjE2Mjk1NzEwOTh9.utv_dd0oplgKG-NSwzUN6iOq4p4JDCHrwjNl1k-Yq9w' \
     -d $'{
  "talk_name": "Go e Microserviços",
  "score": "10"
}'

About

Código da palestra sobre Microsserviços usando Gokit

Resources

Stars

Watchers

Forks

Packages

No packages published