Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type Member
- type MemberParam
- type MemberRole
- type MemberRoleParam
- type MemberRolesPermissions
- type MemberRolesPermissionsParam
- type MemberUser
- type MemberUserParam
- type PageRule
- type PageRuleStatus
- type PageruleDeleteParams
- type PageruleDeleteResponse
- type PageruleDeleteResponseEnvelope
- type PageruleDeleteResponseEnvelopeSuccess
- type PageruleEditParams
- type PageruleEditParamsStatus
- type PageruleEditResponseEnvelope
- type PageruleEditResponseEnvelopeSuccess
- type PageruleEditResponseUnion
- type PageruleGetParams
- type PageruleGetResponseEnvelope
- type PageruleGetResponseEnvelopeSuccess
- type PageruleGetResponseUnion
- type PageruleListParams
- type PageruleListParamsDirection
- type PageruleListParamsMatch
- type PageruleListParamsOrder
- type PageruleListParamsStatus
- type PageruleListResponseEnvelope
- type PageruleListResponseEnvelopeSuccess
- type PageruleNewParams
- type PageruleNewParamsStatus
- type PageruleNewResponseEnvelope
- type PageruleNewResponseEnvelopeSuccess
- type PageruleNewResponseUnion
- type PageruleService
- func (r *PageruleService) Delete(ctx context.Context, pageruleID string, body PageruleDeleteParams, ...) (res *PageruleDeleteResponse, err error)
- func (r *PageruleService) Edit(ctx context.Context, pageruleID string, params PageruleEditParams, ...) (res *PageruleEditResponseUnion, err error)
- func (r *PageruleService) Get(ctx context.Context, pageruleID string, query PageruleGetParams, ...) (res *PageruleGetResponseUnion, err error)
- func (r *PageruleService) List(ctx context.Context, params PageruleListParams, opts ...option.RequestOption) (res *[]PageRule, err error)
- func (r *PageruleService) New(ctx context.Context, params PageruleNewParams, opts ...option.RequestOption) (res *PageruleNewResponseUnion, err error)
- func (r *PageruleService) Update(ctx context.Context, pageruleID string, params PageruleUpdateParams, ...) (res *PageruleUpdateResponseUnion, err error)
- type PageruleUpdateParams
- type PageruleUpdateParamsStatus
- type PageruleUpdateResponseEnvelope
- type PageruleUpdateResponseEnvelopeSuccess
- type PageruleUpdateResponseUnion
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ResponseInfo
- type Role
- type Route
- type RouteName
- type RouteParam
- type RouteValue
- type RouteValueParam
- type RouteValueType
- type SettingListParams
- type SettingListResponse
- type SettingListResponseEnvelope
- type SettingListResponseEnvelopeSuccess
- type SettingService
- type SortDirection
- type Target
- type TargetConstraint
- type TargetConstraintOperator
- type TargetConstraintParam
- type TargetParam
- type TargetTarget
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶ added in v2.2.0
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶ added in v2.2.0
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 CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRole ¶ added in v2.1.0
type MemberRole = shared.MemberRole
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissions ¶ added in v2.1.0
type MemberRolesPermissions = shared.MemberRolesPermissions
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberUser ¶ added in v2.1.0
type MemberUser = shared.MemberUser
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
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 ¶
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 PageruleDeleteParams ¶
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 ¶
func (r PageruleDeleteResponseEnvelopeSuccess) IsKnown() bool
type PageruleEditParams ¶
type PageruleEditParams struct { // Identifier ZoneID param.Field[string] `path:"zone_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 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 ¶
func (r PageruleEditResponseEnvelopeSuccess) IsKnown() bool
type PageruleEditResponseUnion ¶
type PageruleEditResponseUnion interface {
ImplementsPagerulesPageruleEditResponseUnion()
}
Union satisfied by pagerules.PageruleEditResponseUnknown or shared.UnionString.
type PageruleGetParams ¶
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 ¶
func (r PageruleGetResponseEnvelopeSuccess) IsKnown() bool
type PageruleGetResponseUnion ¶
type PageruleGetResponseUnion interface {
ImplementsPagerulesPageruleGetResponseUnion()
}
Union satisfied by pagerules.PageruleGetResponseUnknown or shared.UnionString.
type PageruleListParams ¶
type PageruleListParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` // 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 ¶
func (r PageruleListResponseEnvelopeSuccess) IsKnown() bool
type PageruleNewParams ¶
type PageruleNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_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 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 ¶
func (r PageruleNewResponseEnvelopeSuccess) IsKnown() bool
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 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 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 ¶
func (r *PageruleService) Delete(ctx context.Context, pageruleID string, body PageruleDeleteParams, opts ...option.RequestOption) (res *PageruleDeleteResponse, err error)
Deletes an existing Page Rule.
func (*PageruleService) Edit ¶
func (r *PageruleService) Edit(ctx context.Context, pageruleID string, params PageruleEditParams, opts ...option.RequestOption) (res *PageruleEditResponseUnion, err error)
Updates one or more fields of an existing Page Rule.
func (*PageruleService) Get ¶
func (r *PageruleService) Get(ctx context.Context, pageruleID string, query PageruleGetParams, opts ...option.RequestOption) (res *PageruleGetResponseUnion, err error)
Fetches the details of a Page Rule.
func (*PageruleService) List ¶
func (r *PageruleService) List(ctx context.Context, params PageruleListParams, opts ...option.RequestOption) (res *[]PageRule, err error)
Fetches Page Rules in a zone.
func (*PageruleService) New ¶
func (r *PageruleService) New(ctx context.Context, params PageruleNewParams, opts ...option.RequestOption) (res *PageruleNewResponseUnion, err error)
Creates a new Page Rule.
func (*PageruleService) Update ¶
func (r *PageruleService) Update(ctx context.Context, pageruleID string, params 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.
type PageruleUpdateParams ¶
type PageruleUpdateParams struct { // Identifier ZoneID param.Field[string] `path:"zone_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 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 ¶
func (r PageruleUpdateResponseEnvelopeSuccess) IsKnown() bool
type PageruleUpdateResponseUnion ¶
type PageruleUpdateResponseUnion interface {
ImplementsPagerulesPageruleUpdateResponseUnion()
}
Union satisfied by pagerules.PageruleUpdateResponseUnknown or shared.UnionString.
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 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 ¶
type RouteName ¶
type RouteName string
The type of route.
const (
RouteNameForwardURL RouteName = "forward_url"
)
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 SettingListParams ¶
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 ¶
func (r SettingListResponseEnvelopeSuccess) IsKnown() bool
type SettingService ¶
type SettingService struct {
Options []option.RequestOption
}
SettingService 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 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, query SettingListParams, 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 ¶ added in v2.2.0
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 ¶
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