From 19d14bd88ee456affb63334c5e3430f59d44306b Mon Sep 17 00:00:00 2001 From: Robin Lai Date: Thu, 5 Dec 2019 12:58:33 -0800 Subject: [PATCH] fix typo --- ledger/ledger.go | 4 ++-- protos/node/node.pb.go | 22 ++++++++++----------- protos/status/status.pb.go | 40 +++++++++++++++++++------------------- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ledger/ledger.go b/ledger/ledger.go index 548907c..4decf8c 100644 --- a/ledger/ledger.go +++ b/ledger/ledger.go @@ -42,7 +42,7 @@ func NewChannelCommit(fromKey ic.PubKey, toKey ic.PubKey, amount int64) (*ledger }, err } -func NewChannelState(id *ledgerpb.ChannelID, sequence int64, fromAccount *ledgerpb.Account, toAccount *ledgerpb.Account) *ledgerPb.ChannelState { +func NewChannelState(id *ledgerpb.ChannelID, sequence int64, fromAccount *ledgerpb.Account, toAccount *ledgerpb.Account) *ledgerpb.ChannelState { return &ledgerpb.ChannelState{ Id: id, Sequence: sequence, @@ -71,7 +71,7 @@ func ImportAccount(ctx context.Context, pubKey ic.PubKey, ledgerClient ledgerpb. return res.GetAccount(), nil } -func ImportSignedAccount(ctx context.Context, privKey ic.PrivKey, pubKey ic.PubKey, ledgerClient ledgerpb.ChannelsClient) (*ledgerPb.SignedCreateAccountResult, error) { +func ImportSignedAccount(ctx context.Context, privKey ic.PrivKey, pubKey ic.PubKey, ledgerClient ledgerpb.ChannelsClient) (*ledgerpb.SignedCreateAccountResult, error) { pubKeyBytes, err := pubKey.Raw() if err != nil { return nil, err diff --git a/protos/node/node.pb.go b/protos/node/node.pb.go index e7479b2..c2ec03c 100644 --- a/protos/node/node.pb.go +++ b/protos/node/node.pb.go @@ -31,7 +31,7 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Node struct { - tableName string `pg:"node_metrics,alias:t,discard_unknown_columns"` + TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty" pg:"table_name" pg:"node_metrics,alias:t,discard_unknown_columns"` NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` BtfsVersion string `protobuf:"bytes,3,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` UpTime uint64 `protobuf:"varint,4,opt,name=up_time,json=upTime,proto3" json:"up_time,omitempty" pg:"up_time"` @@ -93,9 +93,9 @@ func (m *Node) XXX_DiscardUnknown() { var xxx_messageInfo_Node proto.InternalMessageInfo -func (m *Node) GettableName() string { +func (m *Node) GetTableName() string { if m != nil { - return m.tableName + return m.TableName } return "" } @@ -582,10 +582,10 @@ func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintNode(dAtA, i, uint64(len(m.tableName))) + if len(m.TableName) > 0 { + i -= len(m.TableName) + copy(dAtA[i:], m.TableName) + i = encodeVarintNode(dAtA, i, uint64(len(m.TableName))) i-- dAtA[i] = 0xa } @@ -658,7 +658,7 @@ func encodeVarintNode(dAtA []byte, offset int, v uint64) int { } func NewPopulatedNode(r randyNode, easy bool) *Node { this := &Node{} - this.tableName = string(randStringNode(r)) + this.TableName = string(randStringNode(r)) this.NodeId = string(randStringNode(r)) this.BtfsVersion = string(randStringNode(r)) this.UpTime = uint64(uint64(r.Uint32())) @@ -790,7 +790,7 @@ func (m *Node) Size() (n int) { } var l int _ = l - l = len(m.tableName) + l = len(m.TableName) if l > 0 { n += 1 + l + sovNode(uint64(l)) } @@ -937,7 +937,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -965,7 +965,7 @@ func (m *Node) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.tableName = string(dAtA[iNdEx:postIndex]) + m.TableName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { diff --git a/protos/status/status.pb.go b/protos/status/status.pb.go index 94bb30a..11fb6a0 100644 --- a/protos/status/status.pb.go +++ b/protos/status/status.pb.go @@ -102,7 +102,7 @@ func (*SignedMetrics) XXX_MessageName() string { } type NodeHealth struct { - tableName string `pg:"health_monitoring,alias:t,discard_unknown_columns"` + TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty" pg:"table_name" pg:"health_monitoring,alias:t,discard_unknown_columns"` NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` BtfsVersion string `protobuf:"bytes,3,opt,name=btfs_version,json=btfsVersion,proto3" json:"btfs_version,omitempty" pg:"btfs_version"` FailurePoint string `protobuf:"bytes,4,opt,name=failure_point,json=failurePoint,proto3" json:"failure_point,omitempty" pg:"failure_point"` @@ -145,9 +145,9 @@ func (m *NodeHealth) XXX_DiscardUnknown() { var xxx_messageInfo_NodeHealth proto.InternalMessageInfo -func (m *NodeHealth) GettableName() string { +func (m *NodeHealth) GetTableName() string { if m != nil { - return m.tableName + return m.TableName } return "" } @@ -185,7 +185,7 @@ func (*NodeHealth) XXX_MessageName() string { } type NodeError struct { - tableName string `pg:"test_error,alias:t,discard_unknown_columns"` + TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty" pg:"table_name" pg:"test_error,alias:t,discard_unknown_columns"` HVal string `protobuf:"bytes,2,opt,name=h_val,json=hVal,proto3" json:"h_val,omitempty" pg:"h_val"` PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty" pg:"peer_id"` ErrorStatus string `protobuf:"bytes,4,opt,name=error_status,json=errorStatus,proto3" json:"error_status,omitempty" pg:"error_status"` @@ -228,9 +228,9 @@ func (m *NodeError) XXX_DiscardUnknown() { var xxx_messageInfo_NodeError proto.InternalMessageInfo -func (m *NodeError) GettableName() string { +func (m *NodeError) GetTableName() string { if m != nil { - return m.tableName + return m.TableName } return "" } @@ -833,10 +833,10 @@ func (m *NodeHealth) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintStatus(dAtA, i, uint64(len(m.tableName))) + if len(m.TableName) > 0 { + i -= len(m.TableName) + copy(dAtA[i:], m.TableName) + i = encodeVarintStatus(dAtA, i, uint64(len(m.TableName))) i-- dAtA[i] = 0xa } @@ -896,10 +896,10 @@ func (m *NodeError) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.tableName) > 0 { - i -= len(m.tableName) - copy(dAtA[i:], m.tableName) - i = encodeVarintStatus(dAtA, i, uint64(len(m.tableName))) + if len(m.TableName) > 0 { + i -= len(m.TableName) + copy(dAtA[i:], m.TableName) + i = encodeVarintStatus(dAtA, i, uint64(len(m.TableName))) i-- dAtA[i] = 0xa } @@ -1028,7 +1028,7 @@ func (m *NodeHealth) Size() (n int) { } var l int _ = l - l = len(m.tableName) + l = len(m.TableName) if l > 0 { n += 1 + l + sovStatus(uint64(l)) } @@ -1058,7 +1058,7 @@ func (m *NodeError) Size() (n int) { } var l int _ = l - l = len(m.tableName) + l = len(m.TableName) if l > 0 { n += 1 + l + sovStatus(uint64(l)) } @@ -1317,7 +1317,7 @@ func (m *NodeHealth) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1345,7 +1345,7 @@ func (m *NodeHealth) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.tableName = string(dAtA[iNdEx:postIndex]) + m.TableName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -1532,7 +1532,7 @@ func (m *NodeError) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field tableName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TableName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1560,7 +1560,7 @@ func (m *NodeError) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.tableName = string(dAtA[iNdEx:postIndex]) + m.TableName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 {