magic_network_monitoring

package
v2.0.0-beta.12 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigDeleteParams

type ConfigDeleteParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

type ConfigEditParams

type ConfigEditParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

type ConfigFullGetParams

type ConfigFullGetParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

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

Lists default sampling, router IPs, and rules for account.

type ConfigGetParams

type ConfigGetParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

type ConfigNewParams

type ConfigNewParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

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

Delete an existing network monitoring configuration.

func (*ConfigService) Edit

Update fields in an existing network monitoring configuration.

func (*ConfigService) Get

Lists default sampling and router IPs for account.

func (*ConfigService) New

Create a new network monitoring configuration.

func (*ConfigService) Update

Update an existing network monitoring configuration, requires the entire configuration to be updated at once.

type ConfigUpdateParams

type ConfigUpdateParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

type Error

type Error = apierror.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 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       interface{} `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 RuleAdvertisementEditParams

type RuleAdvertisementEditParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

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

Update advertisement for rule.

type RuleDeleteParams

type RuleDeleteParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

type RuleEditParams

type RuleEditParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

type RuleGetParams

type RuleGetParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

type RuleListParams

type RuleListParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

type RuleNewParams

type RuleNewParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

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 interface{}, 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 interface{}, 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 interface{}, 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

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 RuleUpdateParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

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

Jump to

Keyboard shortcuts

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