Documentation
¶
Index ¶
- type ConfigDeleteParams
- type ConfigDeleteResponseEnvelope
- type ConfigDeleteResponseEnvelopeErrors
- type ConfigDeleteResponseEnvelopeMessages
- type ConfigDeleteResponseEnvelopeSuccess
- type ConfigEditParams
- type ConfigEditResponseEnvelope
- type ConfigEditResponseEnvelopeErrors
- type ConfigEditResponseEnvelopeMessages
- type ConfigEditResponseEnvelopeSuccess
- type ConfigFullGetParams
- type ConfigFullGetResponseEnvelope
- type ConfigFullGetResponseEnvelopeErrors
- type ConfigFullGetResponseEnvelopeMessages
- type ConfigFullGetResponseEnvelopeSuccess
- type ConfigFullService
- type ConfigGetParams
- type ConfigGetResponseEnvelope
- type ConfigGetResponseEnvelopeErrors
- type ConfigGetResponseEnvelopeMessages
- type ConfigGetResponseEnvelopeSuccess
- type ConfigNewParams
- type ConfigNewResponseEnvelope
- type ConfigNewResponseEnvelopeErrors
- type ConfigNewResponseEnvelopeMessages
- type ConfigNewResponseEnvelopeSuccess
- type ConfigService
- func (r *ConfigService) Delete(ctx context.Context, body ConfigDeleteParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error)
- func (r *ConfigService) Edit(ctx context.Context, body ConfigEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error)
- func (r *ConfigService) Get(ctx context.Context, query ConfigGetParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error)
- func (r *ConfigService) New(ctx context.Context, body ConfigNewParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error)
- func (r *ConfigService) Update(ctx context.Context, body ConfigUpdateParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error)
- type ConfigUpdateParams
- type ConfigUpdateResponseEnvelope
- type ConfigUpdateResponseEnvelopeErrors
- type ConfigUpdateResponseEnvelopeMessages
- type ConfigUpdateResponseEnvelopeSuccess
- type Error
- type ErrorData
- type MagicNetworkMonitoringService
- type MagicVisibilityMNMConfig
- type MagicVisibilityMNMRule
- type MagicVisibilityMNMRuleAdvertisable
- type RuleAdvertisementEditParams
- type RuleAdvertisementEditResponseEnvelope
- type RuleAdvertisementEditResponseEnvelopeErrors
- type RuleAdvertisementEditResponseEnvelopeMessages
- type RuleAdvertisementEditResponseEnvelopeSuccess
- type RuleAdvertisementService
- type RuleDeleteParams
- type RuleDeleteResponseEnvelope
- type RuleDeleteResponseEnvelopeErrors
- type RuleDeleteResponseEnvelopeMessages
- type RuleDeleteResponseEnvelopeSuccess
- type RuleEditParams
- type RuleEditResponseEnvelope
- type RuleEditResponseEnvelopeErrors
- type RuleEditResponseEnvelopeMessages
- type RuleEditResponseEnvelopeSuccess
- type RuleGetParams
- type RuleGetResponseEnvelope
- type RuleGetResponseEnvelopeErrors
- type RuleGetResponseEnvelopeMessages
- type RuleGetResponseEnvelopeSuccess
- type RuleListParams
- type RuleListResponseEnvelope
- type RuleListResponseEnvelopeErrors
- type RuleListResponseEnvelopeMessages
- type RuleListResponseEnvelopeResultInfo
- type RuleListResponseEnvelopeSuccess
- type RuleNewParams
- type RuleNewResponseEnvelope
- type RuleNewResponseEnvelopeErrors
- type RuleNewResponseEnvelopeMessages
- type RuleNewResponseEnvelopeSuccess
- type RuleService
- func (r *RuleService) Delete(ctx context.Context, ruleID string, body RuleDeleteParams, ...) (res *MagicVisibilityMNMRule, err error)
- func (r *RuleService) Edit(ctx context.Context, ruleID string, body RuleEditParams, ...) (res *MagicVisibilityMNMRule, err error)
- func (r *RuleService) Get(ctx context.Context, ruleID string, query RuleGetParams, ...) (res *MagicVisibilityMNMRule, err error)
- func (r *RuleService) List(ctx context.Context, query RuleListParams, opts ...option.RequestOption) (res *[]MagicVisibilityMNMRule, err error)
- func (r *RuleService) New(ctx context.Context, body RuleNewParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error)
- func (r *RuleService) Update(ctx context.Context, body RuleUpdateParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error)
- type RuleUpdateParams
- type RuleUpdateResponseEnvelope
- type RuleUpdateResponseEnvelopeErrors
- type RuleUpdateResponseEnvelopeMessages
- type RuleUpdateResponseEnvelopeSuccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigDeleteParams ¶
type ConfigDeleteResponseEnvelope ¶
type ConfigDeleteResponseEnvelope struct {
Errors []ConfigDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []ConfigDeleteResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMConfig `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 ConfigDeleteResponseEnvelopeErrors ¶
type ConfigDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConfigDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConfigDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConfigDeleteResponseEnvelopeMessages ¶
type ConfigDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConfigDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConfigDeleteResponseEnvelopeMessages) 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 ConfigEditResponseEnvelope ¶
type ConfigEditResponseEnvelope struct {
Errors []ConfigEditResponseEnvelopeErrors `json:"errors,required"`
Messages []ConfigEditResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMConfig `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 ConfigEditResponseEnvelopeErrors ¶
type ConfigEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConfigEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConfigEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseEnvelopeMessages ¶
type ConfigEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConfigEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConfigEditResponseEnvelopeMessages) 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 []ConfigFullGetResponseEnvelopeErrors `json:"errors,required"`
Messages []ConfigFullGetResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMConfig `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 ConfigFullGetResponseEnvelopeErrors ¶
type ConfigFullGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configFullGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConfigFullGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConfigFullGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConfigFullGetResponseEnvelopeMessages ¶
type ConfigFullGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configFullGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConfigFullGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConfigFullGetResponseEnvelopeMessages) 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 *MagicVisibilityMNMConfig, err error)
Lists default sampling, router IPs, and rules for account.
type ConfigGetParams ¶
type ConfigGetResponseEnvelope ¶
type ConfigGetResponseEnvelope struct {
Errors []ConfigGetResponseEnvelopeErrors `json:"errors,required"`
Messages []ConfigGetResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMConfig `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 ConfigGetResponseEnvelopeErrors ¶
type ConfigGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConfigGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConfigGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseEnvelopeMessages ¶
type ConfigGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConfigGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConfigGetResponseEnvelopeMessages) 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 ConfigNewResponseEnvelope ¶
type ConfigNewResponseEnvelope struct {
Errors []ConfigNewResponseEnvelopeErrors `json:"errors,required"`
Messages []ConfigNewResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMConfig `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 ConfigNewResponseEnvelopeErrors ¶
type ConfigNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConfigNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConfigNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseEnvelopeMessages ¶
type ConfigNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConfigNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConfigNewResponseEnvelopeMessages) 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 *MagicVisibilityMNMConfig, err error)
Delete an existing network monitoring configuration.
func (*ConfigService) Edit ¶
func (r *ConfigService) Edit(ctx context.Context, body ConfigEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, 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 *MagicVisibilityMNMConfig, err error)
Lists default sampling and router IPs for account.
func (*ConfigService) New ¶
func (r *ConfigService) New(ctx context.Context, body ConfigNewParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error)
Create a new network monitoring configuration.
func (*ConfigService) Update ¶
func (r *ConfigService) Update(ctx context.Context, body ConfigUpdateParams, opts ...option.RequestOption) (res *MagicVisibilityMNMConfig, err error)
Update an existing network monitoring configuration, requires the entire configuration to be updated at once.
type ConfigUpdateParams ¶
type ConfigUpdateResponseEnvelope ¶
type ConfigUpdateResponseEnvelope struct {
Errors []ConfigUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []ConfigUpdateResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMConfig `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 ConfigUpdateResponseEnvelopeErrors ¶
type ConfigUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ConfigUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ConfigUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseEnvelopeMessages ¶
type ConfigUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON configUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ConfigUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ConfigUpdateResponseEnvelopeMessages) 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 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 MagicVisibilityMNMConfig ¶
type MagicVisibilityMNMConfig 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 magicVisibilityMNMConfigJSON `json:"-"`
}
func (*MagicVisibilityMNMConfig) UnmarshalJSON ¶
func (r *MagicVisibilityMNMConfig) UnmarshalJSON(data []byte) (err error)
type MagicVisibilityMNMRule ¶
type MagicVisibilityMNMRule 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"`
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 magicVisibilityMNMRuleJSON `json:"-"`
}
func (*MagicVisibilityMNMRule) UnmarshalJSON ¶
func (r *MagicVisibilityMNMRule) UnmarshalJSON(data []byte) (err error)
type MagicVisibilityMNMRuleAdvertisable ¶
type MagicVisibilityMNMRuleAdvertisable 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 magicVisibilityMNMRuleAdvertisableJSON `json:"-"`
}
func (*MagicVisibilityMNMRuleAdvertisable) UnmarshalJSON ¶
func (r *MagicVisibilityMNMRuleAdvertisable) UnmarshalJSON(data []byte) (err error)
type RuleAdvertisementEditResponseEnvelope ¶
type RuleAdvertisementEditResponseEnvelope struct {
Errors []RuleAdvertisementEditResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleAdvertisementEditResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMRuleAdvertisable `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 RuleAdvertisementEditResponseEnvelopeErrors ¶
type RuleAdvertisementEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleAdvertisementEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleAdvertisementEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleAdvertisementEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleAdvertisementEditResponseEnvelopeMessages ¶
type RuleAdvertisementEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleAdvertisementEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleAdvertisementEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleAdvertisementEditResponseEnvelopeMessages) 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, body RuleAdvertisementEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRuleAdvertisable, err error)
Update advertisement for rule.
type RuleDeleteParams ¶
type RuleDeleteResponseEnvelope ¶
type RuleDeleteResponseEnvelope struct {
Errors []RuleDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleDeleteResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMRule `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 RuleDeleteResponseEnvelopeErrors ¶
type RuleDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeMessages ¶
type RuleDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeSuccess ¶
type RuleDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleDeleteResponseEnvelopeSuccessTrue RuleDeleteResponseEnvelopeSuccess = true
)
func (RuleDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type RuleEditParams ¶
type RuleEditResponseEnvelope ¶
type RuleEditResponseEnvelope struct {
Errors []RuleEditResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleEditResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMRule `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 RuleEditResponseEnvelopeErrors ¶
type RuleEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeMessages ¶
type RuleEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeMessages) 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 []RuleGetResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleGetResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMRule `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 RuleGetResponseEnvelopeErrors ¶
type RuleGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleGetResponseEnvelopeMessages ¶
type RuleGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleGetResponseEnvelopeSuccess ¶
type RuleGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleGetResponseEnvelopeSuccessTrue RuleGetResponseEnvelopeSuccess = true
)
func (RuleGetResponseEnvelopeSuccess) IsKnown ¶
func (r RuleGetResponseEnvelopeSuccess) IsKnown() bool
type RuleListParams ¶
type RuleListResponseEnvelope ¶
type RuleListResponseEnvelope struct {
Errors []RuleListResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleListResponseEnvelopeMessages `json:"messages,required"`
Result []MagicVisibilityMNMRule `json:"result,required,nullable"`
// Whether the API call was successful
Success RuleListResponseEnvelopeSuccess `json:"success,required"`
ResultInfo RuleListResponseEnvelopeResultInfo `json:"result_info"`
JSON ruleListResponseEnvelopeJSON `json:"-"`
}
func (*RuleListResponseEnvelope) UnmarshalJSON ¶
func (r *RuleListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleListResponseEnvelopeErrors ¶
type RuleListResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleListResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleListResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleListResponseEnvelopeMessages ¶
type RuleListResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleListResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleListResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleListResponseEnvelopeResultInfo ¶
type RuleListResponseEnvelopeResultInfo 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 ruleListResponseEnvelopeResultInfoJSON `json:"-"`
}
func (*RuleListResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *RuleListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type RuleListResponseEnvelopeSuccess ¶
type RuleListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleListResponseEnvelopeSuccessTrue RuleListResponseEnvelopeSuccess = true
)
func (RuleListResponseEnvelopeSuccess) IsKnown ¶
func (r RuleListResponseEnvelopeSuccess) IsKnown() bool
type RuleNewParams ¶
type RuleNewResponseEnvelope ¶
type RuleNewResponseEnvelope struct {
Errors []RuleNewResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleNewResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMRule `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 RuleNewResponseEnvelopeErrors ¶
type RuleNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeMessages ¶
type RuleNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeSuccess ¶
type RuleNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleNewResponseEnvelopeSuccessTrue RuleNewResponseEnvelopeSuccess = true
)
func (RuleNewResponseEnvelopeSuccess) IsKnown ¶
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 *MagicVisibilityMNMRule, err error)
Delete a network monitoring rule for account.
func (*RuleService) Edit ¶
func (r *RuleService) Edit(ctx context.Context, ruleID string, body RuleEditParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, 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 *MagicVisibilityMNMRule, 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 *[]MagicVisibilityMNMRule, err error)
Lists network monitoring rules for account.
func (*RuleService) New ¶
func (r *RuleService) New(ctx context.Context, body RuleNewParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, 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, body RuleUpdateParams, opts ...option.RequestOption) (res *MagicVisibilityMNMRule, err error)
Update network monitoring rules for account.
type RuleUpdateParams ¶
type RuleUpdateResponseEnvelope ¶
type RuleUpdateResponseEnvelope struct {
Errors []RuleUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []RuleUpdateResponseEnvelopeMessages `json:"messages,required"`
Result MagicVisibilityMNMRule `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 RuleUpdateResponseEnvelopeErrors ¶
type RuleUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*RuleUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleUpdateResponseEnvelopeMessages ¶
type RuleUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON ruleUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*RuleUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleUpdateResponseEnvelopeSuccess ¶
type RuleUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RuleUpdateResponseEnvelopeSuccessTrue RuleUpdateResponseEnvelopeSuccess = true
)
func (RuleUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r RuleUpdateResponseEnvelopeSuccess) IsKnown() bool