Skip to content

Commit

Permalink
chore: start upgrade to firefly-common 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMayWork committed Jan 10, 2024
1 parent 85da316 commit 235a713
Show file tree
Hide file tree
Showing 36 changed files with 458 additions and 1,451 deletions.
31 changes: 31 additions & 0 deletions docs/reference/config.md

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ go 1.19
require (
blockwatch.cc/tzgo v1.17.1
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/Masterminds/squirrel v1.5.3
github.com/Masterminds/squirrel v1.5.4
github.com/aidarkhanov/nanoid v1.0.8
github.com/blang/semver/v4 v4.0.0
github.com/docker/go-units v0.5.0
github.com/getkin/kin-openapi v0.116.0
github.com/ghodss/yaml v1.0.0
github.com/go-resty/resty/v2 v2.7.0
github.com/golang-migrate/migrate/v4 v4.15.2
github.com/golang-migrate/migrate/v4 v4.16.1
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.5.0
github.com/hyperledger/firefly-common v1.3.1-0.20230912221149-2b028031e84a
github.com/hyperledger/firefly-common v1.4.1
github.com/hyperledger/firefly-signer v1.1.8
github.com/jarcoal/httpmock v1.2.0
github.com/lib/pq v1.10.7
github.com/lib/pq v1.10.9
github.com/mattn/go-sqlite3 v1.14.16
github.com/prometheus/client_golang v1.14.0
github.com/qeesung/image2ascii v1.0.1
github.com/santhosh-tekuri/jsonschema/v5 v5.1.1
github.com/sirupsen/logrus v1.9.0
github.com/sirupsen/logrus v1.9.2
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.14.0
github.com/stretchr/testify v1.8.1
gitlab.com/hfuss/mux-prometheus v0.0.5
golang.org/x/net v0.10.0
golang.org/x/text v0.10.0
golang.org/x/net v0.17.0
golang.org/x/text v0.14.0
gopkg.in/yaml.v2 v2.4.0
)

Expand Down Expand Up @@ -82,11 +82,12 @@ require (
github.com/wayneashleyberry/terminal-dimensions v1.1.0 // indirect
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
go.uber.org/atomic v1.10.0 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.9.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
1,398 changes: 29 additions & 1,369 deletions go.sum

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions go.work
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
go 1.18
go 1.19

toolchain go1.21.3

use (
.
./smart_contracts/fabric/firefly-go
./smart_contracts/fabric/custompin-sample
./smart_contracts/fabric/firefly-go
)
310 changes: 308 additions & 2 deletions go.work.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions internal/database/sqlcommon/batch_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -172,7 +172,7 @@ func (s *SQLCommon) GetBatches(ctx context.Context, namespace string, filter ffa
batches = append(batches, batch)
}

return batches, s.QueryRes(ctx, batchesTable, tx, fop, fi), err
return batches, s.QueryRes(ctx, batchesTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/blob_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -162,7 +162,7 @@ func (s *SQLCommon) GetBlobs(ctx context.Context, namespace string, filter ffapi
blob = append(blob, d)
}

return blob, s.QueryRes(ctx, blobsTable, tx, fop, fi), err
return blob, s.QueryRes(ctx, blobsTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/blockchainevents_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -228,5 +228,5 @@ func (s *SQLCommon) GetBlockchainEvents(ctx context.Context, namespace string, f
events = append(events, event)
}

return events, s.QueryRes(ctx, blockchaineventsTable, tx, fop, fi), err
return events, s.QueryRes(ctx, blockchaineventsTable, tx, fop, nil, fi), err
}
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/contractapis_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -259,7 +259,7 @@ func (s *SQLCommon) GetContractAPIs(ctx context.Context, namespace string, filte
apis = append(apis, api)
}

return apis, s.QueryRes(ctx, contractapisTable, tx, fop, fi), err
return apis, s.QueryRes(ctx, contractapisTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/contractlisteners_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -174,7 +174,7 @@ func (s *SQLCommon) GetContractListeners(ctx context.Context, namespace string,
subs = append(subs, sub)
}

return subs, s.QueryRes(ctx, contractlistenersTable, tx, fop, fi), err
return subs, s.QueryRes(ctx, contractlistenersTable, tx, fop, nil, fi), err
}

func (s *SQLCommon) UpdateContractListener(ctx context.Context, ns string, id *fftypes.UUID, update ffapi.Update) (err error) {
Expand Down
6 changes: 3 additions & 3 deletions internal/database/sqlcommon/data_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -322,7 +322,7 @@ func (s *SQLCommon) GetData(ctx context.Context, namespace string, filter ffapi.
data = append(data, d)
}

return data, s.QueryRes(ctx, dataTable, tx, fop, fi), err
return data, s.QueryRes(ctx, dataTable, tx, fop, nil, fi), err

}

Expand Down Expand Up @@ -354,7 +354,7 @@ func (s *SQLCommon) GetDataRefs(ctx context.Context, namespace string, filter ff
refs = append(refs, &ref)
}

return refs, s.QueryRes(ctx, dataTable, tx, fop, fi), err
return refs, s.QueryRes(ctx, dataTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/datatype_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -196,6 +196,6 @@ func (s *SQLCommon) GetDatatypes(ctx context.Context, namespace string, filter f
datatypes = append(datatypes, datatype)
}

return datatypes, s.QueryRes(ctx, datatypesTable, tx, fop, fi), err
return datatypes, s.QueryRes(ctx, datatypesTable, tx, fop, nil, fi), err

}
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/event_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -222,6 +222,6 @@ func (s *SQLCommon) GetEvents(ctx context.Context, namespace string, filter ffap
events = append(events, event)
}

return events, s.QueryRes(ctx, eventsTable, tx, fop, fi), err
return events, s.QueryRes(ctx, eventsTable, tx, fop, nil, fi), err

}
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/ffi_errors_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -137,6 +137,6 @@ func (s *SQLCommon) GetFFIErrors(ctx context.Context, namespace string, filter f
errors = append(errors, ci)
}

return errors, s.QueryRes(ctx, ffierrorsTable, tx, fop, fi), err
return errors, s.QueryRes(ctx, ffierrorsTable, tx, fop, nil, fi), err

}
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/ffi_events_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -165,7 +165,7 @@ func (s *SQLCommon) GetFFIEvents(ctx context.Context, namespace string, filter f
events = append(events, ci)
}

