diff --git a/demo/MicroservicesAccelerators.pdf b/demo/MicroservicesAccelerators.pdf deleted file mode 100644 index 7cac7b5..0000000 Binary files a/demo/MicroservicesAccelerators.pdf and /dev/null differ diff --git a/demo/clamp-metrics-grafana-dashboard.json b/demo/clamp-metrics-grafana-dashboard.json deleted file mode 100644 index 1a56117..0000000 --- a/demo/clamp-metrics-grafana-dashboard.json +++ /dev/null @@ -1,850 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": 15, - "links": [], - "panels": [ - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 13, - "panels": [], - "title": "Service Response time", - "type": "row" - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 2, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 1 - }, - "hiddenSeries": false, - "id": 17, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "7.0.0", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "avg by (step_name) (service_request_with_step_name_time_counter{step_status=\"COMPLETED\", step_name!~\"submit motor claim|submit medical claim\"})", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "{{step_name}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Average response time by business step", - "tooltip": { - "shared": false, - "sort": 2, - "value_type": "individual" - }, - "transparent": true, - "type": "graph", - "xaxis": { - "buckets": null, - "min": null, - "mode": "series", - "name": null, - "show": false, - "values": [ - "avg" - ] - }, - "yaxes": [ - { - "decimals": null, - "format": "ms", - "label": "Time taken", - "logBase": 2, - "max": null, - "min": null, - "show": true - }, - { - "format": "s", - "label": "Time", - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "basic", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "7.0.0", - "targets": [ - { - "expr": "clamp_max(sum by (service_request_id) (service_request_with_step_name_time_counter{step_name!~\"submit motor claim|submit medical claim\"}), 100000)", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "{{service_request_id}}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Claim lifecycle completion time - Excluding manual review", - "transformations": [], - "transparent": true, - "type": "bargauge" - }, - { - "datasource": "Prometheus", - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "#EAB839", - "value": 200 - }, - { - "color": "dark-orange", - "value": 700 - }, - { - "color": "dark-red", - "value": 1000 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 9, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "max" - ], - "values": false - } - }, - "pluginVersion": "7.0.0", - "targets": [ - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"user authentication\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"user authentication\", step_status=\"COMPLETED\"}))", - "format": "heatmap", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 3, - "legendFormat": "User Authentication", - "refId": "B" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"user authorization\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"user authorization\", step_status=\"COMPLETED\"}))", - "interval": "", - "intervalFactor": 1, - "legendFormat": "User Authorization", - "refId": "C" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"get user details\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"get user details\", step_status=\"COMPLETED\"}))", - "interval": "", - "intervalFactor": 10, - "legendFormat": "Get User Info", - "refId": "D" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"create claim\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"create claim\", step_status=\"COMPLETED\"}))", - "format": "heatmap", - "interval": "", - "intervalFactor": 10, - "legendFormat": "Create Claim", - "refId": "A" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"submit motor claim\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"submit motor claim\", step_status=\"COMPLETED\"}))", - "format": "heatmap", - "interval": "", - "intervalFactor": 10, - "legendFormat": "Submit Motor Claim", - "refId": "E" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"update approved claim\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"update approved claim\", step_status=\"COMPLETED\"}))", - "format": "heatmap", - "interval": "", - "intervalFactor": 10, - "legendFormat": "Approved Claims", - "refId": "F" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"process disbursement\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"process disbursement\", step_status=\"COMPLETED\"}))", - "format": "heatmap", - "interval": "", - "intervalFactor": 10, - "legendFormat": "Process Disbursement", - "refId": "G" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"notify approval status\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"notify approval status\", step_status=\"COMPLETED\"}))", - "format": "heatmap", - "interval": "", - "intervalFactor": 10, - "legendFormat": "Approval Notification", - "refId": "H" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"notify rejection status\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"notify rejection status\", step_status=\"COMPLETED\"}))", - "format": "heatmap", - "interval": "", - "intervalFactor": 10, - "legendFormat": "Rejection Notification", - "refId": "I" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"update reject claim\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"update reject claim\", step_status=\"COMPLETED\"}))", - "format": "heatmap", - "interval": "", - "intervalFactor": 10, - "legendFormat": "Rejected Claim", - "refId": "J" - }, - { - "expr": "avg(sum(service_request_with_step_name_time_counter{step_name=\"submit medical claim\", step_status=\"COMPLETED\"})/count(service_request_with_step_name_counter{step_name=\"submit medical claim\", step_status=\"COMPLETED\"}))", - "interval": "", - "legendFormat": "Submit Medical Claim", - "refId": "K" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average Step Response times", - "type": "stat" - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 11, - "panels": [], - "title": "Service statistics", - "type": "row" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 28 - }, - "id": 4, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "max" - ], - "values": false - } - }, - "pluginVersion": "7.0.0", - "targets": [ - { - "expr": "count (count by (service_request_id) (service_request_with_step_name_time_counter))", - "format": "time_series", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Claims Created", - "type": "stat" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 28 - }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "values": false - } - }, - "pluginVersion": "7.0.0", - "targets": [ - { - "expr": "(count(service_request_with_step_name_counter{step_name=\"submit motor claim\", step_status=\"STARTED\"}))-(count(service_request_with_step_name_counter{step_name=\"update approved claim\", step_status=\"COMPLETED\"})+(count(service_request_with_step_name_counter{step_name=\"update reject claim\", step_status=\"COMPLETED\"})))", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Claims pending review", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 34 - }, - "hiddenSeries": false, - "id": 15, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 2, - "nullPointMode": "null as zero", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "7.0.0", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum(service_request_with_step_name_counter{step_name=\"submit motor claim\", step_status=\"STARTED\"})", - "interval": "", - "legendFormat": "Motor Claim - Started", - "refId": "E" - }, - { - "expr": "sum(service_request_with_step_name_counter{step_name=\"submit motor claim\", step_status=\"COMPLETED\"})", - "interval": "", - "legendFormat": "Motor Claim - Completed", - "refId": "B" - }, - { - "expr": "sum(service_request_with_step_name_counter{step_name=\"submit motor claim\", step_status=\"FAILED\"})", - "interval": "", - "legendFormat": "Motor Claim - Failed", - "refId": "C" - }, - { - "expr": "sum(service_request_with_step_name_counter{step_name=\"submit medical claim\", step_status=\"STARTED\"})", - "interval": "", - "legendFormat": "Medical Claim - Started", - "refId": "F" - }, - { - "expr": "sum(service_request_with_step_name_counter{step_name=\"submit medical claim\", step_status=\"COMPLETED\"})", - "interval": "", - "legendFormat": "Medical Claim - Complete", - "refId": "A" - }, - { - "expr": "sum(service_request_with_step_name_counter{step_name=\"submit medical claim\", step_status=\"FAILED\"})", - "interval": "", - "legendFormat": "Medical Claim - Failed", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Claim Type Distribution", - "tooltip": { - "shared": false, - "sort": 1, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "series", - "name": null, - "show": false, - "values": [ - "max" - ] - }, - "yaxes": [ - { - "format": "short", - "label": "No of Claim Requests", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": { - "align": null - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Rejected Claim" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Approved Claim" - }, - "properties": [ - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 34 - }, - "id": 23, - "options": { - "colorMode": "background", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "sum" - ], - "values": false - } - }, - "pluginVersion": "7.0.0", - "targets": [ - { - "expr": "sum(service_request_with_step_name_counter{step_name=\"update approved claim\",step_status=\"COMPLETED\"})", - "instant": true, - "interval": "", - "legendFormat": "Approved Claim", - "refId": "E" - }, - { - "expr": "sum(service_request_with_step_name_counter{step_name=\"update reject claim\",step_status=\"COMPLETED\"})", - "instant": true, - "interval": "", - "legendFormat": "Rejected Claim", - "refId": "B" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Approved & Rejected Claims", - "type": "stat" - }, - { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 40 - }, - "id": 21, - "panels": [], - "title": "Workflow statistics", - "type": "row" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 41 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "max" - ], - "values": false - } - }, - "pluginVersion": "7.0.0", - "targets": [ - { - "expr": "create_workflow_request_handler_counter", - "format": "heatmap", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Total workflows created", - "type": "stat" - } - ], - "refresh": "5s", - "schemaVersion": 25, - "style": "dark", - "tags": [], - "templating": { - "list": [] - }, - "time": { - "from": "now-30m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Clamp-Metrics", - "uid": "ihhU4aZMz", - "version": 85 -} \ No newline at end of file diff --git a/demo/clamp_demo.postman_environment.json b/demo/clamp_demo.postman_environment.json deleted file mode 100644 index 890e750..0000000 --- a/demo/clamp_demo.postman_environment.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "7f7d9586-7e43-5033-fa14-5a8ce8b0b525", - "name": "clamp_demo", - "values": [ - { - "key": "host", - "value": "52.35.136.17:8080", - "enabled": true - }, - { - "key": "serviceRequestId", - "value": "04938e4d-bbbf-4a47-b673-2c22634cd6e7", - "enabled": true - } - ], - "_postman_variable_scope": "environment", - "_postman_exported_at": "2020-06-25T13:59:58.674Z", - "_postman_exported_using": "Postman/7.25.0" -} \ No newline at end of file diff --git a/demo/clamp_demo_postman_collection.json b/demo/clamp_demo_postman_collection.json deleted file mode 100644 index 5590aa5..0000000 --- a/demo/clamp_demo_postman_collection.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "info": { - "_postman_id": "40e1e285-0d23-4d0f-9722-dad071a42fa2", - "name": "TATA AIG Demo", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "Insurance Approval or Rejection Workflow", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"insurance_claim_clamp_demo\",\n \"description\": \"insurance claim for MOTOR or MEDICAL\",\n \"steps\": [\n {\n \"name\": \"user authentication\",\n \"mode\": \"HTTP\",\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/f4ee8258-49b1-4579-a8c2-5881a0c65206\"\n }\n },\n {\n \"name\": \"user authorization\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"username\": \"user_authentication.response.username\",\n\t\t\t \t\"userId\": \"user_authentication.response.id\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/d9f2e6d1-3100-4ffb-88a4-633e89e1b99c\"\n }\n },\n {\n \"name\": \"get user details\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"username\": \"user_authentication.response.username\",\n\t\t\t \t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"roles\":\"user_authorization.response.roles\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/0df407a1-d4ea-41b3-bf2d-31f3c0fe03b5\"\n }\n },\n {\n \"name\": \"create claim\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimDetails\": \"user_authentication.request.claimDetails\",\n\t\t\t \t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"existingPolicies\":\"get_user_details.response.policyDetails\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/c73e40b4-a044-44bd-931a-d0f08d58f0d3\"\n }\n },\n {\n \"name\": \"submit motor claim\",\n \"when\": \"user_authentication.request.claimDetails.claimType == 'MOTOR'\",\n \"mode\": \"AMQP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimId\": \"create_claim.response.claimId\",\n\t\t\t\t\t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"claimStatus\": \"create_claim.response.claimStatus\",\n\t\t\t \t\"claimType\": \"create_claim.response.claimType\",\n\t\t\t \t\"claimDate\": \"create_claim.response.claimDate\",\n\t\t \t\t\"policyId\": \"create_claim.response.policyId\",\n\t\t\t \t\"garageId\":\"create_claim.response.garageId\",\n\t\t\t \t\"inspectorDetails\":\"create_claim.response.inspectorDetails\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"connection_url\": \"amqp://clamp:clamp@34.216.32.148:5672/\",\n \"queue_name\": \"clamp_queue\",\n \"content_type\": \"text/plain\"\n }\n },\n {\n \"name\": \"submit medical claim\",\n \"when\": \"user_authentication.request.claimDetails.claimType == 'MEDICAL'\",\n \"mode\": \"AMQP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimId\": \"create_claim.response.claimId\",\n\t\t\t\t\t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"claimStatus\": \"submit_medical_claim.request.claimStatus\",\n\t\t\t \t\"claimType\": \"create_claim.response.claimType\",\n\t\t\t \t\"claimDate\": \"create_claim.response.claimDate\",\n\t\t \t\t\"policyId\": \"create_claim.response.policyId\",\n\t\t\t \t\"garageId\":\"create_claim.response.garageId\",\n\t\t\t \t\"inspectorDetails\":\"create_claim.response.inspectorDetails\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"connection_url\": \"amqp://clamp:clamp@34.216.32.148:5672/\",\n \"queue_name\": \"clamp_queue\",\n \"content_type\": \"text/plain\"\n }\n },\n {\n \"name\": \"update approved claim\",\n \"when\": \"update_approved_claim.request.claimStatus == 'APPROVED'\",\n \"mode\": \"HTTP\",\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/39528702-f29f-4a87-98e7-55b43c81fed3\"\n }\n },\n {\n \"name\": \"update reject claim\",\n \"when\": \"update_reject_claim.request.claimStatus == 'REJECTED'\",\n \"mode\": \"HTTP\",\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/b0ab4d1c-263b-41f5-9888-c8913160c20f\"\n }\n },\n {\n \"name\": \"process disbursement\",\n \"when\": \"update_approved_claim.request.claimStatus == 'APPROVED'\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimId\": \"create_claim.response.claimId\",\n\t\t\t\t\t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"claimStatus\":\"process_disbursement.request.claimStatus\",\n\t\t\t \t\"approvedAmount\":\"process_disbursement.request.reviewerDetails.approvedAmount\",\n\t\t\t \t\"reviewerId\":\"process_disbursement.request.reviewerDetails.reviewerId\",\n\t\t\t \t\"reviewerDate\":\"process_disbursement.request.reviewerDetails.reviewDate\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/a2a9bb05-f043-4a6e-b513-0377902bd85d\"\n }\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/workflow", - "host": [ - "{{host}}" - ], - "path": [ - "workflow" - ] - } - }, - "response": [] - }, - { - "name": "Insurance Motor claim request", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "b946ae66-d549-4272-ae09-9238990ac1b3", - "exec": [ - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "id": "f9c6d9df-c0e4-4f9f-bd54-e38d870ccc1b", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setEnvironmentVariable(\"serviceRequestId\", jsonData.serviceRequestId);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userDetails\" :{\n \t\"username\": \"shambhu.shikari\",\n\t\t\"password\": \"jungle-green-t0p!\",\n\t\t\"channel\": \"web\"\n },\n\t\"claimDetails\":{\n\t\t\"claimType\":\"MOTOR\",\n\t\t\"claimDate\":\"23/06/2020\",\n\t\t\"policyId\":\"908\",\n\t\t\"garageId\":\"5000\",\n\t\t\"supportingDocuments\":\"\"\n\t}\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/serviceRequest/insurance_claim_clamp_demo", - "host": [ - "{{host}}" - ], - "path": [ - "serviceRequest", - "insurance_claim_clamp_demo" - ] - } - }, - "response": [] - }, - { - "name": "Insurance Medical Claim", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "282c346e-f4f1-4780-8343-0079f0ae98e4", - "exec": [ - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "id": "785a7e8b-e666-408e-8f14-5893e697455a", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setEnvironmentVariable(\"serviceRequestId\", jsonData.serviceRequestId);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"userDetails\" :{\n \t\"username\": \"shambhu.shikari\",\n\t\t\"password\": \"jungle-green-t0p!\",\n\t\t\"channel\": \"web\"\n },\n\t\"claimDetails\":{\n\t\t\"claimType\":\"MEDICAL\",\n\t\t\"claimDate\":\"23/06/2020\",\n\t\t\"policyId\":\"610\",\n\t\t\"garageId\":\"10000\",\n\t\t\"supportingDocuments\":\"\"\n\t}\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/serviceRequest/insurance_claim_clamp_demo", - "host": [ - "{{host}}" - ], - "path": [ - "serviceRequest", - "insurance_claim_clamp_demo" - ] - } - }, - "response": [] - }, - { - "name": "Motor Claim Approval", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"serviceRequestId\": \"{{serviceRequestId}}\",\n \"stepId\": 5,\n \"response\": {\n\t\t\"claimId\":\"90990908324\",\n\t \"userId\":\"1234567890\",\n\t\t\"claimStatus\":\"APPROVED\",\n\t\t\"claimType\":\"MOTOR\",\n\t\t\"claimDate\":\"23/06/2020\",\n\t\t\"policyId\":\"908\",\n\t\t\"garageId\":\"5000\",\n\t\t\"reviewerDetails\":{\n\t\t\t\"reviewerId\":\"12924\",\n\t\t\t\"approvedAmount\":\"5000\",\n\t\t\t\"reviewerName\":\"Sanjeev\",\n\t\t\t\"reviewDate\":\"23/06/2020\"\n\t\t},\n\t\t\"notes\": \"Inspection not required approved based on documentation. CASHLESS\"\n}\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/stepResponse", - "host": [ - "{{host}}" - ], - "path": [ - "stepResponse" - ] - } - }, - "response": [] - }, - { - "name": "Medical Claim Approval", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"serviceRequestId\": \"{{serviceRequestId}}\",\n \"stepId\": 6,\n \"response\": {\n\t\t\"claimId\":\"90990908324\",\n\t \"userId\":\"1234567890\",\n\t\t\"claimStatus\":\"APPROVED\",\n\t\t\"claimType\":\"MEDICAL\",\n\t\t\"claimDate\":\"23/06/2020\",\n\t\t\"policyId\":\"610\",\n\t\t\"garageId\":\"5000\",\n\t\t\"reviewerDetails\":{\n\t\t\t\"reviewerId\":\"12924\",\n\t\t\t\"approvedAmount\":\"10000\",\n\t\t\t\"reviewerName\":\"Sanjeev\",\n\t\t\t\"reviewDate\":\"23/06/2020\"\n\t\t},\n\t\t\"notes\": \"Inspection not required approved based on documentation. CASHLESS\"\n}\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/stepResponse", - "host": [ - "{{host}}" - ], - "path": [ - "stepResponse" - ] - } - }, - "response": [] - }, - { - "name": "Motor Claim Rejection", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "36906cc6-c1bd-4908-969a-5eda913725ee", - "exec": [ - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "id": "76122e26-1966-4173-bac4-93dbc8356419", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setEnvironmentVariable(\"serviceRequestId\", jsonData.serviceRequestId);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n\n \"serviceRequestId\": \"{{serviceRequestId}}\",\n \"stepId\": 5,\n \"response\": {\n\t\t\"claimId\":\"90990908324\",\n\t \"userId\":\"1234567890\",\n\t\t\"claimStatus\":\"REJECTED\",\n\t\t\"claimType\":\"MOTOR\",\n\t\t\"claimDate\":\"23/06/2020\",\n\t\t\"policyId\":\"908\",\n\t\t\"garageId\":\"5000\",\n\t\t\"notes\": \"Vehicle damage pictures missing from the submitted documentation. Please add those to proceed with the claim\"\n\t}\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/stepResponse", - "host": [ - "{{host}}" - ], - "path": [ - "stepResponse" - ] - } - }, - "response": [] - }, - { - "name": "Medical Claim Rejection", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "496fe202-c4fd-4435-80a3-729bd9dbe1f0", - "exec": [ - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "id": "95a6165c-6f0c-4236-81d7-f5cca4e0f0a9", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setEnvironmentVariable(\"serviceRequestId\", jsonData.serviceRequestId);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n\n \"serviceRequestId\": \"{{serviceRequestId}}\",\n \"stepId\": 6,\n \"response\": {\n\t\t\"claimId\":\"90990908324\",\n\t \"userId\":\"1234567890\",\n\t\t\"claimStatus\":\"REJECTED\",\n\t\t\"claimType\":\"MEDICAL\",\n\t\t\"claimDate\":\"23/06/2020\",\n\t\t\"policyId\":\"610\",\n\t\t\"garageId\":\"5000\",\n\t\t\"notes\": \"Vehicle damage pictures missing from the submitted documentation. Please add those to proceed with the claim\"\n\t}\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/stepResponse", - "host": [ - "{{host}}" - ], - "path": [ - "stepResponse" - ] - } - }, - "response": [] - }, - { - "name": "Claim System failure", - "event": [ - { - "listen": "prerequest", - "script": { - "id": "36906cc6-c1bd-4908-969a-5eda913725ee", - "exec": [ - "" - ], - "type": "text/javascript" - } - }, - { - "listen": "test", - "script": { - "id": "76122e26-1966-4173-bac4-93dbc8356419", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setEnvironmentVariable(\"serviceRequestId\", jsonData.serviceRequestId);" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n\n \"serviceRequestId\": \"{{serviceRequestId}}\",\n \"stepId\": 5,\n \"error\": {\n \"code\": 401,\n \"message\": \"Claim failed\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/stepResponse", - "host": [ - "{{host}}" - ], - "path": [ - "stepResponse" - ] - } - }, - "response": [] - }, - { - "name": "Get workflow by workflow name", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{host}}/workflow/insurance_claim_clamp_demo", - "host": [ - "{{host}}" - ], - "path": [ - "workflow", - "insurance_claim_clamp_demo" - ] - } - }, - "response": [] - }, - { - "name": "Insurance Approval or Rejection Workflow with Notification", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "type": "text", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"insurance_claim_clamp_notification\",\n \"description\": \"insurance claim for MOTOR or MEDICAL\",\n \"steps\": [\n {\n \"name\": \"user authentication\",\n \"mode\": \"HTTP\",\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/f4ee8258-49b1-4579-a8c2-5881a0c65206\"\n }\n },\n {\n \"name\": \"user authorization\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"username\": \"user_authentication.response.username\",\n\t\t\t \t\"userId\": \"user_authentication.response.id\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/d9f2e6d1-3100-4ffb-88a4-633e89e1b99c\"\n }\n },\n {\n \"name\": \"get user details\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"username\": \"user_authentication.response.username\",\n\t\t\t \t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"roles\":\"user_authorization.response.roles\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/0df407a1-d4ea-41b3-bf2d-31f3c0fe03b5\"\n }\n },\n {\n \"name\": \"create claim\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimDetails\": \"user_authentication.request.claimDetails\",\n\t\t\t \t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"existingPolicies\":\"get_user_details.response.policyDetails\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/c73e40b4-a044-44bd-931a-d0f08d58f0d3\"\n }\n },\n {\n \"name\": \"submit motor claim\",\n \"when\": \"user_authentication.request.claimDetails.claimType == 'MOTOR'\",\n \"mode\": \"AMQP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimId\": \"create_claim.response.claimId\",\n\t\t\t\t\t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"claimStatus\": \"create_claim.response.claimStatus\",\n\t\t\t \t\"claimType\": \"user_authentication.request.claimDetails.claimType\",\n\t\t\t \t\"claimDate\": \"create_claim.response.claimDate\",\n\t\t \t\t\"policyId\": \"create_claim.response.policyId\",\n\t\t\t \t\"garageId\":\"create_claim.response.garageId\",\n\t\t\t \t\"inspectorDetails\":\"create_claim.response.inspectorDetails\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"connection_url\": \"amqp://clamp:clamp@34.216.32.148:5672/\",\n \"queue_name\": \"clamp_queue\",\n \"content_type\": \"text/plain\"\n }\n },\n {\n \"name\": \"submit medical claim\",\n \"when\": \"user_authentication.request.claimDetails.claimType == 'MEDICAL'\",\n \"mode\": \"AMQP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimId\": \"create_claim.response.claimId\",\n\t\t\t\t\t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"claimStatus\": \"submit_medical_claim.request.claimStatus\",\n\t\t\t \t\"claimType\": \"user_authentication.request.claimDetails.claimType\",\n\t\t\t \t\"claimDate\": \"create_claim.response.claimDate\",\n\t\t \t\t\"policyId\": \"create_claim.response.policyId\",\n\t\t\t \t\"garageId\":\"create_claim.response.garageId\",\n\t\t\t \t\"inspectorDetails\":\"create_claim.response.inspectorDetails\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"connection_url\": \"amqp://clamp:clamp@34.216.32.148:5672/\",\n \"queue_name\": \"clamp_queue\",\n \"content_type\": \"text/plain\"\n }\n },\n {\n \"name\": \"update approved claim\",\n \"when\": \"update_approved_claim.request.claimStatus == 'APPROVED'\",\n \"mode\": \"HTTP\",\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/39528702-f29f-4a87-98e7-55b43c81fed3\"\n }\n },\n {\n \"name\": \"update reject claim\",\n \"when\": \"update_reject_claim.request.claimStatus == 'REJECTED'\",\n \"mode\": \"HTTP\",\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/b0ab4d1c-263b-41f5-9888-c8913160c20f\"\n }\n },\n {\n \"name\": \"process disbursement\",\n \"when\": \"update_approved_claim.request.claimStatus == 'APPROVED'\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimId\": \"create_claim.response.claimId\",\n\t\t\t\t\t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"claimStatus\":\"process_disbursement.request.claimStatus\",\n\t\t\t \t\"approvedAmount\":\"process_disbursement.request.reviewerDetails.approvedAmount\",\n\t\t\t \t\"reviewerId\":\"process_disbursement.request.reviewerDetails.reviewerId\",\n\t\t\t \t\"reviewerDate\":\"process_disbursement.request.reviewerDetails.reviewDate\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/a2a9bb05-f043-4a6e-b513-0377902bd85d\"\n }\n },\n {\n \"name\": \"notify approval status\",\n \"when\": \"update_approved_claim.request.claimStatus == 'APPROVED'\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimId\": \"create_claim.response.claimId\",\n\t\t\t\t\t\"claimType\": \"user_authentication.request.claimDetails.claimType\",\n\t\t\t\t\t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"claimStatus\":\"update_approved_claim.request.claimStatus\",\n\t\t\t \t\"disbursedAmount\":\"process_disbursement.response.disbursedAmount\",\n\t\t\t \t\"mobileNumber\":\"get_user_details.response.mobileNumber\",\n\t\t\t \t\"emailId\":\"get_user_details.response.emailId\",\n\t\t\t \t\"username\":\"user_authentication.response.username\",\n\t\t\t \t\"reviewerName\":\"update_approved_claim.response.reviewerDetails.reviewerName\",\n\t\t\t \t\"disbursementDate\":\"process_disbursement.response.disbursementDate\",\n\t\t\t \t\"partyName\":\"process_disbursement.response.partyDetails.partyName\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/182bb362-ff16-44ca-a43c-d66107ee549a\"\n }\n },\n {\n \"name\": \"notify rejection status\",\n \"when\": \"update_reject_claim.request.claimStatus == 'REJECTED'\",\n \"mode\": \"HTTP\",\n \"transform\" : true,\n\t\t\t\"requestTransform\": {\n\t\t\t\t\"spec\":{\n\t\t\t\t\t\"claimId\": \"create_claim.response.claimId\",\n\t\t\t\t\t\"claimType\": \"user_authentication.request.claimDetails.claimType\",\n\t\t\t\t\t\"userId\": \"user_authentication.response.id\",\n\t\t\t \t\"claimStatus\":\"update_reject_claim.request.claimStatus\",\n\t\t\t \t\"disbursedAmount\":\"update_reject_claim.response.reviewerDetails.approvedAmount\",\n\t\t\t \t\"mobileNumber\":\"get_user_details.response.mobileNumber\",\n\t\t\t \t\"emailId\":\"get_user_details.response.emailId\",\n\t\t\t \t\"username\":\"user_authentication.response.username\",\n\t\t\t \t\"reviewerName\":\"update_reject_claim.response.reviewerDetails.reviewerName\"\n\t\t\t\t}\n\t\t\t},\n \"val\": {\n \"method\": \"POST\",\n \"url\": \"https://run.mocky.io/v3/ebb3928f-f64e-4df3-b83f-41e9a28ed9a9\"\n }\n }\n \n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{host}}/workflow", - "host": [ - "{{host}}" - ], - "path": [ - "workflow" - ] - } - }, - "response": [] - } - ], - "protocolProfileBehavior": {} -} diff --git a/docs/.nojekyll b/docs/.keep similarity index 100% rename from docs/.nojekyll rename to docs/.keep diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 549a74e..0000000 --- a/docs/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# Clamp: A Microservices Orchestrator - -> An opinionated approach to microservices architecture and orchestration - -## Introduction -Clamp lets you stitch together services in your distributed platform. Built primarily as a microservices orchestrator, it serves to cut down on boilerplate and decomposes complexities related to inter-service communication. Define workflows that seamlessly route to your services over both synchronous and asynchronous communication calls. - -### Battle-tested design -![enter image description here](arch.png) - - Approach used on multiple platforms in production. - - Seamless orchestration at scale - - Facilitates workflow management - - Central tracking of flows - -### Batteries included -**Lightweight JSON-based workflow management** -Define and update workflows even at run-time, using our APIs. - -**Simple payload transformation between steps** Use context variables such as past request and response content to create service payloads. Currently only support JSON payloads. - -**Branching and conditional logic in workflows** Simplicity keeps business logic out and provides required flexibility to introduce multiple execution paths for scenarios such as error-handling and rollback. - -**Sync and Async** Clamp supports both synchronous and asynchronous communication protocols for services, and ships with integrations for RabbitMQ, Kafka and HTTP. - -**Request profiling and time distribution** Know exactly which steps are taking time, with in-built profiling and time distribution metrics, connect your own monitoring systems, and much more! - -**Simple stateless design backed by a persistent store** Clamp can scale and manage high-throughput scenarios with minimal overhead. - -To know the benefits of microservices orchestration [click here](https://searchapparchitecture.techtarget.com/tip/Learn-the-benefits-of-microservices-orchestration). -## Getting Clamp -Clamp ships as a lightweight binary that can simply be dropped into your existing setup. You can either [build it from source](/?id=building-from-source) or use [Docker](/?id=docker). -### Installation -#### Building from source -- Install GoLang on your system, instructions for various platforms can be found [here](https://golang.org/doc/install). -- Clone the [Clamp repository](https://gitlab.com/sahajsoft/clamp/clamp-core). -- `cd` into the project. -- Configure PostgreSQL, Kafka and RabbitMQ in *config/env.go* with your settings. -- Run `go build main.go` to build the project. -- Run `./main migrate` to execute the migrations. -- Run `./main` to start the application. - -Clamp runs on port 8080 by default, and exposes Swagger UI on `/swagger/index.html`. -#### Docker -- `cd` into the project. -- Configure PostgreSQL, Kafka and RabbitMQ in *config/env.go* with your settings. -- Run `docker build -t clamp-docker .` to build the image. -- Use `docker run --name=clamp-docker -d -p 9090:8080 clamp-docker` to spawn a container for Clamp. - -To know more about how to configure PostgreSQL, Kafka and RabbitMQ, you can check [usage section](/usage?id=pre-requisites) - -## Contributing -We are working on making it easy to contribute to Clamp. Please get in touch with [Lohith](mailto:lohithkm@sahaj.ai), [Tejash](mailto:tejashl@sahaj.ai), or [Dantin](mailto:dantink@sahaj.ai) for more information. \ No newline at end of file diff --git a/docs/_coverpage.md b/docs/_coverpage.md deleted file mode 100644 index 39ae916..0000000 --- a/docs/_coverpage.md +++ /dev/null @@ -1,6 +0,0 @@ -# **CLAMP** -An opinionated approach to microservices orchestration - -[Install](/?id=getting-clamp) -[Get Started](/?id=introduction) -[Contribute](https://gitlab.com/sahajsoft/clamp/clamp-core) \ No newline at end of file diff --git a/docs/_sidebar.md b/docs/_sidebar.md deleted file mode 100644 index 9906cac..0000000 --- a/docs/_sidebar.md +++ /dev/null @@ -1,4 +0,0 @@ -**Documentation** - -- [**Quickstart**](/) -- [**Usage**](usage.md) \ No newline at end of file diff --git a/docs/arch.png b/docs/arch.png deleted file mode 100644 index d4b139f..0000000 Binary files a/docs/arch.png and /dev/null differ diff --git a/docs/docs.go b/docs/docs.go index abd5e0f..5fc8fbd 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,6 +1,5 @@ // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT -// This file was generated by swaggo/swag at -// 2020-07-07 16:42:12.083616 +0530 IST m=+0.056490824 +// This file was generated by swaggo/swag package docs @@ -20,7 +19,6 @@ var doc = `{ "description": "{{.Description}}", "title": "{{.Title}}", "contact": {}, - "license": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", @@ -39,7 +37,7 @@ var doc = `{ "parameters": [ { "type": "string", - "description": "Service Request Id", + "description": "Service Request ID", "name": "serviceRequestId", "in": "path", "required": true @@ -277,7 +275,6 @@ var doc = `{ "type": "object", "properties": { "error": { - "type": "object", "$ref": "#/definitions/models.ClampErrorResponse" }, "requestHeaders": { @@ -292,9 +289,6 @@ var doc = `{ }, "stepId": { "type": "integer" - }, - "stepStatusRecorded": { - "type": "boolean" } } }, @@ -384,9 +378,6 @@ var doc = `{ "val" ], "properties": { - "canStepExecute": { - "type": "boolean" - }, "enabled": { "type": "boolean" }, @@ -406,7 +397,6 @@ var doc = `{ } }, "requestTransform": { - "type": "object", "$ref": "#/definitions/models.RequestTransform" }, "transform": { @@ -419,7 +409,6 @@ var doc = `{ "type": "string" }, "val": { - "type": "object", "$ref": "#/definitions/models.Val" }, "when": { @@ -437,7 +426,6 @@ var doc = `{ "type": "string" }, "payload": { - "type": "object", "$ref": "#/definitions/models.Payload" }, "status": { @@ -498,12 +486,12 @@ type swaggerInfo struct { // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = swaggerInfo{ - Version: "1.0", - Host: "localhost:8080", - BasePath: "/", + Version: "", + Host: "", + BasePath: "", Schemes: []string{}, - Title: "Clamp Swagger API", - Description: "An opinionated approach to microservices architecture and orchestration", + Title: "", + Description: "", } type s struct{} diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 884a3b5..0000000 --- a/docs/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - Clamp - - - - - - - -
- - - - - diff --git a/docs/scenarios.md b/docs/scenarios.md deleted file mode 100644 index e69de29..0000000 diff --git a/docs/swagger.json b/docs/swagger.json index 653301d..f81f85a 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1,15 +1,8 @@ { "swagger": "2.0", "info": { - "description": "An opinionated approach to microservices architecture and orchestration", - "title": "Clamp Swagger API", - "termsOfService": "http://swagger.io/terms/", - "contact": {}, - "license": {}, - "version": "1.0" + "contact": {} }, - "host": "localhost:8080", - "basePath": "/", "paths": { "/serviceRequest/{serviceRequestId}": { "get": { @@ -24,7 +17,7 @@ "parameters": [ { "type": "string", - "description": "Service Request Id", + "description": "Service Request ID", "name": "serviceRequestId", "in": "path", "required": true @@ -262,7 +255,6 @@ "type": "object", "properties": { "error": { - "type": "object", "$ref": "#/definitions/models.ClampErrorResponse" }, "requestHeaders": { @@ -277,9 +269,6 @@ }, "stepId": { "type": "integer" - }, - "stepStatusRecorded": { - "type": "boolean" } } }, @@ -369,9 +358,6 @@ "val" ], "properties": { - "canStepExecute": { - "type": "boolean" - }, "enabled": { "type": "boolean" }, @@ -391,7 +377,6 @@ } }, "requestTransform": { - "type": "object", "$ref": "#/definitions/models.RequestTransform" }, "transform": { @@ -404,7 +389,6 @@ "type": "string" }, "val": { - "type": "object", "$ref": "#/definitions/models.Val" }, "when": { @@ -422,7 +406,6 @@ "type": "string" }, "payload": { - "type": "object", "$ref": "#/definitions/models.Payload" }, "status": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index bdc8f71..a4b2f94 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -3,7 +3,6 @@ definitions: properties: error: $ref: '#/definitions/models.ClampErrorResponse' - type: object requestHeaders: type: string response: @@ -13,8 +12,6 @@ definitions: type: string stepId: type: integer - stepStatusRecorded: - type: boolean type: object models.ClampErrorResponse: properties: @@ -69,8 +66,6 @@ definitions: type: object models.Step: properties: - canStepExecute: - type: boolean enabled: type: boolean id: @@ -85,7 +80,6 @@ definitions: type: array requestTransform: $ref: '#/definitions/models.RequestTransform' - type: object transform: type: boolean transformFormat: @@ -94,7 +88,6 @@ definitions: type: string val: $ref: '#/definitions/models.Val' - type: object when: type: string required: @@ -110,7 +103,6 @@ definitions: type: string payload: $ref: '#/definitions/models.Payload' - type: object status: type: string time_taken: @@ -140,14 +132,8 @@ definitions: - name - steps type: object -host: localhost:8080 info: contact: {} - description: An opinionated approach to microservices architecture and orchestration - license: {} - termsOfService: http://swagger.io/terms/ - title: Clamp Swagger API - version: "1.0" paths: /serviceRequest/{serviceRequestId}: get: @@ -155,7 +141,7 @@ paths: - application/json description: Get service request by service request id parameters: - - description: Service Request Id + - description: Service Request ID in: path name: serviceRequestId required: true diff --git a/docs/usage.md b/docs/usage.md deleted file mode 100644 index b5cedd4..0000000 --- a/docs/usage.md +++ /dev/null @@ -1,568 +0,0 @@ -# Usage Guide -The following sections cover detailed usage details and specifications for the JSON configuration used to describe workflows. Before we begin, let's go over a few basic concepts: -- **Workflow**: A workflow is a series of steps executed in a set order to achieve a specific function, such as booking an order, renewing a license, scheduling an appointment, and so forth. In a microservices setup, each step will be taken up by a different µ-service catering to something specific. Clamp is able to understand and execute such workflows given a JSON configuration according to the given specification. -- **Step**: A step is the smallest unit in a workflow. A step can be used to execute a specific function. A step can execute in 2 modes SYNC & ASYNC. Step can be integrated with HTTP API / Kafka / Rabbit MQ. Step can be conditionally executed and the request for the step can be transformed in runtime. - - **Step Modes**: Sync step is a type of step where clamp expects a response after executing it. Async step is a step where the response can be deferred, the downstream service can send back the response latter in time. -- **Service Request**: A service request is an asynchronous call made to Clamp, telling it to execute a specific workflow. Depending on the nature of the workflow, a service request might contain a payload or not. Upon creation of service requests, their state can be monitored via their service request IDs. -- **Context Object**: In the process of executing a workflow, a context object will store the request and respose of each step. This request context can be used in step for conditional executing it or transforming the request to the step. - -## Pre-requisites -### Data Store -Clamp makes use of a data store to keep track of workflows, service requests and payloads while orchestrating between µ-services. Right now, the only data store supported is [PostgreSQL](https://www.postgresql.org/). You can connect Clamp to your own Postgres setup by configuring it in `config/env.go`. -``` -DBConnectionStr string `env:"CLAMP_DB_CONNECTION_STR" envDefault:"host=: user= dbname= password="` -``` -### Message Broker -A message broker is required to facilitate async communication between Clamp and all the µ-services in your environment if you choose to not communicate over HTTP. Clamp ships with integrations for RabbitMQ and Kafka. These are also configured the same way as above with the data store, by editing `config/env.go`. -- AMQP -``` -QueueConnectionStr string `env:"CLAMP_QUEUE_CONNECTION_STR" envDefault:"amqp://:@:/"` -``` -- Kafka -``` -KafkaConnectionStr string `env:"CLAMP_KAFKA_CONNECTION_STR" envDefault:":"` -``` -## Clamp API -The following section covers API documentation for Clamp's REST API, which ships with endpoints handling workflow creation, triggering a service request, and so forth. -### Swagger -If you're someone who likes to get their hands dirty immediately, maybe you would like to check out this [Swagger](http://54.149.76.62:8642/swagger/index.html) link to try out the APIs. -### Workflows -#### Creation -Workflows are created in Clamp by making a **POST** request to its **`/workflow`** API endpoint. -
- Here's a sample payload: (Click to expand) - - ``` - { - "name": "process_claim", - "description": "processing of medical claim", - "steps": [ - { - "name": "user_authentication", - "mode": "HTTP", - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/f4ee8258-49b1-4579-a8c2-5881a0c65206" - } - }, - { - "name": "user_authorization", - "mode": "HTTP", - "transform": true, - "requestTransform": { - "spec": { - "username": "user_authentication.response.username", - "userId": "user_authentication.response.id" - } - }, - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/d9f2e6d1-3100-4ffb-88a4-633e89e1b99c" - } - }, - { - "name": "get_user_details", - "mode": "HTTP", - "transform": true, - "requestTransform": { - "spec": { - "username": "user_authentication.response.username", - "userId": "user_authentication.response.id", - "roles": "user_authorization.response.roles" - } - }, - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/0df407a1-d4ea-41b3-bf2d-31f3c0fe03b5" - } - }, - { - "name": "create_claim", - "mode": "HTTP", - "transform": true, - "requestTransform": { - "spec": { - "claimDetails": "user_authentication.request.claimDetails", - "userId": "user_authentication.response.id", - "existingPolicies": "get_user_details.response.policyDetails" - } - }, - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/c73e40b4-a044-44bd-931a-d0f08d58f0d3" - } - }, - { - "name": "submit_motor_claim", - "when": "user_authentication.request.claimDetails.claimType == 'MOTOR'", - "mode": "AMQP", - "transform": true, - "requestTransform": { - "spec": { - "claimId": "create_claim.response.claimId", - "userId": "user_authentication.response.id", - "claimStatus": "create_claim.response.claimStatus", - "claimType": "user_authentication.request.claimDetails.claimType", - "claimDate": "create_claim.response.claimDate", - "policyId": "create_claim.response.policyId", - "garageId": "create_claim.response.garageId", - "inspectorDetails": "create_claim.response.inspectorDetails" - } - }, - "val": { - "connection_url": "amqp://clamp:clampdev!@172.31.0.152:5672/", - "queue_name": "clamp_queue", - "content_type": "text/plain" - } - }, - { - "name": "submit_medical_claim", - "when": "user_authentication.request.claimDetails.claimType == 'MEDICAL'", - "mode": "KAFKA", - "transform": true, - "requestTransform": { - "spec": { - "claimId": "create_claim.response.claimId", - "userId": "user_authentication.response.id", - "claimStatus": "submit_medical_claim.request.claimStatus", - "claimType": "user_authentication.request.claimDetails.claimType", - "claimDate": "create_claim.response.claimDate", - "policyId": "create_claim.response.policyId", - "garageId": "create_claim.response.garageId", - "inspectorDetails": "create_claim.response.inspectorDetails" - } - }, - "val": { - "connection_url": "172.31.0.152:9092", - "topic_name": "clamp_topic" - } - }, - { - "name": "update_approved_claim", - "when": "update_approved_claim.request.claimStatus == 'APPROVED'", - "mode": "HTTP", - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/39528702-f29f-4a87-98e7-55b43c81fed3" - } - }, - { - "name": "update_reject_claim", - "when": "update_reject_claim.request.claimStatus == 'REJECTED'", - "mode": "HTTP", - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/b0ab4d1c-263b-41f5-9888-c8913160c20f" - } - }, - { - "name": "process_disbursement", - "when": "update_approved_claim.request.claimStatus == 'APPROVED'", - "mode": "HTTP", - "transform": true, - "requestTransform": { - "spec": { - "claimId": "create_claim.response.claimId", - "userId": "user_authentication.response.id", - "claimStatus": "process_disbursement.request.claimStatus", - "approvedAmount": "process_disbursement.request.reviewerDetails.approvedAmount", - "reviewerId": "process_disbursement.request.reviewerDetails.reviewerId", - "reviewerDate": "process_disbursement.request.reviewerDetails.reviewDate" - } - }, - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/a2a9bb05-f043-4a6e-b513-0377902bd85d" - } - } - ] - } - ``` -
- -##### Workflow Metadata -There's some basic metadata that needs to be defined when a workflow is created. The following attributes are mandatory and must be present in the request: -- `name` is the unique identifier for any workflow. It is recommended that you keep this short and name every workflow in a consistent manner. Camel case is recommended, but not mandatory. You could hyphenate between words or use underscores, or choose any other convention, as long as you choose one and stick with it. This field **does not accept spaces**. -- `description` is typically a brief title describing what the workflow is for. -- `steps` are used to describe the workflow in terms of service calls and payload transformations. Steps support simple branching strategies, as well as rollback strategies for error scenarios. See more on [defining steps](#defining-steps) below. - -##### Defining Steps -The following section covers how to define steps in your workflow specification. Here's a sample step: -``` -{ - "name": "submit motor claim", - "when": "user_authentication.request.claimDetails.claimType == 'MOTOR'", - "mode": "AMQP", - "transform" : true, - "requestTransform": { - "spec":{ - "claimId": "create_claim.response.claimId", - "userId": "user_authentication.response.id", - "claimStatus": "create_claim.response.claimStatus", - "claimType": "user_authentication.request.claimDetails.claimType", - "claimDate": "create_claim.response.claimDate", - "policyId": "create_claim.response.policyId", - "garageId":"create_claim.response.garageId", - "inspectorDetails":"create_claim.response.inspectorDetails" - } - }, - "val": { - "connection_url": "amqp://clamp:clampdev!@172.31.0.152:5672/", - "queue_name": "clamp_queue", - "content_type": "text/plain" - } -} -``` -There's some basic metadata that needs to be defined for a step. -- `name` is the unique identifier for a step in a workflow. It is recommended that you keep this short. Camel case is recommended, but not mandatory. You could hyphenate between words or use underscores, or choose any other convention, as long as you choose one and stick with it. This field **does not accept spaces**. -- `mode` specifies what communication mode it needs to use. It supports HTTP / KAFKA / AMQP. -- `val` is the connection config to use for communication. Below are configs specific to each modes. - - `HTTP` - ``` - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/f4ee8258-49b1-4579-a8c2-5881a0c65206", - "headers": "Content-Type:application/json" - } - ``` - - `AMQP` - ``` - "val": { - "connection_url": "amqp://clamp:clampdev!@172.31.0.152:5672/", - "queue_name": "clamp_queue", - "content_type": "text/plain" - } - ``` - - `KAFKA` - ``` - "val": { - "connection_url": "172.31.0.152:9092", - "topic_name": "clamp_topic" - } - ``` -- `when` is used to specify the condition based on which the step execution depends. The possible options to use for comparision are [here](https://github.com/antonmedv/expr/blob/master/docs/Language-Definition.md#comparison-operators) -- `requestTransform` is used for transforming the request object to the step. `transform` need to be enabled to apply the transformations. -- `Context object` can be used in both `when` and `requestTransform`. The context object can be accessed by directly specifying the `step_name` and then specify whether `request` or `response` and specify the key to access it. Ex:`step_name.response.key`. It can be nested to any level like `step_name.response.key1.key1a` - -#### View Workflow -Once a workflow is defined, you can view the structure and metadata of the workflow by performing a GET request to the `/workflow/{name}` endpoint for Clamp. For example, if your workflow was called `mtcReq` and Clamp was running on `http://54.149.76.62:8642`, you would make the following cURL request: -``` -curl http://54.149.76.62:8642/workflow/process_claim -``` - -
- This should return a response as below:(Click here to expand) - -``` -{ - "id": "348", - "name": "process_claim", - "description": "processing of medical claim", - "enabled": true, - "created_at": "2020-09-14T12:08:37.989947Z", - "updated_at": "0001-01-01T00:00:00Z", - "steps": [ - { - "id": 1, - "name": "user_authentication", - "type": "SYNC", - "mode": "HTTP", - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/f4ee8258-49b1-4579-a8c2-5881a0c65206", - "headers": "" - }, - "transform": false, - "enabled": false, - "when": "", - "transformFormat": "", - "requestTransform": null, - "onFailure": null - }, - { - "id": 2, - "name": "user_authorization", - "type": "SYNC", - "mode": "HTTP", - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/d9f2e6d1-3100-4ffb-88a4-633e89e1b99c", - "headers": "" - }, - "transform": true, - "enabled": false, - "when": "", - "transformFormat": "", - "requestTransform": { - "spec": { - "userId": "user_authentication.response.id", - "username": "user_authentication.response.username" - } - }, - "onFailure": null - }, - ... - ... - { - "id": 8, - "name": "update_reject_claim", - "type": "SYNC", - "mode": "HTTP", - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/b0ab4d1c-263b-41f5-9888-c8913160c20f", - "headers": "" - }, - "transform": false, - "enabled": false, - "when": "update_reject_claim.request.claimStatus == 'REJECTED'", - "transformFormat": "", - "requestTransform": null, - "onFailure": null - }, - { - "id": 9, - "name": "process_disbursement", - "type": "SYNC", - "mode": "HTTP", - "val": { - "method": "POST", - "url": "https://run.mocky.io/v3/a2a9bb05-f043-4a6e-b513-0377902bd85d", - "headers": "" - }, - "transform": true, - "enabled": false, - "when": "update_approved_claim.request.claimStatus == 'APPROVED'", - "transformFormat": "", - "requestTransform": { - "spec": { - "approvedAmount": "process_disbursement.request.reviewerDetails.approvedAmount", - "claimId": "create_claim.response.claimId", - "claimStatus": "process_disbursement.request.claimStatus", - "reviewerDate": "process_disbursement.request.reviewerDetails.reviewDate", - "reviewerId": "process_disbursement.request.reviewerDetails.reviewerId", - "userId": "user_authentication.response.id" - } - }, - "onFailure": null - } - ] -} -``` -
- -### Service Requests -A service request essentially tells Clamp to execute a particular workflow. Depending upon the workflow, it may or may not require a request body to go along with it. Let us take the example of `process_claim`, the workflow we created in the above sections. -#### Creation -By making a POST request on `/serviceRequest/process_claim`, we can instruct Clamp to start the `process_claim` workflow. If our workflow requires an initial payload, we can send it in the request body. - -**Request**: -``` -curl -X POST 'http://54.149.76.62:8642/serviceRequest/process_claim' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "userDetails" :{ - "username": "xyz", - "password": "***", - "channel": "web" - }, - "claimDetails":{ - "claimType":"MOTOR", - "claimDate":"23/06/2020", - "policyId":"908", - "garageId":"5000", - "supportingDocuments":"" - } -}' -``` -The above request will trigger the `process_claim` workflow with the following initial payload: -``` -{ - "userDetails" :{ - "username": "xyz", - "password": "***", - "channel": "web" - }, - "claimDetails":{ - "claimType":"MOTOR", - "claimDate":"23/06/2020", - "policyId":"908", - "garageId":"5000", - "supportingDocuments":"" - } -} -``` - -**Response**: -``` -{ - "pollUrl": "/serviceRequest/6102fa39-d209-4b98-8c75-d9f2ef9aa791", - "status": "NEW", - "serviceRequestId": "6102fa39-d209-4b98-8c75-d9f2ef9aa791" -}} -``` -- The `pollUrl` will contain the `GET` endpoint which needs to be polled to monitor the status of every service request. -- The `serviceRequestId` is the unique identifier for a service request. -- The `status` field will contain the completion status for the service request. - -#### Check Status -The status of a service request can be polled by making a GET request on the `/serviceRequest/{id}` endpoint, where the `{id}` parameter is the service request ID obtained during creation. Hence, the following request: -``` -curl http://54.149.76.62:8642/serviceRequest/6102fa39-d209-4b98-8c75-d9f2ef9aa791 -``` -should respond back with the status of service request "6102fa39-d209-4b98-8c75-d9f2ef9aa791", which would look as follows: -``` - - "service_request_id": "6102fa39-d209-4b98-8c75-d9f2ef9aa791", - "workflow_name": "process_claim", - "status": "COMPLETED", - "total_time_in_ms": 170382, - "steps": [ - { - "id": 1, - "name": "user_authentication", - "status": "STARTED", - "time_taken": 0, - "payload": { - "request": { - "claimDetails": { - "claimDate": "23/06/2020", - "claimType": "MOTOR", - "garageId": "5000", - "policyId": "908", - "supportingDocuments": "" - }, - "userDetails": { - "channel": "web", - "password": "jungle-green-t0p!", - "username": "shambhu.shikari" - } - }, - "response": null - } - }, - { - "id": 1, - "name": "user_authentication", - "status": "COMPLETED", - "time_taken": 798, - "payload": { - "request": { - "claimDetails": { - "claimDate": "23/06/2020", - "claimType": "MOTOR", - "garageId": "5000", - "policyId": "908", - "supportingDocuments": "" - }, - "userDetails": { - "channel": "web", - "password": "jungle-green-t0p!", - "username": "shambhu.shikari" - } - }, - "response": { - "id": "1234567890", - "name": "Shambhu Shikari", - "username": "shambhu.shikari" - } - } - }, - ... - ... - { - "id": 9, - "name": "process_disbursement", - "status": "STARTED", - "time_taken": 0, - "payload": { - "request": { - "approvedAmount": "5000", - "claimId": "90990908324", - "claimStatus": "APPROVED", - "reviewerDate": "2020 Jun 23 00:00:00.000 IST", - "reviewerId": "12924", - "userId": "1234567890" - }, - "response": null - } - }, - { - "id": 9, - "name": "process_disbursement", - "status": "COMPLETED", - "time_taken": 514, - "payload": { - "request": { - "approvedAmount": "5000", - "claimId": "90990908324", - "claimStatus": "APPROVED", - "reviewerDate": "2020 Jun 23 00:00:00.000 IST", - "reviewerId": "12924", - "userId": "1234567890" - }, - "response": { - "claimId": "90990908324", - "disbursedAmount": "5000", - "disbursementDate": "2020 Jun 23 00:00:00.000 IST", - "disbursementRefId": "234234434", - "partyDetails": { - "partyId": "23432431", - "partyName": "Apple Auto" - }, - "paymentInstrumentId": "CHEQUE", - "userId": "1234567890" - } - } - } - ], - "reason": "" -} -``` -- The `status` field will contain the completion status for the service request. It will contain `IN_PROGRESS` / `COMPLETED` -- `total_time_in_ms` will contain the time taken in ms to execute the complete workflow -- `steps` will contain step level status, it contains both the request/response that is sent/received for each step. -- In each step in `steps` the `status` defines the state of each step it went through. The possible values are `STARTED` / `COMPLETED` / `SKIPPED` / `FAILED` -- The step status will be `SKIPPED` if the `when` condition is not met. - -#### Send Response -When an async step gets executed, the response for the step needs to be sent explicitly to clamp. The response can be sent back using an HTTP API or through AMQP / Kafka queue. -- HTTP - - By making a POST request on `/stepResponse`, we can send response to Clamp. The response can be sent in below format. - - **Request**: - ``` - curl -X POST 'http://54.149.76.62:8642/stepResponse' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "serviceRequestId": "{{serviceRequestId}}", - "stepId": 5, - "response": { - "claimId": "90990908324", - ... - "notes": "Inspection not required approved based on documentation. CASHLESS" - } - } - }' - ``` - The above request will trigger the workflow to resume execution. - - - When an async step gets executed, **clamp** sends the current id of the service request in the request body. The downstream service needs to send back the same **serviceRequestId** back in the response to continue the same service request. - - The `stepId` is the next step id which needs to be executed. The value of this will also be sent as request to downstream services. - - The `response` field should contain the respective json response that needs to be sent back. - -- AMQP / KAFKA - - The reponse can be sent back through AMQP / KAFKA. Clamp listens to specific topic in both AMQP / KAFKA. `clamp_steps_response` is the topic name to which the below response can be sent. - ``` - { - "serviceRequestId": "{{serviceRequestId}}", - "stepId": 5, - "response": { - "claimId": "90990908324", - ... - "notes": "Inspection not required approved based on documentation. CASHLESS" - } - } - ``` \ No newline at end of file diff --git a/go.mod b/go.mod index bf25206..89b1a76 100644 --- a/go.mod +++ b/go.mod @@ -7,21 +7,29 @@ require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/antonmedv/expr v1.8.8 github.com/caarlos0/env v3.5.0+incompatible + github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/gin-contrib/cors v1.3.1 github.com/gin-gonic/gin v1.6.3 + github.com/go-openapi/swag v0.19.9 // indirect github.com/go-pg/pg/v9 v9.1.6 github.com/gofrs/uuid v3.3.0+incompatible // indirect github.com/google/uuid v1.1.1 + github.com/kr/pty v1.1.5 // indirect + github.com/mailru/easyjson v0.7.6 // indirect github.com/prometheus/client_golang v1.7.1 github.com/qntfy/jsonparser v1.0.2 // indirect github.com/qntfy/kazaam v3.4.8+incompatible github.com/robinjoseph08/go-pg-migrations/v2 v2.1.0 + github.com/satori/go.uuid v1.2.0 // indirect github.com/streadway/amqp v1.0.0 - github.com/stretchr/testify v1.5.1 + github.com/stretchr/objx v0.2.0 // indirect + github.com/stretchr/testify v1.6.1 github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 github.com/swaggo/gin-swagger v1.2.0 - github.com/swaggo/swag v1.6.7 + github.com/swaggo/swag v1.6.8 golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect - golang.org/x/tools v0.0.0-20200928201943-a0ef9b62deab // indirect + golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0 // indirect + golang.org/x/tools v0.0.0-20201016155721-7c89c52d2f52 // indirect + gopkg.in/yaml.v2 v2.3.0 // indirect gotest.tools/gotestsum v0.5.3 // indirect ) diff --git a/go.sum b/go.sum index 1c30c7e..100323c 100644 --- a/go.sum +++ b/go.sum @@ -30,6 +30,8 @@ github.com/codemodus/kace v0.5.1 h1:4OCsBlE2c/rSJo375ggfnucv9eRzge/U5LrrOZd47HA= github.com/codemodus/kace v0.5.1/go.mod h1:coddaHoX1ku1YFSe4Ip0mL9kQjJvKkzb9CfIdG1YR04= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -49,6 +51,7 @@ github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03D github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= github.com/gdamore/tcell v1.3.0/go.mod h1:Hjvr+Ofd+gLglo7RYKxxnzCBmev3BzsS67MebKS4zMM= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.3.1 h1:doAsuITavI4IOcd0Y19U4B+O0dNWihRyX//nn4sEmgA= github.com/gin-contrib/cors v1.3.1/go.mod h1:jjEJ4268OPZUcU7k9Pm653S7lXUGcqMADzFA61xsmDk= @@ -77,13 +80,19 @@ github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3Hfo github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= +github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.4 h1:ixzUSnHTd6hCemgtAJgluaTSGYpLNpJY4mA2DIkdOAo= github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.9 h1:9z9cbFuZJ7AcvOHKIY+f6Aevb4vObNDkTEyoMfO7rAc= +github.com/go-openapi/spec v0.19.9/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-pg/pg/v9 v9.0.0-beta.14/go.mod h1:T2Sr6bpTCOr2lUqOUMiXLMJqZHSUBKk1LdgSqjwhZfA= github.com/go-pg/pg/v9 v9.0.0-beta.15/go.mod h1:JtAtFggZZ97a9GoyKBYWYO9Vd4zWyk4DQ/2EONhmlIs= github.com/go-pg/pg/v9 v9.0.3/go.mod h1:Tm/Q3Vt6gdQOH6TTN1H/xLlIXc+Qrka7TZ6uREtu/eA= @@ -142,6 +151,8 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -169,6 +180,8 @@ github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -259,6 +272,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 h1:PyYN9JH5jY9j6av01SpfRMb+1DWg/i3MbGOKPxJ2wjM= github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= github.com/swaggo/gin-swagger v1.2.0 h1:YskZXEiv51fjOMTsXrOetAjrMDfFaXD79PEoQBOe2W0= @@ -266,6 +280,8 @@ github.com/swaggo/gin-swagger v1.2.0/go.mod h1:qlH2+W7zXGZkczuL+r2nEBR2JTT+/lX05 github.com/swaggo/swag v1.5.1/go.mod h1:1Bl9F/ZBpVWh22nY0zmYyASPO1lI/zIwRDrpZU+tv8Y= github.com/swaggo/swag v1.6.7 h1:e8GC2xDllJZr3omJkm9YfmK0Y56+rMO3cg0JBKNz09s= github.com/swaggo/swag v1.6.7/go.mod h1:xDhTyuFIujYiN3DKWC/H/83xcfHp+UE/IzWWampG7Zc= +github.com/swaggo/swag v1.6.8 h1:z3ZNcpJs/NLMpZcKqXUsBELmmY2Ocy09JXKx5gu3L4M= +github.com/swaggo/swag v1.6.8/go.mod h1:a0IpNeMfGidNOcm2TsqODUh9JHdHu3kxDA0UlGbBKjI= github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df h1:Y2l28Jr3vOEeYtxfVbMtVfOdAwuUqWaP9fvNKiBVeXY= github.com/tsuyoshiwada/go-gitcmd v0.0.0-20180205145712-5f1f5f9475df/go.mod h1:pnyouUty/nBr/zm3GYwTIt+qFTLWbdjeLjZmJdzJOu8= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -279,7 +295,10 @@ github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLY github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= +github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/vmihailenco/bufpool v0.1.5 h1:mEO/biwhAgiY97yPMmAdH4PvaIu63C6uGBdfSdoMo/I= github.com/vmihailenco/bufpool v0.1.5/go.mod h1:fL9i/PRTuS7AELqAHwSU1Zf1c70xhkhGe/cD5ud9pJk= github.com/vmihailenco/msgpack/v4 v4.3.5/go.mod h1:DuaveEe48abshDmz5UBKyZ+yDugvaeFk5ayfrewUOaw= @@ -291,6 +310,7 @@ github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgq github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -332,8 +352,11 @@ golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200222033325-078779b8f2d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0 h1:5kGOVHlq0euqwzgTC9Vu15p6fV1Wi0ArVi8da2urnVg= +golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -365,9 +388,13 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -377,10 +404,13 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 h1:SjQ2+AKWgZLc1xej6WSzL+Dfs5Uyd5xcZH1mGC411IA= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200917221617-d56e4e40bc9d h1:y39d97JVttj+rkTXITl1nf9Vsk+VoRuNzIDLFldUSB4= golang.org/x/tools v0.0.0-20200917221617-d56e4e40bc9d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20200928201943-a0ef9b62deab h1:CyH2SDm5ATQiX9gtbMYfvNNed97A9v+TJFnUX/fTaJY= golang.org/x/tools v0.0.0-20200928201943-a0ef9b62deab/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201016155721-7c89c52d2f52 h1:kQmzX/hkUy5Skcy3sSCAHmfYZ8IXdj2r6KNiHud5y5o= +golang.org/x/tools v0.0.0-20201016155721-7c89c52d2f52/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -423,6 +453,9 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v1.4.0 h1:BjtEgfuw8Qyd+jPvQz8CfoxiO/UjFEidWinwEXZiWv0= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/gotestsum v0.5.3 h1:9SkwB5ou8GYUqSgbCCYCMk9BVXueDmzwk5WjaZeZW2o=