email_routing

package
v2.0.0-beta.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressDeleteResponse

type AddressDeleteResponse struct {
	// Destination address identifier.
	ID string `json:"id"`
	// The date and time the destination address has been created.
	Created time.Time `json:"created" format:"date-time"`
	// The contact email address of the user.
	Email string `json:"email"`
	// The date and time the destination address was last modified.
	Modified time.Time `json:"modified" format:"date-time"`
	// Destination address tag. (Deprecated, replaced by destination address
	// identifier)
	Tag string `json:"tag"`
	// The date and time the destination address has been verified. Null means not
	// verified yet.
	Verified time.Time                 `json:"verified" format:"date-time"`
	JSON     addressDeleteResponseJSON `json:"-"`
}

func (*AddressDeleteResponse) UnmarshalJSON

func (r *AddressDeleteResponse) UnmarshalJSON(data []byte) (err error)

type AddressDeleteResponseEnvelope

type AddressDeleteResponseEnvelope struct {
	Errors   []AddressDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AddressDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   AddressDeleteResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success AddressDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    addressDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*AddressDeleteResponseEnvelope) UnmarshalJSON

func (r *AddressDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type AddressDeleteResponseEnvelopeErrors

type AddressDeleteResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    addressDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*AddressDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *AddressDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type AddressDeleteResponseEnvelopeMessages

type AddressDeleteResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    addressDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*AddressDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *AddressDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type AddressDeleteResponseEnvelopeSuccess

type AddressDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressDeleteResponseEnvelopeSuccessTrue AddressDeleteResponseEnvelopeSuccess = true
)

func (AddressDeleteResponseEnvelopeSuccess) IsKnown

type AddressGetResponse

type AddressGetResponse struct {
	// Destination address identifier.
	ID string `json:"id"`
	// The date and time the destination address has been created.
	Created time.Time `json:"created" format:"date-time"`
	// The contact email address of the user.
	Email string `json:"email"`
	// The date and time the destination address was last modified.
	Modified time.Time `json:"modified" format:"date-time"`
	// Destination address tag. (Deprecated, replaced by destination address
	// identifier)
	Tag string `json:"tag"`
	// The date and time the destination address has been verified. Null means not
	// verified yet.
	Verified time.Time              `json:"verified" format:"date-time"`
	JSON     addressGetResponseJSON `json:"-"`
}

func (*AddressGetResponse) UnmarshalJSON

func (r *AddressGetResponse) UnmarshalJSON(data []byte) (err error)

type AddressGetResponseEnvelope

type AddressGetResponseEnvelope struct {
	Errors   []AddressGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AddressGetResponseEnvelopeMessages `json:"messages,required"`
	Result   AddressGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success AddressGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    addressGetResponseEnvelopeJSON    `json:"-"`
}

func (*AddressGetResponseEnvelope) UnmarshalJSON

func (r *AddressGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type AddressGetResponseEnvelopeErrors

type AddressGetResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    addressGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*AddressGetResponseEnvelopeErrors) UnmarshalJSON

func (r *AddressGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type AddressGetResponseEnvelopeMessages

type AddressGetResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    addressGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*AddressGetResponseEnvelopeMessages) UnmarshalJSON

func (r *AddressGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type AddressGetResponseEnvelopeSuccess

type AddressGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressGetResponseEnvelopeSuccessTrue AddressGetResponseEnvelopeSuccess = true
)

func (AddressGetResponseEnvelopeSuccess) IsKnown

type AddressListParams

type AddressListParams struct {
	// Sorts results in an ascending or descending order.
	Direction param.Field[AddressListParamsDirection] `query:"direction"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[float64] `query:"per_page"`
	// Filter by verified destination addresses.
	Verified param.Field[AddressListParamsVerified] `query:"verified"`
}

func (AddressListParams) URLQuery

func (r AddressListParams) URLQuery() (v url.Values)

URLQuery serializes AddressListParams's query parameters as `url.Values`.

type AddressListParamsDirection

type AddressListParamsDirection string

Sorts results in an ascending or descending order.

const (
	AddressListParamsDirectionAsc  AddressListParamsDirection = "asc"
	AddressListParamsDirectionDesc AddressListParamsDirection = "desc"
)

func (AddressListParamsDirection) IsKnown

func (r AddressListParamsDirection) IsKnown() bool

type AddressListParamsVerified

type AddressListParamsVerified bool

Filter by verified destination addresses.

const (
	AddressListParamsVerifiedTrue  AddressListParamsVerified = true
	AddressListParamsVerifiedFalse AddressListParamsVerified = false
)

func (AddressListParamsVerified) IsKnown

func (r AddressListParamsVerified) IsKnown() bool

type AddressListResponse

type AddressListResponse struct {
	// Destination address identifier.
	ID string `json:"id"`
	// The date and time the destination address has been created.
	Created time.Time `json:"created" format:"date-time"`
	// The contact email address of the user.
	Email string `json:"email"`
	// The date and time the destination address was last modified.
	Modified time.Time `json:"modified" format:"date-time"`
	// Destination address tag. (Deprecated, replaced by destination address
	// identifier)
	Tag string `json:"tag"`
	// The date and time the destination address has been verified. Null means not
	// verified yet.
	Verified time.Time               `json:"verified" format:"date-time"`
	JSON     addressListResponseJSON `json:"-"`
}

func (*AddressListResponse) UnmarshalJSON

func (r *AddressListResponse) UnmarshalJSON(data []byte) (err error)

type AddressNewParams

type AddressNewParams struct {
	// The contact email address of the user.
	Email param.Field[string] `json:"email,required"`
}

func (AddressNewParams) MarshalJSON

func (r AddressNewParams) MarshalJSON() (data []byte, err error)

type AddressNewResponse

type AddressNewResponse struct {
	// Destination address identifier.
	ID string `json:"id"`
	// The date and time the destination address has been created.
	Created time.Time `json:"created" format:"date-time"`
	// The contact email address of the user.
	Email string `json:"email"`
	// The date and time the destination address was last modified.
	Modified time.Time `json:"modified" format:"date-time"`
	// Destination address tag. (Deprecated, replaced by destination address
	// identifier)
	Tag string `json:"tag"`
	// The date and time the destination address has been verified. Null means not
	// verified yet.
	Verified time.Time              `json:"verified" format:"date-time"`
	JSON     addressNewResponseJSON `json:"-"`
}

func (*AddressNewResponse) UnmarshalJSON

func (r *AddressNewResponse) UnmarshalJSON(data []byte) (err error)

type AddressNewResponseEnvelope

type AddressNewResponseEnvelope struct {
	Errors   []AddressNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AddressNewResponseEnvelopeMessages `json:"messages,required"`
	Result   AddressNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success AddressNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    addressNewResponseEnvelopeJSON    `json:"-"`
}

func (*AddressNewResponseEnvelope) UnmarshalJSON

func (r *AddressNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type AddressNewResponseEnvelopeErrors

type AddressNewResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    addressNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*AddressNewResponseEnvelopeErrors) UnmarshalJSON

func (r *AddressNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type AddressNewResponseEnvelopeMessages

type AddressNewResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    addressNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*AddressNewResponseEnvelopeMessages) UnmarshalJSON

func (r *AddressNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type AddressNewResponseEnvelopeSuccess

type AddressNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressNewResponseEnvelopeSuccessTrue AddressNewResponseEnvelopeSuccess = true
)

func (AddressNewResponseEnvelopeSuccess) IsKnown

type AddressService

type AddressService struct {
	Options []option.RequestOption
}

AddressService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAddressService method instead.

func NewAddressService

func NewAddressService(opts ...option.RequestOption) (r *AddressService)

NewAddressService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AddressService) Delete

func (r *AddressService) Delete(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string, opts ...option.RequestOption) (res *AddressDeleteResponse, err error)

Deletes a specific destination address.

func (*AddressService) Get

func (r *AddressService) Get(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string, opts ...option.RequestOption) (res *AddressGetResponse, err error)

Gets information for a specific destination email already created.

func (*AddressService) List

Lists existing destination addresses.

func (*AddressService) ListAutoPaging

Lists existing destination addresses.

func (*AddressService) New

func (r *AddressService) New(ctx context.Context, accountIdentifier string, body AddressNewParams, opts ...option.RequestOption) (res *AddressNewResponse, err error)

Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used.

type DNSGetResponseEnvelope

type DNSGetResponseEnvelope struct {
	Errors   []DNSGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DNSGetResponseEnvelopeMessages `json:"messages,required"`
	Result   []EmailDNSRecord                 `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    DNSGetResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo DNSGetResponseEnvelopeResultInfo `json:"result_info"`
	JSON       dnsGetResponseEnvelopeJSON       `json:"-"`
}