return events, s.QueryRes(ctx, ffieventsTable, tx, fop, fi), err
return events, s.QueryRes(ctx, ffieventsTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/ffi_methods_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -169,7 +169,7 @@ func (s *SQLCommon) GetFFIMethods(ctx context.Context, namespace string, filter
methods = append(methods, ci)
}

return methods, s.QueryRes(ctx, ffimethodsTable, tx, fop, fi), err
return methods, s.QueryRes(ctx, ffimethodsTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/ffi_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -248,7 +248,7 @@ func (s *SQLCommon) GetFFIs(ctx context.Context, namespace string, filter ffapi.
ffis = append(ffis, cd)
}

return ffis, s.QueryRes(ctx, ffiTable, tx, fop, fi), err
return ffis, s.QueryRes(ctx, ffiTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/group_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -306,5 +306,5 @@ func (s *SQLCommon) GetGroups(ctx context.Context, namespace string, filter ffap
}
}

return groups, s.QueryRes(ctx, groupsTable, tx, fop, fi), err
return groups, s.QueryRes(ctx, groupsTable, tx, fop, nil, fi), err
}
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/identity_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -229,6 +229,6 @@ func (s *SQLCommon) GetIdentities(ctx context.Context, namespace string, filter
identities = append(identities, d)
}

return identities, s.QueryRes(ctx, identitiesTable, tx, fop, fi), err
return identities, s.QueryRes(ctx, identitiesTable, tx, fop, nil, fi), err

}
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/message_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -531,7 +531,7 @@ func (s *SQLCommon) getMessagesQuery(ctx context.Context, namespace string, quer
return nil, nil, err
}
}
return msgs, s.QueryRes(ctx, messagesTable, tx, fop, fi), err
return msgs, s.QueryRes(ctx, messagesTable, tx, fop, nil, fi), err
}

func (s *SQLCommon) GetMessageIDs(ctx context.Context, namespace string, filter ffapi.Filter) (ids []*core.IDAndSequence, err error) {
Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/nextpin_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -138,7 +138,7 @@ func (s *SQLCommon) GetNextPins(ctx context.Context, namespace string, filter ff
nextpins = append(nextpins, d)
}

return nextpins, s.QueryRes(ctx, pinsTable, tx, fop, fi), err
return nextpins, s.QueryRes(ctx, pinsTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/nonce_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -141,7 +141,7 @@ func (s *SQLCommon) GetNonces(ctx context.Context, filter ffapi.Filter) (message
nonce = append(nonce, d)
}

return nonce, s.QueryRes(ctx, noncesTable, tx, fop, fi), err
return nonce, s.QueryRes(ctx, noncesTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/offset_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -171,7 +171,7 @@ func (s *SQLCommon) GetOffsets(ctx context.Context, filter ffapi.Filter) (messag
offset = append(offset, d)
}

return offset, s.QueryRes(ctx, offsetsTable, tx, fop, fi), err
return offset, s.QueryRes(ctx, offsetsTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/operation_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -210,7 +210,7 @@ func (s *SQLCommon) GetOperations(ctx context.Context, namespace string, filter
ops = append(ops, op)
}

return ops, s.QueryRes(ctx, operationsTable, tx, fop, fi), err
return ops, s.QueryRes(ctx, operationsTable, tx, fop, nil, fi), err
}

func (s *SQLCommon) UpdateOperation(ctx context.Context, ns string, id *fftypes.UUID, filter ffapi.Filter, update ffapi.Update) (updated bool, err error) {
Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/pin_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -197,7 +197,7 @@ func (s *SQLCommon) GetPins(ctx context.Context, namespace string, filter ffapi.
pin = append(pin, d)
}

return pin, s.QueryRes(ctx, pinsTable, tx, fop, fi), err
return pin, s.QueryRes(ctx, pinsTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/subscription_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -210,7 +210,7 @@ func (s *SQLCommon) GetSubscriptions(ctx context.Context, namespace string, filt
subscription = append(subscription, d)
}

return subscription, s.QueryRes(ctx, subscriptionsTable, tx, fop, fi), err
return subscription, s.QueryRes(ctx, subscriptionsTable, tx, fop, nil, fi), err

}

Expand Down
4 changes: 2 additions & 2 deletions internal/database/sqlcommon/tokenapproval_sql.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -232,7 +232,7 @@ func (s *SQLCommon) GetTokenApprovals(ctx context.Context, namespace string, fil
approvals = append(approvals, d)
}

return approvals, s.QueryRes(ctx, tokenapprovalTable, tx, fop, fi), err
return approvals, s.QueryRes(ctx, tokenapprovalTable, tx, fop, nil, fi), err
}

func (s *SQLCommon) UpdateTokenApprovals(ctx context.Context, filter ffapi.Filter, update ffapi.Update) (err error) {
Expand Down
Loading

0 comments on commit 235a713

Please sign in to comment.