Skip to content

mikolajsemeniuk/CQRS-GRPC-Go

Repository files navigation

CQRS-GRPC-Go

go work init ./product-validation-service
go work use ./product-proxy-service

ElasticSearch get all indexes

curl --request GET --url 'http://localhost:9200/_cat/indices?v='

ElasticSearch create index

curl --request PUT --url http://localhost:9200/products

ElasticSearch remove index

curl --request DELETE --url http://localhost:9200/products

ElasticSearch get index schema

curl --request GET --url http://localhost:9200/products/_mapping

ElasticSearch get all documents

curl --request GET --url 'http://localhost:9200/products/_search?size=1308' | json_pp

ElasticSearch add/update document

curl --request PUT \
  --url http://localhost:9200/products/_doc/7e41edc1-8c5d-4902-af9d-b5dbea215a87 \
  --header 'Content-Type: application/json' \
  --data '{
	"id": "7e41edc1-8c5d-4902-af9d-b5dbea215a87",
	"name": "ps4",
	"dollars": 500,
	"cents": 0,
	"amount": 3,
	"is_imported": false,
	"created_at": "2022-04-23T18:25:43.511Z",
	"updated_at": "0000-00-00 00:00:00"
}'

ElasticSearch remove document

curl --request DELETE --url http://localhost:9200/products/_doc/7e41edc1-8c5d-4902-af9d-b5dbea215a87

What to do:

  • changing to simple http router
  • adding strict schema to elastic and see what happens

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages