diff --git a/Dockerfile b/Dockerfile index cd7283f1..376b8da1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.14.1-buster +FROM golang:1.14.2-buster MAINTAINER Textile # This is (in large part) copied (with love) from diff --git a/api/pb/api.pb.go b/api/pb/api.pb.go index c370041c..6cc89668 100644 --- a/api/pb/api.pb.go +++ b/api/pb/api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: api.proto -package api_pb +package threads_pb import ( context "context" @@ -1787,7 +1787,7 @@ func (m *ListenRequest) GetFilters() []*ListenRequest_Filter { type ListenRequest_Filter struct { CollectionName string `protobuf:"bytes,1,opt,name=collectionName,proto3" json:"collectionName,omitempty"` InstanceID string `protobuf:"bytes,2,opt,name=instanceID,proto3" json:"instanceID,omitempty"` - Action ListenRequest_Filter_Action `protobuf:"varint,3,opt,name=action,proto3,enum=api.pb.ListenRequest_Filter_Action" json:"action,omitempty"` + Action ListenRequest_Filter_Action `protobuf:"varint,3,opt,name=action,proto3,enum=threads.pb.ListenRequest_Filter_Action" json:"action,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1842,7 +1842,7 @@ func (m *ListenRequest_Filter) GetAction() ListenRequest_Filter_Action { type ListenReply struct { CollectionName string `protobuf:"bytes,1,opt,name=collectionName,proto3" json:"collectionName,omitempty"` InstanceID string `protobuf:"bytes,2,opt,name=instanceID,proto3" json:"instanceID,omitempty"` - Action ListenReply_Action `protobuf:"varint,3,opt,name=action,proto3,enum=api.pb.ListenReply_Action" json:"action,omitempty"` + Action ListenReply_Action `protobuf:"varint,3,opt,name=action,proto3,enum=threads.pb.ListenReply_Action" json:"action,omitempty"` Instance []byte `protobuf:"bytes,4,opt,name=instance,proto3" json:"instance,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1903,128 +1903,128 @@ func (m *ListenReply) GetInstance() []byte { } func init() { - proto.RegisterEnum("api.pb.ListenRequest_Filter_Action", ListenRequest_Filter_Action_name, ListenRequest_Filter_Action_value) - proto.RegisterEnum("api.pb.ListenReply_Action", ListenReply_Action_name, ListenReply_Action_value) - proto.RegisterType((*GetTokenRequest)(nil), "api.pb.GetTokenRequest") - proto.RegisterType((*GetTokenReply)(nil), "api.pb.GetTokenReply") - proto.RegisterType((*NewDBRequest)(nil), "api.pb.NewDBRequest") - proto.RegisterType((*NewDBFromAddrRequest)(nil), "api.pb.NewDBFromAddrRequest") - proto.RegisterType((*CollectionConfig)(nil), "api.pb.CollectionConfig") - proto.RegisterType((*CollectionConfig_IndexConfig)(nil), "api.pb.CollectionConfig.IndexConfig") - proto.RegisterType((*NewDBReply)(nil), "api.pb.NewDBReply") - proto.RegisterType((*GetDBInfoRequest)(nil), "api.pb.GetDBInfoRequest") - proto.RegisterType((*GetDBInfoReply)(nil), "api.pb.GetDBInfoReply") - proto.RegisterType((*NewCollectionRequest)(nil), "api.pb.NewCollectionRequest") - proto.RegisterType((*NewCollectionReply)(nil), "api.pb.NewCollectionReply") - proto.RegisterType((*CreateRequest)(nil), "api.pb.CreateRequest") - proto.RegisterType((*CreateReply)(nil), "api.pb.CreateReply") - proto.RegisterType((*SaveRequest)(nil), "api.pb.SaveRequest") - proto.RegisterType((*SaveReply)(nil), "api.pb.SaveReply") - proto.RegisterType((*DeleteRequest)(nil), "api.pb.DeleteRequest") - proto.RegisterType((*DeleteReply)(nil), "api.pb.DeleteReply") - proto.RegisterType((*HasRequest)(nil), "api.pb.HasRequest") - proto.RegisterType((*HasReply)(nil), "api.pb.HasReply") - proto.RegisterType((*FindRequest)(nil), "api.pb.FindRequest") - proto.RegisterType((*FindReply)(nil), "api.pb.FindReply") - proto.RegisterType((*FindByIDRequest)(nil), "api.pb.FindByIDRequest") - proto.RegisterType((*FindByIDReply)(nil), "api.pb.FindByIDReply") - proto.RegisterType((*StartTransactionRequest)(nil), "api.pb.StartTransactionRequest") - proto.RegisterType((*ReadTransactionRequest)(nil), "api.pb.ReadTransactionRequest") - proto.RegisterType((*ReadTransactionReply)(nil), "api.pb.ReadTransactionReply") - proto.RegisterType((*WriteTransactionRequest)(nil), "api.pb.WriteTransactionRequest") - proto.RegisterType((*WriteTransactionReply)(nil), "api.pb.WriteTransactionReply") - proto.RegisterType((*ListenRequest)(nil), "api.pb.ListenRequest") - proto.RegisterType((*ListenRequest_Filter)(nil), "api.pb.ListenRequest.Filter") - proto.RegisterType((*ListenReply)(nil), "api.pb.ListenReply") + proto.RegisterEnum("threads.pb.ListenRequest_Filter_Action", ListenRequest_Filter_Action_name, ListenRequest_Filter_Action_value) + proto.RegisterEnum("threads.pb.ListenReply_Action", ListenReply_Action_name, ListenReply_Action_value) + proto.RegisterType((*GetTokenRequest)(nil), "threads.pb.GetTokenRequest") + proto.RegisterType((*GetTokenReply)(nil), "threads.pb.GetTokenReply") + proto.RegisterType((*NewDBRequest)(nil), "threads.pb.NewDBRequest") + proto.RegisterType((*NewDBFromAddrRequest)(nil), "threads.pb.NewDBFromAddrRequest") + proto.RegisterType((*CollectionConfig)(nil), "threads.pb.CollectionConfig") + proto.RegisterType((*CollectionConfig_IndexConfig)(nil), "threads.pb.CollectionConfig.IndexConfig") + proto.RegisterType((*NewDBReply)(nil), "threads.pb.NewDBReply") + proto.RegisterType((*GetDBInfoRequest)(nil), "threads.pb.GetDBInfoRequest") + proto.RegisterType((*GetDBInfoReply)(nil), "threads.pb.GetDBInfoReply") + proto.RegisterType((*NewCollectionRequest)(nil), "threads.pb.NewCollectionRequest") + proto.RegisterType((*NewCollectionReply)(nil), "threads.pb.NewCollectionReply") + proto.RegisterType((*CreateRequest)(nil), "threads.pb.CreateRequest") + proto.RegisterType((*CreateReply)(nil), "threads.pb.CreateReply") + proto.RegisterType((*SaveRequest)(nil), "threads.pb.SaveRequest") + proto.RegisterType((*SaveReply)(nil), "threads.pb.SaveReply") + proto.RegisterType((*DeleteRequest)(nil), "threads.pb.DeleteRequest") + proto.RegisterType((*DeleteReply)(nil), "threads.pb.DeleteReply") + proto.RegisterType((*HasRequest)(nil), "threads.pb.HasRequest") + proto.RegisterType((*HasReply)(nil), "threads.pb.HasReply") + proto.RegisterType((*FindRequest)(nil), "threads.pb.FindRequest") + proto.RegisterType((*FindReply)(nil), "threads.pb.FindReply") + proto.RegisterType((*FindByIDRequest)(nil), "threads.pb.FindByIDRequest") + proto.RegisterType((*FindByIDReply)(nil), "threads.pb.FindByIDReply") + proto.RegisterType((*StartTransactionRequest)(nil), "threads.pb.StartTransactionRequest") + proto.RegisterType((*ReadTransactionRequest)(nil), "threads.pb.ReadTransactionRequest") + proto.RegisterType((*ReadTransactionReply)(nil), "threads.pb.ReadTransactionReply") + proto.RegisterType((*WriteTransactionRequest)(nil), "threads.pb.WriteTransactionRequest") + proto.RegisterType((*WriteTransactionReply)(nil), "threads.pb.WriteTransactionReply") + proto.RegisterType((*ListenRequest)(nil), "threads.pb.ListenRequest") + proto.RegisterType((*ListenRequest_Filter)(nil), "threads.pb.ListenRequest.Filter") + proto.RegisterType((*ListenReply)(nil), "threads.pb.ListenReply") } func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 1316 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xdd, 0x72, 0xdb, 0x44, - 0x14, 0x96, 0x6c, 0x47, 0xb6, 0x8e, 0xe2, 0xc6, 0x6c, 0xd3, 0xc4, 0xa3, 0x09, 0x25, 0x23, 0x98, - 0x4e, 0x80, 0xc1, 0x04, 0x97, 0x69, 0xcb, 0x4f, 0x01, 0xff, 0xb5, 0x36, 0x64, 0x4a, 0x66, 0xe3, - 0x02, 0x33, 0x30, 0x30, 0x8a, 0xb5, 0x8e, 0x45, 0x15, 0xd9, 0x91, 0x14, 0x88, 0xd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, 0xc7, 0xf6, 0x09, 0x16, 0x85, 0x8d, 0x0b, 0xd8, 0x64, 0xfa, 0x1f, 0x79, - 0xd3, 0xd3, 0x96, 0x65, 0x79, 0x02, 0x8e, 0x69, 0x59, 0x5e, 0x84, 0x43, 0xbf, 0x51, 0x8d, 0x87, - 0x87, 0x05, 0x81, 0x07, 0x27, 0x83, 0x5c, 0x7c, 0x19, 0xe4, 0x3f, 0x65, 0xa8, 0x65, 0x25, 0x28, - 0xac, 0x6b, 0x9e, 0xf2, 0x60, 0xa9, 0x98, 0x7d, 0xa3, 0x2d, 0x50, 0xfc, 0xd1, 0x84, 0x9c, 0x9a, - 0x21, 0x72, 0x38, 0x42, 0x9f, 0x41, 0xd9, 0x76, 0x2d, 0x72, 0x41, 0x22, 0xe0, 0xb7, 0x96, 0x01, - 0x37, 0x06, 0x54, 0x2e, 0x34, 0x22, 0xda, 0xa4, 0x7f, 0x04, 0x9a, 0x30, 0x4f, 0xa1, 0x67, 0x66, - 0x30, 0x89, 0xa0, 0xe9, 0x37, 0x85, 0x3e, 0x77, 0xed, 0xb3, 0x73, 0x9e, 0xf9, 0x0a, 0x0e, 0x47, - 0xc6, 0x3a, 0x40, 0x98, 0x95, 0x99, 0x33, 0x37, 0xee, 0x40, 0xed, 0x31, 0x09, 0xba, 0xed, 0x81, - 0x3b, 0x9e, 0xae, 0xc8, 0x93, 0xf1, 0x00, 0x6e, 0x08, 0x72, 0x94, 0x20, 0x9b, 0xb0, 0x46, 0x23, - 0xeb, 0xd7, 0xe5, 0xdd, 0xe2, 0xde, 0x3a, 0xe6, 0x83, 0xc5, 0x38, 0x1b, 0x3f, 0xb0, 0x2c, 0x25, - 0x6e, 0xad, 0x62, 0xc3, 0x3e, 0x28, 0x23, 0xe6, 0x11, 0x53, 0xb0, 0x2a, 0x1d, 0xa1, 0x9c, 0xb1, - 0x09, 0x28, 0xa3, 0x9d, 0x7a, 0x65, 0x43, 0xb5, 0xe3, 0x11, 0x33, 0x20, 0xab, 0x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0x54, 0xef, 0x2c, 0x09, 0x84, - 0xc2, 0x4e, 0x49, 0x20, 0x48, 0x52, 0x5c, 0x4b, 0x2c, 0xc0, 0x21, 0x05, 0x62, 0xdc, 0x54, 0x75, - 0xa6, 0xb8, 0x29, 0xe9, 0x0c, 0x65, 0xd7, 0x2e, 0x47, 0x59, 0xe5, 0x55, 0x28, 0x5b, 0x7e, 0x05, - 0xca, 0xfe, 0x5d, 0x80, 0x5b, 0x8b, 0xd9, 0xa6, 0x84, 0xba, 0x0f, 0xda, 0x28, 0x69, 0x9f, 0x61, - 0x7e, 0x6f, 0x66, 0x93, 0xc1, 0xc9, 0x24, 0x4a, 0x52, 0xf2, 0xfa, 0x51, 0x77, 0xcb, 0x92, 0x37, - 0x6e, 0x7b, 0xec, 0xba, 0x1b, 0x0d, 0x28, 0x96, 0x95, 0x34, 0xa5, 0x6c, 0xee, 0x84, 0x7e, 0x45, - 0xb1, 0x04, 0xc9, 0xd4, 0xc1, 0x2a, 0xbd, 0xec, 0xc1, 0x5a, 0xbb, 0xdc, 0xc1, 0x52, 0x2e, 0x79, - 0xb0, 0x7e, 0x2b, 0x40, 0xf5, 0xc0, 0xf6, 0x03, 0xb2, 0xb2, 0x42, 0xdf, 0x83, 0xf2, 0xd8, 0x76, - 0x02, 0xe2, 0x45, 0x57, 0xee, 0x9d, 0x08, 0x28, 0xb5, 0xb7, 0xf1, 0x88, 0x09, 0xe1, 0x48, 0x58, - 0x7f, 0x2e, 0x83, 0xc2, 0xe7, 0x72, 0x8a, 0xbc, 0xfc, 0x02, 0x8d, 0xa8, 0x90, 0x6d, 0x44, 0xe8, - 0x13, 0x50, 0x38, 0x21, 0x58, 0x42, 0x6e, 0x34, 0xdf, 0x5c, 0x65, 0x49, 0xa3, 0xc5, 0xb9, 0x13, - 0x6e, 0x31, 0xee, 0x82, 0xc2, 0x67, 0x50, 0x19, 0x8a, 0xad, 0x83, 0x83, 0x9a, 0x84, 0x00, 0x94, - 0x0e, 0xee, 0xb5, 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7e, 0x37, 0xd0, 0xf3, 0x6a, 0x94, 0x21, - 0xa1, 0xf7, 0xa0, 0xd8, 0x37, 0x7d, 0x94, 0xd3, 0x06, 0xf4, 0x85, 0xfa, 0xc4, 0x0d, 0xa3, 0x55, - 0x04, 0xe5, 0xd5, 0x7f, 0x7d, 0xb1, 0x3e, 0x19, 0x12, 0xfa, 0x14, 0x2a, 0x51, 0xdd, 0x41, 0xcb, - 0x0a, 0xbf, 0x9e, 0x5f, 0xa2, 0x0c, 0x09, 0x3d, 0x85, 0x8d, 0xcc, 0x35, 0x05, 0xdd, 0x8e, 0x64, - 0xf3, 0x6f, 0x7d, 0xfa, 0xce, 0xd2, 0xf5, 0x84, 0x9f, 0xdf, 0x41, 0x2d, 0xdb, 0x4a, 0x50, 0x7c, - 0x21, 0x58, 0x72, 0xa5, 0xd0, 0x5f, 0x5f, 0x2e, 0x90, 0x68, 0x7e, 0x00, 0x0a, 0x3f, 0xa9, 0x49, - 0x1e, 0x52, 0x35, 0x28, 0xc9, 0x83, 0x70, 0xa0, 0x0d, 0x69, 0x5f, 0x6e, 0x37, 0x60, 0xdb, 0x9e, - 0x36, 0x02, 0x72, 0x11, 0xd8, 0x0e, 0x69, 0x04, 0x13, 0x8f, 0x98, 0x96, 0xff, 0xd3, 0x89, 0x37, - 0x1b, 0xb5, 0xcb, 0x43, 0x3e, 0x3a, 0x94, 0x7f, 0x2f, 0x94, 0x87, 0x7d, 0xdc, 0x6b, 0x75, 0x8f, - 0x8e, 0x15, 0xf6, 0x3b, 0xe7, 0xee, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xed, 0x14, 0x9f, 0x80, - 0xdb, 0x11, 0x00, 0x00, + // 1320 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4f, 0x8f, 0xdb, 0x44, + 0x14, 0xb7, 0x93, 0xac, 0x13, 0x3f, 0x6f, 0xba,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0x0f, 0x3b, 0x34, 0xc3, 0x7e, 0x43, 0x6e, 0x16, 0x5b, 0xbb, 0x06, 0x5f, + 0x6c, 0xe6, 0x1b, 0x3f, 0x65, 0xd5, 0x8a, 0xc3, 0xda, 0xc6, 0x8c, 0x8f, 0x40, 0x99, 0xb2, 0x88, + 0x98, 0x81, 0x97, 0x95, 0x25, 0x94, 0xc5, 0xfb, 0x80, 0x52, 0x08, 0x34, 0x32, 0x1b, 0xaa, 0x47, + 0x1e, 0x31, 0x03, 0xb2, 0x0d, 0xf0, 0x16, 0x5c, 0x8b, 0x6b, 0xfb, 0x88, 0x56, 0x90, 0x51, 0xdb, + 0x48, 0xed, 0xa2, 0x9b, 0xa0, 0xda, 0xae, 0x1f, 0x98, 0xee, 0x34, 0xac, 0xda, 0xae, 0x11, 0x6f, + 0xe0, 0x0f, 0x41, 0x8b, 0xa0, 0x68, 0x66, 0x9a, 0xa0, 0x45, 0xdf, 0x46, 0x7d, 0x9e, 0x1f, 0xd5, + 0x10, 0xb7, 0xf0, 0x19, 0x68, 0x63, 0xf3, 0x87, 0x37, 0xe0, 0x99, 0x06, 0x2a, 0x07, 0xa2, 0x19, + 0x39, 0x87, 0x6a, 0x9f, 0x38, 0xe4, 0x6a, 0x32, 0x92, 0x0a, 0xb2, 0xb8, 0x19, 0x64, 0x15, 0xb4, + 0x08, 0x8e, 0xa2, 0x7f, 0x0f, 0x30, 0x34, 0xfd, 0x37, 0x03, 0x8d, 0xa1, 0xc2, 0xb0, 0x68, 0x35, + 0x0e, 0x40, 0x21, 0x2f, 0x6c, 0x3f, 0xf0, 0x19, 0x56, 0xc5, 0x08, 0x57, 0xb4, 0x06, 0x0f, 0x6d, + 0xd7, 0xba, 0xa2, 0x1a, 0x3c, 0xbf, 0x20, 0xde, 0xea, 0x8b, 0xf1, 0x57, 0x8f, 0x1a, 0x45, 0x66, + 0x20, 0xde, 0xc0, 0xef, 0x81, 0xca, 0x81, 0xa8, 0x37, 0x89, 0x72, 0xc9, 0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 0x94, 0x41, 0xe1, 0x7b, 0x19, 0x83, + 0x43, 0x7e, 0x85, 0xe1, 0x56, 0x48, 0x0f, 0x37, 0xf4, 0x19, 0x28, 0x9c, 0x2c, 0xac, 0x48, 0xd7, + 0x3a, 0xef, 0xbe, 0xcc, 0x9b, 0x76, 0x97, 0x73, 0x2b, 0x54, 0xc3, 0x77, 0x40, 0xe1, 0x3b, 0xa8, + 0x0c, 0xc5, 0xee, 0xc9, 0x49, 0x4d, 0x42, 0x00, 0xca, 0x91, 0x31, 0xe8, 0x4e, 0x06, 0x35, 0x19, + 0x55, 0xa0, 0x34, 0xee, 0x7e, 0x33, 0xa8, 0x15, 0xe8, 0x6e, 0x7f, 0x70, 0x32, 0x98, 0x0c, 0x6a, + 0x45, 0xfc, 0xb7, 0x0c, 0x5a, 0x64, 0x9c, 0xd6, 0xe1, 0xaa, 0xa2, 0xf9, 0x38, 0x15, 0xcd, 0x61, + 0x56, 0x34, 0x4b, 0x67, 0x95, 0x0a, 0x22, 0x31, 0xd1, 0x4b, 0xa9, 0x89, 0xfe, 0xfe, 0x3a, 0xc0, + 0x38, 0x2e, 0x69, 0x1d, 0x97, 0x2c, 0xc4, 0x55, 0xe8, 0xfc, 0x43, 0x73, 0xf0, 0x78, 0x84, 0x86, + 0x50, 0x89, 0xde, 0x8c, 0x28, 0x71, 0xa6, 0x53, 0x6f, 0x53, 0xfd, 0x46, 0xf6, 0x47, 0x7a, 0x13, + 0x94, 0x5a, 0xf2, 0x6d, 0x19, 0xdd, 0x87, 0x1d, 0xf6, 0x0e, 0x41, 0x0d, 0x51, 0x52, 0x7c, 0x3c, + 0xea, 0x07, 0x19, 0x5f, 0x98, 0x01, 0xf4, 0x25, 0x54, 0x13, 0x4f, 0x40, 0xd4, 0xdc, 0x10, 0x4d, + 0xbd, 0x0e, 0xb7, 0x18, 0x3b, 0x06, 0x75, 0xfd, 0xb6, 0x41, 0x37, 0x53, 0x7e, 0x27, 0x9e, 0x46, + 0xba, 0x9e, 0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, 0x55, 0x77, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, + 0xac, 0xa6, 0x6a, 0xa5, 0xbb, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2064,7 +2064,7 @@ func NewAPIClient(cc *grpc.ClientConn) APIClient { } func (c *aPIClient) GetToken(ctx context.Context, opts ...grpc.CallOption) (API_GetTokenClient, error) { - stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[0], "/api.pb.API/GetToken", opts...) + stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[0], "/threads.pb.API/GetToken", opts...) if err != nil { return nil, err } @@ -2096,7 +2096,7 @@ func (x *aPIGetTokenClient) Recv() (*GetTokenReply, error) { func (c *aPIClient) NewDB(ctx context.Context, in *NewDBRequest, opts ...grpc.CallOption) (*NewDBReply, error) { out := new(NewDBReply) - err := c.cc.Invoke(ctx, "/api.pb.API/NewDB", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/NewDB", in, out, opts...) if err != nil { return nil, err } @@ -2105,7 +2105,7 @@ func (c *aPIClient) NewDB(ctx context.Context, in *NewDBRequest, opts ...grpc.Ca func (c *aPIClient) NewDBFromAddr(ctx context.Context, in *NewDBFromAddrRequest, opts ...grpc.CallOption) (*NewDBReply, error) { out := new(NewDBReply) - err := c.cc.Invoke(ctx, "/api.pb.API/NewDBFromAddr", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/NewDBFromAddr", in, out, opts...) if err != nil { return nil, err } @@ -2114,7 +2114,7 @@ func (c *aPIClient) NewDBFromAddr(ctx context.Context, in *NewDBFromAddrRequest, func (c *aPIClient) GetDBInfo(ctx context.Context, in *GetDBInfoRequest, opts ...grpc.CallOption) (*GetDBInfoReply, error) { out := new(GetDBInfoReply) - err := c.cc.Invoke(ctx, "/api.pb.API/GetDBInfo", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/GetDBInfo", in, out, opts...) if err != nil { return nil, err } @@ -2123,7 +2123,7 @@ func (c *aPIClient) GetDBInfo(ctx context.Context, in *GetDBInfoRequest, opts .. func (c *aPIClient) NewCollection(ctx context.Context, in *NewCollectionRequest, opts ...grpc.CallOption) (*NewCollectionReply, error) { out := new(NewCollectionReply) - err := c.cc.Invoke(ctx, "/api.pb.API/NewCollection", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/NewCollection", in, out, opts...) if err != nil { return nil, err } @@ -2132,7 +2132,7 @@ func (c *aPIClient) NewCollection(ctx context.Context, in *NewCollectionRequest, func (c *aPIClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateReply, error) { out := new(CreateReply) - err := c.cc.Invoke(ctx, "/api.pb.API/Create", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/Create", in, out, opts...) if err != nil { return nil, err } @@ -2141,7 +2141,7 @@ func (c *aPIClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc. func (c *aPIClient) Save(ctx context.Context, in *SaveRequest, opts ...grpc.CallOption) (*SaveReply, error) { out := new(SaveReply) - err := c.cc.Invoke(ctx, "/api.pb.API/Save", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/Save", in, out, opts...) if err != nil { return nil, err } @@ -2150,7 +2150,7 @@ func (c *aPIClient) Save(ctx context.Context, in *SaveRequest, opts ...grpc.Call func (c *aPIClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteReply, error) { out := new(DeleteReply) - err := c.cc.Invoke(ctx, "/api.pb.API/Delete", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/Delete", in, out, opts...) if err != nil { return nil, err } @@ -2159,7 +2159,7 @@ func (c *aPIClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc. func (c *aPIClient) Has(ctx context.Context, in *HasRequest, opts ...grpc.CallOption) (*HasReply, error) { out := new(HasReply) - err := c.cc.Invoke(ctx, "/api.pb.API/Has", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/Has", in, out, opts...) if err != nil { return nil, err } @@ -2168,7 +2168,7 @@ func (c *aPIClient) Has(ctx context.Context, in *HasRequest, opts ...grpc.CallOp func (c *aPIClient) Find(ctx context.Context, in *FindRequest, opts ...grpc.CallOption) (*FindReply, error) { out := new(FindReply) - err := c.cc.Invoke(ctx, "/api.pb.API/Find", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/Find", in, out, opts...) if err != nil { return nil, err } @@ -2177,7 +2177,7 @@ func (c *aPIClient) Find(ctx context.Context, in *FindRequest, opts ...grpc.Call func (c *aPIClient) FindByID(ctx context.Context, in *FindByIDRequest, opts ...grpc.CallOption) (*FindByIDReply, error) { out := new(FindByIDReply) - err := c.cc.Invoke(ctx, "/api.pb.API/FindByID", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.pb.API/FindByID", in, out, opts...) if err != nil { return nil, err } @@ -2185,7 +2185,7 @@ func (c *aPIClient) FindByID(ctx context.Context, in *FindByIDRequest, opts ...g } func (c *aPIClient) ReadTransaction(ctx context.Context, opts ...grpc.CallOption) (API_ReadTransactionClient, error) { - stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[1], "/api.pb.API/ReadTransaction", opts...) + stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[1], "/threads.pb.API/ReadTransaction", opts...) if err != nil { return nil, err } @@ -2216,7 +2216,7 @@ func (x *aPIReadTransactionClient) Recv() (*ReadTransactionReply, error) { } func (c *aPIClient) WriteTransaction(ctx context.Context, opts ...grpc.CallOption) (API_WriteTransactionClient, error) { - stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[2], "/api.pb.API/WriteTransaction", opts...) + stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[2], "/threads.pb.API/WriteTransaction", opts...) if err != nil { return nil, err } @@ -2247,7 +2247,7 @@ func (x *aPIWriteTransactionClient) Recv() (*WriteTransactionReply, error) { } func (c *aPIClient) Listen(ctx context.Context, in *ListenRequest, opts ...grpc.CallOption) (API_ListenClient, error) { - stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[3], "/api.pb.API/Listen", opts...) + stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[3], "/threads.pb.API/Listen", opts...) if err != nil { return nil, err } @@ -2383,7 +2383,7 @@ func _API_NewDB_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/NewDB", + FullMethod: "/threads.pb.API/NewDB", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).NewDB(ctx, req.(*NewDBRequest)) @@ -2401,7 +2401,7 @@ func _API_NewDBFromAddr_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/NewDBFromAddr", + FullMethod: "/threads.pb.API/NewDBFromAddr", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).NewDBFromAddr(ctx, req.(*NewDBFromAddrRequest)) @@ -2419,7 +2419,7 @@ func _API_GetDBInfo_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/GetDBInfo", + FullMethod: "/threads.pb.API/GetDBInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).GetDBInfo(ctx, req.(*GetDBInfoRequest)) @@ -2437,7 +2437,7 @@ func _API_NewCollection_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/NewCollection", + FullMethod: "/threads.pb.API/NewCollection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).NewCollection(ctx, req.(*NewCollectionRequest)) @@ -2455,7 +2455,7 @@ func _API_Create_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/Create", + FullMethod: "/threads.pb.API/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).Create(ctx, req.(*CreateRequest)) @@ -2473,7 +2473,7 @@ func _API_Save_Handler(srv interface{}, ctx context.Context, dec func(interface{ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/Save", + FullMethod: "/threads.pb.API/Save", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).Save(ctx, req.(*SaveRequest)) @@ -2491,7 +2491,7 @@ func _API_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/Delete", + FullMethod: "/threads.pb.API/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).Delete(ctx, req.(*DeleteRequest)) @@ -2509,7 +2509,7 @@ func _API_Has_Handler(srv interface{}, ctx context.Context, dec func(interface{} } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/Has", + FullMethod: "/threads.pb.API/Has", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).Has(ctx, req.(*HasRequest)) @@ -2527,7 +2527,7 @@ func _API_Find_Handler(srv interface{}, ctx context.Context, dec func(interface{ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/Find", + FullMethod: "/threads.pb.API/Find", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).Find(ctx, req.(*FindRequest)) @@ -2545,7 +2545,7 @@ func _API_FindByID_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.pb.API/FindByID", + FullMethod: "/threads.pb.API/FindByID", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).FindByID(ctx, req.(*FindByIDRequest)) @@ -2627,7 +2627,7 @@ func (x *aPIListenServer) Send(m *ListenReply) error { } var _API_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.pb.API", + ServiceName: "threads.pb.API", HandlerType: (*APIServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/api/pb/api.proto b/api/pb/api.proto index a0cd9b7a..1c7c343c 100644 --- a/api/pb/api.proto +++ b/api/pb/api.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package api.pb; +package threads.pb; option java_multiple_files = true; option java_package = "io.textile.threads_grpc"; diff --git a/core/thread/token.go b/core/thread/identity.go similarity index 100% rename from core/thread/token.go rename to core/thread/identity.go diff --git a/net/api/pb/api.pb.go b/net/api/pb/api.pb.go index c4729525..c17fa846 100644 --- a/net/api/pb/api.pb.go +++ b/net/api/pb/api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: api.proto -package net_api_pb +package threads_net_pb import ( context "context" @@ -1171,90 +1171,91 @@ func (m *SubscribeRequest) GetThreadIDs() [][]byte { } func init() { - proto.RegisterType((*GetHostIDRequest)(nil), "net.api.pb.GetHostIDRequest") - proto.RegisterType((*GetHostIDReply)(nil), "net.api.pb.GetHostIDReply") - proto.RegisterType((*GetTokenRequest)(nil), "net.api.pb.GetTokenRequest") - proto.RegisterType((*GetTokenReply)(nil), "net.api.pb.GetTokenReply") - proto.RegisterType((*CreateThreadRequest)(nil), "net.api.pb.CreateThreadRequest") - proto.RegisterType((*Keys)(nil), "net.api.pb.Keys") - proto.RegisterType((*ThreadInfoReply)(nil), "net.api.pb.ThreadInfoReply") - proto.RegisterType((*LogInfo)(nil), "net.api.pb.LogInfo") - proto.RegisterType((*AddThreadRequest)(nil), "net.api.pb.AddThreadRequest") - proto.RegisterType((*GetThreadRequest)(nil), "net.api.pb.GetThreadRequest") - proto.RegisterType((*PullThreadRequest)(nil), "net.api.pb.PullThreadRequest") - proto.RegisterType((*PullThreadReply)(nil), "net.api.pb.PullThreadReply") - proto.RegisterType((*DeleteThreadRequest)(nil), "net.api.pb.DeleteThreadRequest") - proto.RegisterType((*DeleteThreadReply)(nil), "net.api.pb.DeleteThreadReply") - proto.RegisterType((*AddReplicatorRequest)(nil), "net.api.pb.AddReplicatorRequest") - proto.RegisterType((*AddReplicatorReply)(nil), "net.api.pb.AddReplicatorReply") - proto.RegisterType((*CreateRecordRequest)(nil), "net.api.pb.CreateRecordRequest") - proto.RegisterType((*NewRecordReply)(nil), "net.api.pb.NewRecordReply") - proto.RegisterType((*AddRecordRequest)(nil), "net.api.pb.AddRecordRequest") - proto.RegisterType((*Record)(nil), "net.api.pb.Record") - proto.RegisterType((*AddRecordReply)(nil), "net.api.pb.AddRecordReply") - proto.RegisterType((*GetRecordRequest)(nil), "net.api.pb.GetRecordRequest") - proto.RegisterType((*GetRecordReply)(nil), "net.api.pb.GetRecordReply") - proto.RegisterType((*SubscribeRequest)(nil), "net.api.pb.SubscribeRequest") + proto.RegisterType((*GetHostIDRequest)(nil), "threads.net.pb.GetHostIDRequest") + proto.RegisterType((*GetHostIDReply)(nil), "threads.net.pb.GetHostIDReply") + proto.RegisterType((*GetTokenRequest)(nil), "threads.net.pb.GetTokenRequest") + proto.RegisterType((*GetTokenReply)(nil), "threads.net.pb.GetTokenReply") + proto.RegisterType((*CreateThreadRequest)(nil), "threads.net.pb.CreateThreadRequest") + proto.RegisterType((*Keys)(nil), "threads.net.pb.Keys") + proto.RegisterType((*ThreadInfoReply)(nil), "threads.net.pb.ThreadInfoReply") + proto.RegisterType((*LogInfo)(nil), "threads.net.pb.LogInfo") + proto.RegisterType((*AddThreadRequest)(nil), "threads.net.pb.AddThreadRequest") + proto.RegisterType((*GetThreadRequest)(nil), "threads.net.pb.GetThreadRequest") + proto.RegisterType((*PullThreadRequest)(nil), "threads.net.pb.PullThreadRequest") + proto.RegisterType((*PullThreadReply)(nil), "threads.net.pb.PullThreadReply") + proto.RegisterType((*DeleteThreadRequest)(nil), "threads.net.pb.DeleteThreadRequest") + proto.RegisterType((*DeleteThreadReply)(nil), "threads.net.pb.DeleteThreadReply") + proto.RegisterType((*AddReplicatorRequest)(nil), "threads.net.pb.AddReplicatorRequest") + proto.RegisterType((*AddReplicatorReply)(nil), "threads.net.pb.AddReplicatorReply") + proto.RegisterType((*CreateRecordRequest)(nil), "threads.net.pb.CreateRecordRequest") + proto.RegisterType((*NewRecordReply)(nil), "threads.net.pb.NewRecordReply") + proto.RegisterType((*AddRecordRequest)(nil), "threads.net.pb.AddRecordRequest") + proto.RegisterType((*Record)(nil), "threads.net.pb.Record") + proto.RegisterType((*AddRecordReply)(nil), "threads.net.pb.AddRecordReply") + proto.RegisterType((*GetRecordRequest)(nil), "threads.net.pb.GetRecordRequest") + proto.RegisterType((*GetRecordReply)(nil), "threads.net.pb.GetRecordReply") + proto.RegisterType((*SubscribeRequest)(nil), "threads.net.pb.SubscribeRequest") } func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 859 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x49, 0x6f, 0xc2, 0x46, - 0x14, 0xc6, 0xac, 0xf1, 0x0b, 0x21, 0x64, 0x88, 0x22, 0xea, 0x24, 0x14, 0x8d, 0x2a, 0x15, 0x55, - 0x15, 0x4d, 0xe9, 0xa5, 0x87, 0x5c, 0x48, 0x49, 0x83, 0x93, 0x14, 0x21, 0x07, 0xa9, 0xc7, 0xc8, - 0xe0, 0x29, 0x41, 0xb1, 0x6c, 0xd7, 0x1e, 0xd2, 0x72, 0xed, 0xb1, 0x7f, 0xa1, 0xb7, 0xfe, 0xd2, - 0x6a, 0x66, 0xbc, 0x8c, 0x0d, 0x21, 0x8e, 0x7a, 0xf3, 0xdb, 0xbe, 0xb7, 0xbf, 0x31, 0xa8, 0xa6, - 0xb7, 0xea, 0x7b, 0xbe, 0x4b, 0x5d, 0x04, 0x0e, 0xa1, 0x7d, 0x4e, 0xce, 0x31, 0x82, 0xe6, 0x1d, - 0xa1, 0x63, 0x37, 0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xf2, 0x6f, 0x11, 0x66, 0x63, - 0xe3, 0x76, 0x38, 0x7a, 0x9a, 0xdc, 0xce, 0xe6, 0x55, 0xfe, 0x97, 0xf9, 0xc3, 0x7f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x34, 0xbc, 0x71, 0x73, 0x72, 0x0a, 0x00, 0x00, + // 873 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x72, 0xda, 0x48, + 0x10, 0x46, 0xfc, 0x5a, 0x6d, 0x8c, 0xf1, 0x98, 0xf2, 0x52, 0xec, 0x2e, 0x8b, 0x67, 0xf7, 0x40, + 0xd5, 0xa6, 0x14, 0x87, 0x5c, 0x72, 0xc8, 0x21, 0x38, 0x38, 0x86, 0x38, 0x45, 0x88, 0x4c, 0x52, + 0xa9, 0xf2, 0xc1, 0x25, 0xd0, 0x04, 0x53, 0x56, 0x21, 0x45, 0x1a, 0x9c, 0x70, 0xcd, 0x03, 0xe4, + 0x21, 0xf2, 0x9a, 0xb9, 0xa4, 0x66, 0x46, 0x12, 0xfa, 0x33, 0xc8, 0x55, 0xb9, 0xa9, 0x7b, 0xba, + 0xbf, 0xfe, 0x99, 0xee, 0x6f, 0x04, 0xb2, 0x66, 0xcd, 0x15, 0xcb, 0x36, 0xa9, 0x89, 0x2a, 0xf4, + 0xc6, 0x26, 0x9a, 0xee, 0x28, 0x0b, 0x42, 0x15, 0x6b, 0x82, 0x11, 0x54, 0xcf, 0x09, 0xed, 0x9b, + 0x0e, 0x1d, 0xf4, 0x54, 0xf2, 0x79, 0x49, 0x1c, 0x8a, 0xdb, 0x50, 0x09, 0xe8, 0x2c, 0x63, 0x85, + 0x8e, 0xa0, 0x68, 0x11, 0x62, 0x0f, 0x7a, 0x75, 0xa9, 0x25, 0xb5, 0xcb, 0xaa, 0x2b, 0xe1, 0x11, + 0xec, 0x9f, 0x13, 0x3a, 0x36, 0x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9, 0x30, 0x5e, 0x7a, 0x94, 0x29, 0x53, + 0x22, 0xfa, 0x74, 0x98, 0xd8, 0xcc, 0x07, 0x23, 0xaa, 0x00, 0x6b, 0xfe, 0x43, 0xc7, 0x51, 0x87, + 0x18, 0x99, 0xc6, 0x31, 0xa3, 0xf4, 0x99, 0x41, 0x1f, 0xa1, 0x1c, 0x64, 0xc3, 0x78, 0x3f, 0x13, + 0xe8, 0xb5, 0x71, 0xbc, 0xd9, 0x48, 0x20, 0x5f, 0xc1, 0x5e, 0x88, 0x0a, 0xd1, 0x7f, 0x09, 0x5d, + 0x8d, 0x31, 0x6e, 0x03, 0x6f, 0xb1, 0x12, 0xe0, 0xef, 0xbd, 0x31, 0x70, 0xd9, 0xe0, 0x9e, 0x31, + 0x08, 0xad, 0x64, 0x7c, 0x5e, 0xc3, 0xac, 0x89, 0x33, 0x6c, 0x01, 0xfc, 0xd5, 0x4e, 0x9c, 0x82, + 0x2d, 0x80, 0x11, 0x5e, 0xc8, 0xb8, 0x1b, 0x75, 0x1f, 0x60, 0x94, 0x34, 0x12, 0x37, 0x2a, 0x0c, + 0xf8, 0x0e, 0x64, 0x7f, 0xb9, 0xe3, 0x80, 0xd1, 0xbd, 0xdf, 0x5e, 0xf2, 0x89, 0x74, 0xfa, 0x0c, + 0xfe, 0x9c, 0x9b, 0x0a, 0x25, 0x5f, 0xe9, 0xdc, 0x20, 0x9e, 0xfd, 0xf5, 0x82, 0xd0, 0xeb, 0x99, + 0x6d, 0x4d, 0x4f, 0x41, 0x5c, 0xab, 0x33, 0x24, 0x74, 0x24, 0xfd, 0xc8, 0xc2, 0xb8, 0xaf, 0x9e, + 0x75, 0x7b, 0x97, 0xc3, 0xb3, 0xf1, 0xa4, 0xc8, 0xff, 0x70, 0x9f, 0xfe, 0x0a, 0x00, 0x00, 0xff, + 0xff, 0x41, 0xf6, 0x3c, 0x6f, 0xee, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1293,7 +1294,7 @@ func NewAPIClient(cc *grpc.ClientConn) APIClient { func (c *aPIClient) GetHostID(ctx context.Context, in *GetHostIDRequest, opts ...grpc.CallOption) (*GetHostIDReply, error) { out := new(GetHostIDReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/GetHostID", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/GetHostID", in, out, opts...) if err != nil { return nil, err } @@ -1301,7 +1302,7 @@ func (c *aPIClient) GetHostID(ctx context.Context, in *GetHostIDRequest, opts .. } func (c *aPIClient) GetToken(ctx context.Context, opts ...grpc.CallOption) (API_GetTokenClient, error) { - stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[0], "/net.api.pb.API/GetToken", opts...) + stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[0], "/threads.net.pb.API/GetToken", opts...) if err != nil { return nil, err } @@ -1333,7 +1334,7 @@ func (x *aPIGetTokenClient) Recv() (*GetTokenReply, error) { func (c *aPIClient) CreateThread(ctx context.Context, in *CreateThreadRequest, opts ...grpc.CallOption) (*ThreadInfoReply, error) { out := new(ThreadInfoReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/CreateThread", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/CreateThread", in, out, opts...) if err != nil { return nil, err } @@ -1342,7 +1343,7 @@ func (c *aPIClient) CreateThread(ctx context.Context, in *CreateThreadRequest, o func (c *aPIClient) AddThread(ctx context.Context, in *AddThreadRequest, opts ...grpc.CallOption) (*ThreadInfoReply, error) { out := new(ThreadInfoReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/AddThread", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/AddThread", in, out, opts...) if err != nil { return nil, err } @@ -1351,7 +1352,7 @@ func (c *aPIClient) AddThread(ctx context.Context, in *AddThreadRequest, opts .. func (c *aPIClient) GetThread(ctx context.Context, in *GetThreadRequest, opts ...grpc.CallOption) (*ThreadInfoReply, error) { out := new(ThreadInfoReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/GetThread", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/GetThread", in, out, opts...) if err != nil { return nil, err } @@ -1360,7 +1361,7 @@ func (c *aPIClient) GetThread(ctx context.Context, in *GetThreadRequest, opts .. func (c *aPIClient) PullThread(ctx context.Context, in *PullThreadRequest, opts ...grpc.CallOption) (*PullThreadReply, error) { out := new(PullThreadReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/PullThread", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/PullThread", in, out, opts...) if err != nil { return nil, err } @@ -1369,7 +1370,7 @@ func (c *aPIClient) PullThread(ctx context.Context, in *PullThreadRequest, opts func (c *aPIClient) DeleteThread(ctx context.Context, in *DeleteThreadRequest, opts ...grpc.CallOption) (*DeleteThreadReply, error) { out := new(DeleteThreadReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/DeleteThread", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/DeleteThread", in, out, opts...) if err != nil { return nil, err } @@ -1378,7 +1379,7 @@ func (c *aPIClient) DeleteThread(ctx context.Context, in *DeleteThreadRequest, o func (c *aPIClient) AddReplicator(ctx context.Context, in *AddReplicatorRequest, opts ...grpc.CallOption) (*AddReplicatorReply, error) { out := new(AddReplicatorReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/AddReplicator", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/AddReplicator", in, out, opts...) if err != nil { return nil, err } @@ -1387,7 +1388,7 @@ func (c *aPIClient) AddReplicator(ctx context.Context, in *AddReplicatorRequest, func (c *aPIClient) CreateRecord(ctx context.Context, in *CreateRecordRequest, opts ...grpc.CallOption) (*NewRecordReply, error) { out := new(NewRecordReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/CreateRecord", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/CreateRecord", in, out, opts...) if err != nil { return nil, err } @@ -1396,7 +1397,7 @@ func (c *aPIClient) CreateRecord(ctx context.Context, in *CreateRecordRequest, o func (c *aPIClient) AddRecord(ctx context.Context, in *AddRecordRequest, opts ...grpc.CallOption) (*AddRecordReply, error) { out := new(AddRecordReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/AddRecord", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/AddRecord", in, out, opts...) if err != nil { return nil, err } @@ -1405,7 +1406,7 @@ func (c *aPIClient) AddRecord(ctx context.Context, in *AddRecordRequest, opts .. func (c *aPIClient) GetRecord(ctx context.Context, in *GetRecordRequest, opts ...grpc.CallOption) (*GetRecordReply, error) { out := new(GetRecordReply) - err := c.cc.Invoke(ctx, "/net.api.pb.API/GetRecord", in, out, opts...) + err := c.cc.Invoke(ctx, "/threads.net.pb.API/GetRecord", in, out, opts...) if err != nil { return nil, err } @@ -1413,7 +1414,7 @@ func (c *aPIClient) GetRecord(ctx context.Context, in *GetRecordRequest, opts .. } func (c *aPIClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (API_SubscribeClient, error) { - stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[1], "/net.api.pb.API/Subscribe", opts...) + stream, err := c.cc.NewStream(ctx, &_API_serviceDesc.Streams[1], "/threads.net.pb.API/Subscribe", opts...) if err != nil { return nil, err } @@ -1515,7 +1516,7 @@ func _API_GetHostID_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/GetHostID", + FullMethod: "/threads.net.pb.API/GetHostID", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).GetHostID(ctx, req.(*GetHostIDRequest)) @@ -1559,7 +1560,7 @@ func _API_CreateThread_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/CreateThread", + FullMethod: "/threads.net.pb.API/CreateThread", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).CreateThread(ctx, req.(*CreateThreadRequest)) @@ -1577,7 +1578,7 @@ func _API_AddThread_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/AddThread", + FullMethod: "/threads.net.pb.API/AddThread", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).AddThread(ctx, req.(*AddThreadRequest)) @@ -1595,7 +1596,7 @@ func _API_GetThread_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/GetThread", + FullMethod: "/threads.net.pb.API/GetThread", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).GetThread(ctx, req.(*GetThreadRequest)) @@ -1613,7 +1614,7 @@ func _API_PullThread_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/PullThread", + FullMethod: "/threads.net.pb.API/PullThread", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).PullThread(ctx, req.(*PullThreadRequest)) @@ -1631,7 +1632,7 @@ func _API_DeleteThread_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/DeleteThread", + FullMethod: "/threads.net.pb.API/DeleteThread", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).DeleteThread(ctx, req.(*DeleteThreadRequest)) @@ -1649,7 +1650,7 @@ func _API_AddReplicator_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/AddReplicator", + FullMethod: "/threads.net.pb.API/AddReplicator", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).AddReplicator(ctx, req.(*AddReplicatorRequest)) @@ -1667,7 +1668,7 @@ func _API_CreateRecord_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/CreateRecord", + FullMethod: "/threads.net.pb.API/CreateRecord", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).CreateRecord(ctx, req.(*CreateRecordRequest)) @@ -1685,7 +1686,7 @@ func _API_AddRecord_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/AddRecord", + FullMethod: "/threads.net.pb.API/AddRecord", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).AddRecord(ctx, req.(*AddRecordRequest)) @@ -1703,7 +1704,7 @@ func _API_GetRecord_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/net.api.pb.API/GetRecord", + FullMethod: "/threads.net.pb.API/GetRecord", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(APIServer).GetRecord(ctx, req.(*GetRecordRequest)) @@ -1733,7 +1734,7 @@ func (x *aPISubscribeServer) Send(m *NewRecordReply) error { } var _API_serviceDesc = grpc.ServiceDesc{ - ServiceName: "net.api.pb.API", + ServiceName: "threads.net.pb.API", HandlerType: (*APIServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/net/api/pb/api.proto b/net/api/pb/api.proto index 6edac0a1..4a2064de 100644 --- a/net/api/pb/api.proto +++ b/net/api/pb/api.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package net.api.pb; +package threads.net.pb; option java_multiple_files = true; option java_package = "io.textile.threads_net_grpc"; diff --git a/net/net.go b/net/net.go index 1b1d17b9..8420f20c 100644 --- a/net/net.go +++ b/net/net.go @@ -585,7 +585,8 @@ func (n *net) CreateRecord(ctx context.Context, id thread.ID, body format.Node, for _, opt := range opts { opt(args) } - if _, err = thread.ValidateToken(n.getPrivKey(), args.Token); err != nil { + pk, err := thread.ValidateToken(n.getPrivKey(), args.Token) + if err != nil { return } @@ -593,7 +594,7 @@ func (n *net) CreateRecord(ctx context.Context, id thread.ID, body format.Node, if err != nil { return } - rec, err := n.newRecord(ctx, id, lg, body) + rec, err := n.newRecord(ctx, id, lg, body, pk) if err != nil { return } @@ -829,7 +830,7 @@ func (n *net) putRecord(ctx context.Context, id thread.ID, lid peer.ID, rec core } // newRecord creates a new record with the given body as a new event body. -func (n *net) newRecord(ctx context.Context, id thread.ID, lg thread.LogInfo, body format.Node) (core.Record, error) { +func (n *net) newRecord(ctx context.Context, id thread.ID, lg thread.LogInfo, body format.Node, pk thread.PubKey) (core.Record, error) { if lg.PrivKey == nil { return nil, fmt.Errorf("a private-key is required to create records") } @@ -852,11 +853,14 @@ func (n *net) newRecord(ctx context.Context, id thread.ID, lg thread.LogInfo, bo return nil, err } + if pk == nil { + pk = thread.NewLibp2pPubKey(n.getPrivKey().GetPublic()) + } return cbor.CreateRecord(ctx, n, cbor.CreateRecordConfig{ Block: event, Prev: lg.Head, Key: lg.PrivKey, - PubKey: thread.NewLibp2pPubKey(n.getPrivKey().GetPublic()), + PubKey: pk, ServiceKey: sk, }) }