Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type Advertisement
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type ConfigDeleteParams
- type ConfigDeleteResponseEnvelope
- type ConfigDeleteResponseEnvelopeSuccess
- type ConfigEditParams
- type ConfigEditResponseEnvelope
- type ConfigEditResponseEnvelopeSuccess
- type ConfigFullGetParams
- type ConfigFullGetResponseEnvelope
- type ConfigFullGetResponseEnvelopeSuccess
- type ConfigFullService
- type ConfigGetParams
- type ConfigGetResponseEnvelope
- type ConfigGetResponseEnvelopeSuccess
- type ConfigNewParams
- type ConfigNewResponseEnvelope
- type ConfigNewResponseEnvelopeSuccess
- type ConfigService
- func (r *ConfigService) Delete(ctx context.Context, body ConfigDeleteParams, opts ...option.RequestOption) (res *Configuration, err error)
- func (r *ConfigService) Edit(ctx context.Context, params ConfigEditParams, opts ...option.RequestOption) (res *Configuration, err error)
- func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *Configuration, err error)
- func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *Configuration, err error)
- func (r *ConfigService) Update(ctx context.Context, params ConfigUpdateParams, opts ...option.RequestOption) (res *Configuration, err error)
- type ConfigUpdateParams
- type ConfigUpdateResponseEnvelope
- type ConfigUpdateResponseEnvelopeSuccess
- type Configuration
- type Error
- type ErrorData
- type MagicNetworkMonitoringRule
- type MagicNetworkMonitoringService
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ResponseInfo
- type Role
- type RuleAdvertisementEditParams
- type RuleAdvertisementEditResponseEnvelope
- type RuleAdvertisementEditResponseEnvelopeSuccess
- type RuleAdvertisementService
- type RuleDeleteParams
- type RuleDeleteResponseEnvelope
- type RuleDeleteResponseEnvelopeSuccess
- type RuleEditParams
- type RuleEditResponseEnvelope
- type RuleEditResponseEnvelopeSuccess
- type RuleGetParams
- type RuleGetResponseEnvelope
- type RuleGetResponseEnvelopeSuccess
- type RuleListParams
- type RuleNewParams
- type RuleNewResponseEnvelope
- type RuleNewResponseEnvelopeSuccess
- type RuleService
- func (r *RuleService) Delete(ctx context.Context, ruleID string, body RuleDeleteParams, ...) (res *MagicNetworkMonitoringRule, err error)
- func (r *RuleService) Edit(ctx context.Context, ruleID string, params RuleEditParams, ...) (res *MagicNetworkMonitoringRule, err error)
- func (r *RuleService) Get(ctx context.Context, ruleID string, query RuleGetParams, ...) (res *MagicNetworkMonitoringRule, err error)
- func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...option.RequestOption) (res *pagination.SinglePage[MagicNetworkMonitoringRule], err error)
- func (r *RuleService) ListAutoPaging(ctx context.Context, query RuleListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[MagicNetworkMonitoringRule]
- func (r *RuleService) New(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
- func (r *RuleService) Update(ctx context.Context, params RuleUpdateParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
- type RuleUpdateParams
- type RuleUpdateResponseEnvelope
- type RuleUpdateResponseEnvelopeSuccess
- type SortDirection
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 CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
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 MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
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 Advertisement ¶
type Advertisement struct { // Toggle on if you would like Cloudflare to automatically advertise the IP // Prefixes within the rule via Magic Transit when the rule is triggered. Only // available for users of Magic Transit. AutomaticAdvertisement bool `json:"automatic_advertisement,required,nullable"` JSON advertisementJSON `json:"-"` }
func (*Advertisement) UnmarshalJSON ¶
func (r *Advertisement) UnmarshalJSON(data []byte) (err error)
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 CloudflareTunnelStatus ¶ added in v2.3.0
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 ConfigDeleteParams ¶
type ConfigDeleteResponseEnvelope ¶
type ConfigDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Configuration `json:"result,required"` // Whether the API call was successful Success ConfigDeleteResponseEnvelopeSuccess `json:"success,required"` JSON configDeleteResponseEnvelopeJSON `json:"-"` }
func (*ConfigDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigDeleteResponseEnvelopeSuccess ¶
type ConfigDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConfigDeleteResponseEnvelopeSuccessTrue ConfigDeleteResponseEnvelopeSuccess = true
)
func (ConfigDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigDeleteResponseEnvelopeSuccess) IsKnown() bool
type ConfigEditParams ¶
type ConfigEditParams struct { AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (ConfigEditParams) MarshalJSON ¶
func (r ConfigEditParams) MarshalJSON() (data []byte, err error)
type ConfigEditResponseEnvelope ¶
type ConfigEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Configuration `json:"result,required"` // Whether the API call was successful Success ConfigEditResponseEnvelopeSuccess `json:"success,required"` JSON configEditResponseEnvelopeJSON `json:"-"` }
func (*ConfigEditResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseEnvelopeSuccess ¶
type ConfigEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConfigEditResponseEnvelopeSuccessTrue ConfigEditResponseEnvelopeSuccess = true
)
func (ConfigEditResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigEditResponseEnvelopeSuccess) IsKnown() bool
type ConfigFullGetParams ¶
type ConfigFullGetResponseEnvelope ¶
type ConfigFullGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Configuration `json:"result,required"` // Whether the API call was successful Success ConfigFullGetResponseEnvelopeSuccess `json:"success,required"` JSON configFullGetResponseEnvelopeJSON `json:"-"` }
func (*ConfigFullGetResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigFullGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigFullGetResponseEnvelopeSuccess ¶
type ConfigFullGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConfigFullGetResponseEnvelopeSuccessTrue ConfigFullGetResponseEnvelopeSuccess = true
)
func (ConfigFullGetResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigFullGetResponseEnvelopeSuccess) IsKnown() bool
type ConfigFullService ¶
type ConfigFullService struct {
Options []option.RequestOption
}
ConfigFullService 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 NewConfigFullService method instead.
func NewConfigFullService ¶
func NewConfigFullService(opts ...option.RequestOption) (r *ConfigFullService)
NewConfigFullService 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 (*ConfigFullService) Get ¶
func (r *ConfigFullService) Get(ctx context.Context, query ConfigFullGetParams, opts ...option.RequestOption) (res *Configuration, err error)
Lists default sampling, router IPs, and rules for account.
type ConfigGetParams ¶
type ConfigGetResponseEnvelope ¶
type ConfigGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Configuration `json:"result,required"` // Whether the API call was successful Success ConfigGetResponseEnvelopeSuccess `json:"success,required"` JSON configGetResponseEnvelopeJSON `json:"-"` }
func (*ConfigGetResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseEnvelopeSuccess ¶
type ConfigGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConfigGetResponseEnvelopeSuccessTrue ConfigGetResponseEnvelopeSuccess = true
)
func (ConfigGetResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigGetResponseEnvelopeSuccess) IsKnown() bool
type ConfigNewParams ¶
type ConfigNewParams struct { AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (ConfigNewParams) MarshalJSON ¶
func (r ConfigNewParams) MarshalJSON() (data []byte, err error)
type ConfigNewResponseEnvelope ¶
type ConfigNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Configuration `json:"result,required"` // Whether the API call was successful Success ConfigNewResponseEnvelopeSuccess `json:"success,required"` JSON configNewResponseEnvelopeJSON `json:"-"` }
func (*ConfigNewResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseEnvelopeSuccess ¶
type ConfigNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConfigNewResponseEnvelopeSuccessTrue ConfigNewResponseEnvelopeSuccess = true
)
func (ConfigNewResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigNewResponseEnvelopeSuccess) IsKnown() bool
type ConfigService ¶
type ConfigService struct { Options []option.RequestOption Full *ConfigFullService }
ConfigService 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 NewConfigService method instead.
func NewConfigService ¶
func NewConfigService(opts ...option.RequestOption) (r *ConfigService)
NewConfigService 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 (*ConfigService) Delete ¶
func (r *ConfigService) Delete(ctx context.Context, body ConfigDeleteParams, opts ...option.RequestOption) (res *Configuration, err error)
Delete an existing network monitoring configuration.
func (*ConfigService) Edit ¶
func (r *ConfigService) Edit(ctx context.Context, params ConfigEditParams, opts ...option.RequestOption) (res *Configuration, err error)
Update fields in an existing network monitoring configuration.
func (*ConfigService) Get ¶
func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *Configuration, err error)
Lists default sampling and router IPs for account.
func (*ConfigService) New ¶
func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *Configuration, err error)
Create a new network monitoring configuration.
func (*ConfigService) Update ¶
func (r *ConfigService) Update(ctx context.Context, params ConfigUpdateParams, opts ...option.RequestOption) (res *Configuration, err error)
Update an existing network monitoring configuration, requires the entire configuration to be updated at once.
type ConfigUpdateParams ¶
type ConfigUpdateParams struct { AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (ConfigUpdateParams) MarshalJSON ¶
func (r ConfigUpdateParams) MarshalJSON() (data []byte, err error)
type ConfigUpdateResponseEnvelope ¶
type ConfigUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Configuration `json:"result,required"` // Whether the API call was successful Success ConfigUpdateResponseEnvelopeSuccess `json:"success,required"` JSON configUpdateResponseEnvelopeJSON `json:"-"` }
func (*ConfigUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseEnvelopeSuccess ¶
type ConfigUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ConfigUpdateResponseEnvelopeSuccessTrue ConfigUpdateResponseEnvelopeSuccess = true
)
func (ConfigUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigUpdateResponseEnvelopeSuccess) IsKnown() bool
type Configuration ¶
type Configuration struct { // Fallback sampling rate of flow messages being sent in packets per second. This // should match the packet sampling rate configured on the router. DefaultSampling float64 `json:"default_sampling,required"` // The account name. Name string `json:"name,required"` RouterIPs []string `json:"router_ips,required"` JSON configurationJSON `json:"-"` }
func (*Configuration) UnmarshalJSON ¶
func (r *Configuration) UnmarshalJSON(data []byte) (err error)
type MagicNetworkMonitoringRule ¶
type MagicNetworkMonitoringRule struct { // Toggle on if you would like Cloudflare to automatically advertise the IP // Prefixes within the rule via Magic Transit when the rule is triggered. Only // available for users of Magic Transit. AutomaticAdvertisement bool `json:"automatic_advertisement,required,nullable"` // The amount of time that the rule threshold must be exceeded to send an alert // notification. The final value must be equivalent to one of the following 8 // values ["1m","5m","10m","15m","20m","30m","45m","60m"]. The format is // AhBmCsDmsEusFns where A, B, C, D, E and F durations are optional; however at // least one unit must be provided. Duration string `json:"duration,required"` // The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, // underscore (\_), dash (-), period (.), and tilde (~). You can’t have a space in // the rule name. Max 256 characters. Name string `json:"name,required"` Prefixes []string `json:"prefixes,required"` // The id of the rule. Must be unique. ID string `json:"id"` // The number of bits per second for the rule. When this value is exceeded for the // set duration, an alert notification is sent. Minimum of 1 and no maximum. BandwidthThreshold float64 `json:"bandwidth_threshold"` // The number of packets per second for the rule. When this value is exceeded for // the set duration, an alert notification is sent. Minimum of 1 and no maximum. PacketThreshold float64 `json:"packet_threshold"` JSON magicNetworkMonitoringRuleJSON `json:"-"` }
func (*MagicNetworkMonitoringRule) UnmarshalJSON ¶
func (r *MagicNetworkMonitoringRule) UnmarshalJSON(data []byte) (err error)
type MagicNetworkMonitoringService ¶
type MagicNetworkMonitoringService struct { Options []option.RequestOption Configs *ConfigService Rules *RuleService }
MagicNetworkMonitoringService 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 NewMagicNetworkMonitoringService method instead.
func NewMagicNetworkMonitoringService ¶
func NewMagicNetworkMonitoringService(opts ...option.RequestOption) (r *MagicNetworkMonitoringService)
NewMagicNetworkMonitoringService 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.
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
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 MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶ added in v2.3.0
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
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 RuleAdvertisementEditParams ¶
type RuleAdvertisementEditParams struct { AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (RuleAdvertisementEditParams) MarshalJSON ¶
func (r RuleAdvertisementEditParams) MarshalJSON() (data []byte, err error)
type RuleAdvertisementEditResponseEnvelope ¶
type RuleAdvertisementEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Advertisement `json:"result,required,nullable"` // Whether the API call was successful Success RuleAdvertisementEditResponseEnvelopeSuccess `json:"success,required"` JSON ruleAdvertisementEditResponseEnvelopeJSON `json:"-"` }
func (*RuleAdvertisementEditResponseEnvelope) UnmarshalJSON ¶
func (r *RuleAdvertisementEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleAdvertisementEditResponseEnvelopeSuccess ¶
type RuleAdvertisementEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleAdvertisementEditResponseEnvelopeSuccessTrue RuleAdvertisementEditResponseEnvelopeSuccess = true
)
func (RuleAdvertisementEditResponseEnvelopeSuccess) IsKnown ¶
func (r RuleAdvertisementEditResponseEnvelopeSuccess) IsKnown() bool
type RuleAdvertisementService ¶
type RuleAdvertisementService struct {
Options []option.RequestOption
}
RuleAdvertisementService 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 NewRuleAdvertisementService method instead.
func NewRuleAdvertisementService ¶
func NewRuleAdvertisementService(opts ...option.RequestOption) (r *RuleAdvertisementService)
NewRuleAdvertisementService 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 (*RuleAdvertisementService) Edit ¶
func (r *RuleAdvertisementService) Edit(ctx context.Context, ruleID string, params RuleAdvertisementEditParams, opts ...option.RequestOption) (res *Advertisement, err error)
Update advertisement for rule.
type RuleDeleteParams ¶
type RuleDeleteResponseEnvelope ¶
type RuleDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MagicNetworkMonitoringRule `json:"result,required,nullable"` // Whether the API call was successful Success RuleDeleteResponseEnvelopeSuccess `json:"success,required"` JSON ruleDeleteResponseEnvelopeJSON `json:"-"` }
func (*RuleDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeSuccess ¶
type RuleDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleDeleteResponseEnvelopeSuccessTrue RuleDeleteResponseEnvelopeSuccess = true
)
func (RuleDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type RuleEditParams ¶
type RuleEditParams struct { AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (RuleEditParams) MarshalJSON ¶
func (r RuleEditParams) MarshalJSON() (data []byte, err error)
type RuleEditResponseEnvelope ¶
type RuleEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MagicNetworkMonitoringRule `json:"result,required,nullable"` // Whether the API call was successful Success RuleEditResponseEnvelopeSuccess `json:"success,required"` JSON ruleEditResponseEnvelopeJSON `json:"-"` }
func (*RuleEditResponseEnvelope) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeSuccess ¶
type RuleEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleEditResponseEnvelopeSuccessTrue RuleEditResponseEnvelopeSuccess = true
)
func (RuleEditResponseEnvelopeSuccess) IsKnown ¶
func (r RuleEditResponseEnvelopeSuccess) IsKnown() bool
type RuleGetParams ¶
type RuleGetResponseEnvelope ¶
type RuleGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MagicNetworkMonitoringRule `json:"result,required,nullable"` // Whether the API call was successful Success RuleGetResponseEnvelopeSuccess `json:"success,required"` JSON ruleGetResponseEnvelopeJSON `json:"-"` }
func (*RuleGetResponseEnvelope) UnmarshalJSON ¶
func (r *RuleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleGetResponseEnvelopeSuccess ¶
type RuleGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleGetResponseEnvelopeSuccessTrue RuleGetResponseEnvelopeSuccess = true
)
func (RuleGetResponseEnvelopeSuccess) IsKnown ¶
func (r RuleGetResponseEnvelopeSuccess) IsKnown() bool
type RuleListParams ¶
type RuleNewParams ¶
type RuleNewParams struct { AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (RuleNewParams) MarshalJSON ¶
func (r RuleNewParams) MarshalJSON() (data []byte, err error)
type RuleNewResponseEnvelope ¶
type RuleNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MagicNetworkMonitoringRule `json:"result,required,nullable"` // Whether the API call was successful Success RuleNewResponseEnvelopeSuccess `json:"success,required"` JSON ruleNewResponseEnvelopeJSON `json:"-"` }
func (*RuleNewResponseEnvelope) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeSuccess ¶
type RuleNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleNewResponseEnvelopeSuccessTrue RuleNewResponseEnvelopeSuccess = true
)
func (RuleNewResponseEnvelopeSuccess) IsKnown ¶
func (r RuleNewResponseEnvelopeSuccess) IsKnown() bool
type RuleService ¶
type RuleService struct { Options []option.RequestOption Advertisements *RuleAdvertisementService }
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, ruleID string, body RuleDeleteParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
Delete a network monitoring rule for account.
func (*RuleService) Edit ¶
func (r *RuleService) Edit(ctx context.Context, ruleID string, params RuleEditParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
Update a network monitoring rule for account.
func (*RuleService) Get ¶
func (r *RuleService) Get(ctx context.Context, ruleID string, query RuleGetParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
List a single network monitoring rule for account.
func (*RuleService) List ¶
func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...option.RequestOption) (res *pagination.SinglePage[MagicNetworkMonitoringRule], err error)
Lists network monitoring rules for account.
func (*RuleService) ListAutoPaging ¶
func (r *RuleService) ListAutoPaging(ctx context.Context, query RuleListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[MagicNetworkMonitoringRule]
Lists network monitoring rules for account.
func (*RuleService) New ¶
func (r *RuleService) New(ctx context.Context, params RuleNewParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
Create network monitoring rules for account. Currently only supports creating a single rule per API request.
func (*RuleService) Update ¶
func (r *RuleService) Update(ctx context.Context, params RuleUpdateParams, opts ...option.RequestOption) (res *MagicNetworkMonitoringRule, err error)
Update network monitoring rules for account.
type RuleUpdateParams ¶
type RuleUpdateParams struct { AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (RuleUpdateParams) MarshalJSON ¶
func (r RuleUpdateParams) MarshalJSON() (data []byte, err error)
type RuleUpdateResponseEnvelope ¶
type RuleUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MagicNetworkMonitoringRule `json:"result,required,nullable"` // Whether the API call was successful Success RuleUpdateResponseEnvelopeSuccess `json:"success,required"` JSON ruleUpdateResponseEnvelopeJSON `json:"-"` }
func (*RuleUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *RuleUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleUpdateResponseEnvelopeSuccess ¶
type RuleUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleUpdateResponseEnvelopeSuccessTrue RuleUpdateResponseEnvelopeSuccess = true
)
func (RuleUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r RuleUpdateResponseEnvelopeSuccess) IsKnown() bool
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.