email_routing

package
v4.0.0-...-bae6edb Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type Action

type Action struct {
	// Type of supported action.
	Type  ActionType `json:"type,required"`
	Value []string   `json:"value,required"`
	JSON  actionJSON `json:"-"`
}

Actions pattern.

func (*Action) UnmarshalJSON

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

type ActionParam

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

Actions pattern.

func (ActionParam) MarshalJSON

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

type ActionType

type ActionType string

Type of supported action.

const (
	ActionTypeDrop    ActionType = "drop"
	ActionTypeForward ActionType = "forward"
	ActionTypeWorker  ActionType = "worker"
)

func (ActionType) IsKnown

func (r ActionType) IsKnown() bool

type Address

type Address 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     addressJSON `json:"-"`
}

func (*Address) UnmarshalJSON

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

type AddressDeleteParams

type AddressDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type AddressDeleteResponseEnvelope

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

func (*AddressDeleteResponseEnvelope) UnmarshalJSON

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

type AddressDeleteResponseEnvelopeSuccess

type AddressDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressDeleteResponseEnvelopeSuccessTrue AddressDeleteResponseEnvelopeSuccess = true
)

func (AddressDeleteResponseEnvelopeSuccess) IsKnown

type AddressGetParams

type AddressGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type AddressGetResponseEnvelope

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

func (*AddressGetResponseEnvelope) UnmarshalJSON

func (r *AddressGetResponseEnvelope) 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 {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// 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 AddressNewParams

type AddressNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// 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 AddressNewResponseEnvelope

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

func (*AddressNewResponseEnvelope) UnmarshalJSON

func (r *AddressNewResponseEnvelope) 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, destinationAddressIdentifier string, body AddressDeleteParams, opts ...option.RequestOption) (res *Address, err error)

Deletes a specific destination address.

func (*AddressService) Get

func (r *AddressService) Get(ctx context.Context, destinationAddressIdentifier string, query AddressGetParams, opts ...option.RequestOption) (res *Address, 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, params AddressNewParams, opts ...option.RequestOption) (res *Address, err error)

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

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CatchAllAction

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

Action for the catch-all routing rule.

func (*CatchAllAction) UnmarshalJSON

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

type CatchAllActionParam

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

Action for the catch-all routing rule.

func (CatchAllActionParam) MarshalJSON

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

type CatchAllActionType

type CatchAllActionType string

Type of action for catch-all rule.

const (
	CatchAllActionTypeDrop    CatchAllActionType = "drop"
	CatchAllActionTypeForward CatchAllActionType = "forward"
	CatchAllActionTypeWorker  CatchAllActionType = "worker"
)

func (CatchAllActionType) IsKnown

func (r CatchAllActionType) IsKnown() bool

type CatchAllMatcher

type CatchAllMatcher struct {
	// Type of matcher. Default is 'all'.
	Type CatchAllMatcherType `json:"type,required"`
	JSON catchAllMatcherJSON `json:"-"`
}

Matcher for catch-all routing rule.

func (*CatchAllMatcher) UnmarshalJSON

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

type CatchAllMatcherParam

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

Matcher for catch-all routing rule.

func (CatchAllMatcherParam) MarshalJSON

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

type CatchAllMatcherType

type CatchAllMatcherType string

Type of matcher. Default is 'all'.

const (
	CatchAllMatcherTypeAll CatchAllMatcherType = "all"
)

func (CatchAllMatcherType) IsKnown

func (r CatchAllMatcherType) IsKnown() bool

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type DNSDeleteParams

type DNSDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type DNSDeleteResponse

