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

Additional functionality to util package #136

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Conversation

mwieser
Copy link
Member

@mwieser mwieser commented Oct 25, 2021

  • Extend util package with helper functions.
    • Add MIME interface to use mimtype.MIME or an already KnownMIME
    • Add function to detach context to avoid context cancelation. Can be used to pass context information to go routines without a deadline or cancel
    • Add oauth2 helper for PKCE extention
    • add where IN and NIN helper using pg.StringArray to support more arguments
    • add helper to copy test file into folder unique to the test and cleanup helper
  • Add starttls support to mailer
    • Extend mailer mock to support waiting for all expected mails to arrive to test mails sent in go routines
  • update CHANGELOG with information about deprecated mail tls change
  • fix bug detecting test env when running the debugger

- Add MIME interface to use mimtype.MIME or an already KnownMIME
- Add function to detach context to avoid context cancelation. Can be used to pass context information to go routines without a deadline or cancel
- Add oauth2 helper for PKCE extention
- Extend mailer mock to support waiting for all expected mails to arrive to test mails sent in go routines
Copy link
Contributor

@MorpheusXAUT MorpheusXAUT left a comment

Choose a reason for hiding this comment

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

LGTM

internal/mailer/transport/smtp.go Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 27, 2021

Codecov Report

Patch coverage: 90.20% and project coverage change: +0.94 🎉

Comparison is base (d14d4b2) 62.86% compared to head (be48d27) 63.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   62.86%   63.80%   +0.94%     
==========================================
  Files          78       86       +8     
  Lines        6053     6239     +186     
==========================================
+ Hits         3805     3981     +176     
- Misses       1635     1643       +8     
- Partials      613      615       +2     
Impacted Files Coverage Δ
internal/util/test.go 42.85% <33.33%> (-57.15%) ⬇️
internal/util/oauth2/pkce.go 44.44% <44.44%> (ø)
internal/util/int.go 60.00% <60.00%> (ø)
internal/util/context.go 33.33% <66.66%> (+11.11%) ⬆️
internal/util/db/db.go 76.59% <87.50%> (+5.62%) ⬆️
internal/test/helper_files.go 93.10% <93.10%> (ø)
internal/config/server_config.go 98.16% <100.00%> (+0.01%) ⬆️
internal/util/bool.go 100.00% <100.00%> (ø)
internal/util/currency.go 100.00% <100.00%> (ø)
internal/util/db/ilike.go 100.00% <100.00%> (ø)
... and 8 more

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

# Conflicts:
#	CHANGELOG.md
#	go.mod
#	internal/config/server_config.go
#	internal/util/string.go
…m for slices instead of passing each item as arg.

sqlboiler fails at about 10k params because database and driver limits are reached. With this slices with over 1kk entries are working.
@mwieser mwieser removed the request for review from eldelto May 30, 2022 16:20
@mwieser mwieser requested a review from anjankow May 10, 2023 08:41
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.

3 participants