You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@milagro.apache.org by ki...@apache.org on 2019/08/29 13:45:27 UTC

[incubator-milagro-dta] branch update_open-api created (now 85818f7)

This is an automated email from the ASF dual-hosted git repository.

kittohoward pushed a change to branch update_open-api
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-dta.git.


      at 85818f7  remove protobuf instructions from readme and change open API port

This branch includes the following new commits:

     new 85818f7  remove protobuf instructions from readme and change open API port

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-milagro-dta] 01/01: remove protobuf instructions from readme and change open API port

Posted by ki...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kittohoward pushed a commit to branch update_open-api
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-dta.git

commit 85818f78bae4554fc61a4a6d37fc0d780f46d6d8
Author: howardkitto <ki...@gmail.com>
AuthorDate: Thu Aug 29 14:45:03 2019 +0100

    remove protobuf instructions from readme and change open API port
---
 README.md                                    |  27 +-----
 go.sum                                       |   4 +
 open-api.yaml                                |   4 +-
 pkg/bitcoinplugin/open-api.yaml              |   2 +-
 pkg/safeguardsecret/safeguardsecret-api.yaml | 123 ---------------------------
 5 files changed, 10 insertions(+), 150 deletions(-)

diff --git a/README.md b/README.md
index c6e04e9..992ea89 100644
--- a/README.md
+++ b/README.md
@@ -114,41 +114,20 @@ This package is needed for testing.
 go get github.com/stretchr/testify/assert
 ```
 
-## Run service
+## Run Service
 
-This script will build the service
+This script will build the service 
 
 ```
 ./build.sh
 ```
 
-To run the service
+To run the service with default settings
 
 ```
 ./target/service
 ```
 
-## Developer Notes
-
-You need to install protobufs
-
-If you change the portobufs definition run 
-
-$ protoc -I=. --go_out=. ./docs.proto
-
-To add a new endpoint to the goKit Microservices framework
-
-1. First define the contract in milagro/pkg/milagroservice/proto.go
-
-Add structs for http transport
-Add responses to milagro/swagger/swagger.config,yaml
-
-2. Add an endpoint definition
-
-milagro/pkg/milagroendpoints/endpoints.go
-
-3. Create a handler factory
-
 
 ## Crypto Notice
 
diff --git a/go.sum b/go.sum
index 306d48a..521c6f5 100644
--- a/go.sum
+++ b/go.sum
@@ -86,9 +86,11 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJY
 github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
 github.com/go-critic/go-critic v0.0.0-20181204210945-c3db6069acc5/go.mod h1:Jc75BZJv2dNy7opKH6bF29VveDQHfGZ6Asn/3phBesg=
 github.com/go-critic/go-critic v0.0.0-20181204210945-ee9bf5809ead/go.mod h1:3MzXZKJdeXqdU9cj+rvZdNiN7SZ8V9OjybF8loZDmHU=
+github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0=
 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
 github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM=
 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA=
 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
 github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
 github.com/go-playground/locales v0.12.1 h1:2FITxuFt/xuCNP1Acdhv62OzaCiviiE4kotfhkmOqEc=
@@ -496,6 +498,7 @@ github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc
 github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
 github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
 github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
+github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
 github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
@@ -560,6 +563,7 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP
 github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
 github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
 github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
diff --git a/open-api.yaml b/open-api.yaml
index ddc8eaf..e5ee635 100644
--- a/open-api.yaml
+++ b/open-api.yaml
@@ -1,7 +1,7 @@
 openapi: 3.0.0
 info:
   title: Apache Milagro Server
-  description: Milagro Secure - distributed / decentralized core security services. This is the HTTP API specification for the D-TA when it is running no plugins (or the plugin template).
+  description: Milagro Secure - distributed / decentralized core security services. This is the HTTP API specification for the D-TA when it is running no plugins.
   contact:
     email: dev@milagro.apache.org
   license:
@@ -297,7 +297,7 @@ paths:
                 type: string
 servers:
   - url: 'http://localhost:5556'
-  - url: 'http://localhost:5555' 
+  - url: 'http://localhost:5558' 
 components:
   schemas:
       CreateIdentityResponse:
diff --git a/pkg/bitcoinplugin/open-api.yaml b/pkg/bitcoinplugin/open-api.yaml
index 86e1fc2..5556870 100644
--- a/pkg/bitcoinplugin/open-api.yaml
+++ b/pkg/bitcoinplugin/open-api.yaml
@@ -303,7 +303,7 @@ paths:
   #               type: string
 servers:
   - url: 'http://localhost:5556'
-  - url: 'http://localhost:5555' 
+  - url: 'http://localhost:5558' 
 components:
   schemas:
       # CreateIdentityResponse:
diff --git a/pkg/safeguardsecret/safeguardsecret-api.yaml b/pkg/safeguardsecret/safeguardsecret-api.yaml
deleted file mode 100644
index a25e38c..0000000
--- a/pkg/safeguardsecret/safeguardsecret-api.yaml
+++ /dev/null
@@ -1,123 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http:#www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-openapi: 3.0.0 
-info:
-  description: Milagro Secure - distributed / decentralized core security services.
-  title: Apache Milagro Server - Safeguard Secret
-  contact:
-    email: howard@qredo.com
-  license:
-    name: Apache Milagro
-  version: 0.0.1
-paths:  
-  /v1/order:
-    post:
-      summary: Post a string and get back the encrypted version
-      tags:
-        - safeguardSecret
-      requestBody:
-        content:
-          application/json:
-            schema:
-              type: object
-              properties:
-                beneficiaryIDDocumentCID:
-                  type: string                  
-                  example: QmfWg5GffUEzwahd9hkvdnqTGQs5PfusoEpx3kSDSdG4ze
-                extension:
-                  type: object
-                  properties:
-                    plainText:
-                      type: string
-                      example: S0m3 V3ry 1mp0rt@nt T3xt
-      responses:
-        '200':
-          $ref: '#/components/schemas/SafeguardSecret'
-  /v1/order/secret:
-    post:
-      summary: Release secret
-      tags:
-        - safeguardSecret
-      operationId: createkey
-      requestBody:
-        content:
-          application/json:
-            schema:
-              type: object
-              properties:
-                orderReference:
-                  type: string
-                  example: e1b3645e-b9ad-11e9-8d56-acde48001122
-                beneficiaryIDDocumentCID:
-                  type: string
-                  example: QmfWg5GffUEzwahd9hkvdnqTGQs5PfusoEpx3kSDSdG4ze
-                extension:
-                  type: object
-                  properties:
-                    cypherText:
-                      type: string
-                      example: a72d69d8fb151edde606163ff880ae4f572d40b5135816379c7f6438a66dee44
-                    t:
-                      type: string
-                      example: d9591744259dc7969084b659
-                    v: 
-                      type: string
-                      example: 04343b1aad4b00e32fd94c64b024ea387c366d967b5d6713c8ffb7d6b716f0e1b92561b43207f18a475365e1b112e9ae3ba8af0d3aa4cc1b0be880d6918a15fd6b
-      responses:
-        '200':
-          $ref: '#/components/schemas/DecryptAString'  
-servers:
-  - url: 'http://localhost:5556'
-components:
-  schemas:
-    SafeguardSecret:
-      type: object
-      properties:
-        orderPart1CID:
-          type: string
-        orderPart2CID:
-          type: string
-        commitment:
-          type: string
-        createdAt:
-          type: integer
-        extension:
-          type: object
-          properties:
-            cypherText:
-              type: string
-            t:
-              type: string
-            v:
-              type: string
-    DecryptAString:
-      type: object
-      properties:
-        secret:
-          type: string
-        commitment:
-          type: string
-        extension:
-          type: object
-          properties:
-            plainText: 
-              type: string
-tags:
-  - name: safeguardSecret
-    description: D-TA Plugin for Encrypting Strings
-    
\ No newline at end of file