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

Update email routing API reference urls #1038

Merged
merged 2 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changelog/1038.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```release-note:bug
email_routing_destination: Update API reference URLs
```
```release-note:bug
email_routing_rules: Update API reference URLs
```
```release-note:bug
email_routing_settings: Update API reference URLs
```
10 changes: 5 additions & 5 deletions email_routing_destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type CreateEmailRoutingAddressResponse struct {

// ListEmailRoutingDestinationAddresses Lists existing destination addresses.
//
// API reference: https://api.cloudflare.com/#email-routing---destination-addresses-list-destination-addresses
// API reference: https://api.cloudflare.com/#email-routing-destination-addresses-list-destination-addresses
func (api *API) ListEmailRoutingDestinationAddresses(ctx context.Context, rc *ResourceContainer, params ListEmailRoutingAddressParameters) ([]EmailRoutingDestinationAddress, *ResultInfo, error) {
if rc.Identifier == "" {
return []EmailRoutingDestinationAddress{}, &ResultInfo{}, ErrMissingAccountID
Expand Down Expand Up @@ -84,7 +84,7 @@ func (api *API) ListEmailRoutingDestinationAddresses(ctx context.Context, rc *Re
// CreateEmailRoutingDestinationAddress Create a destination address to forward your emails to.
// Destination addresses need to be verified before they become active.
//
// API reference: https://api.cloudflare.com/#email-routing---destination-addresses-list-destination-addresses
// API reference: https://api.cloudflare.com/#email-routing-destination-addresses-create-a-destination-address
func (api *API) CreateEmailRoutingDestinationAddress(ctx context.Context, rc *ResourceContainer, params CreateEmailRoutingAddressParameters) (EmailRoutingDestinationAddress, error) {
if rc.Identifier == "" {
return EmailRoutingDestinationAddress{}, ErrMissingAccountID
Expand All @@ -108,7 +108,7 @@ func (api *API) CreateEmailRoutingDestinationAddress(ctx context.Context, rc *Re

// GetEmailRoutingDestinationAddress Gets information for a specific destination email already created.
//
// API reference: https://api.cloudflare.com/#email-routing---destination-addresses-get-a-destination-address
// API reference: https://api.cloudflare.com/#email-routing-destination-addresses-get-a-destination-address
func (api *API) GetEmailRoutingDestinationAddress(ctx context.Context, rc *ResourceContainer, addressID string) (EmailRoutingDestinationAddress, error) {
if rc.Identifier == "" {
return EmailRoutingDestinationAddress{}, ErrMissingAccountID
Expand All @@ -130,9 +130,9 @@ func (api *API) GetEmailRoutingDestinationAddress(ctx context.Context, rc *Resou
return r.Result, nil
}

// DeleteEmailRoutingDestinationAddress Gets information for a specific destination email already created.
// DeleteEmailRoutingDestinationAddress Deletes a specific destination address.
//
// API reference: https://api.cloudflare.com/#email-routing---destination-addresses-delete-destination-address
// API reference: https://api.cloudflare.com/#email-routing-destination-addresses-delete-destination-address
func (api *API) DeleteEmailRoutingDestinationAddress(ctx context.Context, rc *ResourceContainer, addressID string) (EmailRoutingDestinationAddress, error) {
if rc.Identifier == "" {
return EmailRoutingDestinationAddress{}, ErrMissingAccountID
Expand Down
17 changes: 8 additions & 9 deletions email_routing_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type EmailRoutingCatchAllRule struct {

// ListEmailRoutingRules Lists existing routing rules.
//
// API reference: https://api.cloudflare.com/#email-routing---routing-rules-list-routing-rules
// API reference: https://api.cloudflare.com/#email-routing-routing-rules-list-routing-rules
func (api *API) ListEmailRoutingRules(ctx context.Context, rc *ResourceContainer, params ListEmailRoutingRulesParameters) ([]EmailRoutingRule, *ResultInfo, error) {
if rc.Identifier == "" {
return []EmailRoutingRule{}, &ResultInfo{}, ErrMissingZoneID
Expand Down Expand Up @@ -120,10 +120,9 @@ func (api *API) ListEmailRoutingRules(ctx context.Context, rc *ResourceContainer
return rules, &rResponse.ResultInfo, nil
}

// CreateEmailRoutingRule Create a new routing rule.
// Rules consist of a custom email address paired with a destination address, that forward emails to the destination address you chose.
// CreateEmailRoutingRule Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the email (like forwarding it to a specific destination address).
//
// API reference: https://api.cloudflare.com/#email-routing---routing-rules-create-routing-rule
// API reference: https://api.cloudflare.com/#email-routing-routing-rules-create-routing-rule
func (api *API) CreateEmailRoutingRule(ctx context.Context, rc *ResourceContainer, params CreateEmailRoutingRuleParameters) (EmailRoutingRule, error) {
if rc.Identifier == "" {
return EmailRoutingRule{}, ErrMissingZoneID
Expand All @@ -147,7 +146,7 @@ func (api *API) CreateEmailRoutingRule(ctx context.Context, rc *ResourceContaine

// GetEmailRoutingRule Get information for a specific routing rule already created.
//
// API reference: https://api.cloudflare.com/#email-routing---routing-rules-get-routing-rule
// API reference: https://api.cloudflare.com/#email-routing-routing-rules-get-routing-rule
func (api *API) GetEmailRoutingRule(ctx context.Context, rc *ResourceContainer, ruleID string) (EmailRoutingRule, error) {
if rc.Identifier == "" {
return EmailRoutingRule{}, ErrMissingZoneID
Expand All @@ -171,7 +170,7 @@ func (api *API) GetEmailRoutingRule(ctx context.Context, rc *ResourceContainer,

// UpdateEmailRoutingRule Update actions, matches, or enable/disable specific routing rules
//
// API reference: https://api.cloudflare.com/#email-routing---routing-rules-update-routing-rule
// API reference: https://api.cloudflare.com/#email-routing-routing-rules-update-routing-rule
func (api *API) UpdateEmailRoutingRule(ctx context.Context, rc *ResourceContainer, params UpdateEmailRoutingRuleParameters) (EmailRoutingRule, error) {
if rc.Identifier == "" {
return EmailRoutingRule{}, ErrMissingZoneID
Expand Down Expand Up @@ -199,7 +198,7 @@ func (api *API) UpdateEmailRoutingRule(ctx context.Context, rc *ResourceContaine

// DeleteEmailRoutingRule Delete a specific routing rule.
//
// API reference: https://api.cloudflare.com/#email-routing---routing-rules-delete-routing-rule
// API reference: https://api.cloudflare.com/#email-routing-routing-rules-delete-routing-rule
func (api *API) DeleteEmailRoutingRule(ctx context.Context, rc *ResourceContainer, ruleID string) (EmailRoutingRule, error) {
if rc.Identifier == "" {
return EmailRoutingRule{}, ErrMissingZoneID
Expand All @@ -223,7 +222,7 @@ func (api *API) DeleteEmailRoutingRule(ctx context.Context, rc *ResourceContaine

// GetEmailRoutingCatchAllRule Get information on the default catch-all routing rule.
//
// API reference: https://api.cloudflare.com/#email-routing---routing-rules-get-catch-all-rule
// API reference: https://api.cloudflare.com/#email-routing-routing-rules-get-catch-all-rule
func (api *API) GetEmailRoutingCatchAllRule(ctx context.Context, rc *ResourceContainer) (EmailRoutingCatchAllRule, error) {
if rc.Identifier == "" {
return EmailRoutingCatchAllRule{}, ErrMissingZoneID
Expand All @@ -247,7 +246,7 @@ func (api *API) GetEmailRoutingCatchAllRule(ctx context.Context, rc *ResourceCon

// UpdateEmailRoutingCatchAllRule Enable or disable catch-all routing rule, or change action to forward to specific destination address.
//
// API reference: https://api.cloudflare.com/#email-routing---routing-rules-update-catch-all-rule
// API reference: https://api.cloudflare.com/#email-routing-routing-rules-update-catch-all-rule
func (api *API) UpdateEmailRoutingCatchAllRule(ctx context.Context, rc *ResourceContainer, params EmailRoutingCatchAllRule) (EmailRoutingCatchAllRule, error) {
if rc.Identifier == "" {
return EmailRoutingCatchAllRule{}, ErrMissingZoneID
Expand Down
8 changes: 4 additions & 4 deletions email_routing_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type EmailRoutingDNSSettingsResponse struct {

// GetEmailRoutingSettings Get information about the settings for your Email Routing zone.
//
// API reference: https://api.cloudflare.com/#email-routing---settings-get-email-routing-settings
// API reference: https://api.cloudflare.com/#email-routing-settings-get-email-routing-settings
func (api *API) GetEmailRoutingSettings(ctx context.Context, rc *ResourceContainer) (EmailRoutingSettings, error) {
if rc.Identifier == "" {
return EmailRoutingSettings{}, ErrMissingZoneID
Expand All @@ -53,7 +53,7 @@ func (api *API) GetEmailRoutingSettings(ctx context.Context, rc *ResourceContain

// EnableEmailRouting Enable you Email Routing zone. Add and lock the necessary MX and SPF records.
//
// API reference: https://api.cloudflare.com/#email-routing---settings-enable-email-routing
// API reference: https://api.cloudflare.com/#email-routing-settings-enable-email-routing
func (api *API) EnableEmailRouting(ctx context.Context, rc *ResourceContainer) (EmailRoutingSettings, error) {
if rc.Identifier == "" {
return EmailRoutingSettings{}, ErrMissingZoneID
Expand All @@ -75,7 +75,7 @@ func (api *API) EnableEmailRouting(ctx context.Context, rc *ResourceContainer) (

// DisableEmailRouting Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.
//
// API reference: https://api.cloudflare.com/#email-routing---settings-enable-email-routing
// API reference: https://api.cloudflare.com/#email-routing-settings-disable-email-routing
func (api *API) DisableEmailRouting(ctx context.Context, rc *ResourceContainer) (EmailRoutingSettings, error) {
if rc.Identifier == "" {
return EmailRoutingSettings{}, ErrMissingZoneID
Expand All @@ -97,7 +97,7 @@ func (api *API) DisableEmailRouting(ctx context.Context, rc *ResourceContainer)

// GetEmailRoutingDNSSettings Show the DNS records needed to configure your Email Routing zone.
//
// API reference: https://api.cloudflare.com/#email-routing---settings-disable-email-routing
// API reference: https://api.cloudflare.com/#email-routing-settings-email-routing---dns-settings
func (api *API) GetEmailRoutingDNSSettings(ctx context.Context, rc *ResourceContainer) ([]DNSRecord, error) {
if rc.Identifier == "" {
return []DNSRecord{}, ErrMissingZoneID
Expand Down