-
Notifications
You must be signed in to change notification settings - Fork 146
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
DE-1146 Release v5 #367
Merged
Merged
DE-1146 Release v5 #367
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…geRawForURL() methods (#373)
`SubaccountDetails(ctx context.Context, subaccountId string)` renamed to `GetSubaccount(ctx context.Context, subaccountID string)`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking changes:
Mailgun client is now domain agnostic
func mailgun.NewMailgun
func NewMessage(domain, from, subject, text string, to ...string)
has a variadicto
argument, so there would be no compile error if you miss passingdomain
.Types and mocks
github.com/mailgun/mailgun-go/v5/mtypes
package.Event
interface and parsers moved togithub.com/mailgun/mailgun-go/v5/events
github.com/mailgun/mailgun-go/v5/mocks
to address Remove dependency on github.com/go-chi/chi/v5 (again) #322 and Why does this depend on chi? #332Messages
Send()
andReSend()
methods now returnsmtypes.SendMessageResponse
.NewMessage()
andNewMIMEMessage()
have been removed, use relative funcs.GetStoredMessageForURL
method has been removed.GetStoredMessageRawForURL
method has been removed.Validation
NewEmailValidator
andNewEmailValidatorFromEnv
are removed, useValidateEmail(...)
method ofMailgun
.IsValid
field is removed from the response; useRisk
.Subaccounts
SubaccountDetails(ctx context.Context, subaccountId string)
method is removed, useGetSubaccount(ctx context.Context, subaccountID string)
.Domains
func UpdateDomainTrackingWebPrefix
is removed, usefunc UpdateDomain
.func VerifyDomain
is removed, usefunc VerifyAndReturnDomain
.CreateDomainOptions.IPS
is removed, useCreateDomainOptions.IPs
.ListEventsWithDomain(opts *ListEventOptions, domain string)
->ListEvents(domain string, opts *ListEventOptions)
.Metrics
ESPBlockCount
has been removed. UseTemporaryFailedESPBlockCount
.IPs
ListDomainIPS(...)
is removed, useListDomainIPs(...)
.ListIPS(ctx context.Context, dedicated bool)
is removed, useListIPs(ctx context.Context, dedicated, enabled bool)
(has newenabled
argument).Webhooks
VerifyWebhookRequest
method has been removed.Other changes
These changes might be breaking in some cases.
Send(ctx context.Context, m Message)
method now accepts theMessage
interface instead of a pointer to struct.SetAPIBase()
method now returns an error.For the EU: do
mg.SetAPIBase(mailgun.APIBaseEU)
instead ofmg.SetAPIBase("https://api.eu.mailgun.net/v...")
.The Webhook Signing Key is now optional and does not relate to the API key. If it is not set(by
SetWebhookSigningKey(webhookSigningKey string)
method), don't call theVerifyWebhookSignature()
method, as it will always fail.mailgun.MailgunImpl
is renamed tomailgun.Client
for not stuttering.