type DNSDeleteResponse struct {
	// This field can have the runtime type of [[]shared.ResponseInfo].
	Errors interface{} `json:"errors,required"`
	// This field can have the runtime type of [[]shared.ResponseInfo].
	Messages interface{} `json:"messages,required"`
	// Whether the API call was successful
	Success DNSDeleteResponseSuccess `json:"success,required"`
	// This field can have the runtime type of [[]DNSRecord].
	Result interface{} `json:"result"`
	// This field can have the runtime type of
	// [DNSDeleteResponseEmailDNSSettingsResponseCollectionResultInfo].
	ResultInfo interface{}           `json:"result_info"`
	JSON       dnsDeleteResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (DNSDeleteResponse) AsUnion

AsUnion returns a DNSDeleteResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are email_routing.DNSDeleteResponseEmailAPIResponseCommon, email_routing.DNSDeleteResponseEmailDNSSettingsResponseCollection.

func (*DNSDeleteResponse) UnmarshalJSON

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

type DNSDeleteResponseEmailAPIResponseCommon

type DNSDeleteResponseEmailAPIResponseCommon struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DNSDeleteResponseEmailAPIResponseCommonSuccess `json:"success,required"`
	JSON    dnsDeleteResponseEmailAPIResponseCommonJSON    `json:"-"`
}

func (*DNSDeleteResponseEmailAPIResponseCommon) UnmarshalJSON

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

type DNSDeleteResponseEmailAPIResponseCommonSuccess

type DNSDeleteResponseEmailAPIResponseCommonSuccess bool

Whether the API call was successful

const (
	DNSDeleteResponseEmailAPIResponseCommonSuccessTrue DNSDeleteResponseEmailAPIResponseCommonSuccess = true
)

func (DNSDeleteResponseEmailAPIResponseCommonSuccess) IsKnown

type DNSDeleteResponseEmailDNSSettingsResponseCollection

type DNSDeleteResponseEmailDNSSettingsResponseCollection struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    DNSDeleteResponseEmailDNSSettingsResponseCollectionSuccess    `json:"success,required"`
	Result     []DNSRecord                                                   `json:"result"`
	ResultInfo DNSDeleteResponseEmailDNSSettingsResponseCollectionResultInfo `json:"result_info"`
	JSON       dnsDeleteResponseEmailDNSSettingsResponseCollectionJSON       `json:"-"`
}

func (*DNSDeleteResponseEmailDNSSettingsResponseCollection) UnmarshalJSON

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

type DNSDeleteResponseEmailDNSSettingsResponseCollectionResultInfo

type DNSDeleteResponseEmailDNSSettingsResponseCollectionResultInfo 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       dnsDeleteResponseEmailDNSSettingsResponseCollectionResultInfoJSON `json:"-"`
}

func (*DNSDeleteResponseEmailDNSSettingsResponseCollectionResultInfo) UnmarshalJSON

type DNSDeleteResponseEmailDNSSettingsResponseCollectionSuccess

type DNSDeleteResponseEmailDNSSettingsResponseCollectionSuccess bool

Whether the API call was successful

const (
	DNSDeleteResponseEmailDNSSettingsResponseCollectionSuccessTrue DNSDeleteResponseEmailDNSSettingsResponseCollectionSuccess = true
)

func (DNSDeleteResponseEmailDNSSettingsResponseCollectionSuccess) IsKnown

type DNSDeleteResponseSuccess

type DNSDeleteResponseSuccess bool

Whether the API call was successful

const (
	DNSDeleteResponseSuccessTrue DNSDeleteResponseSuccess = true
)

func (DNSDeleteResponseSuccess) IsKnown

func (r DNSDeleteResponseSuccess) IsKnown() bool

type DNSDeleteResponseUnion

type DNSDeleteResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by email_routing.DNSDeleteResponseEmailAPIResponseCommon or email_routing.DNSDeleteResponseEmailDNSSettingsResponseCollection.

type DNSEditParams

type DNSEditParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Domain of your zone.
	Name param.Field[string] `json:"name,required"`
}

func (DNSEditParams) MarshalJSON

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

type DNSEditResponseEnvelope

type DNSEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DNSEditResponseEnvelopeSuccess `json:"success,required"`
	Result  Settings                       `json:"result"`
	JSON    dnsEditResponseEnvelopeJSON    `json:"-"`
}

func (*DNSEditResponseEnvelope) UnmarshalJSON

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

type DNSEditResponseEnvelopeSuccess

type DNSEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DNSEditResponseEnvelopeSuccessTrue DNSEditResponseEnvelopeSuccess = true
)

func (DNSEditResponseEnvelopeSuccess) IsKnown

type DNSGetParams

type DNSGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Domain of your zone.
	Subdomain param.Field[string] `query:"subdomain"`
}

func (DNSGetParams) URLQuery

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

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

type DNSGetResponse

type DNSGetResponse struct {
	// This field can have the runtime type of [[]shared.ResponseInfo].
	Errors interface{} `json:"errors,required"`
	// This field can have the runtime type of [[]shared.ResponseInfo].
	Messages interface{} `json:"messages,required"`
	// Whether the API call was successful
	Success DNSGetResponseSuccess `json:"success,required"`
	// This field can have the runtime type of
	// [DNSGetResponseEmailEmailRoutingDNSQueryResponseResult], [[]DNSRecord].
	Result interface{} `json:"result"`
	// This field can have the runtime type of
	// [DNSGetResponseEmailEmailRoutingDNSQueryResponseResultInfo],
	// [DNSGetResponseEmailDNSSettingsResponseCollectionResultInfo].
	ResultInfo interface{}        `json:"result_info"`
	JSON       dnsGetResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (DNSGetResponse) AsUnion

func (r DNSGetResponse) AsUnion() DNSGetResponseUnion

AsUnion returns a DNSGetResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are email_routing.DNSGetResponseEmailEmailRoutingDNSQueryResponse, email_routing.DNSGetResponseEmailDNSSettingsResponseCollection.

func (*DNSGetResponse) UnmarshalJSON

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

type DNSGetResponseEmailDNSSettingsResponseCollection

type DNSGetResponseEmailDNSSettingsResponseCollection struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    DNSGetResponseEmailDNSSettingsResponseCollectionSuccess    `json:"success,required"`
	Result     []DNSRecord                                                `json:"result"`
	ResultInfo DNSGetResponseEmailDNSSettingsResponseCollectionResultInfo `json:"result_info"`
	JSON       dnsGetResponseEmailDNSSettingsResponseCollectionJSON       `json:"-"`
}

func (*DNSGetResponseEmailDNSSettingsResponseCollection) UnmarshalJSON

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

type DNSGetResponseEmailDNSSettingsResponseCollectionResultInfo

type DNSGetResponseEmailDNSSettingsResponseCollectionResultInfo 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       dnsGetResponseEmailDNSSettingsResponseCollectionResultInfoJSON `json:"-"`
}

func (*DNSGetResponseEmailDNSSettingsResponseCollectionResultInfo) UnmarshalJSON

type DNSGetResponseEmailDNSSettingsResponseCollectionSuccess

type DNSGetResponseEmailDNSSettingsResponseCollectionSuccess bool

Whether the API call was successful

const (
	DNSGetResponseEmailDNSSettingsResponseCollectionSuccessTrue DNSGetResponseEmailDNSSettingsResponseCollectionSuccess = true
)

func (DNSGetResponseEmailDNSSettingsResponseCollectionSuccess) IsKnown

type DNSGetResponseEmailEmailRoutingDNSQueryResponse

type DNSGetResponseEmailEmailRoutingDNSQueryResponse struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    DNSGetResponseEmailEmailRoutingDNSQueryResponseSuccess    `json:"success,required"`
	Result     DNSGetResponseEmailEmailRoutingDNSQueryResponseResult     `json:"result"`
	ResultInfo DNSGetResponseEmailEmailRoutingDNSQueryResponseResultInfo `json:"result_info"`
	JSON       dnsGetResponseEmailEmailRoutingDNSQueryResponseJSON       `json:"-"`
}

func (*DNSGetResponseEmailEmailRoutingDNSQueryResponse) UnmarshalJSON

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

type DNSGetResponseEmailEmailRoutingDNSQueryResponseResult

type DNSGetResponseEmailEmailRoutingDNSQueryResponseResult struct {
	Errors []DNSGetResponseEmailEmailRoutingDNSQueryResponseResultError `json:"errors"`
	Record []DNSRecord                                                  `json:"record"`
	JSON   dnsGetResponseEmailEmailRoutingDNSQueryResponseResultJSON    `json:"-"`
}

func (*DNSGetResponseEmailEmailRoutingDNSQueryResponseResult) UnmarshalJSON

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

type DNSGetResponseEmailEmailRoutingDNSQueryResponseResultError

type DNSGetResponseEmailEmailRoutingDNSQueryResponseResultError struct {
	Code string `json:"code"`
	// List of records needed to enable an Email Routing zone.
	Missing DNSRecord                                                      `json:"missing"`
	JSON    dnsGetResponseEmailEmailRoutingDNSQueryResponseResultErrorJSON `json:"-"`
}

func (*DNSGetResponseEmailEmailRoutingDNSQueryResponseResultError) UnmarshalJSON

type DNSGetResponseEmailEmailRoutingDNSQueryResponseResultInfo

type DNSGetResponseEmailEmailRoutingDNSQueryResponseResultInfo 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       dnsGetResponseEmailEmailRoutingDNSQueryResponseResultInfoJSON `json:"-"`
}

func (*DNSGetResponseEmailEmailRoutingDNSQueryResponseResultInfo) UnmarshalJSON

type DNSGetResponseEmailEmailRoutingDNSQueryResponseSuccess

type DNSGetResponseEmailEmailRoutingDNSQueryResponseSuccess bool

Whether the API call was successful

const (
	DNSGetResponseEmailEmailRoutingDNSQueryResponseSuccessTrue DNSGetResponseEmailEmailRoutingDNSQueryResponseSuccess = true
)

func (DNSGetResponseEmailEmailRoutingDNSQueryResponseSuccess) IsKnown

type DNSGetResponseSuccess

type DNSGetResponseSuccess bool

Whether the API call was successful

const (
	DNSGetResponseSuccessTrue DNSGetResponseSuccess = true
)

func (DNSGetResponseSuccess) IsKnown

func (r DNSGetResponseSuccess) IsKnown() bool

type DNSGetResponseUnion

type DNSGetResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by email_routing.DNSGetResponseEmailEmailRoutingDNSQueryResponse or email_routing.DNSGetResponseEmailDNSSettingsResponseCollection.

type DNSNewParams

type DNSNewParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Domain of your zone.
	Name param.Field[string] `json:"name,required"`
}

func (DNSNewParams) MarshalJSON

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

type DNSNewResponseEnvelope

type DNSNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success DNSNewResponseEnvelopeSuccess `json:"success,required"`
	Result  Settings                      `json:"result"`
	JSON    dnsNewResponseEnvelopeJSON    `json:"-"`
}

func (*DNSNewResponseEnvelope) UnmarshalJSON

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

type DNSNewResponseEnvelopeSuccess

type DNSNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DNSNewResponseEnvelopeSuccessTrue DNSNewResponseEnvelopeSuccess = true
)

func (DNSNewResponseEnvelopeSuccess) IsKnown

func (r DNSNewResponseEnvelopeSuccess) IsKnown() bool

type DNSRecord

type DNSRecord 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 DNSRecordTTL `json:"ttl"`
	// DNS record type.
	Type DNSRecordType `json:"type"`
	JSON dnsRecordJSON `json:"-"`
}

List of records needed to enable an Email Routing zone.

func (*DNSRecord) UnmarshalJSON

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

type DNSRecordTTL

type DNSRecordTTL float64

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

const (
	DNSRecordTTL1 DNSRecordTTL = 1
)

func (DNSRecordTTL) IsKnown

func (r DNSRecordTTL) IsKnown() bool

type DNSRecordType

type DNSRecordType string

DNS record type.

const (
	DNSRecordTypeA      DNSRecordType = "A"
	DNSRecordTypeAAAA   DNSRecordType = "AAAA"
	DNSRecordTypeCNAME  DNSRecordType = "CNAME"
	DNSRecordTypeHTTPS  DNSRecordType = "HTTPS"
	DNSRecordTypeTXT    DNSRecordType = "TXT"
	DNSRecordTypeSRV    DNSRecordType = "SRV"
	DNSRecordTypeLOC    DNSRecordType = "LOC"
	DNSRecordTypeMX     DNSRecordType = "MX"
	DNSRecordTypeNS     DNSRecordType = "NS"
	DNSRecordTypeCERT   DNSRecordType = "CERT"
	DNSRecordTypeDNSKEY DNSRecordType = "DNSKEY"
	DNSRecordTypeDS     DNSRecordType = "DS"
	DNSRecordTypeNAPTR  DNSRecordType = "NAPTR"
	DNSRecordTypeSMIMEA DNSRecordType = "SMIMEA"
	DNSRecordTypeSSHFP  DNSRecordType = "SSHFP"
	DNSRecordTypeSVCB   DNSRecordType = "SVCB"
	DNSRecordTypeTLSA   DNSRecordType = "TLSA"
	DNSRecordTypeURI    DNSRecordType = "URI"
)

func (DNSRecordType) IsKnown

func (r DNSRecordType) 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) Delete

func (r *DNSService) Delete(ctx context.Context, body DNSDeleteParams, opts ...option.RequestOption) (res *DNSDeleteResponse, err error)

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

func (*DNSService) Edit

func (r *DNSService) Edit(ctx context.Context, params DNSEditParams, opts ...option.RequestOption) (res *Settings, err error)

Unlock MX Records previously locked by Email Routing.

func (*DNSService) Get

func (r *DNSService) Get(ctx context.Context, params DNSGetParams, opts ...option.RequestOption) (res *DNSGetResponse, err error)

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

func (*DNSService) New

func (r *DNSService) New(ctx context.Context, params DNSNewParams, opts ...option.RequestOption) (res *Settings, err error)

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

type EmailRoutingDisableParams

type EmailRoutingDisableParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	Body   interface{}         `json:"body,required"`
}

func (EmailRoutingDisableParams) MarshalJSON

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

type EmailRoutingDisableResponseEnvelope

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

func (*EmailRoutingDisableResponseEnvelope) UnmarshalJSON

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

type EmailRoutingDisableResponseEnvelopeSuccess

type EmailRoutingDisableResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	EmailRoutingDisableResponseEnvelopeSuccessTrue EmailRoutingDisableResponseEnvelopeSuccess = true
)

func (EmailRoutingDisableResponseEnvelopeSuccess) IsKnown

type EmailRoutingEnableParams

type EmailRoutingEnableParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	Body   interface{}         `json:"body,required"`
}

func (EmailRoutingEnableParams) MarshalJSON

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

type EmailRoutingEnableResponseEnvelope

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

func (*EmailRoutingEnableResponseEnvelope) UnmarshalJSON

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

type EmailRoutingEnableResponseEnvelopeSuccess

type EmailRoutingEnableResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	EmailRoutingEnableResponseEnvelopeSuccessTrue EmailRoutingEnableResponseEnvelopeSuccess = true
)

func (EmailRoutingEnableResponseEnvelopeSuccess) IsKnown

type EmailRoutingGetParams

type EmailRoutingGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type EmailRoutingGetResponseEnvelope

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

func (*EmailRoutingGetResponseEnvelope) UnmarshalJSON

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

type EmailRoutingGetResponseEnvelopeSuccess

type EmailRoutingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	EmailRoutingGetResponseEnvelopeSuccessTrue EmailRoutingGetResponseEnvelopeSuccess = true
)

func (EmailRoutingGetResponseEnvelopeSuccess) IsKnown

type EmailRoutingRule

type EmailRoutingRule struct {
	// Routing rule identifier.
	ID string `json:"id"`
	// List actions patterns.
	Actions []Action `json:"actions"`
	// Routing rule status.
	Enabled EmailRoutingRuleEnabled `json:"enabled"`
	// Matching patterns to forward to your actions.
	Matchers []Matcher `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 emailRoutingRuleJSON `json:"-"`
}

func (*EmailRoutingRule) UnmarshalJSON

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

type EmailRoutingRuleEnabled

type EmailRoutingRuleEnabled bool

Routing rule status.

const (
	EmailRoutingRuleEnabledTrue  EmailRoutingRuleEnabled = true
	EmailRoutingRuleEnabledFalse EmailRoutingRuleEnabled = false
)

func (EmailRoutingRuleEnabled) IsKnown

func (r EmailRoutingRuleEnabled) 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, params EmailRoutingDisableParams, opts ...option.RequestOption) (res *Settings, 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, params EmailRoutingEnableParams, opts ...option.RequestOption) (res *Settings, err error)

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

func (*EmailRoutingService) Get

Get information about the settings for your Email Routing zone.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type Matcher

type Matcher struct {
	// Field for type matcher.
	Field MatcherField `json:"field,required"`
	// Type of matcher.
	Type MatcherType `json:"type,required"`
	// Value for matcher.
	Value string      `json:"value,required"`
	JSON  matcherJSON `json:"-"`
}

Matching pattern to forward your actions.

func (*Matcher) UnmarshalJSON

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

type MatcherField

type MatcherField string

Field for type matcher.

const (
	MatcherFieldTo MatcherField = "to"
)

func (MatcherField) IsKnown

func (r MatcherField) IsKnown() bool

type MatcherParam

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

Matching pattern to forward your actions.

func (MatcherParam) MarshalJSON

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

type MatcherType

type MatcherType string

Type of matcher.

const (
	MatcherTypeLiteral MatcherType = "literal"
)

func (MatcherType) IsKnown

func (r MatcherType) IsKnown() bool

type Member

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

A scope is a combination of scope objects which provides additional context.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

A scope object represents any resource that can have actions applied against invite.

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type RuleCatchAllGetParams

type RuleCatchAllGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RuleCatchAllGetResponse

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

func (*RuleCatchAllGetResponse) UnmarshalJSON

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

type RuleCatchAllGetResponseEnabled

type RuleCatchAllGetResponseEnabled bool

Routing rule status.

const (
	RuleCatchAllGetResponseEnabledTrue  RuleCatchAllGetResponseEnabled = true
	RuleCatchAllGetResponseEnabledFalse RuleCatchAllGetResponseEnabled = false
)

func (RuleCatchAllGetResponseEnabled) IsKnown

type RuleCatchAllGetResponseEnvelope

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

func (*RuleCatchAllGetResponseEnvelope) UnmarshalJSON

func (r *RuleCatchAllGetResponseEnvelope) 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

Get information on the default catch-all routing rule.

func (*RuleCatchAllService) Update

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

type RuleCatchAllUpdateParams

type RuleCatchAllUpdateParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// List actions for the catch-all routing rule.
	Actions param.Field[[]CatchAllActionParam] `json:"actions,required"`
	// List of matchers for the catch-all routing rule.
	Matchers param.Field[[]CatchAllMatcherParam] `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 RuleCatchAllUpdateParamsEnabled

type RuleCatchAllUpdateParamsEnabled bool

Routing rule status.

const (
	RuleCatchAllUpdateParamsEnabledTrue  RuleCatchAllUpdateParamsEnabled = true
	RuleCatchAllUpdateParamsEnabledFalse RuleCatchAllUpdateParamsEnabled = false
)

func (RuleCatchAllUpdateParamsEnabled) IsKnown

type RuleCatchAllUpdateResponse

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

func (*RuleCatchAllUpdateResponse) UnmarshalJSON

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

type RuleCatchAllUpdateResponseEnabled

type RuleCatchAllUpdateResponseEnabled bool

Routing rule status.

const (
	RuleCatchAllUpdateResponseEnabledTrue  RuleCatchAllUpdateResponseEnabled = true
	RuleCatchAllUpdateResponseEnabledFalse RuleCatchAllUpdateResponseEnabled = false
)

func (RuleCatchAllUpdateResponseEnabled) IsKnown

type RuleCatchAllUpdateResponseEnvelope

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

func (*RuleCatchAllUpdateResponseEnvelope) UnmarshalJSON

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

type RuleCatchAllUpdateResponseEnvelopeSuccess

type RuleCatchAllUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleCatchAllUpdateResponseEnvelopeSuccessTrue RuleCatchAllUpdateResponseEnvelopeSuccess = true
)

func (RuleCatchAllUpdateResponseEnvelopeSuccess) IsKnown

type RuleDeleteParams

type RuleDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RuleDeleteResponseEnvelope

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

func (*RuleDeleteResponseEnvelope) UnmarshalJSON

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

type RuleDeleteResponseEnvelopeSuccess

type RuleDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleDeleteResponseEnvelopeSuccessTrue RuleDeleteResponseEnvelopeSuccess = true
)

func (RuleDeleteResponseEnvelopeSuccess) IsKnown

type RuleGetParams

type RuleGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RuleGetResponseEnvelope

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

func (*RuleGetResponseEnvelope) UnmarshalJSON

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