func (*DNSGetResponseEnvelope) UnmarshalJSON

func (r *DNSGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type DNSGetResponseEnvelopeErrors

type DNSGetResponseEnvelopeErrors struct {
	Code    int64                            `json:"code,required"`
	Message string                           `json:"message,required"`
	JSON    dnsGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*DNSGetResponseEnvelopeErrors) UnmarshalJSON

func (r *DNSGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type DNSGetResponseEnvelopeMessages

type DNSGetResponseEnvelopeMessages struct {
	Code    int64                              `json:"code,required"`
	Message string                             `json:"message,required"`
	JSON    dnsGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*DNSGetResponseEnvelopeMessages) UnmarshalJSON

func (r *DNSGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type DNSGetResponseEnvelopeResultInfo

type DNSGetResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service
	Count float64 `json:"count"`
	// Current page within paginated list of results
	Page float64 `json:"page"`
	// Number of results per page of results
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters
	TotalCount float64                              `json:"total_count"`
	JSON       dnsGetResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*DNSGetResponseEnvelopeResultInfo) UnmarshalJSON

func (r *DNSGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type DNSGetResponseEnvelopeSuccess

type DNSGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DNSGetResponseEnvelopeSuccessTrue DNSGetResponseEnvelopeSuccess = true
)

func (DNSGetResponseEnvelopeSuccess) IsKnown

func (r DNSGetResponseEnvelopeSuccess) IsKnown() bool

type DNSService

type DNSService struct {
	Options []option.RequestOption
}

DNSService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDNSService method instead.

func NewDNSService

func NewDNSService(opts ...option.RequestOption) (r *DNSService)

NewDNSService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*DNSService) Get

func (r *DNSService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *[]EmailDNSRecord, err error)

Show the DNS records needed to configure your Email Routing zone.

type EmailCatchAllRule

type EmailCatchAllRule struct {
	// Routing rule identifier.
	ID string `json:"id"`
	// List actions for the catch-all routing rule.
	Actions []EmailCatchAllRuleAction `json:"actions"`
	// Routing rule status.
	Enabled EmailCatchAllRuleEnabled `json:"enabled"`
	// List of matchers for the catch-all routing rule.
	Matchers []EmailCatchAllRuleMatcher `json:"matchers"`
	// Routing rule name.
	Name string `json:"name"`
	// Routing rule tag. (Deprecated, replaced by routing rule identifier)
	Tag  string                `json:"tag"`
	JSON emailCatchAllRuleJSON `json:"-"`
}

func (*EmailCatchAllRule) UnmarshalJSON

func (r *EmailCatchAllRule) UnmarshalJSON(data []byte) (err error)

type EmailCatchAllRuleAction

type EmailCatchAllRuleAction struct {
	// Type of action for catch-all rule.
	Type  EmailCatchAllRuleActionsType `json:"type,required"`
	Value []string                     `json:"value"`
	JSON  emailCatchAllRuleActionJSON  `json:"-"`
}

Action for the catch-all routing rule.

func (*EmailCatchAllRuleAction) UnmarshalJSON

func (r *EmailCatchAllRuleAction) UnmarshalJSON(data []byte) (err error)

type EmailCatchAllRuleActionsType

type EmailCatchAllRuleActionsType string

Type of action for catch-all rule.

const (
	EmailCatchAllRuleActionsTypeDrop    EmailCatchAllRuleActionsType = "drop"
	EmailCatchAllRuleActionsTypeForward EmailCatchAllRuleActionsType = "forward"
	EmailCatchAllRuleActionsTypeWorker  EmailCatchAllRuleActionsType = "worker"
)

func (EmailCatchAllRuleActionsType) IsKnown

func (r EmailCatchAllRuleActionsType) IsKnown() bool

type EmailCatchAllRuleEnabled

type EmailCatchAllRuleEnabled bool

Routing rule status.

const (
	EmailCatchAllRuleEnabledTrue  EmailCatchAllRuleEnabled = true
	EmailCatchAllRuleEnabledFalse EmailCatchAllRuleEnabled = false
)

func (EmailCatchAllRuleEnabled) IsKnown

func (r EmailCatchAllRuleEnabled) IsKnown() bool

type EmailCatchAllRuleMatcher

type EmailCatchAllRuleMatcher struct {
	// Type of matcher. Default is 'all'.
	Type EmailCatchAllRuleMatchersType `json:"type,required"`
	JSON emailCatchAllRuleMatcherJSON  `json:"-"`
}

Matcher for catch-all routing rule.

func (*EmailCatchAllRuleMatcher) UnmarshalJSON

func (r *EmailCatchAllRuleMatcher) UnmarshalJSON(data []byte) (err error)

type EmailCatchAllRuleMatchersType

type EmailCatchAllRuleMatchersType string

Type of matcher. Default is 'all'.

const (
	EmailCatchAllRuleMatchersTypeAll EmailCatchAllRuleMatchersType = "all"
)

func (EmailCatchAllRuleMatchersType) IsKnown

func (r EmailCatchAllRuleMatchersType) IsKnown() bool

type EmailDNSRecord

type EmailDNSRecord struct {
	// DNS record content.
	Content string `json:"content"`
	// DNS record name (or @ for the zone apex).
	Name string `json:"name"`
	// Required for MX, SRV and URI records. Unused by other record types. Records with
	// lower priorities are preferred.
	Priority float64 `json:"priority"`
	// Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1
	// for 'automatic'.
	TTL EmailDNSRecordTTL `json:"ttl"`
	// DNS record type.
	Type EmailDNSRecordType `json:"type"`
	JSON emailDNSRecordJSON `json:"-"`
}

List of records needed to enable an Email Routing zone.

func (*EmailDNSRecord) UnmarshalJSON

func (r *EmailDNSRecord) UnmarshalJSON(data []byte) (err error)

type EmailDNSRecordTTL

type EmailDNSRecordTTL interface {
	ImplementsEmailRoutingEmailDNSRecordTTL()
}

Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'.

Union satisfied by shared.UnionFloat or email_routing.EmailDNSRecordTTLNumber.

type EmailDNSRecordTTLNumber

type EmailDNSRecordTTLNumber float64
const (
	EmailDNSRecordTTLNumber1 EmailDNSRecordTTLNumber = 1
)

func (EmailDNSRecordTTLNumber) IsKnown

func (r EmailDNSRecordTTLNumber) IsKnown() bool

type EmailDNSRecordType

type EmailDNSRecordType string

DNS record type.

const (
	EmailDNSRecordTypeA      EmailDNSRecordType = "A"
	EmailDNSRecordTypeAAAA   EmailDNSRecordType = "AAAA"
	EmailDNSRecordTypeCNAME  EmailDNSRecordType = "CNAME"
	EmailDNSRecordTypeHTTPS  EmailDNSRecordType = "HTTPS"
	EmailDNSRecordTypeTXT    EmailDNSRecordType = "TXT"
	EmailDNSRecordTypeSRV    EmailDNSRecordType = "SRV"
	EmailDNSRecordTypeLOC    EmailDNSRecordType = "LOC"
	EmailDNSRecordTypeMX     EmailDNSRecordType = "MX"
	EmailDNSRecordTypeNS     EmailDNSRecordType = "NS"
	EmailDNSRecordTypeCERT   EmailDNSRecordType = "CERT"
	EmailDNSRecordTypeDNSKEY EmailDNSRecordType = "DNSKEY"
	EmailDNSRecordTypeDS     EmailDNSRecordType = "DS"
	EmailDNSRecordTypeNAPTR  EmailDNSRecordType = "NAPTR"
	EmailDNSRecordTypeSMIMEA EmailDNSRecordType = "SMIMEA"
	EmailDNSRecordTypeSSHFP  EmailDNSRecordType = "SSHFP"
	EmailDNSRecordTypeSVCB   EmailDNSRecordType = "SVCB"
	EmailDNSRecordTypeTLSA   EmailDNSRecordType = "TLSA"
	EmailDNSRecordTypeURI    EmailDNSRecordType = "URI"
)

func (EmailDNSRecordType) IsKnown

func (r EmailDNSRecordType) IsKnown() bool

type EmailRoutingDisableResponse

type EmailRoutingDisableResponse struct {
	// Email Routing settings identifier.
	ID string `json:"id"`
	// The date and time the settings have been created.
	Created time.Time `json:"created" format:"date-time"`
	// State of the zone settings for Email Routing.
	Enabled EmailRoutingDisableResponseEnabled `json:"enabled"`
	// The date and time the settings have been modified.
	Modified time.Time `json:"modified" format:"date-time"`
	// Domain of your zone.
	Name string `json:"name"`
	// Flag to check if the user skipped the configuration wizard.
	SkipWizard EmailRoutingDisableResponseSkipWizard `json:"skip_wizard"`
	// Show the state of your account, and the type or configuration error.
	Status EmailRoutingDisableResponseStatus `json:"status"`
	// Email Routing settings tag. (Deprecated, replaced by Email Routing settings
	// identifier)
	Tag  string                          `json:"tag"`
	JSON emailRoutingDisableResponseJSON `json:"-"`
}

func (*EmailRoutingDisableResponse) UnmarshalJSON

func (r *EmailRoutingDisableResponse) UnmarshalJSON(data []byte) (err error)

type EmailRoutingDisableResponseEnabled

type EmailRoutingDisableResponseEnabled bool

State of the zone settings for Email Routing.

const (
	EmailRoutingDisableResponseEnabledTrue  EmailRoutingDisableResponseEnabled = true
	EmailRoutingDisableResponseEnabledFalse EmailRoutingDisableResponseEnabled = false
)

func (EmailRoutingDisableResponseEnabled) IsKnown

type EmailRoutingDisableResponseEnvelope

type EmailRoutingDisableResponseEnvelope struct {
	Errors   []EmailRoutingDisableResponseEnvelopeErrors   `json:"errors,required"`
	Messages []EmailRoutingDisableResponseEnvelopeMessages `json:"messages,required"`
	Result   EmailRoutingDisableResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success EmailRoutingDisableResponseEnvelopeSuccess `json:"success,required"`
	JSON    emailRoutingDisableResponseEnvelopeJSON    `json:"-"`
}

func (*EmailRoutingDisableResponseEnvelope) UnmarshalJSON

func (r *EmailRoutingDisableResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type EmailRoutingDisableResponseEnvelopeErrors

type EmailRoutingDisableResponseEnvelopeErrors struct {
	Code    int64                                         `json:"code,required"`
	Message string                                        `json:"message,required"`
	JSON    emailRoutingDisableResponseEnvelopeErrorsJSON `json:"-"`
}

func (*EmailRoutingDisableResponseEnvelopeErrors) UnmarshalJSON

func (r *EmailRoutingDisableResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type EmailRoutingDisableResponseEnvelopeMessages

type EmailRoutingDisableResponseEnvelopeMessages struct {
	Code    int64                                           `json:"code,required"`
	Message string                                          `json:"message,required"`
	JSON    emailRoutingDisableResponseEnvelopeMessagesJSON `json:"-"`
}

func (*EmailRoutingDisableResponseEnvelopeMessages) UnmarshalJSON

func (r *EmailRoutingDisableResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type EmailRoutingDisableResponseEnvelopeSuccess

type EmailRoutingDisableResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	EmailRoutingDisableResponseEnvelopeSuccessTrue EmailRoutingDisableResponseEnvelopeSuccess = true
)

func (EmailRoutingDisableResponseEnvelopeSuccess) IsKnown

type EmailRoutingDisableResponseSkipWizard

type EmailRoutingDisableResponseSkipWizard bool

Flag to check if the user skipped the configuration wizard.

const (
	EmailRoutingDisableResponseSkipWizardTrue  EmailRoutingDisableResponseSkipWizard = true
	EmailRoutingDisableResponseSkipWizardFalse EmailRoutingDisableResponseSkipWizard = false
)

func (EmailRoutingDisableResponseSkipWizard) IsKnown

type EmailRoutingDisableResponseStatus

type EmailRoutingDisableResponseStatus string

Show the state of your account, and the type or configuration error.

const (
	EmailRoutingDisableResponseStatusReady               EmailRoutingDisableResponseStatus = "ready"
	EmailRoutingDisableResponseStatusUnconfigured        EmailRoutingDisableResponseStatus = "unconfigured"
	EmailRoutingDisableResponseStatusMisconfigured       EmailRoutingDisableResponseStatus = "misconfigured"
	EmailRoutingDisableResponseStatusMisconfiguredLocked EmailRoutingDisableResponseStatus = "misconfigured/locked"
	EmailRoutingDisableResponseStatusUnlocked            EmailRoutingDisableResponseStatus = "unlocked"
)

func (EmailRoutingDisableResponseStatus) IsKnown

type EmailRoutingEnableResponse

type EmailRoutingEnableResponse struct {
	// Email Routing settings identifier.
	ID string `json:"id"`
	// The date and time the settings have been created.
	Created time.Time `json:"created" format:"date-time"`
	// State of the zone settings for Email Routing.
	Enabled EmailRoutingEnableResponseEnabled `json:"enabled"`
	// The date and time the settings have been modified.
	Modified time.Time `json:"modified" format:"date-time"`
	// Domain of your zone.
	Name string `json:"name"`
	// Flag to check if the user skipped the configuration wizard.
	SkipWizard EmailRoutingEnableResponseSkipWizard `json:"skip_wizard"`
	// Show the state of your account, and the type or configuration error.
	Status EmailRoutingEnableResponseStatus `json:"status"`
	// Email Routing settings tag. (Deprecated, replaced by Email Routing settings
	// identifier)
	Tag  string                         `json:"tag"`
	JSON emailRoutingEnableResponseJSON `json:"-"`
}

func (*EmailRoutingEnableResponse) UnmarshalJSON

func (r *EmailRoutingEnableResponse) UnmarshalJSON(data []byte) (err error)

type EmailRoutingEnableResponseEnabled

type EmailRoutingEnableResponseEnabled bool

State of the zone settings for Email Routing.

const (
	EmailRoutingEnableResponseEnabledTrue  EmailRoutingEnableResponseEnabled = true
	EmailRoutingEnableResponseEnabledFalse EmailRoutingEnableResponseEnabled = false
)

func (EmailRoutingEnableResponseEnabled) IsKnown

type EmailRoutingEnableResponseEnvelope

type EmailRoutingEnableResponseEnvelope struct {
	Errors   []EmailRoutingEnableResponseEnvelopeErrors   `json:"errors,required"`
	Messages []EmailRoutingEnableResponseEnvelopeMessages `json:"messages,required"`
	Result   EmailRoutingEnableResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success EmailRoutingEnableResponseEnvelopeSuccess `json:"success,required"`
	JSON    emailRoutingEnableResponseEnvelopeJSON    `json:"-"`
}

func (*EmailRoutingEnableResponseEnvelope) UnmarshalJSON

func (r *EmailRoutingEnableResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type EmailRoutingEnableResponseEnvelopeErrors

type EmailRoutingEnableResponseEnvelopeErrors struct {
	Code    int64                                        `json:"code,required"`
	Message string                                       `json:"message,required"`
	JSON    emailRoutingEnableResponseEnvelopeErrorsJSON `json:"-"`
}

func (*EmailRoutingEnableResponseEnvelopeErrors) UnmarshalJSON

func (r *EmailRoutingEnableResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type EmailRoutingEnableResponseEnvelopeMessages

type EmailRoutingEnableResponseEnvelopeMessages struct {
	Code    int64                                          `json:"code,required"`
	Message string                                         `json:"message,required"`
	JSON    emailRoutingEnableResponseEnvelopeMessagesJSON `json:"-"`
}

func (*EmailRoutingEnableResponseEnvelopeMessages) UnmarshalJSON

func (r *EmailRoutingEnableResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type EmailRoutingEnableResponseEnvelopeSuccess

type EmailRoutingEnableResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	EmailRoutingEnableResponseEnvelopeSuccessTrue EmailRoutingEnableResponseEnvelopeSuccess = true
)

func (EmailRoutingEnableResponseEnvelopeSuccess) IsKnown

type EmailRoutingEnableResponseSkipWizard

type EmailRoutingEnableResponseSkipWizard bool

Flag to check if the user skipped the configuration wizard.

const (
	EmailRoutingEnableResponseSkipWizardTrue  EmailRoutingEnableResponseSkipWizard = true
	EmailRoutingEnableResponseSkipWizardFalse EmailRoutingEnableResponseSkipWizard = false
)

func (EmailRoutingEnableResponseSkipWizard) IsKnown

type EmailRoutingEnableResponseStatus

type EmailRoutingEnableResponseStatus string

Show the state of your account, and the type or configuration error.

const (
	EmailRoutingEnableResponseStatusReady               EmailRoutingEnableResponseStatus = "ready"
	EmailRoutingEnableResponseStatusUnconfigured        EmailRoutingEnableResponseStatus = "unconfigured"
	EmailRoutingEnableResponseStatusMisconfigured       EmailRoutingEnableResponseStatus = "misconfigured"
	EmailRoutingEnableResponseStatusMisconfiguredLocked EmailRoutingEnableResponseStatus = "misconfigured/locked"
	EmailRoutingEnableResponseStatusUnlocked            EmailRoutingEnableResponseStatus = "unlocked"
)

func (EmailRoutingEnableResponseStatus) IsKnown

type EmailRoutingGetResponse

type EmailRoutingGetResponse struct {
	// Email Routing settings identifier.
	ID string `json:"id"`
	// The date and time the settings have been created.
	Created time.Time `json:"created" format:"date-time"`
	// State of the zone settings for Email Routing.
	Enabled EmailRoutingGetResponseEnabled `json:"enabled"`
	// The date and time the settings have been modified.
	Modified time.Time `json:"modified" format:"date-time"`
	// Domain of your zone.
	Name string `json:"name"`
	// Flag to check if the user skipped the configuration wizard.
	SkipWizard EmailRoutingGetResponseSkipWizard `json:"skip_wizard"`
	// Show the state of your account, and the type or configuration error.
	Status EmailRoutingGetResponseStatus `json:"status"`
	// Email Routing settings tag. (Deprecated, replaced by Email Routing settings
	// identifier)
	Tag  string                      `json:"tag"`
	JSON emailRoutingGetResponseJSON `json:"-"`
}

func (*EmailRoutingGetResponse) UnmarshalJSON

func (r *EmailRoutingGetResponse) UnmarshalJSON(data []byte) (err error)

type EmailRoutingGetResponseEnabled

type EmailRoutingGetResponseEnabled bool

State of the zone settings for Email Routing.

const (
	EmailRoutingGetResponseEnabledTrue  EmailRoutingGetResponseEnabled = true
	EmailRoutingGetResponseEnabledFalse EmailRoutingGetResponseEnabled = false
)

func (EmailRoutingGetResponseEnabled) IsKnown

type EmailRoutingGetResponseEnvelope

type EmailRoutingGetResponseEnvelope struct {
	Errors   []EmailRoutingGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []EmailRoutingGetResponseEnvelopeMessages `json:"messages,required"`
	Result   EmailRoutingGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success EmailRoutingGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    emailRoutingGetResponseEnvelopeJSON    `json:"-"`
}

func (*EmailRoutingGetResponseEnvelope) UnmarshalJSON

func (r *EmailRoutingGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type EmailRoutingGetResponseEnvelopeErrors

type EmailRoutingGetResponseEnvelopeErrors struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    emailRoutingGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*EmailRoutingGetResponseEnvelopeErrors) UnmarshalJSON

func (r *EmailRoutingGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type EmailRoutingGetResponseEnvelopeMessages

type EmailRoutingGetResponseEnvelopeMessages struct {
	Code    int64                                       `json:"code,required"`
	Message string                                      `json:"message,required"`
	JSON    emailRoutingGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*EmailRoutingGetResponseEnvelopeMessages) UnmarshalJSON

func (r *EmailRoutingGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type EmailRoutingGetResponseEnvelopeSuccess

type EmailRoutingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	EmailRoutingGetResponseEnvelopeSuccessTrue EmailRoutingGetResponseEnvelopeSuccess = true
)

func (EmailRoutingGetResponseEnvelopeSuccess) IsKnown

type EmailRoutingGetResponseSkipWizard

type EmailRoutingGetResponseSkipWizard bool

Flag to check if the user skipped the configuration wizard.

const (
	EmailRoutingGetResponseSkipWizardTrue  EmailRoutingGetResponseSkipWizard = true
	EmailRoutingGetResponseSkipWizardFalse EmailRoutingGetResponseSkipWizard = false
)

func (EmailRoutingGetResponseSkipWizard) IsKnown

type EmailRoutingGetResponseStatus

type EmailRoutingGetResponseStatus string

Show the state of your account, and the type or configuration error.

const (
	EmailRoutingGetResponseStatusReady               EmailRoutingGetResponseStatus = "ready"
	EmailRoutingGetResponseStatusUnconfigured        EmailRoutingGetResponseStatus = "unconfigured"
	EmailRoutingGetResponseStatusMisconfigured       EmailRoutingGetResponseStatus = "misconfigured"
	EmailRoutingGetResponseStatusMisconfiguredLocked EmailRoutingGetResponseStatus = "misconfigured/locked"
	EmailRoutingGetResponseStatusUnlocked            EmailRoutingGetResponseStatus = "unlocked"
)

func (EmailRoutingGetResponseStatus) IsKnown

func (r EmailRoutingGetResponseStatus) IsKnown() bool

type EmailRoutingService

type EmailRoutingService struct {
	Options   []option.RequestOption
	DNS       *DNSService
	Rules     *RuleService
	Addresses *AddressService
}

EmailRoutingService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEmailRoutingService method instead.

func NewEmailRoutingService

func NewEmailRoutingService(opts ...option.RequestOption) (r *EmailRoutingService)

NewEmailRoutingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EmailRoutingService) Disable

func (r *EmailRoutingService) Disable(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailRoutingDisableResponse, err error)

Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.

func (*EmailRoutingService) Enable

func (r *EmailRoutingService) Enable(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailRoutingEnableResponse, err error)

Enable you Email Routing zone. Add and lock the necessary MX and SPF records.

func (*EmailRoutingService) Get

func (r *EmailRoutingService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailRoutingGetResponse, err error)

Get information about the settings for your Email Routing zone.

type Error

type Error = apierror.Error

type RuleCatchAllGetResponseEnvelope

type RuleCatchAllGetResponseEnvelope struct {
	Errors   []RuleCatchAllGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RuleCatchAllGetResponseEnvelopeMessages `json:"messages,required"`
	Result   EmailCatchAllRule                         `json:"result,required"`
	// Whether the API call was successful
	Success RuleCatchAllGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleCatchAllGetResponseEnvelopeJSON    `json:"-"`
}

func (*RuleCatchAllGetResponseEnvelope) UnmarshalJSON

func (r *RuleCatchAllGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleCatchAllGetResponseEnvelopeErrors

type RuleCatchAllGetResponseEnvelopeErrors struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    ruleCatchAllGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RuleCatchAllGetResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleCatchAllGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleCatchAllGetResponseEnvelopeMessages

type RuleCatchAllGetResponseEnvelopeMessages struct {
	Code    int64                                       `json:"code,required"`
	Message string                                      `json:"message,required"`
	JSON    ruleCatchAllGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RuleCatchAllGetResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleCatchAllGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleCatchAllGetResponseEnvelopeSuccess

type RuleCatchAllGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleCatchAllGetResponseEnvelopeSuccessTrue RuleCatchAllGetResponseEnvelopeSuccess = true
)

func (RuleCatchAllGetResponseEnvelopeSuccess) IsKnown

type RuleCatchAllService

type RuleCatchAllService struct {
	Options []option.RequestOption
}

RuleCatchAllService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRuleCatchAllService method instead.

func NewRuleCatchAllService

func NewRuleCatchAllService(opts ...option.RequestOption) (r *RuleCatchAllService)

NewRuleCatchAllService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RuleCatchAllService) Get

func (r *RuleCatchAllService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *EmailCatchAllRule, err error)

Get information on the default catch-all routing rule.

func (*RuleCatchAllService) Update

func (r *RuleCatchAllService) Update(ctx context.Context, zoneIdentifier string, body RuleCatchAllUpdateParams, opts ...option.RequestOption) (res *EmailCatchAllRule, err error)

Enable or disable catch-all routing rule, or change action to forward to specific destination address.

type RuleCatchAllUpdateParams

type RuleCatchAllUpdateParams struct {
	// List actions for the catch-all routing rule.
	Actions param.Field[[]RuleCatchAllUpdateParamsAction] `json:"actions,required"`
	// List of matchers for the catch-all routing rule.
	Matchers param.Field[[]RuleCatchAllUpdateParamsMatcher] `json:"matchers,required"`
	// Routing rule status.
	Enabled param.Field[RuleCatchAllUpdateParamsEnabled] `json:"enabled"`
	// Routing rule name.
	Name param.Field[string] `json:"name"`
}

func (RuleCatchAllUpdateParams) MarshalJSON

func (r RuleCatchAllUpdateParams) MarshalJSON() (data []byte, err error)

type RuleCatchAllUpdateParamsAction

type RuleCatchAllUpdateParamsAction struct {
	// Type of action for catch-all rule.
	Type  param.Field[RuleCatchAllUpdateParamsActionsType] `json:"type,required"`
	Value param.Field[[]string]                            `json:"value"`
}

Action for the catch-all routing rule.

func (RuleCatchAllUpdateParamsAction) MarshalJSON

func (r RuleCatchAllUpdateParamsAction) MarshalJSON() (data []byte, err error)

type RuleCatchAllUpdateParamsActionsType

type RuleCatchAllUpdateParamsActionsType string

Type of action for catch-all rule.

const (
	RuleCatchAllUpdateParamsActionsTypeDrop    RuleCatchAllUpdateParamsActionsType = "drop"
	RuleCatchAllUpdateParamsActionsTypeForward RuleCatchAllUpdateParamsActionsType = "forward"
	RuleCatchAllUpdateParamsActionsTypeWorker  RuleCatchAllUpdateParamsActionsType = "worker"
)

func (RuleCatchAllUpdateParamsActionsType) IsKnown

type RuleCatchAllUpdateParamsEnabled

type RuleCatchAllUpdateParamsEnabled bool

Routing rule status.

const (
	RuleCatchAllUpdateParamsEnabledTrue  RuleCatchAllUpdateParamsEnabled = true
	RuleCatchAllUpdateParamsEnabledFalse RuleCatchAllUpdateParamsEnabled = false
)

func (RuleCatchAllUpdateParamsEnabled) IsKnown

type RuleCatchAllUpdateParamsMatcher

type RuleCatchAllUpdateParamsMatcher struct {
	// Type of matcher. Default is 'all'.
	Type param.Field[RuleCatchAllUpdateParamsMatchersType] `json:"type,required"`
}

Matcher for catch-all routing rule.

func (RuleCatchAllUpdateParamsMatcher) MarshalJSON

func (r RuleCatchAllUpdateParamsMatcher) MarshalJSON() (data []byte, err error)

type RuleCatchAllUpdateParamsMatchersType

type RuleCatchAllUpdateParamsMatchersType string

Type of matcher. Default is 'all'.

const (
	RuleCatchAllUpdateParamsMatchersTypeAll RuleCatchAllUpdateParamsMatchersType = "all"
)

func (RuleCatchAllUpdateParamsMatchersType) IsKnown

type RuleCatchAllUpdateResponseEnvelope

type RuleCatchAllUpdateResponseEnvelope struct {
	Errors   []RuleCatchAllUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RuleCatchAllUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   EmailCatchAllRule                            `json:"result,required"`
	// Whether the API call was successful
	Success RuleCatchAllUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleCatchAllUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*RuleCatchAllUpdateResponseEnvelope) UnmarshalJSON

func (r *RuleCatchAllUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleCatchAllUpdateResponseEnvelopeErrors

type RuleCatchAllUpdateResponseEnvelopeErrors struct {
	Code    int64                                        `json:"code,required"`
	Message string                                       `json:"message,required"`
	JSON    ruleCatchAllUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RuleCatchAllUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleCatchAllUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleCatchAllUpdateResponseEnvelopeMessages

type RuleCatchAllUpdateResponseEnvelopeMessages struct {
	Code    int64                                          `json:"code,required"`
	Message string                                         `json:"message,required"`
	JSON    ruleCatchAllUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RuleCatchAllUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleCatchAllUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleCatchAllUpdateResponseEnvelopeSuccess

type RuleCatchAllUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleCatchAllUpdateResponseEnvelopeSuccessTrue RuleCatchAllUpdateResponseEnvelopeSuccess = true
)

func (RuleCatchAllUpdateResponseEnvelopeSuccess) IsKnown

type RuleDeleteResponse

type RuleDeleteResponse struct {
	// Routing rule identifier.
	ID string `json:"id"`
	// List actions patterns.
	Actions []RuleDeleteResponseAction `json:"actions"`
	// Routing rule status.
	Enabled RuleDeleteResponseEnabled `json:"enabled"`
	// Matching patterns to forward to your actions.
	Matchers []RuleDeleteResponseMatcher `json:"matchers"`
	// Routing rule name.
	Name string `json:"name"`
	// Priority of the routing rule.
	Priority float64 `json:"priority"`
	// Routing rule tag. (Deprecated, replaced by routing rule identifier)
	Tag  string                 `json:"tag"`
	JSON ruleDeleteResponseJSON `json:"-"`
}

func (*RuleDeleteResponse) UnmarshalJSON

func (r *RuleDeleteResponse) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseAction

type RuleDeleteResponseAction struct {
	// Type of supported action.
	Type  RuleDeleteResponseActionsType `json:"type,required"`
	Value []string                      `json:"value,required"`
	JSON  ruleDeleteResponseActionJSON  `json:"-"`
}

Actions pattern.

func (*RuleDeleteResponseAction) UnmarshalJSON

func (r *RuleDeleteResponseAction) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseActionsType

type RuleDeleteResponseActionsType string

Type of supported action.

const (
	RuleDeleteResponseActionsTypeDrop    RuleDeleteResponseActionsType = "drop"
	RuleDeleteResponseActionsTypeForward RuleDeleteResponseActionsType = "forward"
	RuleDeleteResponseActionsTypeWorker  RuleDeleteResponseActionsType = "worker"
)

func (RuleDeleteResponseActionsType) IsKnown

func (r RuleDeleteResponseActionsType) IsKnown() bool

type RuleDeleteResponseEnabled

type RuleDeleteResponseEnabled bool

Routing rule status.

const (
	RuleDeleteResponseEnabledTrue  RuleDeleteResponseEnabled = true
	RuleDeleteResponseEnabledFalse RuleDeleteResponseEnabled = false
)

func (RuleDeleteResponseEnabled) IsKnown

func (r RuleDeleteResponseEnabled) IsKnown() bool

type RuleDeleteResponseEnvelope

type RuleDeleteResponseEnvelope struct {
	Errors   []RuleDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RuleDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   RuleDeleteResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success RuleDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*RuleDeleteResponseEnvelope) UnmarshalJSON

func (r *RuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseEnvelopeErrors

type RuleDeleteResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    ruleDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RuleDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseEnvelopeMessages

type RuleDeleteResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    ruleDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RuleDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseEnvelopeSuccess

type RuleDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleDeleteResponseEnvelopeSuccessTrue RuleDeleteResponseEnvelopeSuccess = true
)

func (RuleDeleteResponseEnvelopeSuccess) IsKnown

type RuleDeleteResponseMatcher

type RuleDeleteResponseMatcher struct {
	// Field for type matcher.
	Field RuleDeleteResponseMatchersField `json:"field,required"`
	// Type of matcher.
	Type RuleDeleteResponseMatchersType `json:"type,required"`
	// Value for matcher.
	Value string                        `json:"value,required"`
	JSON  ruleDeleteResponseMatcherJSON `json:"-"`
}

Matching pattern to forward your actions.

func (*RuleDeleteResponseMatcher) UnmarshalJSON

func (r *RuleDeleteResponseMatcher) UnmarshalJSON(data []byte) (err error)

type RuleDeleteResponseMatchersField

type RuleDeleteResponseMatchersField string

Field for type matcher.

const (
	RuleDeleteResponseMatchersFieldTo RuleDeleteResponseMatchersField = "to"
)

func (RuleDeleteResponseMatchersField) IsKnown

type RuleDeleteResponseMatchersType

type RuleDeleteResponseMatchersType string

Type of matcher.

const (
	RuleDeleteResponseMatchersTypeLiteral RuleDeleteResponseMatchersType = "literal"
)

func (RuleDeleteResponseMatchersType) IsKnown

type RuleGetResponse

type RuleGetResponse struct {
	// Routing rule identifier.
	ID string `json:"id"`
	// List actions patterns.
	Actions []RuleGetResponseAction `json:"actions"`
	// Routing rule status.
	Enabled RuleGetResponseEnabled `json:"enabled"`
	// Matching patterns to forward to your actions.
	Matchers []RuleGetResponseMatcher `json:"matchers"`
	// Routing rule name.
	Name string `json:"name"`
	// Priority of the routing rule.
	Priority float64 `json:"priority"`
	// Routing rule tag. (Deprecated, replaced by routing rule identifier)
	Tag  string              `json:"tag"`
	JSON ruleGetResponseJSON `json:"-"`
}

func (*RuleGetResponse) UnmarshalJSON

func (r *RuleGetResponse) UnmarshalJSON(data []byte) (err error)

type RuleGetResponseAction

type RuleGetResponseAction struct {
	// Type of supported action.
	Type  RuleGetResponseActionsType `json:"type,required"`
	Value []string                   `json:"value,required"`
	JSON  ruleGetResponseActionJSON  `json:"-"`
}

Actions pattern.

func (*RuleGetResponseAction) UnmarshalJSON

func (r *RuleGetResponseAction) UnmarshalJSON(data []byte) (err error)

type RuleGetResponseActionsType

type RuleGetResponseActionsType string

Type of supported action.

const (
	RuleGetResponseActionsTypeDrop    RuleGetResponseActionsType = "drop"
	RuleGetResponseActionsTypeForward RuleGetResponseActionsType = "forward"
	RuleGetResponseActionsTypeWorker  RuleGetResponseActionsType = "worker"
)

func (RuleGetResponseActionsType) IsKnown

func (r RuleGetResponseActionsType) IsKnown() bool

type RuleGetResponseEnabled

type RuleGetResponseEnabled bool

Routing rule status.

const (
	RuleGetResponseEnabledTrue  RuleGetResponseEnabled = true
	RuleGetResponseEnabledFalse RuleGetResponseEnabled = false
)

func (RuleGetResponseEnabled) IsKnown

func (r RuleGetResponseEnabled) IsKnown() bool

type RuleGetResponseEnvelope

type RuleGetResponseEnvelope struct {
	Errors   []RuleGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RuleGetResponseEnvelopeMessages `json:"messages,required"`
	Result   RuleGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success RuleGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleGetResponseEnvelopeJSON    `json:"-"`
}

func (*RuleGetResponseEnvelope) UnmarshalJSON

func (r *RuleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleGetResponseEnvelopeErrors

type RuleGetResponseEnvelopeErrors struct {
	Code    int64                             `json:"code,required"`
	Message string                            `json:"message,required"`
	JSON    ruleGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RuleGetResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleGetResponseEnvelopeMessages

type RuleGetResponseEnvelopeMessages struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    ruleGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RuleGetResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleGetResponseEnvelopeSuccess

type RuleGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleGetResponseEnvelopeSuccessTrue RuleGetResponseEnvelopeSuccess = true
)

func (RuleGetResponseEnvelopeSuccess) IsKnown

type RuleGetResponseMatcher

type RuleGetResponseMatcher struct {
	// Field for type matcher.
	Field RuleGetResponseMatchersField `json:"field,required"`
	// Type of matcher.
	Type RuleGetResponseMatchersType `json:"type,required"`
	// Value for matcher.
	Value string                     `json:"value,required"`
	JSON  ruleGetResponseMatcherJSON `json:"-"`
}

Matching pattern to forward your actions.

func (*RuleGetResponseMatcher) UnmarshalJSON

func (r *RuleGetResponseMatcher) UnmarshalJSON(data []byte) (err error)

type RuleGetResponseMatchersField

type RuleGetResponseMatchersField string

Field for type matcher.

const (
	RuleGetResponseMatchersFieldTo RuleGetResponseMatchersField = "to"
)

func (RuleGetResponseMatchersField) IsKnown

func (r RuleGetResponseMatchersField) IsKnown() bool

type RuleGetResponseMatchersType

type RuleGetResponseMatchersType string

Type of matcher.

const (
	RuleGetResponseMatchersTypeLiteral RuleGetResponseMatchersType = "literal"
)

func (RuleGetResponseMatchersType) IsKnown

func (r RuleGetResponseMatchersType) IsKnown() bool

type RuleListParams

type RuleListParams struct {
	// Filter by enabled routing rules.
	Enabled param.Field[RuleListParamsEnabled] `query:"enabled"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[float64] `query:"per_page"`
}

func (RuleListParams) URLQuery

func (r RuleListParams) URLQuery() (v url.Values)

URLQuery serializes RuleListParams's query parameters as `url.Values`.

type RuleListParamsEnabled

type RuleListParamsEnabled bool

Filter by enabled routing rules.

const (
	RuleListParamsEnabledTrue  RuleListParamsEnabled = true
	RuleListParamsEnabledFalse RuleListParamsEnabled = false
)

func (RuleListParamsEnabled) IsKnown

func (r RuleListParamsEnabled) IsKnown() bool

type RuleListResponse

type RuleListResponse struct {
	// Routing rule identifier.
	ID string `json:"id"`
	// List actions patterns.
	Actions []RuleListResponseAction `json:"actions"`
	// Routing rule status.
	Enabled RuleListResponseEnabled `json:"enabled"`
	// Matching patterns to forward to your actions.
	Matchers []RuleListResponseMatcher `json:"matchers"`
	// Routing rule name.
	Name string `json:"name"`
	// Priority of the routing rule.
	Priority float64 `json:"priority"`
	// Routing rule tag. (Deprecated, replaced by routing rule identifier)
	Tag  string               `json:"tag"`
	JSON ruleListResponseJSON `json:"-"`
}

func (*RuleListResponse) UnmarshalJSON

func (r *RuleListResponse) UnmarshalJSON(data []byte) (err error)

type RuleListResponseAction

type RuleListResponseAction struct {
	// Type of supported action.
	Type  RuleListResponseActionsType `json:"type,required"`
	Value []string                    `json:"value,required"`
	JSON  ruleListResponseActionJSON  `json:"-"`
}

Actions pattern.

func (*RuleListResponseAction) UnmarshalJSON

func (r *RuleListResponseAction) UnmarshalJSON(data []byte) (err error)

type RuleListResponseActionsType

type RuleListResponseActionsType string

Type of supported action.

const (
	RuleListResponseActionsTypeDrop    RuleListResponseActionsType = "drop"
	RuleListResponseActionsTypeForward RuleListResponseActionsType = "forward"
	RuleListResponseActionsTypeWorker  RuleListResponseActionsType = "worker"
)

func (RuleListResponseActionsType) IsKnown

func (r RuleListResponseActionsType) IsKnown() bool

type RuleListResponseEnabled

type RuleListResponseEnabled bool

Routing rule status.

const (
	RuleListResponseEnabledTrue  RuleListResponseEnabled = true
	RuleListResponseEnabledFalse RuleListResponseEnabled = false
)

func (RuleListResponseEnabled) IsKnown

func (r RuleListResponseEnabled) IsKnown() bool

type RuleListResponseMatcher

type RuleListResponseMatcher struct {
	// Field for type matcher.
	Field RuleListResponseMatchersField `json:"field,required"`
	// Type of matcher.
	Type RuleListResponseMatchersType `json:"type,required"`
	// Value for matcher.
	Value string                      `json:"value,required"`
	JSON  ruleListResponseMatcherJSON `json:"-"`
}

Matching pattern to forward your actions.

func (*RuleListResponseMatcher) UnmarshalJSON

func (r *RuleListResponseMatcher) UnmarshalJSON(data []byte) (err error)

type RuleListResponseMatchersField

type RuleListResponseMatchersField string

Field for type matcher.

const (
	RuleListResponseMatchersFieldTo RuleListResponseMatchersField = "to"
)

func (RuleListResponseMatchersField) IsKnown

func (r RuleListResponseMatchersField) IsKnown() bool

type RuleListResponseMatchersType

type RuleListResponseMatchersType string

Type of matcher.

const (
	RuleListResponseMatchersTypeLiteral RuleListResponseMatchersType = "literal"
)

func (RuleListResponseMatchersType) IsKnown

func (r RuleListResponseMatchersType) IsKnown() bool

type RuleNewParams

type RuleNewParams struct {
	// List actions patterns.
	Actions param.Field[[]RuleNewParamsAction] `json:"actions,required"`
	// Matching patterns to forward to your actions.
	Matchers param.Field[[]RuleNewParamsMatcher] `json:"matchers,required"`
	// Routing rule status.
	Enabled param.Field[RuleNewParamsEnabled] `json:"enabled"`
	// Routing rule name.
	Name param.Field[string] `json:"name"`
	// Priority of the routing rule.
	Priority param.Field[float64] `json:"priority"`
}

func (RuleNewParams) MarshalJSON

func (r RuleNewParams) MarshalJSON() (data []byte, err error)

type RuleNewParamsAction

type RuleNewParamsAction struct {
	// Type of supported action.
	Type  param.Field[RuleNewParamsActionsType] `json:"type,required"`
	Value param.Field[[]string]                 `json:"value,required"`
}

Actions pattern.

func (RuleNewParamsAction) MarshalJSON

func (r RuleNewParamsAction) MarshalJSON() (data []byte, err error)

type RuleNewParamsActionsType

type RuleNewParamsActionsType string

Type of supported action.

const (
	RuleNewParamsActionsTypeDrop    RuleNewParamsActionsType = "drop"
	RuleNewParamsActionsTypeForward RuleNewParamsActionsType = "forward"
	RuleNewParamsActionsTypeWorker  RuleNewParamsActionsType = "worker"
)

func (RuleNewParamsActionsType) IsKnown

func (r RuleNewParamsActionsType) IsKnown() bool

type RuleNewParamsEnabled

type RuleNewParamsEnabled bool

Routing rule status.

const (
	RuleNewParamsEnabledTrue  RuleNewParamsEnabled = true
	RuleNewParamsEnabledFalse RuleNewParamsEnabled = false
)

func (RuleNewParamsEnabled) IsKnown

func (r RuleNewParamsEnabled) IsKnown() bool

type RuleNewParamsMatcher

type RuleNewParamsMatcher struct {
	// Field for type matcher.
	Field param.Field[RuleNewParamsMatchersField] `json:"field,required"`
	// Type of matcher.
	Type param.Field[RuleNewParamsMatchersType] `json:"type,required"`
	// Value for matcher.
	Value param.Field[string] `json:"value,required"`
}

Matching pattern to forward your actions.

func (RuleNewParamsMatcher) MarshalJSON

func (r RuleNewParamsMatcher) MarshalJSON() (data []byte, err error)

type RuleNewParamsMatchersField

type RuleNewParamsMatchersField string

Field for type matcher.

const (
	RuleNewParamsMatchersFieldTo RuleNewParamsMatchersField = "to"
)

func (RuleNewParamsMatchersField) IsKnown

func (r RuleNewParamsMatchersField) IsKnown() bool

type RuleNewParamsMatchersType

type RuleNewParamsMatchersType string

Type of matcher.

const (
	RuleNewParamsMatchersTypeLiteral RuleNewParamsMatchersType = "literal"
)

func (RuleNewParamsMatchersType) IsKnown

func (r RuleNewParamsMatchersType) IsKnown() bool

type RuleNewResponse

type RuleNewResponse struct {
	// Routing rule identifier.
	ID string `json:"id"`
	// List actions patterns.
	Actions []RuleNewResponseAction `json:"actions"`
	// Routing rule status.
	Enabled RuleNewResponseEnabled `json:"enabled"`
	// Matching patterns to forward to your actions.
	Matchers []RuleNewResponseMatcher `json:"matchers"`
	// Routing rule name.
	Name string `json:"name"`
	// Priority of the routing rule.
	Priority float64 `json:"priority"`
	// Routing rule tag. (Deprecated, replaced by routing rule identifier)
	Tag  string              `json:"tag"`
	JSON ruleNewResponseJSON `json:"-"`
}

func (*RuleNewResponse) UnmarshalJSON

func (r *RuleNewResponse) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseAction

type RuleNewResponseAction struct {
	// Type of supported action.
	Type  RuleNewResponseActionsType `json:"type,required"`
	Value []string                   `json:"value,required"`
	JSON  ruleNewResponseActionJSON  `json:"-"`
}

Actions pattern.

func (*RuleNewResponseAction) UnmarshalJSON

func (r *RuleNewResponseAction) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseActionsType

type RuleNewResponseActionsType string

Type of supported action.

const (
	RuleNewResponseActionsTypeDrop    RuleNewResponseActionsType = "drop"
	RuleNewResponseActionsTypeForward RuleNewResponseActionsType = "forward"
	RuleNewResponseActionsTypeWorker  RuleNewResponseActionsType = "worker"
)

func (RuleNewResponseActionsType) IsKnown

func (r RuleNewResponseActionsType) IsKnown() bool

type RuleNewResponseEnabled

type RuleNewResponseEnabled bool

Routing rule status.

const (
	RuleNewResponseEnabledTrue  RuleNewResponseEnabled = true
	RuleNewResponseEnabledFalse RuleNewResponseEnabled = false
)

func (RuleNewResponseEnabled) IsKnown

func (r RuleNewResponseEnabled) IsKnown() bool

type RuleNewResponseEnvelope

type RuleNewResponseEnvelope struct {
	Errors   []RuleNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RuleNewResponseEnvelopeMessages `json:"messages,required"`
	Result   RuleNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success RuleNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleNewResponseEnvelopeJSON    `json:"-"`
}

func (*RuleNewResponseEnvelope) UnmarshalJSON

func (r *RuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseEnvelopeErrors

type RuleNewResponseEnvelopeErrors struct {
	Code    int64                             `json:"code,required"`
	Message string                            `json:"message,required"`
	JSON    ruleNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RuleNewResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseEnvelopeMessages

type RuleNewResponseEnvelopeMessages struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    ruleNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RuleNewResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseEnvelopeSuccess

type RuleNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleNewResponseEnvelopeSuccessTrue RuleNewResponseEnvelopeSuccess = true
)

func (RuleNewResponseEnvelopeSuccess) IsKnown

type RuleNewResponseMatcher

type RuleNewResponseMatcher struct {
	// Field for type matcher.
	Field RuleNewResponseMatchersField `json:"field,required"`
	// Type of matcher.
	Type RuleNewResponseMatchersType `json:"type,required"`
	// Value for matcher.
	Value string                     `json:"value,required"`
	JSON  ruleNewResponseMatcherJSON `json:"-"`
}

Matching pattern to forward your actions.

func (*RuleNewResponseMatcher) UnmarshalJSON

func (r *RuleNewResponseMatcher) UnmarshalJSON(data []byte) (err error)

type RuleNewResponseMatchersField

type RuleNewResponseMatchersField string

Field for type matcher.

const (
	RuleNewResponseMatchersFieldTo RuleNewResponseMatchersField = "to"
)

func (RuleNewResponseMatchersField) IsKnown

func (r RuleNewResponseMatchersField) IsKnown() bool

type RuleNewResponseMatchersType

type RuleNewResponseMatchersType string

Type of matcher.

const (
	RuleNewResponseMatchersTypeLiteral RuleNewResponseMatchersType = "literal"
)

func (RuleNewResponseMatchersType) IsKnown

func (r RuleNewResponseMatchersType) IsKnown() bool

type RuleService

type RuleService struct {
	Options   []option.RequestOption
	CatchAlls *RuleCatchAllService
}

RuleService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRuleService method instead.

func NewRuleService

func NewRuleService(opts ...option.RequestOption) (r *RuleService)

NewRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RuleService) Delete

func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, ruleIdentifier string, opts ...option.RequestOption) (res *RuleDeleteResponse, err error)

Delete a specific routing rule.

func (*RuleService) Get

func (r *RuleService) Get(ctx context.Context, zoneIdentifier string, ruleIdentifier string, opts ...option.RequestOption) (res *RuleGetResponse, err error)

Get information for a specific routing rule already created.

func (*RuleService) List

func (r *RuleService) List(ctx context.Context, zoneIdentifier string, query RuleListParams, opts ...option.RequestOption) (res *shared.V4PagePaginationArray[RuleListResponse], err error)

Lists existing routing rules.

func (*RuleService) ListAutoPaging

Lists existing routing rules.

func (*RuleService) New

func (r *RuleService) New(ctx context.Context, zoneIdentifier string, body RuleNewParams, opts ...option.RequestOption) (res *RuleNewResponse, err error)

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).

func (*RuleService) Update

func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, ruleIdentifier string, body RuleUpdateParams, opts ...option.RequestOption) (res *RuleUpdateResponse, err error)

Update actions and matches, or enable/disable specific routing rules.

type RuleUpdateParams

type RuleUpdateParams struct {
	// List actions patterns.
	Actions param.Field[[]RuleUpdateParamsAction] `json:"actions,required"`
	// Matching patterns to forward to your actions.
	Matchers param.Field[[]RuleUpdateParamsMatcher] `json:"matchers,required"`
	// Routing rule status.
	Enabled param.Field[RuleUpdateParamsEnabled] `json:"enabled"`
	// Routing rule name.
	Name param.Field[string] `json:"name"`
	// Priority of the routing rule.
	Priority param.Field[float64] `json:"priority"`
}

func (RuleUpdateParams) MarshalJSON

func (r RuleUpdateParams) MarshalJSON() (data []byte, err error)

type RuleUpdateParamsAction

type RuleUpdateParamsAction struct {
	// Type of supported action.
	Type  param.Field[RuleUpdateParamsActionsType] `json:"type,required"`
	Value param.Field[[]string]                    `json:"value,required"`
}

Actions pattern.

func (RuleUpdateParamsAction) MarshalJSON

func (r RuleUpdateParamsAction) MarshalJSON() (data []byte, err error)

type RuleUpdateParamsActionsType

type RuleUpdateParamsActionsType string

Type of supported action.

const (
	RuleUpdateParamsActionsTypeDrop    RuleUpdateParamsActionsType = "drop"
	RuleUpdateParamsActionsTypeForward RuleUpdateParamsActionsType = "forward"
	RuleUpdateParamsActionsTypeWorker  RuleUpdateParamsActionsType = "worker"
)

func (RuleUpdateParamsActionsType) IsKnown

func (r RuleUpdateParamsActionsType) IsKnown() bool

type RuleUpdateParamsEnabled

type RuleUpdateParamsEnabled bool

Routing rule status.

const (
	RuleUpdateParamsEnabledTrue  RuleUpdateParamsEnabled = true
	RuleUpdateParamsEnabledFalse RuleUpdateParamsEnabled = false
)

func (RuleUpdateParamsEnabled) IsKnown

func (r RuleUpdateParamsEnabled) IsKnown() bool

type RuleUpdateParamsMatcher

type RuleUpdateParamsMatcher struct {
	// Field for type matcher.
	Field param.Field[RuleUpdateParamsMatchersField] `json:"field,required"`
	// Type of matcher.
	Type param.Field[RuleUpdateParamsMatchersType] `json:"type,required"`
	// Value for matcher.
	Value param.Field[string] `json:"value,required"`
}

Matching pattern to forward your actions.

func (RuleUpdateParamsMatcher) MarshalJSON

func (r RuleUpdateParamsMatcher) MarshalJSON() (data []byte, err error)

type RuleUpdateParamsMatchersField

type RuleUpdateParamsMatchersField string

Field for type matcher.

const (
	RuleUpdateParamsMatchersFieldTo RuleUpdateParamsMatchersField = "to"
)

func (RuleUpdateParamsMatchersField) IsKnown

func (r RuleUpdateParamsMatchersField) IsKnown() bool

type RuleUpdateParamsMatchersType

type RuleUpdateParamsMatchersType string

Type of matcher.

const (
	RuleUpdateParamsMatchersTypeLiteral RuleUpdateParamsMatchersType = "literal"
)

func (RuleUpdateParamsMatchersType) IsKnown

func (r RuleUpdateParamsMatchersType) IsKnown() bool

type RuleUpdateResponse

type RuleUpdateResponse struct {
	// Routing rule identifier.
	ID string `json:"id"`
	// List actions patterns.
	Actions []RuleUpdateResponseAction `json:"actions"`
	// Routing rule status.
	Enabled RuleUpdateResponseEnabled `json:"enabled"`
	// Matching patterns to forward to your actions.
	Matchers []RuleUpdateResponseMatcher `json:"matchers"`
	// Routing rule name.
	Name string `json:"name"`
	// Priority of the routing rule.
	Priority float64 `json:"priority"`
	// Routing rule tag. (Deprecated, replaced by routing rule identifier)
	Tag  string                 `json:"tag"`
	JSON ruleUpdateResponseJSON `json:"-"`
}

func (*RuleUpdateResponse) UnmarshalJSON

func (r *RuleUpdateResponse) UnmarshalJSON(data []byte) (err error)

type RuleUpdateResponseAction

type RuleUpdateResponseAction struct {
	// Type of supported action.
	Type  RuleUpdateResponseActionsType `json:"type,required"`
	Value []string                      `json:"value,required"`
	JSON  ruleUpdateResponseActionJSON  `json:"-"`
}

Actions pattern.

func (*RuleUpdateResponseAction) UnmarshalJSON

func (r *RuleUpdateResponseAction) UnmarshalJSON(data []byte) (err error)

type RuleUpdateResponseActionsType

type RuleUpdateResponseActionsType string

Type of supported action.

const (
	RuleUpdateResponseActionsTypeDrop    RuleUpdateResponseActionsType = "drop"
	RuleUpdateResponseActionsTypeForward RuleUpdateResponseActionsType = "forward"
	RuleUpdateResponseActionsTypeWorker  RuleUpdateResponseActionsType = "worker"
)

func (RuleUpdateResponseActionsType) IsKnown

func (r RuleUpdateResponseActionsType) IsKnown() bool

type RuleUpdateResponseEnabled

type RuleUpdateResponseEnabled bool

Routing rule status.

const (
	RuleUpdateResponseEnabledTrue  RuleUpdateResponseEnabled = true
	RuleUpdateResponseEnabledFalse RuleUpdateResponseEnabled = false
)

func (RuleUpdateResponseEnabled) IsKnown

func (r RuleUpdateResponseEnabled) IsKnown() bool

type RuleUpdateResponseEnvelope

type RuleUpdateResponseEnvelope struct {
	Errors   []RuleUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RuleUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   RuleUpdateResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success RuleUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    ruleUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*RuleUpdateResponseEnvelope) UnmarshalJSON

func (r *RuleUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RuleUpdateResponseEnvelopeErrors

type RuleUpdateResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    ruleUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RuleUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *RuleUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RuleUpdateResponseEnvelopeMessages

type RuleUpdateResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    ruleUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RuleUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *RuleUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RuleUpdateResponseEnvelopeSuccess

type RuleUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleUpdateResponseEnvelopeSuccessTrue RuleUpdateResponseEnvelopeSuccess = true
)

func (RuleUpdateResponseEnvelopeSuccess) IsKnown

type RuleUpdateResponseMatcher

type RuleUpdateResponseMatcher struct {
	// Field for type matcher.
	Field RuleUpdateResponseMatchersField `json:"field,required"`
	// Type of matcher.
	Type RuleUpdateResponseMatchersType `json:"type,required"`
	// Value for matcher.
	Value string                        `json:"value,required"`
	JSON  ruleUpdateResponseMatcherJSON `json:"-"`
}

Matching pattern to forward your actions.

func (*RuleUpdateResponseMatcher) UnmarshalJSON

func (r *RuleUpdateResponseMatcher) UnmarshalJSON(data []byte) (err error)

type RuleUpdateResponseMatchersField

type RuleUpdateResponseMatchersField string

Field for type matcher.

const (
	RuleUpdateResponseMatchersFieldTo RuleUpdateResponseMatchersField = "to"
)

func (RuleUpdateResponseMatchersField) IsKnown

type RuleUpdateResponseMatchersType

type RuleUpdateResponseMatchersType string

Type of matcher.

const (
	RuleUpdateResponseMatchersTypeLiteral RuleUpdateResponseMatchersType = "literal"
)

func (RuleUpdateResponseMatchersType) IsKnown

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL