pagerules

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 15 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 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 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.

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 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 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 Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type MemberParam

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

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 MemberUserParam

type MemberUserParam = shared.MemberUserParam

Details of the user associated to the membership.

This is an alias to an internal type.

type PageRule

type PageRule struct {
	// Identifier
	ID string `json:"id,required"`
	// The set of actions to perform if the targets of this rule match the request.
	// Actions can redirect to another URL or override settings, but not both.
	Actions []Route `json:"actions,required"`
	// The timestamp of when the Page Rule was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// The timestamp of when the Page Rule was last modified.
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// The priority of the rule, used to define which Page Rule is processed over
	// another. A higher number indicates a higher priority. For example, if you have a
	// catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
	// take precedence (rule B: `/images/special/*`), specify a higher priority for
	// rule B so it overrides rule A.
	Priority int64 `json:"priority,required"`
	// The status of the Page Rule.
	Status PageRuleStatus `json:"status,required"`
	// The rule targets to evaluate on each request.
	Targets []Target     `json:"targets,required"`
	JSON    pageRuleJSON `json:"-"`
}

func (*PageRule) UnmarshalJSON

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

type PageRuleStatus

type PageRuleStatus string

The status of the Page Rule.

const (
	PageRuleStatusActive   PageRuleStatus = "active"
	PageRuleStatusDisabled PageRuleStatus = "disabled"
)

func (PageRuleStatus) IsKnown

func (r PageRuleStatus) IsKnown() bool

type PageruleDeleteResponse

type PageruleDeleteResponse struct {
	// Identifier
	ID   string                     `json:"id,required"`
	JSON pageruleDeleteResponseJSON `json:"-"`
}

func (*PageruleDeleteResponse) UnmarshalJSON

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

type PageruleDeleteResponseEnvelope

type PageruleDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo  `json:"errors,required"`
	Messages []shared.ResponseInfo  `json:"messages,required"`
	Result   PageruleDeleteResponse `json:"result,required,nullable"`
	// Whether the API call was successful
	Success PageruleDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    pageruleDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*PageruleDeleteResponseEnvelope) UnmarshalJSON

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

type PageruleDeleteResponseEnvelopeSuccess

type PageruleDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PageruleDeleteResponseEnvelopeSuccessTrue PageruleDeleteResponseEnvelopeSuccess = true
)

func (PageruleDeleteResponseEnvelopeSuccess) IsKnown

type PageruleEditParams

type PageruleEditParams struct {
	// The set of actions to perform if the targets of this rule match the request.
	// Actions can redirect to another URL or override settings, but not both.
	Actions param.Field[[]RouteParam] `json:"actions"`
	// The priority of the rule, used to define which Page Rule is processed over
	// another. A higher number indicates a higher priority. For example, if you have a
	// catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
	// take precedence (rule B: `/images/special/*`), specify a higher priority for
	// rule B so it overrides rule A.
	Priority param.Field[int64] `json:"priority"`
	// The status of the Page Rule.
	Status param.Field[PageruleEditParamsStatus] `json:"status"`
	// The rule targets to evaluate on each request.
	Targets param.Field[[]TargetParam] `json:"targets"`
}

func (PageruleEditParams) MarshalJSON

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

type PageruleEditParamsStatus

type PageruleEditParamsStatus string

The status of the Page Rule.

const (
	PageruleEditParamsStatusActive   PageruleEditParamsStatus = "active"
	PageruleEditParamsStatusDisabled PageruleEditParamsStatus = "disabled"
)

func (PageruleEditParamsStatus) IsKnown

func (r PageruleEditParamsStatus) IsKnown() bool

type PageruleEditResponseEnvelope

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

func (*PageruleEditResponseEnvelope) UnmarshalJSON

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

type PageruleEditResponseEnvelopeSuccess

type PageruleEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PageruleEditResponseEnvelopeSuccessTrue PageruleEditResponseEnvelopeSuccess = true
)

func (PageruleEditResponseEnvelopeSuccess) IsKnown

type PageruleEditResponseUnion

type PageruleEditResponseUnion interface {
	ImplementsPagerulesPageruleEditResponseUnion()
}

Union satisfied by pagerules.PageruleEditResponseUnknown or shared.UnionString.

type PageruleGetResponseEnvelope

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

func (*PageruleGetResponseEnvelope) UnmarshalJSON

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

type PageruleGetResponseEnvelopeSuccess

type PageruleGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PageruleGetResponseEnvelopeSuccessTrue PageruleGetResponseEnvelopeSuccess = true
)

func (PageruleGetResponseEnvelopeSuccess) IsKnown

type PageruleGetResponseUnion

type PageruleGetResponseUnion interface {
	ImplementsPagerulesPageruleGetResponseUnion()
}

Union satisfied by pagerules.PageruleGetResponseUnknown or shared.UnionString.

type PageruleListParams

type PageruleListParams struct {
	// The direction used to sort returned Page Rules.
	Direction param.Field[PageruleListParamsDirection] `query:"direction"`
	// When set to `all`, all the search requirements must match. When set to `any`,
	// only one of the search requirements has to match.
	Match param.Field[PageruleListParamsMatch] `query:"match"`
	// The field used to sort returned Page Rules.
	Order param.Field[PageruleListParamsOrder] `query:"order"`
	// The status of the Page Rule.
	Status param.Field[PageruleListParamsStatus] `query:"status"`
}

func (PageruleListParams) URLQuery

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

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

type PageruleListParamsDirection

type PageruleListParamsDirection string

The direction used to sort returned Page Rules.

const (
	PageruleListParamsDirectionAsc  PageruleListParamsDirection = "asc"
	PageruleListParamsDirectionDesc PageruleListParamsDirection = "desc"
)

func (PageruleListParamsDirection) IsKnown

func (r PageruleListParamsDirection) IsKnown() bool

type PageruleListParamsMatch

type PageruleListParamsMatch string

When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.

const (
	PageruleListParamsMatchAny PageruleListParamsMatch = "any"
	PageruleListParamsMatchAll PageruleListParamsMatch = "all"
)

func (PageruleListParamsMatch) IsKnown

func (r PageruleListParamsMatch) IsKnown() bool

type PageruleListParamsOrder

type PageruleListParamsOrder string

The field used to sort returned Page Rules.

const (
	PageruleListParamsOrderStatus   PageruleListParamsOrder = "status"
	PageruleListParamsOrderPriority PageruleListParamsOrder = "priority"
)

func (PageruleListParamsOrder) IsKnown

func (r PageruleListParamsOrder) IsKnown() bool

type PageruleListParamsStatus

type PageruleListParamsStatus string

The status of the Page Rule.

const (
	PageruleListParamsStatusActive   PageruleListParamsStatus = "active"
	PageruleListParamsStatusDisabled PageruleListParamsStatus = "disabled"
)

func (PageruleListParamsStatus) IsKnown

func (r PageruleListParamsStatus) IsKnown() bool

type PageruleListResponseEnvelope

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

func (*PageruleListResponseEnvelope) UnmarshalJSON

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

type PageruleListResponseEnvelopeSuccess

type PageruleListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PageruleListResponseEnvelopeSuccessTrue PageruleListResponseEnvelopeSuccess = true
)

func (PageruleListResponseEnvelopeSuccess) IsKnown

type PageruleNewParams

type PageruleNewParams struct {
	// The set of actions to perform if the targets of this rule match the request.
	// Actions can redirect to another URL or override settings, but not both.
	Actions param.Field[[]RouteParam] `json:"actions,required"`
	// The rule targets to evaluate on each request.
	Targets param.Field[[]TargetParam] `json:"targets,required"`
	// The priority of the rule, used to define which Page Rule is processed over
	// another. A higher number indicates a higher priority. For example, if you have a
	// catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
	// take precedence (rule B: `/images/special/*`), specify a higher priority for
	// rule B so it overrides rule A.
	Priority param.Field[int64] `json:"priority"`
	// The status of the Page Rule.
	Status param.Field[PageruleNewParamsStatus] `json:"status"`
}

func (PageruleNewParams) MarshalJSON

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

type PageruleNewParamsStatus

type PageruleNewParamsStatus string

The status of the Page Rule.

const (
	PageruleNewParamsStatusActive   PageruleNewParamsStatus = "active"
	PageruleNewParamsStatusDisabled PageruleNewParamsStatus = "disabled"
)

func (PageruleNewParamsStatus) IsKnown

func (r PageruleNewParamsStatus) IsKnown() bool

type PageruleNewResponseEnvelope

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

func (*PageruleNewResponseEnvelope) UnmarshalJSON

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

type PageruleNewResponseEnvelopeSuccess

type PageruleNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PageruleNewResponseEnvelopeSuccessTrue PageruleNewResponseEnvelopeSuccess = true
)

func (PageruleNewResponseEnvelopeSuccess) IsKnown

type PageruleNewResponseUnion

type PageruleNewResponseUnion interface {
	ImplementsPagerulesPageruleNewResponseUnion()
}

Union satisfied by pagerules.PageruleNewResponseUnknown or shared.UnionString.

type PageruleService

type PageruleService struct {
	Options  []option.RequestOption
	Settings *SettingService
}

PageruleService contains methods and other services that help with interacting with the testcloudflare 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 NewPageruleService method instead.

func NewPageruleService

func NewPageruleService(opts ...option.RequestOption) (r *PageruleService)

NewPageruleService 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 (*PageruleService) Delete deprecated

func (r *PageruleService) Delete(ctx context.Context, zoneID string, pageruleID string, opts ...option.RequestOption) (res *PageruleDeleteResponse, err error)

Deletes an existing Page Rule.

Deprecated: The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details.

func (*PageruleService) Edit deprecated

func (r *PageruleService) Edit(ctx context.Context, zoneID string, pageruleID string, body PageruleEditParams, opts ...option.RequestOption) (res *PageruleEditResponseUnion, err error)

Updates one or more fields of an existing Page Rule.

Deprecated: The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details.

func (*PageruleService) Get deprecated

func (r *PageruleService) Get(ctx context.Context, zoneID string, pageruleID string, opts ...option.RequestOption) (res *PageruleGetResponseUnion, err error)

Fetches the details of a Page Rule.

Deprecated: The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details.

func (*PageruleService) List deprecated

func (r *PageruleService) List(ctx context.Context, zoneID string, query PageruleListParams, opts ...option.RequestOption) (res *[]PageRule, err error)

Fetches Page Rules in a zone.

Deprecated: The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details.

func (*PageruleService) New deprecated

Creates a new Page Rule.

Deprecated: The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details.

func (*PageruleService) Update deprecated

func (r *PageruleService) Update(ctx context.Context, zoneID string, pageruleID string, body PageruleUpdateParams, opts ...option.RequestOption) (res *PageruleUpdateResponseUnion, err error)

Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request.

Deprecated: The Page Rules API is deprecated in favour of the Ruleset Engine. See https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#page-rules for full details.

type PageruleUpdateParams

type PageruleUpdateParams struct {
	// The set of actions to perform if the targets of this rule match the request.
	// Actions can redirect to another URL or override settings, but not both.
	Actions param.Field[[]RouteParam] `json:"actions,required"`
	// The rule targets to evaluate on each request.
	Targets param.Field[[]TargetParam] `json:"targets,required"`
	// The priority of the rule, used to define which Page Rule is processed over
	// another. A higher number indicates a higher priority. For example, if you have a
	// catch-all Page Rule (rule A: `/images/*`) but want a more specific Page Rule to
	// take precedence (rule B: `/images/special/*`), specify a higher priority for
	// rule B so it overrides rule A.
	Priority param.Field[int64] `json:"priority"`
	// The status of the Page Rule.
	Status param.Field[PageruleUpdateParamsStatus] `json:"status"`
}

func (PageruleUpdateParams) MarshalJSON

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

type PageruleUpdateParamsStatus

type PageruleUpdateParamsStatus string

The status of the Page Rule.

const (
	PageruleUpdateParamsStatusActive   PageruleUpdateParamsStatus = "active"
	PageruleUpdateParamsStatusDisabled PageruleUpdateParamsStatus = "disabled"
)

func (PageruleUpdateParamsStatus) IsKnown

func (r PageruleUpdateParamsStatus) IsKnown() bool

type PageruleUpdateResponseEnvelope

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

func (*PageruleUpdateResponseEnvelope) UnmarshalJSON

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

type PageruleUpdateResponseEnvelopeSuccess

type PageruleUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PageruleUpdateResponseEnvelopeSuccessTrue PageruleUpdateResponseEnvelopeSuccess = true
)

func (PageruleUpdateResponseEnvelopeSuccess) IsKnown

type PageruleUpdateResponseUnion

type PageruleUpdateResponseUnion interface {
	ImplementsPagerulesPageruleUpdateResponseUnion()
}

Union satisfied by pagerules.PageruleUpdateResponseUnknown or shared.UnionString.

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 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 Route

type Route struct {
	// The timestamp of when the override was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The type of route.
	Name  RouteName  `json:"name"`
	Value RouteValue `json:"value"`
	JSON  routeJSON  `json:"-"`
}

func (*Route) UnmarshalJSON

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

type RouteName

type RouteName string

The type of route.

const (
	RouteNameForwardURL RouteName = "forward_url"
)

func (RouteName) IsKnown

func (r RouteName) IsKnown() bool

type RouteParam

type RouteParam struct {
	// The type of route.
	Name  param.Field[RouteName]       `json:"name"`
	Value param.Field[RouteValueParam] `json:"value"`
}

func (RouteParam) MarshalJSON

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

type RouteValue

type RouteValue struct {
	// The response type for the URL redirect.
	Type RouteValueType `json:"type"`
	// The URL to redirect the request to. Notes: ${num} refers to the position of '\*'
	// in the constraint value.
	URL  string         `json:"url"`
	JSON routeValueJSON `json:"-"`
}

func (*RouteValue) UnmarshalJSON

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

type RouteValueParam

type RouteValueParam struct {
	// The response type for the URL redirect.
	Type param.Field[RouteValueType] `json:"type"`
	// The URL to redirect the request to. Notes: ${num} refers to the position of '\*'
	// in the constraint value.
	URL param.Field[string] `json:"url"`
}

func (RouteValueParam) MarshalJSON

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

type RouteValueType

type RouteValueType string

The response type for the URL redirect.

const (
	RouteValueTypeTemporary RouteValueType = "temporary"
	RouteValueTypePermanent RouteValueType = "permanent"
)

func (RouteValueType) IsKnown

func (r RouteValueType) IsKnown() bool

type SettingListResponse

type SettingListResponse = interface{}

type SettingListResponseEnvelope

type SettingListResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Settings available for the zone.
	Result []SettingListResponse `json:"result,required"`
	// Whether the API call was successful
	Success SettingListResponseEnvelopeSuccess `json:"success,required"`
	JSON    settingListResponseEnvelopeJSON    `json:"-"`
}

func (*SettingListResponseEnvelope) UnmarshalJSON

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

type SettingListResponseEnvelopeSuccess

type SettingListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SettingListResponseEnvelopeSuccessTrue SettingListResponseEnvelopeSuccess = true
)

func (SettingListResponseEnvelopeSuccess) IsKnown

type SettingService

type SettingService struct {
	Options []option.RequestOption
}

SettingService contains methods and other services that help with interacting with the testcloudflare 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 NewSettingService method instead.

func NewSettingService

func NewSettingService(opts ...option.RequestOption) (r *SettingService)

NewSettingService 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 (*SettingService) List

func (r *SettingService) List(ctx context.Context, zoneID string, opts ...option.RequestOption) (res *[]SettingListResponse, err error)

Returns a list of settings (and their details) that Page Rules can apply to matching requests.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Target

type Target struct {
	// String constraint.
	Constraint TargetConstraint `json:"constraint"`
	// A target based on the URL of the request.
	Target TargetTarget `json:"target"`
	JSON   targetJSON   `json:"-"`
}

URL target.

func (*Target) UnmarshalJSON

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

type TargetConstraint

type TargetConstraint struct {
	// The matches operator can use asterisks and pipes as wildcard and 'or' operators.
	Operator TargetConstraintOperator `json:"operator,required"`
	// The URL pattern to match against the current request. The pattern may contain up
	// to four asterisks ('\*') as placeholders.
	Value string               `json:"value,required"`
	JSON  targetConstraintJSON `json:"-"`
}

String constraint.

func (*TargetConstraint) UnmarshalJSON

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

type TargetConstraintOperator

type TargetConstraintOperator string

The matches operator can use asterisks and pipes as wildcard and 'or' operators.

const (
	TargetConstraintOperatorMatches    TargetConstraintOperator = "matches"
	TargetConstraintOperatorContains   TargetConstraintOperator = "contains"
	TargetConstraintOperatorEquals     TargetConstraintOperator = "equals"
	TargetConstraintOperatorNotEqual   TargetConstraintOperator = "not_equal"
	TargetConstraintOperatorNotContain TargetConstraintOperator = "not_contain"
)

func (TargetConstraintOperator) IsKnown

func (r TargetConstraintOperator) IsKnown() bool

type TargetConstraintParam

type TargetConstraintParam struct {
	// The matches operator can use asterisks and pipes as wildcard and 'or' operators.
	Operator param.Field[TargetConstraintOperator] `json:"operator,required"`
	// The URL pattern to match against the current request. The pattern may contain up
	// to four asterisks ('\*') as placeholders.
	Value param.Field[string] `json:"value,required"`
}

String constraint.

func (TargetConstraintParam) MarshalJSON

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

type TargetParam

type TargetParam struct {
	// String constraint.
	Constraint param.Field[TargetConstraintParam] `json:"constraint"`
	// A target based on the URL of the request.
	Target param.Field[TargetTarget] `json:"target"`
}

URL target.

func (TargetParam) MarshalJSON

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

type TargetTarget

type TargetTarget string

A target based on the URL of the request.

const (
	TargetTargetURL TargetTarget = "url"
)

func (TargetTarget) IsKnown

func (r TargetTarget) IsKnown() bool

Jump to

Keyboard shortcuts

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