Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(storage): BoltDB configuration handling #780

Merged
merged 1 commit into from
Jun 16, 2024
Merged

refactor(storage): BoltDB configuration handling #780

merged 1 commit into from
Jun 16, 2024

Conversation

appleboy
Copy link
Owner

  • Update go.etcd.io/bbolt dependency from v1.3.9 to v1.3.10
  • Refactor InitAppStatus to pass individual BoltDB and BadgerDB configuration parameters instead of the entire config object
  • Add os package import in boltdb.go
  • Modify New function in boltdb.go to accept dbPath and bucket parameters instead of the entire config object
  • Replace config field in Storage struct with dbPath and bucket fields
  • Update Init method in boltdb.go to handle empty dbPath by setting a default path
  • Update setBoltDB and getBoltDB methods to use bucket field instead of accessing it from the config
  • Adjust boltdb_test.go to create boltDB instance with dbPath and bucket parameters directly

- Update `go.etcd.io/bbolt` dependency from v1.3.9 to v1.3.10
- Refactor `InitAppStatus` to pass individual BoltDB and BadgerDB configuration parameters instead of the entire config object
- Add `os` package import in `boltdb.go`
- Modify `New` function in `boltdb.go` to accept `dbPath` and `bucket` parameters instead of the entire config object
- Replace `config` field in `Storage` struct with `dbPath` and `bucket` fields
- Update `Init` method in `boltdb.go` to handle empty `dbPath` by setting a default path
- Update `setBoltDB` and `getBoltDB` methods to use `bucket` field instead of accessing it from the config
- Adjust `boltdb_test.go` to create `boltDB` instance with `dbPath` and `bucket` parameters directly

Signed-off-by: appleboy <appleboy.tw@gmail.com>
@appleboy appleboy merged commit b2f4a28 into master Jun 16, 2024
10 checks passed
@appleboy appleboy deleted the boltdb branch June 16, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant