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

feat: SQLite integration #5

Merged
merged 16 commits into from
Apr 3, 2024
Merged

feat: SQLite integration #5

merged 16 commits into from
Apr 3, 2024

Conversation

kayra1
Copy link
Contributor

@kayra1 kayra1 commented Mar 28, 2024

Description

This change brings CRUD and DB connection and disconnection functions for SQLite as well as simple validators for CSR and Certificates that will go into this DB.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that validate the behaviour of the software
  • I validated that new and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@kayra1 kayra1 requested a review from a team as a code owner March 28, 2024 08:24
@kayra1
Copy link
Contributor Author

kayra1 commented Mar 28, 2024

I'm not sure about this linter. All of these missing errchecks are intended, especially the one in tests. Go also doesn't allow _ := func to explicitly ignore err returns.

We resolved to put ignore comments in the tests.

Copy link
Contributor

@ghislainbourgeois ghislainbourgeois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start! I have some concerns around the pointers vs value semantics in the design.

internal/certdb/certdb.go Outdated Show resolved Hide resolved
internal/certdb/certdb.go Outdated Show resolved Hide resolved
internal/certdb/certdb.go Outdated Show resolved Hide resolved
internal/certdb/certdb.go Outdated Show resolved Hide resolved
internal/certdb/certdb_test.go Outdated Show resolved Hide resolved
internal/certdb/validation.go Outdated Show resolved Hide resolved
internal/certdb/certdb.go Outdated Show resolved Hide resolved
internal/certdb/certdb.go Outdated Show resolved Hide resolved
internal/certdb/certdb.go Show resolved Hide resolved
internal/certdb/certdb.go Outdated Show resolved Hide resolved
internal/certdb/certdb.go Outdated Show resolved Hide resolved
internal/certdb/certdb_test.go Outdated Show resolved Hide resolved
internal/certdb/validation.go Outdated Show resolved Hide resolved
internal/certdb/validation_test.go Outdated Show resolved Hide resolved
internal/certdb/validation_test.go Show resolved Hide resolved
internal/certdb/validation_test.go Outdated Show resolved Hide resolved
@kayra1 kayra1 requested a review from saltiyazan April 1, 2024 13:34
internal/certdb/validation.go Show resolved Hide resolved
internal/certdb/validation.go Outdated Show resolved Hide resolved
internal/certdb/certdb.go Show resolved Hide resolved
internal/certdb/validation.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ghislainbourgeois ghislainbourgeois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, and I agree with the other comments on validation.go.

internal/certdb/certdb.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ghislainbourgeois ghislainbourgeois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kayra1 kayra1 merged commit 435f407 into main Apr 3, 2024
9 checks passed
@kayra1 kayra1 deleted the TLSENG-36-sqlite-integration branch April 3, 2024 17:18
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.

4 participants