diff --git a/Dockerfile.tools b/Dockerfile.tools index cfed215a1..ccac4ba96 100644 --- a/Dockerfile.tools +++ b/Dockerfile.tools @@ -21,7 +21,8 @@ ARG protobuf=3.8.0 RUN wget -q https://github.com/protocolbuffers/protobuf/releases/download/v$protobuf/protoc-$protobuf-linux-x86_64.zip -O /tmp/protobuf.zip && \ mkdir /tmp/protobuf && \ unzip /tmp/protobuf.zip -d /tmp/protobuf && \ - mv /tmp/protobuf/bin/protoc /usr/local/bin/protoc && \ + mv /tmp/protobuf/bin/* /usr/local/bin/ && \ + mv /tmp/protobuf/include/* /usr/local/include/ && \ rm -rf /tmp/* RUN go install github.com/go-bindata/go-bindata/go-bindata diff --git a/protobuf/api/event.pb.go b/protobuf/api/event.pb.go index 0f2ede966..a94fec8a7 100644 --- a/protobuf/api/event.pb.go +++ b/protobuf/api/event.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" + _struct "github.com/golang/protobuf/ptypes/struct" types "github.com/mesg-foundation/engine/protobuf/types" grpc "google.golang.org/grpc" math "math" @@ -130,10 +131,10 @@ type CreateEventRequest struct { // key is the key of the event. Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // data is the data for the event. - Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Data *_struct.Struct `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateEventRequest) Reset() { *m = CreateEventRequest{} } @@ -175,11 +176,11 @@ func (m *CreateEventRequest) GetKey() string { return "" } -func (m *CreateEventRequest) GetData() string { +func (m *CreateEventRequest) GetData() *_struct.Struct { if m != nil { return m.Data } - return "" + return nil } // CreateEventResponse defines response for execution update. @@ -233,24 +234,25 @@ func init() { func init() { proto.RegisterFile("protobuf/api/event.proto", fileDescriptor_c0ad091fa003d2ac) } var fileDescriptor_c0ad091fa003d2ac = []byte{ - // 260 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xc3, 0x40, - 0x10, 0x85, 0xbb, 0x8d, 0x2e, 0x38, 0xf6, 0x20, 0xe3, 0xc1, 0xb0, 0x07, 0x91, 0x3d, 0xe9, 0x65, - 0x2b, 0x2d, 0x78, 0xf3, 0x24, 0x8a, 0xe7, 0x78, 0x17, 0xb6, 0x3a, 0xa5, 0x8b, 0x9a, 0xac, 0xd9, - 0xa9, 0x50, 0xfc, 0x33, 0xfe, 0x54, 0xc9, 0x24, 0x04, 0x63, 0xf4, 0x36, 0xbc, 0xf7, 0xe6, 0x63, - 0xf6, 0x2d, 0xe4, 0xb1, 0xae, 0xb8, 0x5a, 0x6d, 0xd7, 0x73, 0x1f, 0xc3, 0x9c, 0x3e, 0xa8, 0x64, - 0x27, 0x12, 0x66, 0x3e, 0x06, 0x63, 0x7a, 0x9b, 0x77, 0x91, 0xd2, 0xcf, 0x80, 0xfd, 0x52, 0x80, - 0x0f, 0x5c, 0x93, 0x7f, 0xbb, 0x6d, 0xd4, 0x82, 0xde, 0xb7, 0x94, 0x18, 0xaf, 0x40, 0xaf, 0xc3, - 0x2b, 0x53, 0x9d, 0xab, 0x33, 0x75, 0x7e, 0xb8, 0x38, 0x75, 0x3e, 0x06, 0x37, 0x0e, 0xba, 0x3b, - 0x49, 0x15, 0x5d, 0xda, 0x14, 0xa0, 0x5b, 0x05, 0x11, 0xf6, 0x36, 0x3e, 0x6d, 0x64, 0xff, 0xa0, - 0x90, 0x19, 0x2d, 0xcc, 0x42, 0x99, 0xd8, 0x97, 0x4f, 0x74, 0xdf, 0x78, 0x53, 0xf1, 0x06, 0x1a, - 0x1e, 0x41, 0xf6, 0x42, 0xbb, 0x3c, 0x13, 0xab, 0x19, 0xed, 0x23, 0xe0, 0x4d, 0x4d, 0x9e, 0x69, - 0x70, 0xe1, 0x6f, 0x96, 0xfa, 0x9f, 0x35, 0xed, 0x59, 0xcd, 0x55, 0xcf, 0x9e, 0x7d, 0x87, 0x97, - 0xd9, 0x5e, 0xc0, 0xf1, 0x80, 0x9f, 0x62, 0x55, 0x26, 0xfa, 0xeb, 0x01, 0x8b, 0x4f, 0xd8, 0x97, - 0x10, 0x5e, 0x83, 0x6e, 0x77, 0xf0, 0x44, 0x9a, 0x19, 0x1f, 0x68, 0xf2, 0xb1, 0xd1, 0x92, 0xed, - 0x04, 0x97, 0xa0, 0xdb, 0x2e, 0xbb, 0xf5, 0x71, 0xb1, 0x66, 0xe6, 0xe4, 0xb3, 0x9c, 0x88, 0x76, - 0x72, 0xa9, 0x56, 0x5a, 0x7e, 0x6c, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x58, 0x6b, 0x0c, 0x12, - 0xee, 0x01, 0x00, 0x00, + // 287 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x51, 0xcd, 0x4a, 0xc3, 0x40, + 0x10, 0x6e, 0xda, 0x1a, 0x70, 0xda, 0x83, 0x8c, 0x87, 0x86, 0x45, 0x44, 0xf6, 0xa4, 0x08, 0x5b, + 0x69, 0xc1, 0x9b, 0x27, 0x51, 0x3c, 0xc7, 0x27, 0xd8, 0xc6, 0x69, 0x1b, 0xac, 0xc9, 0x9a, 0x9d, + 0x28, 0xc5, 0x97, 0xf1, 0x51, 0x25, 0x93, 0x18, 0x8c, 0xd1, 0xdb, 0xf0, 0xfd, 0xed, 0xcc, 0xb7, + 0x10, 0xb9, 0x22, 0xe7, 0x7c, 0x55, 0xae, 0xe7, 0xd6, 0xa5, 0x73, 0x7a, 0xa3, 0x8c, 0x8d, 0x40, + 0x38, 0xb2, 0x2e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x1a, 0x01, 0xf5, 0xe0, 0x2a, 0x58, 0x85, 0xb2, + 0xfe, 0xf2, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x68, 0x3c, 0x8a, 0x99, 0x25, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/protobuf/api/event.proto b/protobuf/api/event.proto index fddb0d8bb..e8920bf0e 100644 --- a/protobuf/api/event.proto +++ b/protobuf/api/event.proto @@ -1,5 +1,6 @@ syntax = "proto3"; +import "google/protobuf/struct.proto"; import "protobuf/types/event.proto"; package api; @@ -45,7 +46,7 @@ message CreateEventRequest { string key = 2; // data is the data for the event. - string data = 3; + google.protobuf.Struct data = 3; } // CreateEventResponse defines response for execution update. diff --git a/protobuf/api/execution.pb.go b/protobuf/api/execution.pb.go index 97185b4d2..25ed7fa9f 100644 --- a/protobuf/api/execution.pb.go +++ b/protobuf/api/execution.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" + _struct "github.com/golang/protobuf/ptypes/struct" types "github.com/mesg-foundation/engine/protobuf/types" grpc "google.golang.org/grpc" math "math" @@ -25,13 +26,13 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // CreateExecutionRequest defines request to create a single execution. type CreateExecutionRequest struct { - InstanceHash string `protobuf:"bytes,1,opt,name=instanceHash,proto3" json:"instanceHash,omitempty"` - TaskKey string `protobuf:"bytes,2,opt,name=taskKey,proto3" json:"taskKey,omitempty"` - Inputs string `protobuf:"bytes,3,opt,name=inputs,proto3" json:"inputs,omitempty"` - Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + InstanceHash string `protobuf:"bytes,1,opt,name=instanceHash,proto3" json:"instanceHash,omitempty"` + TaskKey string `protobuf:"bytes,2,opt,name=taskKey,proto3" json:"taskKey,omitempty"` + Inputs *_struct.Struct `protobuf:"bytes,3,opt,name=inputs,proto3" json:"inputs,omitempty"` + Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateExecutionRequest) Reset() { *m = CreateExecutionRequest{} } @@ -73,11 +74,11 @@ func (m *CreateExecutionRequest) GetTaskKey() string { return "" } -func (m *CreateExecutionRequest) GetInputs() string { +func (m *CreateExecutionRequest) GetInputs() *_struct.Struct { if m != nil { return m.Inputs } - return "" + return nil } func (m *CreateExecutionRequest) GetTags() []string { @@ -330,7 +331,7 @@ type isUpdateExecutionRequest_Result interface { } type UpdateExecutionRequest_Outputs struct { - Outputs string `protobuf:"bytes,2,opt,name=outputs,proto3,oneof"` + Outputs *_struct.Struct `protobuf:"bytes,2,opt,name=outputs,proto3,oneof"` } type UpdateExecutionRequest_Error struct { @@ -348,11 +349,11 @@ func (m *UpdateExecutionRequest) GetResult() isUpdateExecutionRequest_Result { return nil } -func (m *UpdateExecutionRequest) GetOutputs() string { +func (m *UpdateExecutionRequest) GetOutputs() *_struct.Struct { if x, ok := m.GetResult().(*UpdateExecutionRequest_Outputs); ok { return x.Outputs } - return "" + return nil } func (m *UpdateExecutionRequest) GetError() string { @@ -415,32 +416,34 @@ func init() { func init() { proto.RegisterFile("protobuf/api/execution.proto", fileDescriptor_96e2c86581f82f05) } var fileDescriptor_96e2c86581f82f05 = []byte{ - // 401 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x4d, 0xaf, 0xd2, 0x40, - 0x14, 0x6d, 0x29, 0x16, 0xb8, 0x7e, 0xc4, 0x8c, 0x49, 0xa9, 0x95, 0x18, 0x32, 0x2b, 0x58, 0x58, - 0x0c, 0xec, 0x74, 0xa7, 0x41, 0x48, 0xdc, 0x95, 0xf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0xa7, 0x9f, 0x8c, 0x32, 0xab, 0x27, 0x92, 0xbf, 0x3e, 0x84, 0x16, 0x62, 0x53, 0xe8, 0x6b, 0x12, - 0x54, 0x69, 0xd4, 0xb1, 0x3f, 0x0e, 0x26, 0xcf, 0xe6, 0x4f, 0x53, 0x13, 0x75, 0xba, 0x31, 0x70, - 0xd6, 0xd0, 0xad, 0x40, 0x3b, 0x0f, 0x07, 0x1a, 0x5c, 0x07, 0xea, 0x0a, 0xee, 0x3b, 0x44, 0x5f, - 0xe4, 0x57, 0x57, 0x79, 0x8e, 0x30, 0x58, 0x02, 0xbd, 0xb2, 0x22, 0xd3, 0x89, 0xb1, 0x5e, 0x7b, - 0xd9, 0x05, 0x60, 0x11, 0x3c, 0x42, 0xa5, 0x4a, 0x65, 0x5d, 0xd7, 0x5e, 0x66, 0xaf, 0x1f, 0xfa, - 0x10, 0x2a, 0xd4, 0xd5, 0x91, 0xf8, 0x4b, 0x18, 0xb6, 0xbc, 0x6c, 0x49, 0xf3, 0x7f, 0x1d, 0x18, - 0x34, 0x28, 0x5b, 0x42, 0x68, 0xdb, 0x64, 0xaf, 0x4c, 0xa4, 0xee, 0xcf, 0x2b, 0x19, 0xb9, 0x49, - 0xfb, 0x48, 0xee, 0xb1, 0x05, 0x04, 0x2b, 0x24, 0x16, 0x1b, 0x99, 0xa3, 0xef, 0xe4, 0x79, 0x9d, - 0x73, 0x43, 0x70, 0x8f, 0xbd, 0x87, 0xd0, 0x36, 0x58, 0x7b, 0xbb, 0xeb, 0x74, 0x8d, 0xbe, 0xf5, - 0xcf, 0x8b, 0xdb, 0x37, 0xac, 0x87, 0xdd, 0xd1, 0xd6, 0x8b, 0xdf, 0x93, 0x05, 0xf7, 0xb6, 0xa1, - 0xf9, 0xb3, 0x16, 0x37, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4b, 0xb1, 0xcc, 0x21, 0x9e, 0x03, 0x00, + // 433 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xc1, 0x6e, 0x13, 0x31, + 0x14, 0x5c, 0x67, 0xcb, 0xb6, 0x79, 0x05, 0x84, 0x8c, 0x94, 0x2c, 0x4b, 0x84, 0x22, 0x9f, 0xd2, + 0x03, 0x0e, 0x4a, 0x6e, 0x70, 0x03, 0x95, 0x46, 0xe2, 0xb6, 0x11, 0x1f, 0xe0, 0x86, 0xd7, 0x74, + 0x45, 0xd8, 0x35, 0xf6, 0xb3, 0x44, 0xcf, 0x88, 0x13, 0x9f, 0xc0, 0xaf, 0xf1, 0x31, 0xa8, 0xf6, + 0xee, 0xa2, 0xb2, 0xa6, 0x37, 0x7b, 0x66, 0x9e, 0x3d, 0x9e, 0x31, 0xcc, 0xb4, 0x69, 0xa8, 0xb9, + 0x74, 0x57, 0x4b, 0xa5, 0xab, 0x25, 0x7e, 0xc3, 0x9d, 0xa3, 0xaa, 0xa9, 0xa5, 0x87, 0x79, 0xaa, + 0x74, 0x55, 0xcc, 0xf6, 0x4d, 0xb3, 0x3f, 0xe0, 0xb2, 0x57, 0x5a, 0x32, 0x6e, 0x47, 0x41, 0x52, + 0xbc, 0xe8, 0x61, 0xba, 0xd1, 0x68, 0xff, 0x3d, 0x42, 0xfc, 0x62, 0x30, 0x79, 0x67, 0x50, 0x11, + 0x9e, 0x77, 0x4c, 0x89, 0x5f, 0x1d, 0x5a, 0xe2, 0x02, 0x1e, 0x56, 0xb5, 0x25, 0x55, 0xef, 0x70, + 0xa3, 0xec, 0x75, 0xce, 0xe6, 0x6c, 0x31, 0x2e, 0xef, 0x60, 0x3c, 0x87, 0x63, 0x52, 0xf6, 0xf3, + 0x07, 0xbc, 0xc9, 0x47, 0x9e, 0xee, 0xb6, 0x7c, 0x09, 0x59, 0x55, 0x6b, 0x47, 0x36, 0x4f, 0xe7, + 0x6c, 0x71, 0xba, 0x9a, 0xca, 0xe0, 0x53, 0x76, 0x86, 0xe4, 0xd6, 0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x8e, 0x14, 0x09, 0x5f, 0x43, 0x7a, 0x81, 0xc4, 0x73, 0x2f, 0x8b, 0xfc, 0x84, 0xe2, 0x49, 0xdb, + 0x40, 0x4f, 0x88, 0x84, 0xbf, 0x81, 0x2c, 0x74, 0xdb, 0xde, 0x1d, 0x2f, 0x3a, 0x36, 0xfa, 0x8a, + 0xdd, 0x1a, 0x0f, 0x2f, 0x6c, 0x87, 0xe3, 0x99, 0xb7, 0xc6, 0xff, 0x93, 0x85, 0x48, 0x2e, 0x33, + 0x1f, 0xf3, 0xfa, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0x21, 0x44, 0x6d, 0xef, 0x03, 0x00, 0x00, } diff --git a/protobuf/api/execution.proto b/protobuf/api/execution.proto index d1a593f07..b9e1e6ecc 100644 --- a/protobuf/api/execution.proto +++ b/protobuf/api/execution.proto @@ -1,5 +1,6 @@ syntax = "proto3"; +import "google/protobuf/struct.proto"; import "protobuf/types/execution.proto"; package api; @@ -29,7 +30,7 @@ service Execution { message CreateExecutionRequest { string instanceHash = 1; string taskKey = 2; - string inputs = 3; + google.protobuf.Struct inputs = 3; repeated string tags = 4; } @@ -74,7 +75,7 @@ message UpdateExecutionRequest { // result pass to execution oneof result { // outputs is a success result. - string outputs = 2; + google.protobuf.Struct outputs = 2; // error is an error result. string error = 3; diff --git a/protobuf/convert/pbstruct.go b/protobuf/convert/pbstruct.go new file mode 100644 index 000000000..f06e6e395 --- /dev/null +++ b/protobuf/convert/pbstruct.go @@ -0,0 +1,44 @@ +package convert + +import ( + "bytes" + "encoding/json" + "sync" + + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" +) + +var marshaler = jsonpb.Marshaler{EmitDefaults: true} + +var bufPool = sync.Pool{ + New: func() interface{} { + return &bytes.Buffer{} + }, +} + +// Marshal converts protobuf struct to map[string]interface{}. +func Marshal(in proto.Message, out interface{}) error { + buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() + defer bufPool.Put(buf) + + dec := json.NewDecoder(buf) + if err := marshaler.Marshal(buf, in); err != nil { + return err + } + return dec.Decode(out) +} + +// Unmarshal converts map[string]interface{} to protobuf struct. +func Unmarshal(in interface{}, out proto.Message) error { + buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() + defer bufPool.Put(buf) + + enc := json.NewEncoder(buf) + if err := enc.Encode(in); err != nil { + return err + } + return jsonpb.Unmarshal(buf, out) +} diff --git a/protobuf/types/event.pb.go b/protobuf/types/event.pb.go index 6224f5220..14a172128 100644 --- a/protobuf/types/event.pb.go +++ b/protobuf/types/event.pb.go @@ -6,6 +6,7 @@ package types import ( fmt "fmt" proto "github.com/golang/protobuf/proto" + _struct "github.com/golang/protobuf/ptypes/struct" math "math" ) @@ -29,10 +30,10 @@ type Event struct { // key is the key of the event. Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // data is the data for the event. - Data string `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Data *_struct.Struct `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Event) Reset() { *m = Event{} } @@ -81,11 +82,11 @@ func (m *Event) GetKey() string { return "" } -func (m *Event) GetData() string { +func (m *Event) GetData() *_struct.Struct { if m != nil { return m.Data } - return "" + return nil } func init() { @@ -95,16 +96,18 @@ func init() { func init() { proto.RegisterFile("protobuf/types/event.proto", fileDescriptor_118d36ccf50c3798) } var fileDescriptor_118d36ccf50c3798 = []byte{ - // 165 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8e, 0x31, 0x0b, 0xc2, 0x30, - 0x10, 0x46, 0xa9, 0x6d, 0x05, 0x83, 0x83, 0x64, 0x2a, 0x4e, 0xd2, 0xc9, 0xc5, 0x46, 0xf4, 0x1f, - 0x08, 0x82, 0xb3, 0xa3, 0x5b, 0xda, 0x5e, 0x93, 0x20, 0xbd, 0x14, 0x73, 0x11, 0xfa, 0xef, 0x25, - 0xe7, 0xd4, 0xed, 0xdd, 0x7b, 0xf0, 0x71, 0x62, 0x3f, 0x7d, 0x3c, 0xf9, 0x36, 0x0e, 0x8a, 0xe6, - 0x09, 0x82, 0x82, 0x2f, 0x20, 0x35, 0x2c, 0x65, 0xc9, 0xaa, 0x06, 0x51, 0xde, 0x93, 0x95, 0x52, - 0x14, 0x56, 0x07, 0x5b, 0x65, 0x87, 0xec, 0xb8, 0x79, 0x32, 0xcb, 0x5a, 0x6c, 0x1d, 0x06, 0xd2, - 0xd8, 0xc1, 0x23, 0xb5, 0x15, 0xb7, 0x85, 0x93, 0x3b, 0x91, 0xbf, 0x61, 0xae, 0x72, 0x4e, 0x09, - 0xd3, 0x52, 0xaf, 0x49, 0x57, 0xc5, 0x7f, 0x29, 0xf1, 0xed, 0xf2, 0x3a, 0x1b, 0x47, 0x36, 0xb6, - 0x4d, 0xe7, 0x47, 0x35, 0x42, 0x30, 0xa7, 0xc1, 0x47, 0xec, 0x35, 0x39, 0x8f, 0x0a, 0xd0, 0x38, - 0x04, 0xb5, 0xfc, 0xb6, 0x5d, 0xf3, 0x7d, 0xfd, 0x05, 0x00, 0x00, 0xff, 0xff, 0x90, 0xf8, 0x6a, - 0x46, 0xc6, 0x00, 0x00, 0x00, + // 202 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x28, 0xca, 0x2f, + 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, + 0xd1, 0x03, 0x0b, 0x0a, 0xb1, 0x82, 0x85, 0xa4, 0x64, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, + 0xe1, 0x2a, 0x8b, 0x4b, 0x8a, 0x4a, 0x93, 0xa1, 0x8a, 0x94, 0xea, 0xb8, 0x58, 0x5d, 0x41, 0x7a, + 0x84, 0x84, 0xb8, 0x58, 0x32, 0x12, 0x8b, 0x33, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, + 0x6c, 0x21, 0x25, 0x2e, 0x9e, 0xcc, 0xbc, 0xe2, 0x92, 0xc4, 0xbc, 0xe4, 0x54, 0x0f, 0x90, 0x1c, + 0x13, 0x58, 0x0e, 0x45, 0x4c, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x52, 0x82, 0x19, 0x2c, 0x05, + 0x62, 0x0a, 0x69, 0x73, 0xb1, 0xa4, 0x24, 0x96, 0x24, 0x4a, 0xb0, 0x28, 0x30, 0x6a, 0x70, 0x1b, + 0x89, 0xeb, 0x41, 0xec, 0xd7, 0x83, 0xd9, 0xaf, 0x17, 0x0c, 0xb6, 0x3f, 0x08, 0xac, 0xc8, 0xc9, + 0x28, 0xca, 0x20, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x37, 0xb5, + 0x38, 0x5d, 0x37, 0x2d, 0xbf, 0x34, 0x2f, 0x25, 0xb1, 0x24, 0x33, 0x3f, 0x4f, 0x3f, 0x35, 0x2f, + 0x3d, 0x33, 0x0f, 0xc9, 0xe9, 0x60, 0x1f, 0x25, 0xb1, 0x81, 0xf9, 0xc6, 0x80, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xb4, 0x6b, 0x0b, 0x88, 0xfd, 0x00, 0x00, 0x00, } diff --git a/protobuf/types/event.proto b/protobuf/types/event.proto index 882393b0b..d93ef0adf 100644 --- a/protobuf/types/event.proto +++ b/protobuf/types/event.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/protobuf/struct.proto"; + package types; option go_package = "github.com/mesg-foundation/engine/protobuf/types"; @@ -15,5 +17,5 @@ message Event { string key = 3; // data is the data for the event. - string data = 4; + google.protobuf.Struct data = 4; } diff --git a/protobuf/types/execution.pb.go b/protobuf/types/execution.pb.go index e55018042..942596fe7 100644 --- a/protobuf/types/execution.pb.go +++ b/protobuf/types/execution.pb.go @@ -6,6 +6,7 @@ package types import ( fmt "fmt" proto "github.com/golang/protobuf/proto" + _struct "github.com/golang/protobuf/ptypes/struct" math "math" ) @@ -77,9 +78,9 @@ type Execution struct { // taskKey is the key of the task of this execution. TaskKey string `protobuf:"bytes,6,opt,name=taskKey,proto3" json:"taskKey,omitempty"` // inputs data of the execution. - Inputs string `protobuf:"bytes,7,opt,name=inputs,proto3" json:"inputs,omitempty"` + Inputs *_struct.Struct `protobuf:"bytes,7,opt,name=inputs,proto3" json:"inputs,omitempty"` // outputs are the returned data of successful execution. - Outputs string `protobuf:"bytes,8,opt,name=outputs,proto3" json:"outputs,omitempty"` + Outputs *_struct.Struct `protobuf:"bytes,8,opt,name=outputs,proto3" json:"outputs,omitempty"` // error message of a failed execution. Error string `protobuf:"bytes,9,opt,name=error,proto3" json:"error,omitempty"` // tags are optionally associated with execution by the user. @@ -156,18 +157,18 @@ func (m *Execution) GetTaskKey() string { return "" } -func (m *Execution) GetInputs() string { +func (m *Execution) GetInputs() *_struct.Struct { if m != nil { return m.Inputs } - return "" + return nil } -func (m *Execution) GetOutputs() string { +func (m *Execution) GetOutputs() *_struct.Struct { if m != nil { return m.Outputs } - return "" + return nil } func (m *Execution) GetError() string { @@ -192,25 +193,27 @@ func init() { func init() { proto.RegisterFile("protobuf/types/execution.proto", fileDescriptor_42e00237fcad5e7f) } var fileDescriptor_42e00237fcad5e7f = []byte{ - // 315 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0x6d, 0x4b, 0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c, 0x9a, 0x64, 0x8c, 0x36, 0x22, 0x61, 0xbe, 0x0d, 0x61, 0x7d, 0x27, - 0x0b, 0x2b, 0xa0, 0x57, 0x0f, 0xeb, 0x87, 0xfa, 0xea, 0x05, 0xe2, 0xed, 0x5d, 0xf1, 0x04, 0x5a, - 0xef, 0x6a, 0xa9, 0xf4, 0x97, 0x4a, 0x8f, 0x42, 0x18, 0x19, 0x92, 0x8e, 0x66, 0x69, 0x84, 0x1d, - 0x80, 0x27, 0xf5, 0x6a, 0x74, 0x61, 0xc8, 0xda, 0xb4, 0x86, 0x6d, 0x48, 0x46, 0x7a, 0x5d, 0xad, - 0x28, 0xe8, 0x3a, 0x02, 0xc4, 0x0f, 0xb2, 0x5c, 0xd1, 0x2c, 0x6d, 0xdc, 0x0d, 0x3f, 0x6e, 0x8a, - 0xd2, 0x2d, 0xfc, 0x24, 0x9b, 0xea, 0x75, 0xbe, 0x26, 0x5b, 0x5c, 0xcf, 0xb5, 0x57, 0x33, 0x19, - 0xde, 0x3f, 0x27, 0x55, 0x94, 0x8a, 0xf2, 0xc3, 0xaf, 0x9b, 0xc4, 0x9c, 0x6f, 0x7f, 0x03, 0x00, - 0x00, 0xff, 0xff, 0x7e, 0xb5, 0xfe, 0x7d, 0xd3, 0x01, 0x00, 0x00, + // 352 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xdd, 0x4a, 0xfb, 0x40, + 0x10, 0xc5, 0xff, 0xe9, 0x47, 0xf2, 0xcf, 0xd4, 0x96, 0xb0, 0x08, 0x06, 0x29, 0x25, 0x14, 0x84, + 0x22, 0x98, 0x68, 0x7d, 0x03, 0x8b, 0xa2, 0x88, 0x20, 0x2d, 0xde, 0x78, 0xb7, 0x4d, 0xa7, 0x69, + 0x68, 0xbb, 0x1b, 0xf6, 0x43, 0xed, 0x5b, 0xfa, 0x48, 0x92, 0x49, 0xa3, 0xf5,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0x67, 0x3a, 0x84, 0xa8, 0x59, 0x2e, 0xac, 0x3c, 0x9f, 0x3f, 0x81, 0x5b, + 0xb5, 0x63, 0x1d, 0xf0, 0x5e, 0xc4, 0x5a, 0xc8, 0x77, 0x11, 0xfc, 0x2b, 0xc5, 0x44, 0x21, 0x37, + 0xb8, 0x08, 0x1c, 0xd6, 0x03, 0x78, 0x10, 0xcf, 0x4a, 0x66, 0x0a, 0xb5, 0x0e, 0x1a, 0xac, 0x0b, + 0xfe, 0x44, 0x6e, 0x8b, 0x0d, 0x96, 0xb8, 0xc9, 0x00, 0xdc, 0x3b, 0x9e, 0x6f, 0x70, 0x11, 0xb4, + 0x6e, 0xc6, 0xaf, 0x97, 0x59, 0x6e, 0x56, 0x76, 0x1e, 0xa7, 0x72, 0x9b, 0x6c, 0x51, 0x67, 0x17, + 0x4b, 0x69, 0xc5, 0x82, 0x97, 0x2f, 0x96, 0xa0, 0xc8, 0x72, 0x71, 0xf0, 0xb8, 0xb4, 0xdd, 0xb9, + 0x4b, 0xfa, 0xfa, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xe4, 0x91, 0x77, 0x23, 0x02, 0x00, 0x00, } diff --git a/protobuf/types/execution.proto b/protobuf/types/execution.proto index e06934a5d..a0fe00f57 100644 --- a/protobuf/types/execution.proto +++ b/protobuf/types/execution.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/protobuf/struct.proto"; + package types; option go_package = "github.com/mesg-foundation/engine/protobuf/types"; @@ -44,10 +46,10 @@ message Execution { string taskKey = 6; // inputs data of the execution. - string inputs = 7; + google.protobuf.Struct inputs = 7; // outputs are the returned data of successful execution. - string outputs = 8; + google.protobuf.Struct outputs = 8; // error message of a failed execution. string error = 9; diff --git a/sdk/execution/execution.go b/sdk/execution/execution.go index b7d1156bf..62c68f2be 100644 --- a/sdk/execution/execution.go +++ b/sdk/execution/execution.go @@ -1,7 +1,6 @@ package executionsdk import ( - "encoding/json" "fmt" "github.com/cskr/pubsub" @@ -49,7 +48,7 @@ func (e *Execution) GetStream(f *Filter) *Listener { } // Update updates execution that matches given hash. -func (e *Execution) Update(executionHash hash.Hash, outputs []byte, reterr error) error { +func (e *Execution) Update(executionHash hash.Hash, outputs map[string]interface{}, reterr error) error { exec, err := e.processExecution(executionHash, outputs, reterr) if err != nil { return err @@ -61,7 +60,7 @@ func (e *Execution) Update(executionHash hash.Hash, outputs []byte, reterr error } // processExecution processes execution and marks it as complated or failed. -func (e *Execution) processExecution(executionHash hash.Hash, outputData []byte, reterr error) (*execution.Execution, error) { +func (e *Execution) processExecution(executionHash hash.Hash, outputs map[string]interface{}, reterr error) (*execution.Execution, error) { tx, err := e.execDB.OpenTransaction() if err != nil { return nil, err @@ -79,13 +78,13 @@ func (e *Execution) processExecution(executionHash hash.Hash, outputData []byte, return nil, err } } else { - o, err := e.validateExecutionOutput(exec.InstanceHash, exec.TaskKey, outputData) + err := e.validateExecutionOutput(exec.InstanceHash, exec.TaskKey, outputs) if err != nil { if err1 := exec.Failed(err); err1 != nil { tx.Discard() return nil, err1 } - } else if err := exec.Complete(o); err != nil { + } else if err := exec.Complete(outputs); err != nil { tx.Discard() return nil, err } @@ -104,26 +103,18 @@ func (e *Execution) processExecution(executionHash hash.Hash, outputData []byte, return exec, nil } -func (e *Execution) validateExecutionOutput(instanceHash hash.Hash, taskKey string, jsonout []byte) (map[string]interface{}, error) { - var output map[string]interface{} - if err := json.Unmarshal(jsonout, &output); err != nil { - return nil, fmt.Errorf("invalid output: %s", err) - } - +func (e *Execution) validateExecutionOutput(instanceHash hash.Hash, taskKey string, outputs map[string]interface{}) error { i, err := e.instance.Get(instanceHash) if err != nil { - return nil, err + return err } s, err := e.service.Get(i.ServiceHash) if err != nil { - return nil, err + return err } - if err := s.RequireTaskOutputs(taskKey, output); err != nil { - return nil, err - } - return output, nil + return s.RequireTaskOutputs(taskKey, outputs) } // Execute executes a task tasKey with inputData and tags for service serviceID. diff --git a/server/grpc/api/event.go b/server/grpc/api/event.go index 0af0c200a..1f45cef46 100644 --- a/server/grpc/api/event.go +++ b/server/grpc/api/event.go @@ -2,14 +2,15 @@ package api import ( "context" - "encoding/json" "errors" "fmt" + structpb "github.com/golang/protobuf/ptypes/struct" "github.com/mesg-foundation/engine/event" "github.com/mesg-foundation/engine/hash" "github.com/mesg-foundation/engine/protobuf/acknowledgement" "github.com/mesg-foundation/engine/protobuf/api" + "github.com/mesg-foundation/engine/protobuf/convert" "github.com/mesg-foundation/engine/protobuf/types" "github.com/mesg-foundation/engine/sdk" eventsdk "github.com/mesg-foundation/engine/sdk/event" @@ -36,10 +37,11 @@ func (s *EventServer) Create(ctx context.Context, req *api.CreateEventRequest) ( return nil, errors.New("create event: key missing") } - var data map[string]interface{} - if err := json.Unmarshal([]byte(req.Data), &data); err != nil { - return nil, fmt.Errorf("create event: data %s", err) + data := make(map[string]interface{}) + if err := convert.Marshal(req.Data, &data); err != nil { + return nil, err } + event, err := s.sdk.Event.Create(instanceHash, req.Key, data) if err != nil { return nil, fmt.Errorf("create event: data %s", err) @@ -74,13 +76,13 @@ func (s *EventServer) Stream(req *api.StreamEventRequest, resp api.Event_StreamS return err } - for exec := range stream.C { - pexec, err := toProtoEvent(exec) + for event := range stream.C { + e, err := toProtoEvent(event) if err != nil { return err } - if err := resp.Send(pexec); err != nil { + if err := resp.Send(e); err != nil { return err } } @@ -89,8 +91,8 @@ func (s *EventServer) Stream(req *api.StreamEventRequest, resp api.Event_StreamS } func toProtoEvent(e *event.Event) (*types.Event, error) { - data, err := json.Marshal(e.Data) - if err != nil { + data := &structpb.Struct{} + if err := convert.Unmarshal(e.Data, data); err != nil { return nil, err } @@ -98,6 +100,6 @@ func toProtoEvent(e *event.Event) (*types.Event, error) { Hash: e.Hash.String(), InstanceHash: e.InstanceHash.String(), Key: e.Key, - Data: string(data), + Data: data, }, nil } diff --git a/server/grpc/api/execution.go b/server/grpc/api/execution.go index 4616ca420..ffd5a3027 100644 --- a/server/grpc/api/execution.go +++ b/server/grpc/api/execution.go @@ -2,14 +2,14 @@ package api import ( "context" - "encoding/json" "errors" - "fmt" + structpb "github.com/golang/protobuf/ptypes/struct" "github.com/mesg-foundation/engine/execution" "github.com/mesg-foundation/engine/hash" "github.com/mesg-foundation/engine/protobuf/acknowledgement" "github.com/mesg-foundation/engine/protobuf/api" + "github.com/mesg-foundation/engine/protobuf/convert" "github.com/mesg-foundation/engine/protobuf/types" "github.com/mesg-foundation/engine/sdk" executionsdk "github.com/mesg-foundation/engine/sdk/execution" @@ -35,11 +35,10 @@ func (s *ExecutionServer) Create(ctx context.Context, req *api.CreateExecutionRe return nil, err } - var inputs map[string]interface{} - if err := json.Unmarshal([]byte(req.Inputs), &inputs); err != nil { - return nil, fmt.Errorf("cannot parse execution's inputs (JSON format): %s", err) + inputs := make(map[string]interface{}) + if err := convert.Marshal(req.Inputs, &inputs); err != nil { + return nil, err } - eventHash, err := hash.Random() if err != nil { return nil, err @@ -100,12 +99,12 @@ func (s *ExecutionServer) Stream(req *api.StreamExecutionRequest, resp api.Execu } for exec := range stream.C { - pexec, err := toProtoExecution(exec) + e, err := toProtoExecution(exec) if err != nil { return err } - if err := resp.Send(pexec); err != nil { + if err := resp.Send(e); err != nil { return err } } @@ -121,7 +120,12 @@ func (s *ExecutionServer) Update(ctx context.Context, req *api.UpdateExecutionRe } switch res := req.Result.(type) { case *api.UpdateExecutionRequest_Outputs: - err = s.sdk.Execution.Update(hash, []byte(res.Outputs), nil) + outputs := make(map[string]interface{}) + if err := convert.Marshal(res.Outputs, &outputs); err != nil { + return nil, err + } + + err = s.sdk.Execution.Update(hash, outputs, nil) case *api.UpdateExecutionRequest_Error: err = s.sdk.Execution.Update(hash, nil, errors.New(res.Error)) default: @@ -136,13 +140,13 @@ func (s *ExecutionServer) Update(ctx context.Context, req *api.UpdateExecutionRe } func toProtoExecution(exec *execution.Execution) (*types.Execution, error) { - inputs, err := json.Marshal(exec.Inputs) - if err != nil { + inputs := &structpb.Struct{} + if err := convert.Unmarshal(exec.Inputs, inputs); err != nil { return nil, err } - outputs, err := json.Marshal(exec.Outputs) - if err != nil { + outputs := &structpb.Struct{} + if err := convert.Unmarshal(exec.Outputs, outputs); err != nil { return nil, err } @@ -153,8 +157,8 @@ func toProtoExecution(exec *execution.Execution) (*types.Execution, error) { Status: types.Status(exec.Status), InstanceHash: exec.InstanceHash.String(), TaskKey: exec.TaskKey, - Inputs: string(inputs), - Outputs: string(outputs), + Inputs: inputs, + Outputs: outputs, Tags: exec.Tags, Error: exec.Error, }, nil diff --git a/systemservices/ethwallet/client/encoding.go b/systemservices/ethwallet/client/encoding.go index 54a43cdb7..b09efe1f0 100644 --- a/systemservices/ethwallet/client/encoding.go +++ b/systemservices/ethwallet/client/encoding.go @@ -1,13 +1,30 @@ package client -import "encoding/json" +import ( + "encoding/json" +) // Marshal returns the MESG format encoding of v. -func Marshal(v interface{}) ([]byte, error) { - return json.Marshal(v) +func Marshal(input interface{}) (map[string]interface{}, error) { + b, err := json.Marshal(input) + if err != nil { + return nil, err + } + + var output map[string]interface{} + if err := json.Unmarshal(b, &output); err != nil { + return nil, err + } + + return output, nil } // Unmarshal parses the MESG-encoded data input and stores the result in the value pointed to by v. -func Unmarshal(input []byte, v interface{}) error { - return json.Unmarshal(input, v) +func Unmarshal(input map[string]interface{}, output interface{}) error { + b, err := json.Marshal(input) + if err != nil { + return err + } + + return json.Unmarshal(b, output) } diff --git a/systemservices/ethwallet/client/task_runner.go b/systemservices/ethwallet/client/task_runner.go index 392094910..036ed703b 100644 --- a/systemservices/ethwallet/client/task_runner.go +++ b/systemservices/ethwallet/client/task_runner.go @@ -2,13 +2,16 @@ package client import ( "context" + "fmt" + structpb "github.com/golang/protobuf/ptypes/struct" pb "github.com/mesg-foundation/engine/protobuf/api" + "github.com/mesg-foundation/engine/protobuf/convert" "github.com/mesg-foundation/engine/protobuf/types" ) // TaskFn is a task function handler prototype. -type TaskFn func(inputs []byte) ([]byte, error) +type TaskFn func(inputs map[string]interface{}) (map[string]interface{}, error) // TaskRunner handles running task in a loop. type TaskRunner struct { @@ -40,17 +43,27 @@ func (r *TaskRunner) Run() error { } if _, ok := r.defs[exec.TaskKey]; !ok { + return fmt.Errorf("servic has no %s task", exec.TaskKey) + } + + inputs := make(map[string]interface{}) + if err := convert.Marshal(exec.Inputs, &inputs); err != nil { return err } - output, err := r.defs[exec.TaskKey]([]byte(exec.Inputs)) + output, err := r.defs[exec.TaskKey](inputs) req := &pb.UpdateExecutionRequest{ Hash: exec.Hash, - Result: &pb.UpdateExecutionRequest_Outputs{ - Outputs: string(output), - }, } - if err != nil { + if err == nil { + outputs := &structpb.Struct{} + if err := convert.Unmarshal(output, outputs); err != nil { + return err + } + req.Result = &pb.UpdateExecutionRequest_Outputs{ + Outputs: outputs, + } + } else { req.Result = &pb.UpdateExecutionRequest_Error{ Error: err.Error(), } diff --git a/systemservices/ethwallet/compiled.json b/systemservices/ethwallet/compiled.json index a07ea1b4e..7e65ae1e8 100644 --- a/systemservices/ethwallet/compiled.json +++ b/systemservices/ethwallet/compiled.json @@ -1 +1 @@ -{"sid":"ethwallet","name":"Ethereum Wallet","description":"Manage Ethereum accounts and sign transactions.","tasks":[{"key":"list","name":"List accounts","description":"Return the addresses of existing account.","inputs":[],"outputs":[{"key":"addresses","name":"Addresses","description":"List of addresses.","type":"String","repeated":true,"object":[]}]},{"key":"create","name":"Create a new account","description":"Create a new account with a passphrase. Make sure to backup the passphrase.","inputs":[{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]}]},{"key":"delete","name":"Delete an account","description":"Delete an account from the wallet. Need the address and its associated passphrase.","inputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]}]},{"key":"export","name":"Export an account","description":"Export an existing account in order to backup it and import it in an other wallet. Respect the Web3 Secret Storage specification. See https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition for more information.","inputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"id","name":"ID","description":"The id of the account.","type":"String","object":[]},{"key":"version","name":"Version","description":"The version used to export the account.","type":"Number","object":[]},{"key":"crypto","name":"Crypto","description":"The encrypted account.","type":"Object","object":[]}]},{"key":"import","name":"Import an account","description":"Import an account. The account have to respect the Web3 Secret Storage specification. See https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition for more information.","inputs":[{"key":"account","name":"Account","description":"The JSON encoded account.","type":"Object","object":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"id","name":"ID","description":"The id of the account.","type":"String","object":[]},{"key":"version","name":"Version","description":"The version used to export the account.","type":"Number","object":[]},{"key":"crypto","name":"Crypto","description":"The encrypted account.","type":"Object","object":[]}]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]}]},{"key":"sign","name":"Sign transaction","description":"Sign a transaction with the specified account.","inputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]},{"key":"transaction","name":"Transaction","description":"The transaction to sign.","type":"Object","object":[{"key":"chainID","name":"Chain ID","description":"The ID of the chain the transaction is for. See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md#list-of-chain-ids.","type":"Number","object":[]},{"key":"nonce","name":"Nonce","description":"Nonce to use.","type":"Number","object":[]},{"key":"to","name":"To","description":"The to address.","type":"String","object":[]},{"key":"value","name":"Value","description":"The value in Wei.","type":"String","object":[]},{"key":"gas","name":"Gas","description":"The maximum gas to use to execute this transaction","type":"Number","object":[]},{"key":"gasPrice","name":"Gas price","description":"The gas price in Wei.","type":"String","object":[]},{"key":"data","name":"Data","description":"The data of the transaction.","type":"String","object":[]}]}],"outputs":[{"key":"signedTransaction","name":"Signed transaction","description":"The signed transaction.","type":"String","object":[]}]},{"key":"importFromPrivateKey","name":"Import an account from a private key","description":"Import an account from a private key.","inputs":[{"key":"privateKey","name":"Private key","description":"The private key to import.","type":"String","object":[]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]}]}],"events":[],"dependencies":[],"configuration":{"env":["MESG_KEYSTORE=/keystore"],"volumes":["/keystore"]},"source":"QmQvFGZiTN2yEUMgBq6bjcrLGL95jegjNdTd9zeYf6gzke"} +{"sid":"ethwallet","name":"Ethereum Wallet","description":"Manage Ethereum accounts and sign transactions.","tasks":[{"key":"list","name":"List accounts","description":"Return the addresses of existing account.","inputs":[],"outputs":[{"key":"addresses","name":"Addresses","description":"List of addresses.","type":"String","repeated":true,"object":[]}]},{"key":"create","name":"Create a new account","description":"Create a new account with a passphrase. Make sure to backup the passphrase.","inputs":[{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]}]},{"key":"delete","name":"Delete an account","description":"Delete an account from the wallet. Need the address and its associated passphrase.","inputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]}]},{"key":"export","name":"Export an account","description":"Export an existing account in order to backup it and import it in an other wallet. Respect the Web3 Secret Storage specification. See https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition for more information.","inputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"id","name":"ID","description":"The id of the account.","type":"String","object":[]},{"key":"version","name":"Version","description":"The version used to export the account.","type":"Number","object":[]},{"key":"crypto","name":"Crypto","description":"The encrypted account.","type":"Object","object":[]}]},{"key":"import","name":"Import an account","description":"Import an account. The account have to respect the Web3 Secret Storage specification. See https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition for more information.","inputs":[{"key":"account","name":"Account","description":"The JSON encoded account.","type":"Object","object":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"id","name":"ID","description":"The id of the account.","type":"String","object":[]},{"key":"version","name":"Version","description":"The version used to export the account.","type":"Number","object":[]},{"key":"crypto","name":"Crypto","description":"The encrypted account.","type":"Object","object":[]}]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]}]},{"key":"sign","name":"Sign transaction","description":"Sign a transaction with the specified account.","inputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]},{"key":"transaction","name":"Transaction","description":"The transaction to sign.","type":"Object","object":[{"key":"chainID","name":"Chain ID","description":"The ID of the chain the transaction is for. See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md#list-of-chain-ids.","type":"Number","object":[]},{"key":"nonce","name":"Nonce","description":"Nonce to use.","type":"Number","object":[]},{"key":"to","name":"To","description":"The to address.","type":"String","object":[]},{"key":"value","name":"Value","description":"The value in Wei.","type":"String","object":[]},{"key":"gas","name":"Gas","description":"The maximum gas to use to execute this transaction","type":"Number","object":[]},{"key":"gasPrice","name":"Gas price","description":"The gas price in Wei.","type":"String","object":[]},{"key":"data","name":"Data","description":"The data of the transaction.","type":"String","object":[]}]}],"outputs":[{"key":"signedTransaction","name":"Signed transaction","description":"The signed transaction.","type":"String","object":[]}]},{"key":"importFromPrivateKey","name":"Import an account from a private key","description":"Import an account from a private key.","inputs":[{"key":"privateKey","name":"Private key","description":"The private key to import.","type":"String","object":[]},{"key":"passphrase","name":"Passphrase","description":"Passphrase to use with the account.","type":"String","object":[]}],"outputs":[{"key":"address","name":"Address","description":"The public address of the account.","type":"String","object":[]}]}],"events":[],"dependencies":[],"configuration":{"env":["MESG_KEYSTORE=/keystore"],"volumes":["/keystore"]},"source":"QmWJMCurpAQiAgSDW6dMpUH8Xktbvo4DyVd5jSrAQazDFG"} diff --git a/systemservices/ethwallet/ethwallet/create.go b/systemservices/ethwallet/ethwallet/create.go index d55bbf1b1..b6040d2e4 100644 --- a/systemservices/ethwallet/ethwallet/create.go +++ b/systemservices/ethwallet/ethwallet/create.go @@ -13,7 +13,7 @@ type createOutputSuccess struct { Address common.Address `json:"address"` } -func (s *Ethwallet) create(input []byte) ([]byte, error) { +func (s *Ethwallet) create(input map[string]interface{}) (map[string]interface{}, error) { var inputs createInputs if err := client.Unmarshal(input, &inputs); err != nil { return nil, err diff --git a/systemservices/ethwallet/ethwallet/delete.go b/systemservices/ethwallet/ethwallet/delete.go index d8d862495..41198cdae 100644 --- a/systemservices/ethwallet/ethwallet/delete.go +++ b/systemservices/ethwallet/ethwallet/delete.go @@ -15,7 +15,7 @@ type deleteOutputSuccess struct { Address common.Address `json:"address"` } -func (s *Ethwallet) delete(input []byte) ([]byte, error) { +func (s *Ethwallet) delete(input map[string]interface{}) (map[string]interface{}, error) { var inputs deleteInputs if err := client.Unmarshal(input, &inputs); err != nil { return nil, err diff --git a/systemservices/ethwallet/ethwallet/export.go b/systemservices/ethwallet/ethwallet/export.go index ddf526968..f3405a0ba 100644 --- a/systemservices/ethwallet/ethwallet/export.go +++ b/systemservices/ethwallet/ethwallet/export.go @@ -13,7 +13,7 @@ type exportInputs struct { Passphrase string `json:"passphrase"` } -func (s *Ethwallet) export(input []byte) ([]byte, error) { +func (s *Ethwallet) export(input map[string]interface{}) (map[string]interface{}, error) { var inputs exportInputs if err := client.Unmarshal(input, &inputs); err != nil { return nil, err diff --git a/systemservices/ethwallet/ethwallet/import.go b/systemservices/ethwallet/ethwallet/import.go index 9d2336c57..5c458413d 100644 --- a/systemservices/ethwallet/ethwallet/import.go +++ b/systemservices/ethwallet/ethwallet/import.go @@ -16,7 +16,7 @@ type importOutputSuccess struct { Address common.Address `json:"address"` } -func (s *Ethwallet) importA(input []byte) ([]byte, error) { +func (s *Ethwallet) importA(input map[string]interface{}) (map[string]interface{}, error) { var inputs importInputs if err := client.Unmarshal(input, &inputs); err != nil { return nil, err diff --git a/systemservices/ethwallet/ethwallet/importFromPrivateKey.go b/systemservices/ethwallet/ethwallet/importFromPrivateKey.go index 039ff545e..0d65b06d9 100644 --- a/systemservices/ethwallet/ethwallet/importFromPrivateKey.go +++ b/systemservices/ethwallet/ethwallet/importFromPrivateKey.go @@ -17,7 +17,7 @@ type importFromPrivateKeyOutputSuccess struct { Address common.Address `json:"address"` } -func (s *Ethwallet) importFromPrivateKey(input []byte) ([]byte, error) { +func (s *Ethwallet) importFromPrivateKey(input map[string]interface{}) (map[string]interface{}, error) { var inputs importFromPrivateKeyInputs if err := client.Unmarshal(input, &inputs); err != nil { return nil, err diff --git a/systemservices/ethwallet/ethwallet/list.go b/systemservices/ethwallet/ethwallet/list.go index 4ee3bd3c6..7e83092c7 100644 --- a/systemservices/ethwallet/ethwallet/list.go +++ b/systemservices/ethwallet/ethwallet/list.go @@ -9,7 +9,7 @@ type listOutputSuccess struct { Addresses []common.Address `json:"addresses"` } -func (s *Ethwallet) list(input []byte) ([]byte, error) { +func (s *Ethwallet) list(input map[string]interface{}) (map[string]interface{}, error) { addresses := make([]common.Address, 0) for _, account := range s.keystore.Accounts() { addresses = append(addresses, account.Address) diff --git a/systemservices/ethwallet/ethwallet/sign.go b/systemservices/ethwallet/ethwallet/sign.go index 4db7857d7..e8a86f17e 100644 --- a/systemservices/ethwallet/ethwallet/sign.go +++ b/systemservices/ethwallet/ethwallet/sign.go @@ -32,7 +32,7 @@ type signOutputSuccess struct { SignedTransaction string `json:"signedTransaction"` } -func (s *Ethwallet) sign(input []byte) ([]byte, error) { +func (s *Ethwallet) sign(input map[string]interface{}) (map[string]interface{}, error) { var inputs signInputs if err := client.Unmarshal(input, &inputs); err != nil { return nil, err diff --git a/systemservices/ethwallet/go.mod b/systemservices/ethwallet/go.mod index 23c7fd292..4c3cde734 100644 --- a/systemservices/ethwallet/go.mod +++ b/systemservices/ethwallet/go.mod @@ -5,10 +5,14 @@ go 1.12 require ( github.com/allegro/bigcache v1.2.1 // indirect github.com/aristanetworks/goarista v0.0.0-20190628180533-8e7d5b18fe7a // indirect + github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8 // indirect + github.com/cespare/cp v1.1.1 // indirect github.com/deckarep/golang-set v1.7.1 // indirect github.com/ethereum/go-ethereum v1.8.27 github.com/go-stack/stack v1.8.0 // indirect - github.com/mesg-foundation/engine v0.5.1-0.20190702155243-a2826b3949a7 + github.com/golang/protobuf v1.3.1 + github.com/mesg-foundation/engine v0.5.1-0.20190725113935-3e817175f412 + github.com/mitchellh/mapstructure v1.1.2 github.com/pborman/uuid v1.2.0 // indirect github.com/rjeczalik/notify v0.9.2 // indirect github.com/stretchr/testify v1.3.0 diff --git a/systemservices/ethwallet/go.sum b/systemservices/ethwallet/go.sum index 30a3e2cb6..e25e7b4a1 100644 --- a/systemservices/ethwallet/go.sum +++ b/systemservices/ethwallet/go.sum @@ -1,53 +1,59 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.20.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/go-winio v0.4.9/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.12 h1:xAfWHN1IrQ0NJ9TBC0KBZoqLjzDTr1ML+4MywiUOryc= github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Netflix/go-expect v0.0.0-20180928190340-9d1f4485533b/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/aristanetworks/goarista v0.0.0-20190628180533-8e7d5b18fe7a h1:AtHySZzzzJyE9NDlY3MNxkR12HsSxE1QmntYzuc0uEw= github.com/aristanetworks/goarista v0.0.0-20190628180533-8e7d5b18fe7a/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= -github.com/briandowns/spinner v0.0.0-20180822135157-9f016caa1359/go.mod h1:hw/JEQBIE+c/BLI4aKM8UU8v+ZqrD3h7HC27kKt8JQU= +github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8 h1:mOg8/RgDSHTQ1R0IR+LMDuW4TDShPv+JzYHuR4GLoNA= +github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= +github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cnf/structhash v0.0.0-20180104161610-62a607eb0224 h1:rnCKRrdSBqc061l0CDuYB+7X3w6w8IK/VCSChJXv62g= github.com/cnf/structhash v0.0.0-20180104161610-62a607eb0224/go.mod h1:pCxVEbcm3AMg7ejXyorUXi6HQCzOIBf7zEDVPtw0/U4= -github.com/containerd/continuity v0.0.0-20180712174259-0377f7d76720/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc h1:TP+534wVlf61smEIq1nwLLAjQVEK2EADoW3CX9AuT+8= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/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= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/docker/cli v0.0.0-20190129171106-b258f458cc8d/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v0.0.0-20180720172123-0dae0957e5fe/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20180803200506-eeea12db7a65 h1:WeqSIzsb30/sarqEph9RS+6xw8rmRpCACwV8+cJ1Rkc= github.com/docker/docker v0.0.0-20180803200506-eeea12db7a65/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.0.0-20180212134524-7beb39f0b969/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/emirpasic/gods v0.0.0-20180618112450-bba54c718c4e/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/ethereum/go-ethereum v1.8.27 h1:d+gkiLaBDk5fn3Pe/xNVaMrB/ozI+AUB2IlVBp29IrY= github.com/ethereum/go-ethereum v1.8.27/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= -github.com/fatih/color v0.0.0-20170926111411-5df930a27be2/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-bindata/go-bindata v0.0.0-20181025070752-41975c0ccc30/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-playground/locales v0.12.1 h1:2FITxuFt/xuCNP1Acdhv62OzaCiviiE4kotfhkmOqEc= @@ -56,64 +62,60 @@ github.com/go-playground/universal-translator v0.16.0 h1:X++omBR/4cE2MNg91AoC3rm github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/goware/prefixer v0.0.0-20160118172347-395022866408/go.mod h1:PE1ycukgRPJ7bJ9a1fdfQ9j8i/cEcRAoLZzbxYpNB/s= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20180522105215-e9c5d9645c43/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= -github.com/hokaccha/go-prettyjson v0.0.0-20180920040306-f579f869bbfe/go.mod h1:pFlLw2CfqZiIBOx6BuCeRLCrfxBJipTY0nIOF/VbGcI= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/kelseyhightower/envconfig v1.3.0 h1:IvRS4f2VcIQy6j4ORGIf9145T/AsUB+oY8LyvN8BXNM= github.com/kelseyhightower/envconfig v1.3.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kevinburke/ssh_config v0.0.0-20180711164746-82cf3f926438/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/lyft/protoc-gen-validate v0.1.0/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/mattn/go-colorable v0.0.0-20180310133214-efa589957cd0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mesg-foundation/core v0.10.1/go.mod h1:a4k0tzvuWQqBLSY+ZIotQ/vOvaIiIOLJ8Epy3tyeV28= -github.com/mesg-foundation/engine v0.5.1-0.20190702155243-a2826b3949a7 h1:A6jV3DT1SIBjENtXKFIxhxIMAFyTDD1TlEk0zKfWaIk= -github.com/mesg-foundation/engine v0.5.1-0.20190702155243-a2826b3949a7/go.mod h1:uS6KCuIBNSCHmsaQuuYXZkJTJJV66e4EVduRFBeiLFg= -github.com/mesg-foundation/engine v0.10.1 h1:67/IaXbY4H/Wm551l8epfGZMMRKoM4AKrwo7qnkzcUM= -github.com/mesg-foundation/prefixer v0.0.0-20180907095533-d7dbe41616bd/go.mod h1:jwBCFVsOhfmt8FwMtfOVWeWWzBIBH7xKKm7DTUluf6Y= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/mesg-foundation/engine v0.5.1-0.20190725113935-3e817175f412 h1:pltHBuy2yeuf83rg2QsbB7YXk1dCnxTXll1mbmTk47w= +github.com/mesg-foundation/engine v0.5.1-0.20190725113935-3e817175f412/go.mod h1:KiMM6s34FwClc1niXN9NO/QG7VKPh4bS/PxBO0b0H48= github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747 h1:eQox4Rh4ewJF+mqYPxCkmBAirRnPaHEB26UkNuPyjlk= github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mr-tron/base58 v1.1.1 h1:OJIdWOWYe2l5PQNgimGtuwHY8nDskvJ5vvs//YnzRLs= github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mwitkow/go-proto-validators v0.0.0-20190212092829-1f388280e944/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -123,29 +125,21 @@ github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJ github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-buffruneio v0.0.0-20180119162133-e2f66f8164ca/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= -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= -github.com/pseudomuto/protoc-gen-doc v1.1.0/go.mod h1:fwtQAY9erXp3mC92O8OTECnDlJT2r0Ff4KSEKbGEmy0= github.com/pseudomuto/protoc-gen-doc v1.3.0/go.mod h1:fwtQAY9erXp3mC92O8OTECnDlJT2r0Ff4KSEKbGEmy0= -github.com/pseudomuto/protokit v0.1.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sergi/go-diff v0.0.0-20180205163309-da645544ed44/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/spf13/cobra v0.0.0-20171207074935-ccaecb155a21/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v0.0.0-20180601132542-3ebe029320b2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/src-d/gcfg v1.3.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= @@ -153,9 +147,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3 h1:sAlSBRDl4psFR3ysKXRSE8ss6Mt90+ma1zRTroTNBJA= github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5/go.mod h1:ppEjwdhyy7Y31EnHRDm1JkChoC7LXIJ7Ex0VYLWtZtQ= -github.com/xanzy/ssh-agent v0.2.0/go.mod h1:0NyE30eGUDliuLEHJgYte/zncp2zdTStcOnWhgSqHD8= github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= -golang.org/x/crypto v0.0.0-20180621125126-a49355c7e3f8/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= @@ -173,7 +166,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 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= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -186,39 +178,41 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w 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/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181112210238-4b1f3b6b1646/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190111214448-fc1d57b08d7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180709204101-e92b11657268/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601 h1:9VBRTdmgQxbs6HE0sUnMrSWNePppAJU07NYvX5dIB04= google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/grpc v0.0.0-20180710012024-c491b25057c8/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -gopkg.in/AlecAivazis/survey.v1 v1.6.1/go.mod h1:2Ehl7OqkBl3Xb8VmC4oFW2bItAhnUfzIjrOzwRxCrOU= +gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.26.0 h1:2NPPsBpD0ZoxshmLWewQru8rWmbT5JqSzz9D1ZrAjYQ= gopkg.in/go-playground/validator.v9 v9.26.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= -gopkg.in/src-d/go-billy.v4 v4.2.0/go.mod h1:ZHSF0JP+7oD97194otDUCD7Ofbk63+xFcfWP5bT6h+Q= gopkg.in/src-d/go-billy.v4 v4.3.0/go.mod h1:tm33zBoOwxjYHZIE+OV8bxTWFMJLrconzFMd38aARFk= -gopkg.in/src-d/go-git-fixtures.v3 v3.3.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= gopkg.in/src-d/go-git.v4 v4.5.0/go.mod h1:CzbUWqMn4pvmvndg3gnh5iZFmSsbhyhUWdI0IQ60AQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=