type RuleGetResponseEnvelopeSuccess

type RuleGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleGetResponseEnvelopeSuccessTrue RuleGetResponseEnvelopeSuccess = true
)

func (RuleGetResponseEnvelopeSuccess) IsKnown

type RuleListParams

type RuleListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// 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 RuleNewParams

type RuleNewParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// List actions patterns.
	Actions param.Field[[]ActionParam] `json:"actions,required"`
	// Matching patterns to forward to your actions.
	Matchers param.Field[[]MatcherParam] `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 RuleNewParamsEnabled

type RuleNewParamsEnabled bool

Routing rule status.

const (
	RuleNewParamsEnabledTrue  RuleNewParamsEnabled = true
	RuleNewParamsEnabledFalse RuleNewParamsEnabled = false
)

func (RuleNewParamsEnabled) IsKnown

func (r RuleNewParamsEnabled) IsKnown() bool

type RuleNewResponseEnvelope

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

func (*RuleNewResponseEnvelope) UnmarshalJSON

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

type RuleNewResponseEnvelopeSuccess

type RuleNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleNewResponseEnvelopeSuccessTrue RuleNewResponseEnvelopeSuccess = true
)

func (RuleNewResponseEnvelopeSuccess) IsKnown

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, ruleIdentifier string, body RuleDeleteParams, opts ...option.RequestOption) (res *EmailRoutingRule, err error)

Delete a specific routing rule.

func (*RuleService) Get

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

Get information for a specific routing rule already created.

func (*RuleService) List

Lists existing routing rules.

func (*RuleService) ListAutoPaging

Lists existing routing rules.

func (*RuleService) New

func (r *RuleService) New(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) (res *EmailRoutingRule, 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, ruleIdentifier string, params RuleUpdateParams, opts ...option.RequestOption) (res *EmailRoutingRule, err error)

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

type RuleUpdateParams

type RuleUpdateParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// List actions patterns.
	Actions param.Field[[]ActionParam] `json:"actions,required"`
	// Matching patterns to forward to your actions.
	Matchers param.Field[[]MatcherParam] `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 RuleUpdateParamsEnabled

type RuleUpdateParamsEnabled bool

Routing rule status.

const (
	RuleUpdateParamsEnabledTrue  RuleUpdateParamsEnabled = true
	RuleUpdateParamsEnabledFalse RuleUpdateParamsEnabled = false
)

func (RuleUpdateParamsEnabled) IsKnown

func (r RuleUpdateParamsEnabled) IsKnown() bool

type RuleUpdateResponseEnvelope

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

func (*RuleUpdateResponseEnvelope) UnmarshalJSON

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

type RuleUpdateResponseEnvelopeSuccess

type RuleUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RuleUpdateResponseEnvelopeSuccessTrue RuleUpdateResponseEnvelopeSuccess = true
)

func (RuleUpdateResponseEnvelopeSuccess) IsKnown

type Settings

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

func (*Settings) UnmarshalJSON

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

type SettingsEnabled

type SettingsEnabled bool

State of the zone settings for Email Routing.

const (
	SettingsEnabledTrue  SettingsEnabled = true
	SettingsEnabledFalse SettingsEnabled = false
)

func (SettingsEnabled) IsKnown

func (r SettingsEnabled) IsKnown() bool

type SettingsSkipWizard

type SettingsSkipWizard bool

Flag to check if the user skipped the configuration wizard.

const (
	SettingsSkipWizardTrue  SettingsSkipWizard = true
	SettingsSkipWizardFalse SettingsSkipWizard = false
)

func (SettingsSkipWizard) IsKnown

func (r SettingsSkipWizard) IsKnown() bool

type SettingsStatus

type SettingsStatus string

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

const (
	SettingsStatusReady               SettingsStatus = "ready"
	SettingsStatusUnconfigured        SettingsStatus = "unconfigured"
	SettingsStatusMisconfigured       SettingsStatus = "misconfigured"
	SettingsStatusMisconfiguredLocked SettingsStatus = "misconfigured/locked"
	SettingsStatusUnlocked            SettingsStatus = "unlocked"
)

func (SettingsStatus) IsKnown

func (r SettingsStatus) IsKnown() bool

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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