magic_transit

package
v7.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation ¶

Index ¶

Constants ¶

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type ACL ¶

type ACL struct {
	// Identifier
	ID string `json:"id"`
	// Description for the ACL.
	Description string `json:"description"`
	// The desired forwarding action for this ACL policy. If set to "false", the policy
	// will forward traffic to Cloudflare. If set to "true", the policy will forward
	// traffic locally on the Magic Connector. If not included in request, will default
	// to false.
	ForwardLocally bool             `json:"forward_locally"`
	LAN1           ACLConfiguration `json:"lan_1"`
	LAN2           ACLConfiguration `json:"lan_2"`
	// The name of the ACL.
	Name      string            `json:"name"`
	Protocols []AllowedProtocol `json:"protocols"`
	// The desired traffic direction for this ACL policy. If set to "false", the policy
	// will allow bidirectional traffic. If set to "true", the policy will only allow
	// traffic in one direction. If not included in request, will default to false.
	Unidirectional bool    `json:"unidirectional"`
	JSON           aclJSON `json:"-"`
}

Bidirectional ACL policy for network traffic within a site.

func (*ACL) UnmarshalJSON ¶

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

type ACLConfiguration ¶

type ACLConfiguration struct {
	// The identifier for the LAN you want to create an ACL policy with.
	LANID string `json:"lan_id" api:"required"`
	// The name of the LAN based on the provided lan_id.
	LANName string `json:"lan_name"`
	// Array of port ranges on the provided LAN that will be included in the ACL. If no
	// ports or port rangess are provided, communication on any port on this LAN is
	// allowed.
	PortRanges []string `json:"port_ranges"`
	// Array of ports on the provided LAN that will be included in the ACL. If no ports
	// or port ranges are provided, communication on any port on this LAN is allowed.
	Ports []int64 `json:"ports"`
	// Array of subnet IPs within the LAN that will be included in the ACL. If no
	// subnets are provided, communication on any subnets on this LAN are allowed.
	Subnets []Subnet             `json:"subnets"`
	JSON    aclConfigurationJSON `json:"-"`
}

func (*ACLConfiguration) UnmarshalJSON ¶

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

type ACLConfigurationParam ¶

type ACLConfigurationParam struct {
	// The identifier for the LAN you want to create an ACL policy with.
	LANID param.Field[string] `json:"lan_id" api:"required"`
	// The name of the LAN based on the provided lan_id.
	LANName param.Field[string] `json:"lan_name"`
	// Array of port ranges on the provided LAN that will be included in the ACL. If no
	// ports or port rangess are provided, communication on any port on this LAN is
	// allowed.
	PortRanges param.Field[[]string] `json:"port_ranges"`
	// Array of ports on the provided LAN that will be included in the ACL. If no ports
	// or port ranges are provided, communication on any port on this LAN is allowed.
	Ports param.Field[[]int64] `json:"ports"`
	// Array of subnet IPs within the LAN that will be included in the ACL. If no
	// subnets are provided, communication on any subnets on this LAN are allowed.
	Subnets param.Field[[]SubnetParam] `json:"subnets"`
}

func (ACLConfigurationParam) MarshalJSON ¶

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

type ASN ¶

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam ¶

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AllowedProtocol ¶

type AllowedProtocol string

Array of allowed communication protocols between configured LANs. If no protocols are provided, all protocols are allowed.

const (
	AllowedProtocolTCP  AllowedProtocol = "tcp"
	AllowedProtocolUdp  AllowedProtocol = "udp"
	AllowedProtocolIcmp AllowedProtocol = "icmp"
)

func (AllowedProtocol) IsKnown ¶

func (r AllowedProtocol) IsKnown() bool

type AppDeleteParams ¶

type AppDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type AppDeleteResponse ¶

type AppDeleteResponse struct {
	// Magic account app ID.
	AccountAppID string `json:"account_app_id" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets []string `json:"source_subnets"`
	// Category of the app.
	Type string                `json:"type"`
	JSON appDeleteResponseJSON `json:"-"`
}

Custom app defined for an account.

func (*AppDeleteResponse) UnmarshalJSON ¶

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

type AppDeleteResponseEnvelope ¶

type AppDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Custom app defined for an account.
	Result AppDeleteResponse `json:"result" api:"required,nullable"`
	// Whether the API call was successful
	Success AppDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    appDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*AppDeleteResponseEnvelope) UnmarshalJSON ¶

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

type AppDeleteResponseEnvelopeSuccess ¶

type AppDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AppDeleteResponseEnvelopeSuccessTrue AppDeleteResponseEnvelopeSuccess = true
)

func (AppDeleteResponseEnvelopeSuccess) IsKnown ¶

type AppEditParams ¶

type AppEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames param.Field[[]string] `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets param.Field[[]string] `json:"ip_subnets"`
	// Display name for the app.
	Name param.Field[string] `json:"name"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets param.Field[[]string] `json:"source_subnets"`
	// Category of the app.
	Type param.Field[string] `json:"type"`
}

func (AppEditParams) MarshalJSON ¶

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

type AppEditResponse ¶

type AppEditResponse struct {
	// Magic account app ID.
	AccountAppID string `json:"account_app_id" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets []string `json:"source_subnets"`
	// Category of the app.
	Type string              `json:"type"`
	JSON appEditResponseJSON `json:"-"`
}

Custom app defined for an account.

func (*AppEditResponse) UnmarshalJSON ¶

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

type AppEditResponseEnvelope ¶

type AppEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Custom app defined for an account.
	Result AppEditResponse `json:"result" api:"required,nullable"`
	// Whether the API call was successful
	Success AppEditResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    appEditResponseEnvelopeJSON    `json:"-"`
}

func (*AppEditResponseEnvelope) UnmarshalJSON ¶

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

type AppEditResponseEnvelopeSuccess ¶

type AppEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AppEditResponseEnvelopeSuccessTrue AppEditResponseEnvelopeSuccess = true
)

func (AppEditResponseEnvelopeSuccess) IsKnown ¶

type AppListParams ¶

type AppListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type AppListResponse ¶

type AppListResponse struct {
	// Magic account app ID.
	AccountAppID string `json:"account_app_id"`
	// This field can have the runtime type of [[]string].
	Hostnames interface{} `json:"hostnames"`
	// This field can have the runtime type of [[]string].
	IPSubnets interface{} `json:"ip_subnets"`
	// Managed app ID.
	ManagedAppID string `json:"managed_app_id"`
	// Display name for the app.
	Name string `json:"name"`
	// This field can have the runtime type of [[]string].
	SourceSubnets interface{} `json:"source_subnets"`
	// Category of the app.
	Type string              `json:"type"`
	JSON appListResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

Collection of Hostnames and/or IP Subnets to associate with traffic decisions.

func (AppListResponse) AsUnion ¶

AsUnion returns a AppListResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are AppListResponseMagicAccountApp, AppListResponseMagicManagedApp.

func (*AppListResponse) UnmarshalJSON ¶

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

type AppListResponseMagicAccountApp ¶

type AppListResponseMagicAccountApp struct {
	// Magic account app ID.
	AccountAppID string `json:"account_app_id" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets []string `json:"source_subnets"`
	// Category of the app.
	Type string                             `json:"type"`
	JSON appListResponseMagicAccountAppJSON `json:"-"`
}

Custom app defined for an account.

func (*AppListResponseMagicAccountApp) UnmarshalJSON ¶

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

type AppListResponseMagicManagedApp ¶

type AppListResponseMagicManagedApp struct {
	// Managed app ID.
	ManagedAppID string `json:"managed_app_id" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets []string `json:"source_subnets"`
	// Category of the app.
	Type string                             `json:"type"`
	JSON appListResponseMagicManagedAppJSON `json:"-"`
}

Managed app defined by Cloudflare.

func (*AppListResponseMagicManagedApp) UnmarshalJSON ¶

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

type AppListResponseUnion ¶

type AppListResponseUnion interface {
	// contains filtered or unexported methods
}

Collection of Hostnames and/or IP Subnets to associate with traffic decisions.

Union satisfied by AppListResponseMagicAccountApp or AppListResponseMagicManagedApp.

type AppNewParams ¶

type AppNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Display name for the app.
	Name param.Field[string] `json:"name" api:"required"`
	// Category of the app.
	Type param.Field[string] `json:"type" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames param.Field[[]string] `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets param.Field[[]string] `json:"ip_subnets"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets param.Field[[]string] `json:"source_subnets"`
}

func (AppNewParams) MarshalJSON ¶

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

type AppNewResponse ¶

type AppNewResponse struct {
	// Magic account app ID.
	AccountAppID string `json:"account_app_id" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets []string `json:"source_subnets"`
	// Category of the app.
	Type string             `json:"type"`
	JSON appNewResponseJSON `json:"-"`
}

Custom app defined for an account.

func (*AppNewResponse) UnmarshalJSON ¶

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

type AppNewResponseEnvelope ¶

type AppNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Custom app defined for an account.
	Result AppNewResponse `json:"result" api:"required,nullable"`
	// Whether the API call was successful
	Success AppNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    appNewResponseEnvelopeJSON    `json:"-"`
}

func (*AppNewResponseEnvelope) UnmarshalJSON ¶

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

type AppNewResponseEnvelopeSuccess ¶

type AppNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AppNewResponseEnvelopeSuccessTrue AppNewResponseEnvelopeSuccess = true
)

func (AppNewResponseEnvelopeSuccess) IsKnown ¶

func (r AppNewResponseEnvelopeSuccess) IsKnown() bool

type AppService ¶

type AppService struct {
	Options []option.RequestOption
}

AppService 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 NewAppService method instead.

func NewAppService ¶

func NewAppService(opts ...option.RequestOption) (r *AppService)

NewAppService 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 (*AppService) Delete ¶

func (r *AppService) Delete(ctx context.Context, accountAppID string, body AppDeleteParams, opts ...option.RequestOption) (res *AppDeleteResponse, err error)

Deletes specific Account App.

func (*AppService) Edit ¶

func (r *AppService) Edit(ctx context.Context, accountAppID string, params AppEditParams, opts ...option.RequestOption) (res *AppEditResponse, err error)

Updates an Account App

func (*AppService) List ¶

Lists Apps associated with an account.

func (*AppService) ListAutoPaging ¶

Lists Apps associated with an account.

func (*AppService) New ¶

func (r *AppService) New(ctx context.Context, params AppNewParams, opts ...option.RequestOption) (res *AppNewResponse, err error)

Creates a new App for an account

func (*AppService) Update ¶

func (r *AppService) Update(ctx context.Context, accountAppID string, params AppUpdateParams, opts ...option.RequestOption) (res *AppUpdateResponse, err error)

Updates an Account App

type AppUpdateParams ¶

type AppUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames param.Field[[]string] `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets param.Field[[]string] `json:"ip_subnets"`
	// Display name for the app.
	Name param.Field[string] `json:"name"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets param.Field[[]string] `json:"source_subnets"`
	// Category of the app.
	Type param.Field[string] `json:"type"`
}

func (AppUpdateParams) MarshalJSON ¶

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

type AppUpdateResponse ¶

type AppUpdateResponse struct {
	// Magic account app ID.
	AccountAppID string `json:"account_app_id" api:"required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// IPv4 CIDRs to associate with traffic decisions. (IPv6 CIDRs are currently
	// unsupported)
	SourceSubnets []string `json:"source_subnets"`
	// Category of the app.
	Type string                `json:"type"`
	JSON appUpdateResponseJSON `json:"-"`
}

Custom app defined for an account.

func (*AppUpdateResponse) UnmarshalJSON ¶

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

type AppUpdateResponseEnvelope ¶

type AppUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Custom app defined for an account.
	Result AppUpdateResponse `json:"result" api:"required,nullable"`
	// Whether the API call was successful
	Success AppUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    appUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*AppUpdateResponseEnvelope) UnmarshalJSON ¶

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

type AppUpdateResponseEnvelopeSuccess ¶

type AppUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AppUpdateResponseEnvelopeSuccessTrue AppUpdateResponseEnvelopeSuccess = true
)

func (AppUpdateResponseEnvelopeSuccess) IsKnown ¶

type AuditLog ¶

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction ¶

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor ¶

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType ¶

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner ¶

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource ¶

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CertificateCA ¶

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate.

This is an alias to an internal type.

type CertificateRequestType ¶

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type Cf1Site ¶ added in v7.6.0

type Cf1Site struct {
	// A human-provided name describing the CF1 Site that should be unique within the
	// account.
	Name string `json:"name" api:"required"`
	// Identifier
	ID        string    `json:"id"`
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// A human-provided description of the CF1 Site.
	Description string          `json:"description"`
	Location    Cf1SiteLocation `json:"location"`
	ModifiedOn  time.Time       `json:"modified_on" format:"date-time"`
	JSON        cf1SiteJSON     `json:"-"`
}

func (*Cf1Site) UnmarshalJSON ¶ added in v7.6.0

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

type Cf1SiteDeleteParams ¶ added in v7.6.0

type Cf1SiteDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type Cf1SiteDeleteResponseEnvelope ¶ added in v7.6.0

type Cf1SiteDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Cf1Site               `json:"result" api:"required"`
	// Whether the API call was successful
	Success Cf1SiteDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cf1SiteDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*Cf1SiteDeleteResponseEnvelope) UnmarshalJSON ¶ added in v7.6.0

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

type Cf1SiteDeleteResponseEnvelopeSuccess ¶ added in v7.6.0

type Cf1SiteDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	Cf1SiteDeleteResponseEnvelopeSuccessTrue Cf1SiteDeleteResponseEnvelopeSuccess = true
)

func (Cf1SiteDeleteResponseEnvelopeSuccess) IsKnown ¶ added in v7.6.0

type Cf1SiteGetParams ¶ added in v7.6.0

type Cf1SiteGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type Cf1SiteGetResponseEnvelope ¶ added in v7.6.0

type Cf1SiteGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Cf1Site               `json:"result" api:"required"`
	// Whether the API call was successful
	Success Cf1SiteGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cf1SiteGetResponseEnvelopeJSON    `json:"-"`
}

func (*Cf1SiteGetResponseEnvelope) UnmarshalJSON ¶ added in v7.6.0

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

type Cf1SiteGetResponseEnvelopeSuccess ¶ added in v7.6.0

type Cf1SiteGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	Cf1SiteGetResponseEnvelopeSuccessTrue Cf1SiteGetResponseEnvelopeSuccess = true
)

func (Cf1SiteGetResponseEnvelopeSuccess) IsKnown ¶ added in v7.6.0

type Cf1SiteListParams ¶ added in v7.6.0

type Cf1SiteListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type Cf1SiteLocation ¶ added in v7.6.0

type Cf1SiteLocation struct {
	// Latitude of the CF1 Site.
	Lat float64 `json:"lat"`
	// Longitude of the CF1 Site.
	Long float64 `json:"long"`
	// Name of nearest town, city, or village.
	Name string              `json:"name"`
	JSON cf1SiteLocationJSON `json:"-"`
}

func (*Cf1SiteLocation) UnmarshalJSON ¶ added in v7.6.0

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

type Cf1SiteLocationParam ¶ added in v7.6.0

type Cf1SiteLocationParam struct {
	// Latitude of the CF1 Site.
	Lat param.Field[float64] `json:"lat"`
	// Longitude of the CF1 Site.
	Long param.Field[float64] `json:"long"`
	// Name of nearest town, city, or village.
	Name param.Field[string] `json:"name"`
}

func (Cf1SiteLocationParam) MarshalJSON ¶ added in v7.6.0

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

type Cf1SiteNewParams ¶ added in v7.6.0

type Cf1SiteNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	Body      []Cf1SiteParam      `json:"body" api:"required"`
}

func (Cf1SiteNewParams) MarshalJSON ¶ added in v7.6.0

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

type Cf1SiteParam ¶ added in v7.6.0

type Cf1SiteParam struct {
	// A human-provided name describing the CF1 Site that should be unique within the
	// account.
	Name param.Field[string] `json:"name" api:"required"`
	// A human-provided description of the CF1 Site.
	Description param.Field[string]               `json:"description"`
	Location    param.Field[Cf1SiteLocationParam] `json:"location"`
}

func (Cf1SiteParam) MarshalJSON ¶ added in v7.6.0

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

type Cf1SiteRampDeleteParams ¶ added in v7.6.0

type Cf1SiteRampDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type Cf1SiteRampDeleteResponseEnvelope ¶ added in v7.6.0

type Cf1SiteRampDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Ramp                  `json:"result" api:"required"`
	// Whether the API call was successful
	Success Cf1SiteRampDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cf1SiteRampDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*Cf1SiteRampDeleteResponseEnvelope) UnmarshalJSON ¶ added in v7.6.0

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

type Cf1SiteRampDeleteResponseEnvelopeSuccess ¶ added in v7.6.0

type Cf1SiteRampDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	Cf1SiteRampDeleteResponseEnvelopeSuccessTrue Cf1SiteRampDeleteResponseEnvelopeSuccess = true
)

func (Cf1SiteRampDeleteResponseEnvelopeSuccess) IsKnown ¶ added in v7.6.0

type Cf1SiteRampGetParams ¶ added in v7.6.0

type Cf1SiteRampGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type Cf1SiteRampGetResponseEnvelope ¶ added in v7.6.0

type Cf1SiteRampGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Ramp                  `json:"result" api:"required"`
	// Whether the API call was successful
	Success Cf1SiteRampGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cf1SiteRampGetResponseEnvelopeJSON    `json:"-"`
}

func (*Cf1SiteRampGetResponseEnvelope) UnmarshalJSON ¶ added in v7.6.0

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

type Cf1SiteRampGetResponseEnvelopeSuccess ¶ added in v7.6.0

type Cf1SiteRampGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	Cf1SiteRampGetResponseEnvelopeSuccessTrue Cf1SiteRampGetResponseEnvelopeSuccess = true
)

func (Cf1SiteRampGetResponseEnvelopeSuccess) IsKnown ¶ added in v7.6.0

type Cf1SiteRampListParams ¶ added in v7.6.0

type Cf1SiteRampListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type Cf1SiteRampNewParams ¶ added in v7.6.0

type Cf1SiteRampNewParams struct {
	// Identifier
	AccountID param.Field[string]        `path:"account_id" api:"required"`
	Body      []Cf1SiteRampNewParamsBody `json:"body" api:"required"`
}

func (Cf1SiteRampNewParams) MarshalJSON ¶ added in v7.6.0

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

type Cf1SiteRampNewParamsBody ¶ added in v7.6.0

type Cf1SiteRampNewParamsBody struct {
	// Identifier of the source network resource to associate as a ramp.
	SourceRampID param.Field[string] `json:"source_ramp_id" api:"required"`
	// The type of network connection (ramp) linking a CF1 Site to Cloudflare's
	// network.
	Type param.Field[RampType] `json:"type" api:"required"`
}

func (Cf1SiteRampNewParamsBody) MarshalJSON ¶ added in v7.6.0

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

type Cf1SiteRampService ¶ added in v7.6.0

type Cf1SiteRampService struct {
	Options []option.RequestOption
}

Cf1SiteRampService 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 NewCf1SiteRampService method instead.

func NewCf1SiteRampService ¶ added in v7.6.0

func NewCf1SiteRampService(opts ...option.RequestOption) (r *Cf1SiteRampService)

NewCf1SiteRampService 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 (*Cf1SiteRampService) Delete ¶ added in v7.6.0

func (r *Cf1SiteRampService) Delete(ctx context.Context, cf1SiteID string, rampID string, body Cf1SiteRampDeleteParams, opts ...option.RequestOption) (res *Ramp, err error)

Deletes a specific ramp from a CF1 Site.

func (*Cf1SiteRampService) Get ¶ added in v7.6.0

func (r *Cf1SiteRampService) Get(ctx context.Context, cf1SiteID string, rampID string, query Cf1SiteRampGetParams, opts ...option.RequestOption) (res *Ramp, err error)

Gets a specific ramp for a CF1 Site.

func (*Cf1SiteRampService) List ¶ added in v7.6.0

func (r *Cf1SiteRampService) List(ctx context.Context, cf1SiteID string, query Cf1SiteRampListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Ramp], err error)

Lists ramps (network connections) associated with a CF1 Site. Ramps represent GRE tunnels, IPsec tunnels, interconnects, or MCONN links.

func (*Cf1SiteRampService) ListAutoPaging ¶ added in v7.6.0

Lists ramps (network connections) associated with a CF1 Site. Ramps represent GRE tunnels, IPsec tunnels, interconnects, or MCONN links.

func (*Cf1SiteRampService) New ¶ added in v7.6.0

func (r *Cf1SiteRampService) New(ctx context.Context, cf1SiteID string, params Cf1SiteRampNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[Ramp], err error)

Creates ramps (network connections) for a CF1 Site.

func (*Cf1SiteRampService) NewAutoPaging ¶ added in v7.6.0

Creates ramps (network connections) for a CF1 Site.

type Cf1SiteService ¶ added in v7.6.0

type Cf1SiteService struct {
	Options []option.RequestOption
	Ramps   *Cf1SiteRampService
}

Cf1SiteService 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 NewCf1SiteService method instead.

func NewCf1SiteService ¶ added in v7.6.0

func NewCf1SiteService(opts ...option.RequestOption) (r *Cf1SiteService)

NewCf1SiteService 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 (*Cf1SiteService) Delete ¶ added in v7.6.0

func (r *Cf1SiteService) Delete(ctx context.Context, cf1SiteID string, body Cf1SiteDeleteParams, opts ...option.RequestOption) (res *Cf1Site, err error)

Deletes a specific CF1 Site for an account.

func (*Cf1SiteService) Get ¶ added in v7.6.0

func (r *Cf1SiteService) Get(ctx context.Context, cf1SiteID string, query Cf1SiteGetParams, opts ...option.RequestOption) (res *Cf1Site, err error)

Gets a specific CF1 Site for an account.

func (*Cf1SiteService) List ¶ added in v7.6.0

Lists CF1 Sites associated with an account. A CF1 Site represents a physical customer network location with optional geographic coordinates.

func (*Cf1SiteService) ListAutoPaging ¶ added in v7.6.0

Lists CF1 Sites associated with an account. A CF1 Site represents a physical customer network location with optional geographic coordinates.

func (*Cf1SiteService) New ¶ added in v7.6.0

Creates new CF1 Sites for an account. Each site must have a unique name within the account.

func (*Cf1SiteService) NewAutoPaging ¶ added in v7.6.0

Creates new CF1 Sites for an account. Each site must have a unique name within the account.

func (*Cf1SiteService) Update ¶ added in v7.6.0

func (r *Cf1SiteService) Update(ctx context.Context, cf1SiteID string, params Cf1SiteUpdateParams, opts ...option.RequestOption) (res *Cf1Site, err error)

Partially updates a specific CF1 Site for an account. Only the fields included in the request body are modified; omitted fields retain their existing values.

type Cf1SiteUpdateParams ¶ added in v7.6.0

type Cf1SiteUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// A human-provided description of the CF1 Site.
	Description param.Field[string]               `json:"description"`
	Location    param.Field[Cf1SiteLocationParam] `json:"location"`
	// A human-provided name describing the CF1 Site that should be unique within the
	// account.
	Name param.Field[string] `json:"name"`
}

func (Cf1SiteUpdateParams) MarshalJSON ¶ added in v7.6.0

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

type Cf1SiteUpdateResponseEnvelope ¶ added in v7.6.0

type Cf1SiteUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Cf1Site               `json:"result" api:"required"`
	// Whether the API call was successful
	Success Cf1SiteUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cf1SiteUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*Cf1SiteUpdateResponseEnvelope) UnmarshalJSON ¶ added in v7.6.0

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

type Cf1SiteUpdateResponseEnvelopeSuccess ¶ added in v7.6.0

type Cf1SiteUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	Cf1SiteUpdateResponseEnvelopeSuccessTrue Cf1SiteUpdateResponseEnvelopeSuccess = true
)

func (Cf1SiteUpdateResponseEnvelopeSuccess) IsKnown ¶ added in v7.6.0

type CfInterconnectBulkUpdateParams ¶

type CfInterconnectBulkUpdateParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	Body              interface{}         `json:"body" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

func (CfInterconnectBulkUpdateParams) MarshalJSON ¶

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

type CfInterconnectBulkUpdateResponse ¶

type CfInterconnectBulkUpdateResponse struct {
	Modified              bool                                                   `json:"modified"`
	ModifiedInterconnects []CfInterconnectBulkUpdateResponseModifiedInterconnect `json:"modified_interconnects"`
	JSON                  cfInterconnectBulkUpdateResponseJSON                   `json:"-"`
}

func (*CfInterconnectBulkUpdateResponse) UnmarshalJSON ¶

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

type CfInterconnectBulkUpdateResponseEnvelope ¶

type CfInterconnectBulkUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo            `json:"errors" api:"required"`
	Messages []shared.ResponseInfo            `json:"messages" api:"required"`
	Result   CfInterconnectBulkUpdateResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success CfInterconnectBulkUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cfInterconnectBulkUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*CfInterconnectBulkUpdateResponseEnvelope) UnmarshalJSON ¶

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

type CfInterconnectBulkUpdateResponseEnvelopeSuccess ¶

type CfInterconnectBulkUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CfInterconnectBulkUpdateResponseEnvelopeSuccessTrue CfInterconnectBulkUpdateResponseEnvelopeSuccess = true
)

func (CfInterconnectBulkUpdateResponseEnvelopeSuccess) IsKnown ¶

type CfInterconnectBulkUpdateResponseModifiedInterconnect ¶

type CfInterconnectBulkUpdateResponseModifiedInterconnect struct {
	// Identifier
	ID string `json:"id"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                                     `json:"automatic_return_routing"`
	BGP                    CfInterconnectBulkUpdateResponseModifiedInterconnectsBGP `json:"bgp"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	ColoName string `json:"colo_name"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the interconnect.
	Description string `json:"description"`
	// Omitted in responses for version 1.5 interconnects.
	GRE         CfInterconnectBulkUpdateResponseModifiedInterconnectsGRE         `json:"gre"`
	HealthCheck CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheck `json:"health_check"`
	// The IPv4 interface address for the interconnect. For MPLS Interconnects, use a
	// /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix may be used.
	// Version 1.5 interconnects require a /31 prefix and may also use a prefix from
	// the account's authorized prefixes; otherwise, select the subnet from RFC 1918 or
	// the approved link-local ranges.
	InterfaceAddress string `json:"interface_address"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
	// value is 576.
	Mtu int64 `json:"mtu"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	Name string `json:"name"`
	// Immutable interconnect version configured at creation time. One of:
	//
	// - "1"
	// - "1.5"
	// - "2"
	Version string `json:"version"`
	// An identifier that correlates this interconnect with the corresponding V2 CNI
	// interconnect resource.
	VirtualPortReservationID string                                                   `json:"virtual_port_reservation_id"`
	JSON                     cfInterconnectBulkUpdateResponseModifiedInterconnectJSON `json:"-"`
}

func (*CfInterconnectBulkUpdateResponseModifiedInterconnect) UnmarshalJSON ¶

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

type CfInterconnectBulkUpdateResponseModifiedInterconnectsBGP ¶ added in v7.9.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsBGP struct {
	// Deprecated. Use customer_asn.
	//
	// Deprecated: deprecated
	AsNo int64 `json:"as_no"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CloudflareEndpoint string `json:"cloudflare_endpoint" format:"ipv4"`
	// ASN used on the customer end of the BGP session.
	CustomerASN int64 `json:"customer_asn"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CustomerEndpoint string `json:"customer_endpoint" format:"ipv4"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                                       `json:"md5_key"`
	JSON   cfInterconnectBulkUpdateResponseModifiedInterconnectsBGPJSON `json:"-"`
}

func (*CfInterconnectBulkUpdateResponseModifiedInterconnectsBGP) UnmarshalJSON ¶ added in v7.9.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsGRE ¶

type CfInterconnectBulkUpdateResponseModifiedInterconnectsGRE struct {
	// The IP address assigned to the Cloudflare side of the GRE tunnel created as part
	// of the Interconnect.
	CloudflareEndpoint string                                                       `json:"cloudflare_endpoint"`
	JSON               cfInterconnectBulkUpdateResponseModifiedInterconnectsGREJSON `json:"-"`
}

Omitted in responses for version 1.5 interconnects.

func (*CfInterconnectBulkUpdateResponseModifiedInterconnectsGRE) UnmarshalJSON ¶

type CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheck ¶ added in v7.10.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the interconnect and the result comes back to Cloudflare
	// via the open Internet, or bidirectional where both the probe and result come and
	// go via the interconnect.
	Direction CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The source IPv4 address used for bidirectional health checks. Supported only for
	// version 1.5 interconnects. It is required when `direction` is `bidirectional`
	// and must be omitted (and is cleared) when `direction` is `unidirectional`. The
	// address must be within RFC1918 space, the approved link-local range
	// 169.254.240.0/20, or the Cloudflare reserved range 198.41.199.224/27.
	Source string `json:"source"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                                      `json:"type"`
	JSON cfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckJSON `json:"-"`
}

func (*CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheck) UnmarshalJSON ¶ added in v7.10.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckDirection ¶ added in v7.10.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the interconnect and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the interconnect.

const (
	CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckDirectionUnidirectional CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckDirection = "unidirectional"
	CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckDirectionBidirectional  CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckDirection = "bidirectional"
)

func (CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckDirection) IsKnown ¶ added in v7.10.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetMagicHealthCheckTarget ¶ added in v7.10.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                                           `json:"saved"`
	JSON  cfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetUnion ¶ added in v7.10.0

func (r CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetUnion()

func (*CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶ added in v7.10.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetUnion ¶ added in v7.10.0

type CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetUnion interface {
	ImplementsCfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by CfInterconnectBulkUpdateResponseModifiedInterconnectsHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type CfInterconnectGetParams ¶

type CfInterconnectGetParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type CfInterconnectGetResponse ¶

type CfInterconnectGetResponse struct {
	Interconnect CfInterconnectGetResponseInterconnect `json:"interconnect"`
	JSON         cfInterconnectGetResponseJSON         `json:"-"`
}

func (*CfInterconnectGetResponse) UnmarshalJSON ¶

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

type CfInterconnectGetResponseEnvelope ¶

type CfInterconnectGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo     `json:"errors" api:"required"`
	Messages []shared.ResponseInfo     `json:"messages" api:"required"`
	Result   CfInterconnectGetResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success CfInterconnectGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cfInterconnectGetResponseEnvelopeJSON    `json:"-"`
}

func (*CfInterconnectGetResponseEnvelope) UnmarshalJSON ¶

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

type CfInterconnectGetResponseEnvelopeSuccess ¶

type CfInterconnectGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CfInterconnectGetResponseEnvelopeSuccessTrue CfInterconnectGetResponseEnvelopeSuccess = true
)

func (CfInterconnectGetResponseEnvelopeSuccess) IsKnown ¶

type CfInterconnectGetResponseInterconnect ¶

type CfInterconnectGetResponseInterconnect struct {
	// Identifier
	ID string `json:"id"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                     `json:"automatic_return_routing"`
	BGP                    CfInterconnectGetResponseInterconnectBGP `json:"bgp"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	ColoName string `json:"colo_name"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the interconnect.
	Description string `json:"description"`
	// Omitted in responses for version 1.5 interconnects.
	GRE         CfInterconnectGetResponseInterconnectGRE         `json:"gre"`
	HealthCheck CfInterconnectGetResponseInterconnectHealthCheck `json:"health_check"`
	// The IPv4 interface address for the interconnect. For MPLS Interconnects, use a
	// /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix may be used.
	// Version 1.5 interconnects require a /31 prefix and may also use a prefix from
	// the account's authorized prefixes; otherwise, select the subnet from RFC 1918 or
	// the approved link-local ranges.
	InterfaceAddress string `json:"interface_address"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
	// value is 576.
	Mtu int64 `json:"mtu"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	Name string `json:"name"`
	// Immutable interconnect version configured at creation time. One of:
	//
	// - "1"
	// - "1.5"
	// - "2"
	Version string `json:"version"`
	// An identifier that correlates this interconnect with the corresponding V2 CNI
	// interconnect resource.
	VirtualPortReservationID string                                    `json:"virtual_port_reservation_id"`
	JSON                     cfInterconnectGetResponseInterconnectJSON `json:"-"`
}

func (*CfInterconnectGetResponseInterconnect) UnmarshalJSON ¶

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

type CfInterconnectGetResponseInterconnectBGP ¶ added in v7.9.0

type CfInterconnectGetResponseInterconnectBGP struct {
	// Deprecated. Use customer_asn.
	//
	// Deprecated: deprecated
	AsNo int64 `json:"as_no"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CloudflareEndpoint string `json:"cloudflare_endpoint" format:"ipv4"`
	// ASN used on the customer end of the BGP session.
	CustomerASN int64 `json:"customer_asn"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CustomerEndpoint string `json:"customer_endpoint" format:"ipv4"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                       `json:"md5_key"`
	JSON   cfInterconnectGetResponseInterconnectBGPJSON `json:"-"`
}

func (*CfInterconnectGetResponseInterconnectBGP) UnmarshalJSON ¶ added in v7.9.0

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

type CfInterconnectGetResponseInterconnectGRE ¶

type CfInterconnectGetResponseInterconnectGRE struct {
	// The IP address assigned to the Cloudflare side of the GRE tunnel created as part
	// of the Interconnect.
	CloudflareEndpoint string                                       `json:"cloudflare_endpoint"`
	JSON               cfInterconnectGetResponseInterconnectGREJSON `json:"-"`
}

Omitted in responses for version 1.5 interconnects.

func (*CfInterconnectGetResponseInterconnectGRE) UnmarshalJSON ¶

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

type CfInterconnectGetResponseInterconnectHealthCheck ¶ added in v7.10.0

type CfInterconnectGetResponseInterconnectHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the interconnect and the result comes back to Cloudflare
	// via the open Internet, or bidirectional where both the probe and result come and
	// go via the interconnect.
	Direction CfInterconnectGetResponseInterconnectHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The source IPv4 address used for bidirectional health checks. Supported only for
	// version 1.5 interconnects. It is required when `direction` is `bidirectional`
	// and must be omitted (and is cleared) when `direction` is `unidirectional`. The
	// address must be within RFC1918 space, the approved link-local range
	// 169.254.240.0/20, or the Cloudflare reserved range 198.41.199.224/27.
	Source string `json:"source"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target CfInterconnectGetResponseInterconnectHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                      `json:"type"`
	JSON cfInterconnectGetResponseInterconnectHealthCheckJSON `json:"-"`
}

func (*CfInterconnectGetResponseInterconnectHealthCheck) UnmarshalJSON ¶ added in v7.10.0

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

type CfInterconnectGetResponseInterconnectHealthCheckDirection ¶ added in v7.10.0

type CfInterconnectGetResponseInterconnectHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the interconnect and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the interconnect.

const (
	CfInterconnectGetResponseInterconnectHealthCheckDirectionUnidirectional CfInterconnectGetResponseInterconnectHealthCheckDirection = "unidirectional"
	CfInterconnectGetResponseInterconnectHealthCheckDirectionBidirectional  CfInterconnectGetResponseInterconnectHealthCheckDirection = "bidirectional"
)

func (CfInterconnectGetResponseInterconnectHealthCheckDirection) IsKnown ¶ added in v7.10.0

type CfInterconnectGetResponseInterconnectHealthCheckTargetMagicHealthCheckTarget ¶ added in v7.10.0

type CfInterconnectGetResponseInterconnectHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                           `json:"saved"`
	JSON  cfInterconnectGetResponseInterconnectHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (CfInterconnectGetResponseInterconnectHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectGetResponseInterconnectHealthCheckTargetUnion ¶ added in v7.10.0

func (r CfInterconnectGetResponseInterconnectHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectGetResponseInterconnectHealthCheckTargetUnion()

func (*CfInterconnectGetResponseInterconnectHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶ added in v7.10.0

type CfInterconnectGetResponseInterconnectHealthCheckTargetUnion ¶ added in v7.10.0

type CfInterconnectGetResponseInterconnectHealthCheckTargetUnion interface {
	ImplementsCfInterconnectGetResponseInterconnectHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by CfInterconnectGetResponseInterconnectHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type CfInterconnectListParams ¶

type CfInterconnectListParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type CfInterconnectListResponse ¶

type CfInterconnectListResponse struct {
	Interconnects []CfInterconnectListResponseInterconnect `json:"interconnects"`
	JSON          cfInterconnectListResponseJSON           `json:"-"`
}

func (*CfInterconnectListResponse) UnmarshalJSON ¶

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

type CfInterconnectListResponseEnvelope ¶

type CfInterconnectListResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors" api:"required"`
	Messages []shared.ResponseInfo      `json:"messages" api:"required"`
	Result   CfInterconnectListResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success CfInterconnectListResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cfInterconnectListResponseEnvelopeJSON    `json:"-"`
}

func (*CfInterconnectListResponseEnvelope) UnmarshalJSON ¶

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

type CfInterconnectListResponseEnvelopeSuccess ¶

type CfInterconnectListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CfInterconnectListResponseEnvelopeSuccessTrue CfInterconnectListResponseEnvelopeSuccess = true
)

func (CfInterconnectListResponseEnvelopeSuccess) IsKnown ¶

type CfInterconnectListResponseInterconnect ¶

type CfInterconnectListResponseInterconnect struct {
	// Identifier
	ID string `json:"id"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                       `json:"automatic_return_routing"`
	BGP                    CfInterconnectListResponseInterconnectsBGP `json:"bgp"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	ColoName string `json:"colo_name"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the interconnect.
	Description string `json:"description"`
	// Omitted in responses for version 1.5 interconnects.
	GRE         CfInterconnectListResponseInterconnectsGRE         `json:"gre"`
	HealthCheck CfInterconnectListResponseInterconnectsHealthCheck `json:"health_check"`
	// The IPv4 interface address for the interconnect. For MPLS Interconnects, use a
	// /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix may be used.
	// Version 1.5 interconnects require a /31 prefix and may also use a prefix from
	// the account's authorized prefixes; otherwise, select the subnet from RFC 1918 or
	// the approved link-local ranges.
	InterfaceAddress string `json:"interface_address"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
	// value is 576.
	Mtu int64 `json:"mtu"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	Name string `json:"name"`
	// Immutable interconnect version configured at creation time. One of:
	//
	// - "1"
	// - "1.5"
	// - "2"
	Version string `json:"version"`
	// An identifier that correlates this interconnect with the corresponding V2 CNI
	// interconnect resource.
	VirtualPortReservationID string                                     `json:"virtual_port_reservation_id"`
	JSON                     cfInterconnectListResponseInterconnectJSON `json:"-"`
}

func (*CfInterconnectListResponseInterconnect) UnmarshalJSON ¶

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

type CfInterconnectListResponseInterconnectsBGP ¶ added in v7.9.0

type CfInterconnectListResponseInterconnectsBGP struct {
	// Deprecated. Use customer_asn.
	//
	// Deprecated: deprecated
	AsNo int64 `json:"as_no"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CloudflareEndpoint string `json:"cloudflare_endpoint" format:"ipv4"`
	// ASN used on the customer end of the BGP session.
	CustomerASN int64 `json:"customer_asn"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CustomerEndpoint string `json:"customer_endpoint" format:"ipv4"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                         `json:"md5_key"`
	JSON   cfInterconnectListResponseInterconnectsBGPJSON `json:"-"`
}

func (*CfInterconnectListResponseInterconnectsBGP) UnmarshalJSON ¶ added in v7.9.0

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

type CfInterconnectListResponseInterconnectsGRE ¶

type CfInterconnectListResponseInterconnectsGRE struct {
	// The IP address assigned to the Cloudflare side of the GRE tunnel created as part
	// of the Interconnect.
	CloudflareEndpoint string                                         `json:"cloudflare_endpoint"`
	JSON               cfInterconnectListResponseInterconnectsGREJSON `json:"-"`
}

Omitted in responses for version 1.5 interconnects.

func (*CfInterconnectListResponseInterconnectsGRE) UnmarshalJSON ¶

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

type CfInterconnectListResponseInterconnectsHealthCheck ¶ added in v7.10.0

type CfInterconnectListResponseInterconnectsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the interconnect and the result comes back to Cloudflare
	// via the open Internet, or bidirectional where both the probe and result come and
	// go via the interconnect.
	Direction CfInterconnectListResponseInterconnectsHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The source IPv4 address used for bidirectional health checks. Supported only for
	// version 1.5 interconnects. It is required when `direction` is `bidirectional`
	// and must be omitted (and is cleared) when `direction` is `unidirectional`. The
	// address must be within RFC1918 space, the approved link-local range
	// 169.254.240.0/20, or the Cloudflare reserved range 198.41.199.224/27.
	Source string `json:"source"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target CfInterconnectListResponseInterconnectsHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                        `json:"type"`
	JSON cfInterconnectListResponseInterconnectsHealthCheckJSON `json:"-"`
}

func (*CfInterconnectListResponseInterconnectsHealthCheck) UnmarshalJSON ¶ added in v7.10.0

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

type CfInterconnectListResponseInterconnectsHealthCheckDirection ¶ added in v7.10.0

type CfInterconnectListResponseInterconnectsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the interconnect and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the interconnect.

const (
	CfInterconnectListResponseInterconnectsHealthCheckDirectionUnidirectional CfInterconnectListResponseInterconnectsHealthCheckDirection = "unidirectional"
	CfInterconnectListResponseInterconnectsHealthCheckDirectionBidirectional  CfInterconnectListResponseInterconnectsHealthCheckDirection = "bidirectional"
)

func (CfInterconnectListResponseInterconnectsHealthCheckDirection) IsKnown ¶ added in v7.10.0

type CfInterconnectListResponseInterconnectsHealthCheckTargetMagicHealthCheckTarget ¶ added in v7.10.0

type CfInterconnectListResponseInterconnectsHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                             `json:"saved"`
	JSON  cfInterconnectListResponseInterconnectsHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (CfInterconnectListResponseInterconnectsHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectListResponseInterconnectsHealthCheckTargetUnion ¶ added in v7.10.0

func (r CfInterconnectListResponseInterconnectsHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectListResponseInterconnectsHealthCheckTargetUnion()

func (*CfInterconnectListResponseInterconnectsHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶ added in v7.10.0

type CfInterconnectListResponseInterconnectsHealthCheckTargetUnion ¶ added in v7.10.0

type CfInterconnectListResponseInterconnectsHealthCheckTargetUnion interface {
	ImplementsCfInterconnectListResponseInterconnectsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by CfInterconnectListResponseInterconnectsHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type CfInterconnectService ¶

type CfInterconnectService struct {
	Options []option.RequestOption
}

CfInterconnectService 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 NewCfInterconnectService method instead.

func NewCfInterconnectService ¶

func NewCfInterconnectService(opts ...option.RequestOption) (r *CfInterconnectService)

NewCfInterconnectService 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 (*CfInterconnectService) BulkUpdate ¶

Updates multiple interconnects associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

func (*CfInterconnectService) Get ¶

func (r *CfInterconnectService) Get(ctx context.Context, cfInterconnectID string, params CfInterconnectGetParams, opts ...option.RequestOption) (res *CfInterconnectGetResponse, err error)

Lists details for a specific interconnect.

func (*CfInterconnectService) List ¶

Lists interconnects associated with an account.

func (*CfInterconnectService) Update ¶

Updates a specific interconnect associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

type CfInterconnectUpdateParams ¶

type CfInterconnectUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting param.Field[bool]                          `json:"automatic_return_routing"`
	BGP                    param.Field[CfInterconnectUpdateParamsBGP] `json:"bgp"`
	// An optional description of the interconnect.
	Description param.Field[string] `json:"description"`
	// Not configurable for version 1.5 interconnects; supplying it returns an error.
	GRE         param.Field[CfInterconnectUpdateParamsGRE]         `json:"gre"`
	HealthCheck param.Field[CfInterconnectUpdateParamsHealthCheck] `json:"health_check"`
	// The IPv4 interface address for the interconnect. For MPLS Interconnects, use a
	// /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix may be used.
	// Version 1.5 interconnects require a /31 prefix and may also use a prefix from
	// the account's authorized prefixes; otherwise, select the subnet from RFC 1918 or
	// the approved link-local ranges.
	InterfaceAddress param.Field[string] `json:"interface_address"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 param.Field[string] `json:"interface_address6"`
	// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
	// value is 576.
	Mtu param.Field[int64] `json:"mtu"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	Name              param.Field[string] `json:"name"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

func (CfInterconnectUpdateParams) MarshalJSON ¶

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

type CfInterconnectUpdateParamsBGP ¶ added in v7.9.0

type CfInterconnectUpdateParamsBGP struct {
	// Deprecated. Use customer_asn.
	//
	// Deprecated: deprecated
	AsNo param.Field[int64] `json:"as_no"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CloudflareEndpoint param.Field[string] `json:"cloudflare_endpoint" format:"ipv4"`
	// ASN used on the customer end of the BGP session.
	CustomerASN param.Field[int64] `json:"customer_asn"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CustomerEndpoint param.Field[string] `json:"customer_endpoint" format:"ipv4"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID param.Field[string] `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes param.Field[[]string] `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID param.Field[string] `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key param.Field[string] `json:"md5_key"`
}

func (CfInterconnectUpdateParamsBGP) MarshalJSON ¶ added in v7.9.0

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

type CfInterconnectUpdateParamsGRE ¶

type CfInterconnectUpdateParamsGRE struct {
	// The IP address assigned to the Cloudflare side of the GRE tunnel created as part
	// of the Interconnect.
	CloudflareEndpoint param.Field[string] `json:"cloudflare_endpoint"`
}

Not configurable for version 1.5 interconnects; supplying it returns an error.

func (CfInterconnectUpdateParamsGRE) MarshalJSON ¶

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

type CfInterconnectUpdateParamsHealthCheck ¶ added in v7.10.0

type CfInterconnectUpdateParamsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the interconnect and the result comes back to Cloudflare
	// via the open Internet, or bidirectional where both the probe and result come and
	// go via the interconnect.
	Direction param.Field[CfInterconnectUpdateParamsHealthCheckDirection] `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled param.Field[bool] `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate param.Field[HealthCheckRate] `json:"rate"`
	// The source IPv4 address used for bidirectional health checks. Supported only for
	// version 1.5 interconnects. It is required when `direction` is `bidirectional`
	// and must be omitted (and is cleared) when `direction` is `unidirectional`. The
	// address must be within RFC1918 space, the approved link-local range
	// 169.254.240.0/20, or the Cloudflare reserved range 198.41.199.224/27.
	Source param.Field[string] `json:"source"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target param.Field[CfInterconnectUpdateParamsHealthCheckTargetUnion] `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type param.Field[HealthCheckType] `json:"type"`
}

func (CfInterconnectUpdateParamsHealthCheck) MarshalJSON ¶ added in v7.10.0

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

type CfInterconnectUpdateParamsHealthCheckDirection ¶ added in v7.10.0

type CfInterconnectUpdateParamsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the interconnect and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the interconnect.

const (
	CfInterconnectUpdateParamsHealthCheckDirectionUnidirectional CfInterconnectUpdateParamsHealthCheckDirection = "unidirectional"
	CfInterconnectUpdateParamsHealthCheckDirectionBidirectional  CfInterconnectUpdateParamsHealthCheckDirection = "bidirectional"
)

func (CfInterconnectUpdateParamsHealthCheckDirection) IsKnown ¶ added in v7.10.0

type CfInterconnectUpdateParamsHealthCheckTargetMagicHealthCheckTarget ¶ added in v7.10.0

type CfInterconnectUpdateParamsHealthCheckTargetMagicHealthCheckTarget struct {
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved param.Field[string] `json:"saved"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (CfInterconnectUpdateParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectUpdateParamsHealthCheckTargetUnion ¶ added in v7.10.0

func (r CfInterconnectUpdateParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectUpdateParamsHealthCheckTargetUnion()

func (CfInterconnectUpdateParamsHealthCheckTargetMagicHealthCheckTarget) MarshalJSON ¶ added in v7.10.0

type CfInterconnectUpdateParamsHealthCheckTargetUnion ¶ added in v7.10.0

type CfInterconnectUpdateParamsHealthCheckTargetUnion interface {
	ImplementsCfInterconnectUpdateParamsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Satisfied by magic_transit.CfInterconnectUpdateParamsHealthCheckTargetMagicHealthCheckTarget, shared.UnionString.

type CfInterconnectUpdateResponse ¶

type CfInterconnectUpdateResponse struct {
	Modified             bool                                             `json:"modified"`
	ModifiedInterconnect CfInterconnectUpdateResponseModifiedInterconnect `json:"modified_interconnect"`
	JSON                 cfInterconnectUpdateResponseJSON                 `json:"-"`
}

func (*CfInterconnectUpdateResponse) UnmarshalJSON ¶

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

type CfInterconnectUpdateResponseEnvelope ¶

type CfInterconnectUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo        `json:"errors" api:"required"`
	Messages []shared.ResponseInfo        `json:"messages" api:"required"`
	Result   CfInterconnectUpdateResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success CfInterconnectUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    cfInterconnectUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*CfInterconnectUpdateResponseEnvelope) UnmarshalJSON ¶

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

type CfInterconnectUpdateResponseEnvelopeSuccess ¶

type CfInterconnectUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CfInterconnectUpdateResponseEnvelopeSuccessTrue CfInterconnectUpdateResponseEnvelopeSuccess = true
)

func (CfInterconnectUpdateResponseEnvelopeSuccess) IsKnown ¶

type CfInterconnectUpdateResponseModifiedInterconnect ¶

type CfInterconnectUpdateResponseModifiedInterconnect struct {
	// Identifier
	ID string `json:"id"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                                `json:"automatic_return_routing"`
	BGP                    CfInterconnectUpdateResponseModifiedInterconnectBGP `json:"bgp"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	ColoName string `json:"colo_name"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the interconnect.
	Description string `json:"description"`
	// Omitted in responses for version 1.5 interconnects.
	GRE         CfInterconnectUpdateResponseModifiedInterconnectGRE         `json:"gre"`
	HealthCheck CfInterconnectUpdateResponseModifiedInterconnectHealthCheck `json:"health_check"`
	// The IPv4 interface address for the interconnect. For MPLS Interconnects, use a
	// /30 or /31 prefix. For GRE Interconnects, a /30 or /31 prefix may be used.
	// Version 1.5 interconnects require a /31 prefix and may also use a prefix from
	// the account's authorized prefixes; otherwise, select the subnet from RFC 1918 or
	// the approved link-local ranges.
	InterfaceAddress string `json:"interface_address"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
	// value is 576.
	Mtu int64 `json:"mtu"`
	// The name of the interconnect. The name cannot share a name with other tunnels.
	Name string `json:"name"`
	// Immutable interconnect version configured at creation time. One of:
	//
	// - "1"
	// - "1.5"
	// - "2"
	Version string `json:"version"`
	// An identifier that correlates this interconnect with the corresponding V2 CNI
	// interconnect resource.
	VirtualPortReservationID string                                               `json:"virtual_port_reservation_id"`
	JSON                     cfInterconnectUpdateResponseModifiedInterconnectJSON `json:"-"`
}

func (*CfInterconnectUpdateResponseModifiedInterconnect) UnmarshalJSON ¶

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

type CfInterconnectUpdateResponseModifiedInterconnectBGP ¶ added in v7.9.0

type CfInterconnectUpdateResponseModifiedInterconnectBGP struct {
	// Deprecated. Use customer_asn.
	//
	// Deprecated: deprecated
	AsNo int64 `json:"as_no"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CloudflareEndpoint string `json:"cloudflare_endpoint" format:"ipv4"`
	// ASN used on the customer end of the BGP session.
	CustomerASN int64 `json:"customer_asn"`
	// Read-only for v1.5; derived from interface_address.
	//
	// Deprecated: deprecated
	CustomerEndpoint string `json:"customer_endpoint" format:"ipv4"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                                  `json:"md5_key"`
	JSON   cfInterconnectUpdateResponseModifiedInterconnectBGPJSON `json:"-"`
}

func (*CfInterconnectUpdateResponseModifiedInterconnectBGP) UnmarshalJSON ¶ added in v7.9.0

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

type CfInterconnectUpdateResponseModifiedInterconnectGRE ¶

type CfInterconnectUpdateResponseModifiedInterconnectGRE struct {
	// The IP address assigned to the Cloudflare side of the GRE tunnel created as part
	// of the Interconnect.
	CloudflareEndpoint string                                                  `json:"cloudflare_endpoint"`
	JSON               cfInterconnectUpdateResponseModifiedInterconnectGREJSON `json:"-"`
}

Omitted in responses for version 1.5 interconnects.

func (*CfInterconnectUpdateResponseModifiedInterconnectGRE) UnmarshalJSON ¶

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

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheck ¶ added in v7.10.0

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the interconnect and the result comes back to Cloudflare
	// via the open Internet, or bidirectional where both the probe and result come and
	// go via the interconnect.
	Direction CfInterconnectUpdateResponseModifiedInterconnectHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The source IPv4 address used for bidirectional health checks. Supported only for
	// version 1.5 interconnects. It is required when `direction` is `bidirectional`
	// and must be omitted (and is cleared) when `direction` is `unidirectional`. The
	// address must be within RFC1918 space, the approved link-local range
	// 169.254.240.0/20, or the Cloudflare reserved range 198.41.199.224/27.
	Source string `json:"source"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                                 `json:"type"`
	JSON cfInterconnectUpdateResponseModifiedInterconnectHealthCheckJSON `json:"-"`
}

func (*CfInterconnectUpdateResponseModifiedInterconnectHealthCheck) UnmarshalJSON ¶ added in v7.10.0

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheckDirection ¶ added in v7.10.0

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the interconnect and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the interconnect.

const (
	CfInterconnectUpdateResponseModifiedInterconnectHealthCheckDirectionUnidirectional CfInterconnectUpdateResponseModifiedInterconnectHealthCheckDirection = "unidirectional"
	CfInterconnectUpdateResponseModifiedInterconnectHealthCheckDirectionBidirectional  CfInterconnectUpdateResponseModifiedInterconnectHealthCheckDirection = "bidirectional"
)

func (CfInterconnectUpdateResponseModifiedInterconnectHealthCheckDirection) IsKnown ¶ added in v7.10.0

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTarget ¶ added in v7.10.0

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                                      `json:"saved"`
	JSON  cfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetUnion ¶ added in v7.10.0

func (r CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTarget) ImplementsCfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetUnion()

func (*CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶ added in v7.10.0

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetUnion ¶ added in v7.10.0

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetUnion interface {
	ImplementsCfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by CfInterconnectUpdateResponseModifiedInterconnectHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

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 CloudflareTunnelConfigSrc ¶

type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc

Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.

This is an alias to an internal type.

type CloudflareTunnelConnection ¶

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus ¶

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType ¶

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type ConnectorDeleteParams ¶

type ConnectorDeleteParams struct {
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type ConnectorDeleteResponse ¶

type ConnectorDeleteResponse struct {
	ID        string `json:"id" api:"required"`
	Activated bool   `json:"activated" api:"required"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    []ConnectorDeleteResponseInterruptWindowDaysOfWeek `json:"interrupt_window_days_of_week" api:"required"`
	InterruptWindowDurationHours float64                                            `json:"interrupt_window_duration_hours" api:"required"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates []string                      `json:"interrupt_window_embargo_dates" api:"required"`
	InterruptWindowHourOfDay    float64                       `json:"interrupt_window_hour_of_day" api:"required"`
	LastUpdated                 string                        `json:"last_updated" api:"required"`
	Notes                       string                        `json:"notes" api:"required"`
	Primary                     bool                          `json:"primary" api:"required"`
	Timezone                    string                        `json:"timezone" api:"required"`
	Device                      ConnectorDeleteResponseDevice `json:"device"`
	LastHeartbeat               string                        `json:"last_heartbeat"`
	LastSeenVersion             string                        `json:"last_seen_version"`
	LicenseKey                  string                        `json:"license_key"`
	SiteID                      string                        `json:"site_id"`
	JSON                        connectorDeleteResponseJSON   `json:"-"`
}

func (*ConnectorDeleteResponse) UnmarshalJSON ¶

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

type ConnectorDeleteResponseDevice ¶

type ConnectorDeleteResponseDevice struct {
	ID           string                            `json:"id" api:"required"`
	SerialNumber string                            `json:"serial_number"`
	Type         ConnectorDeleteResponseDeviceType `json:"type"`
	JSON         connectorDeleteResponseDeviceJSON `json:"-"`
}

func (*ConnectorDeleteResponseDevice) UnmarshalJSON ¶

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

type ConnectorDeleteResponseDeviceType ¶

type ConnectorDeleteResponseDeviceType string
const (
	ConnectorDeleteResponseDeviceTypeManaged  ConnectorDeleteResponseDeviceType = "MANAGED"
	ConnectorDeleteResponseDeviceTypeLicensed ConnectorDeleteResponseDeviceType = "LICENSED"
)

func (ConnectorDeleteResponseDeviceType) IsKnown ¶

type ConnectorDeleteResponseEnvelope ¶

type ConnectorDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo               `json:"errors" api:"required"`
	Messages []shared.ResponseInfo               `json:"messages" api:"required"`
	Result   ConnectorDeleteResponse             `json:"result" api:"required"`
	Success  bool                                `json:"success" api:"required"`
	JSON     connectorDeleteResponseEnvelopeJSON `json:"-"`
}

func (*ConnectorDeleteResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorDeleteResponseInterruptWindowDaysOfWeek ¶

type ConnectorDeleteResponseInterruptWindowDaysOfWeek string
const (
	ConnectorDeleteResponseInterruptWindowDaysOfWeekSunday    ConnectorDeleteResponseInterruptWindowDaysOfWeek = "Sunday"
	ConnectorDeleteResponseInterruptWindowDaysOfWeekMonday    ConnectorDeleteResponseInterruptWindowDaysOfWeek = "Monday"
	ConnectorDeleteResponseInterruptWindowDaysOfWeekTuesday   ConnectorDeleteResponseInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorDeleteResponseInterruptWindowDaysOfWeekWednesday ConnectorDeleteResponseInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorDeleteResponseInterruptWindowDaysOfWeekThursday  ConnectorDeleteResponseInterruptWindowDaysOfWeek = "Thursday"
	ConnectorDeleteResponseInterruptWindowDaysOfWeekFriday    ConnectorDeleteResponseInterruptWindowDaysOfWeek = "Friday"
	ConnectorDeleteResponseInterruptWindowDaysOfWeekSaturday  ConnectorDeleteResponseInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorDeleteResponseInterruptWindowDaysOfWeek) IsKnown ¶

type ConnectorEditParams ¶

type ConnectorEditParams struct {
	AccountID param.Field[string] `path:"account_id" api:"required"`
	Activated param.Field[bool]   `json:"activated"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    param.Field[[]ConnectorEditParamsInterruptWindowDaysOfWeek] `json:"interrupt_window_days_of_week"`
	InterruptWindowDurationHours param.Field[float64]                                        `json:"interrupt_window_duration_hours"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates param.Field[[]string] `json:"interrupt_window_embargo_dates"`
	InterruptWindowHourOfDay    param.Field[float64]  `json:"interrupt_window_hour_of_day"`
	Notes                       param.Field[string]   `json:"notes"`
	Primary                     param.Field[bool]     `json:"primary"`
	// When true, regenerate license key for the connector.
	ProvisionLicense param.Field[bool]   `json:"provision_license"`
	SiteID           param.Field[string] `json:"site_id"`
	Timezone         param.Field[string] `json:"timezone"`
}

func (ConnectorEditParams) MarshalJSON ¶

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

type ConnectorEditParamsInterruptWindowDaysOfWeek ¶

type ConnectorEditParamsInterruptWindowDaysOfWeek string
const (
	ConnectorEditParamsInterruptWindowDaysOfWeekSunday    ConnectorEditParamsInterruptWindowDaysOfWeek = "Sunday"
	ConnectorEditParamsInterruptWindowDaysOfWeekMonday    ConnectorEditParamsInterruptWindowDaysOfWeek = "Monday"
	ConnectorEditParamsInterruptWindowDaysOfWeekTuesday   ConnectorEditParamsInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorEditParamsInterruptWindowDaysOfWeekWednesday ConnectorEditParamsInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorEditParamsInterruptWindowDaysOfWeekThursday  ConnectorEditParamsInterruptWindowDaysOfWeek = "Thursday"
	ConnectorEditParamsInterruptWindowDaysOfWeekFriday    ConnectorEditParamsInterruptWindowDaysOfWeek = "Friday"
	ConnectorEditParamsInterruptWindowDaysOfWeekSaturday  ConnectorEditParamsInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorEditParamsInterruptWindowDaysOfWeek) IsKnown ¶

type ConnectorEditResponse ¶

type ConnectorEditResponse struct {
	ID        string `json:"id" api:"required"`
	Activated bool   `json:"activated" api:"required"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    []ConnectorEditResponseInterruptWindowDaysOfWeek `json:"interrupt_window_days_of_week" api:"required"`
	InterruptWindowDurationHours float64                                          `json:"interrupt_window_duration_hours" api:"required"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates []string                    `json:"interrupt_window_embargo_dates" api:"required"`
	InterruptWindowHourOfDay    float64                     `json:"interrupt_window_hour_of_day" api:"required"`
	LastUpdated                 string                      `json:"last_updated" api:"required"`
	Notes                       string                      `json:"notes" api:"required"`
	Primary                     bool                        `json:"primary" api:"required"`
	Timezone                    string                      `json:"timezone" api:"required"`
	Device                      ConnectorEditResponseDevice `json:"device"`
	LastHeartbeat               string                      `json:"last_heartbeat"`
	LastSeenVersion             string                      `json:"last_seen_version"`
	LicenseKey                  string                      `json:"license_key"`
	SiteID                      string                      `json:"site_id"`
	JSON                        connectorEditResponseJSON   `json:"-"`
}

func (*ConnectorEditResponse) UnmarshalJSON ¶

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

type ConnectorEditResponseDevice ¶

type ConnectorEditResponseDevice struct {
	ID           string                          `json:"id" api:"required"`
	SerialNumber string                          `json:"serial_number"`
	Type         ConnectorEditResponseDeviceType `json:"type"`
	JSON         connectorEditResponseDeviceJSON `json:"-"`
}

func (*ConnectorEditResponseDevice) UnmarshalJSON ¶

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

type ConnectorEditResponseDeviceType ¶

type ConnectorEditResponseDeviceType string
const (
	ConnectorEditResponseDeviceTypeManaged  ConnectorEditResponseDeviceType = "MANAGED"
	ConnectorEditResponseDeviceTypeLicensed ConnectorEditResponseDeviceType = "LICENSED"
)

func (ConnectorEditResponseDeviceType) IsKnown ¶

type ConnectorEditResponseEnvelope ¶

type ConnectorEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo             `json:"errors" api:"required"`
	Messages []shared.ResponseInfo             `json:"messages" api:"required"`
	Result   ConnectorEditResponse             `json:"result" api:"required"`
	Success  bool                              `json:"success" api:"required"`
	JSON     connectorEditResponseEnvelopeJSON `json:"-"`
}

func (*ConnectorEditResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorEditResponseInterruptWindowDaysOfWeek ¶

type ConnectorEditResponseInterruptWindowDaysOfWeek string
const (
	ConnectorEditResponseInterruptWindowDaysOfWeekSunday    ConnectorEditResponseInterruptWindowDaysOfWeek = "Sunday"
	ConnectorEditResponseInterruptWindowDaysOfWeekMonday    ConnectorEditResponseInterruptWindowDaysOfWeek = "Monday"
	ConnectorEditResponseInterruptWindowDaysOfWeekTuesday   ConnectorEditResponseInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorEditResponseInterruptWindowDaysOfWeekWednesday ConnectorEditResponseInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorEditResponseInterruptWindowDaysOfWeekThursday  ConnectorEditResponseInterruptWindowDaysOfWeek = "Thursday"
	ConnectorEditResponseInterruptWindowDaysOfWeekFriday    ConnectorEditResponseInterruptWindowDaysOfWeek = "Friday"
	ConnectorEditResponseInterruptWindowDaysOfWeekSaturday  ConnectorEditResponseInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorEditResponseInterruptWindowDaysOfWeek) IsKnown ¶

type ConnectorEventGetParams ¶

type ConnectorEventGetParams struct {
	// Account identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type ConnectorEventGetResponse ¶

type ConnectorEventGetResponse struct {
	// Event kind plus event-specific payload fields.
	//
	// Event kinds:
	//
	// - `Init`: Initialized process
	// - `Leave`: Stopped process
	// - `StartAttestation`: Started attestation
	// - `FinishAttestationSuccess`: Finished attestation
	// - `FinishAttestationFailure`: Failed attestation
	// - `StartRotateCryptKey`: Started crypt key rotation
	// - `FinishRotateCryptKeySuccess`: Finished crypt key rotation
	// - `FinishRotateCryptKeyFailure`: Failed crypt key rotation
	// - `StartRotatePki`: Started PKI rotation
	// - `FinishRotatePkiSuccess`: Finished PKI rotation
	// - `FinishRotatePkiFailure`: Failed PKI rotation
	// - `StartUpgrade`: Started upgrade
	// - `FinishUpgradeSuccess`: Finished upgrade
	// - `FinishUpgradeFailure`: Failed upgrade
	// - `BlessSlotSuccess`: Blessed boot entry slot
	// - `BlessSlotPending`: Boot entry slot is not yet blessed
	// - `BlessSlotFailure`: Failed to bless boot entry slot
	// - `Reconcile`: Reconciled
	// - `ConfigureCloudflaredTunnel`: Configured Cloudflared tunnel
	// - `RekeyInstallBoth`: Installed initial inbound and outbound keys
	// - `RekeyStart`: Installed new inbound key, kept old outbound
	// - `RekeyRestart`: Restarted in-progress rekey with newer key material
	// - `RekeyAdvance`: Confirmed traffic on new inbound key, swapped outbound to new
	// - `RekeyComplete`: Deleted old keys
	// - `RekeyReset`: Deleted all keys after receiving an unexpected key
	// - `HaTransition`: Completed HA state transition
	// - `HaError`: Received unexpected HA error
	// - `HaInit`: Initialized HA subsystem
	// - `HaLeave`: Stopped HA subsystem
	E ConnectorEventGetResponseE `json:"e" api:"required"`
	// Sequence number, used to order events with the same timestamp
	N float64 `json:"n" api:"required"`
	// Time the Event was recorded (seconds since the Unix epoch)
	T float64 `json:"t" api:"required"`
	// Version
	V    string                        `json:"v"`
	JSON connectorEventGetResponseJSON `json:"-"`
}

Recorded Event

func (*ConnectorEventGetResponse) UnmarshalJSON ¶

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

type ConnectorEventGetResponseE ¶

type ConnectorEventGetResponseE struct {
	// Initialized process
	K ConnectorEventGetResponseEK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string `json:"tunnel_id"`
	// Location of upgrade bundle
	URL  string                         `json:"url"`
	JSON connectorEventGetResponseEJSON `json:"-"`
	// contains filtered or unexported fields
}

Event kind plus event-specific payload fields.

Event kinds:

- `Init`: Initialized process - `Leave`: Stopped process - `StartAttestation`: Started attestation - `FinishAttestationSuccess`: Finished attestation - `FinishAttestationFailure`: Failed attestation - `StartRotateCryptKey`: Started crypt key rotation - `FinishRotateCryptKeySuccess`: Finished crypt key rotation - `FinishRotateCryptKeyFailure`: Failed crypt key rotation - `StartRotatePki`: Started PKI rotation - `FinishRotatePkiSuccess`: Finished PKI rotation - `FinishRotatePkiFailure`: Failed PKI rotation - `StartUpgrade`: Started upgrade - `FinishUpgradeSuccess`: Finished upgrade - `FinishUpgradeFailure`: Failed upgrade - `BlessSlotSuccess`: Blessed boot entry slot - `BlessSlotPending`: Boot entry slot is not yet blessed - `BlessSlotFailure`: Failed to bless boot entry slot - `Reconcile`: Reconciled - `ConfigureCloudflaredTunnel`: Configured Cloudflared tunnel - `RekeyInstallBoth`: Installed initial inbound and outbound keys - `RekeyStart`: Installed new inbound key, kept old outbound - `RekeyRestart`: Restarted in-progress rekey with newer key material - `RekeyAdvance`: Confirmed traffic on new inbound key, swapped outbound to new - `RekeyComplete`: Deleted old keys - `RekeyReset`: Deleted all keys after receiving an unexpected key - `HaTransition`: Completed HA state transition - `HaError`: Received unexpected HA error - `HaInit`: Initialized HA subsystem - `HaLeave`: Stopped HA subsystem

func (*ConnectorEventGetResponseE) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEConfigureCloudflaredTunnel ¶

type ConnectorEventGetResponseEConfigureCloudflaredTunnel struct {
	// Configured Cloudflared tunnel
	K    ConnectorEventGetResponseEConfigureCloudflaredTunnelK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEConfigureCloudflaredTunnelJSON `json:"-"`
}

func (*ConnectorEventGetResponseEConfigureCloudflaredTunnel) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEConfigureCloudflaredTunnelK ¶

type ConnectorEventGetResponseEConfigureCloudflaredTunnelK string

Configured Cloudflared tunnel

const (
	ConnectorEventGetResponseEConfigureCloudflaredTunnelKConfigureCloudflaredTunnel ConnectorEventGetResponseEConfigureCloudflaredTunnelK = "ConfigureCloudflaredTunnel"
)

func (ConnectorEventGetResponseEConfigureCloudflaredTunnelK) IsKnown ¶

type ConnectorEventGetResponseEFinishAttestationFailure ¶

type ConnectorEventGetResponseEFinishAttestationFailure struct {
	// Failed attestation
	K    ConnectorEventGetResponseEFinishAttestationFailureK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEFinishAttestationFailureJSON `json:"-"`
}

func (*ConnectorEventGetResponseEFinishAttestationFailure) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEFinishAttestationFailureK ¶

type ConnectorEventGetResponseEFinishAttestationFailureK string

Failed attestation

const (
	ConnectorEventGetResponseEFinishAttestationFailureKFinishAttestationFailure ConnectorEventGetResponseEFinishAttestationFailureK = "FinishAttestationFailure"
)

func (ConnectorEventGetResponseEFinishAttestationFailureK) IsKnown ¶

type ConnectorEventGetResponseEFinishAttestationSuccess ¶

type ConnectorEventGetResponseEFinishAttestationSuccess struct {
	// Finished attestation
	K    ConnectorEventGetResponseEFinishAttestationSuccessK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEFinishAttestationSuccessJSON `json:"-"`
}

func (*ConnectorEventGetResponseEFinishAttestationSuccess) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEFinishAttestationSuccessK ¶

type ConnectorEventGetResponseEFinishAttestationSuccessK string

Finished attestation

const (
	ConnectorEventGetResponseEFinishAttestationSuccessKFinishAttestationSuccess ConnectorEventGetResponseEFinishAttestationSuccessK = "FinishAttestationSuccess"
)

func (ConnectorEventGetResponseEFinishAttestationSuccessK) IsKnown ¶

type ConnectorEventGetResponseEFinishRotateCryptKeyFailure ¶

type ConnectorEventGetResponseEFinishRotateCryptKeyFailure struct {
	// Failed crypt key rotation
	K    ConnectorEventGetResponseEFinishRotateCryptKeyFailureK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEFinishRotateCryptKeyFailureJSON `json:"-"`
}

func (*ConnectorEventGetResponseEFinishRotateCryptKeyFailure) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEFinishRotateCryptKeyFailureK ¶

type ConnectorEventGetResponseEFinishRotateCryptKeyFailureK string

Failed crypt key rotation

const (
	ConnectorEventGetResponseEFinishRotateCryptKeyFailureKFinishRotateCryptKeyFailure ConnectorEventGetResponseEFinishRotateCryptKeyFailureK = "FinishRotateCryptKeyFailure"
)

func (ConnectorEventGetResponseEFinishRotateCryptKeyFailureK) IsKnown ¶

type ConnectorEventGetResponseEFinishRotateCryptKeySuccess ¶

type ConnectorEventGetResponseEFinishRotateCryptKeySuccess struct {
	// Finished crypt key rotation
	K    ConnectorEventGetResponseEFinishRotateCryptKeySuccessK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEFinishRotateCryptKeySuccessJSON `json:"-"`
}

func (*ConnectorEventGetResponseEFinishRotateCryptKeySuccess) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEFinishRotateCryptKeySuccessK ¶

type ConnectorEventGetResponseEFinishRotateCryptKeySuccessK string

Finished crypt key rotation

const (
	ConnectorEventGetResponseEFinishRotateCryptKeySuccessKFinishRotateCryptKeySuccess ConnectorEventGetResponseEFinishRotateCryptKeySuccessK = "FinishRotateCryptKeySuccess"
)

func (ConnectorEventGetResponseEFinishRotateCryptKeySuccessK) IsKnown ¶

type ConnectorEventGetResponseEFinishRotatePkiFailure ¶

type ConnectorEventGetResponseEFinishRotatePkiFailure struct {
	// Failed PKI rotation
	K    ConnectorEventGetResponseEFinishRotatePkiFailureK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEFinishRotatePkiFailureJSON `json:"-"`
}

func (*ConnectorEventGetResponseEFinishRotatePkiFailure) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEFinishRotatePkiFailureK ¶

type ConnectorEventGetResponseEFinishRotatePkiFailureK string

Failed PKI rotation

const (
	ConnectorEventGetResponseEFinishRotatePkiFailureKFinishRotatePkiFailure ConnectorEventGetResponseEFinishRotatePkiFailureK = "FinishRotatePkiFailure"
)

func (ConnectorEventGetResponseEFinishRotatePkiFailureK) IsKnown ¶

type ConnectorEventGetResponseEFinishRotatePkiSuccess ¶

type ConnectorEventGetResponseEFinishRotatePkiSuccess struct {
	// Finished PKI rotation
	K    ConnectorEventGetResponseEFinishRotatePkiSuccessK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEFinishRotatePkiSuccessJSON `json:"-"`
}

func (*ConnectorEventGetResponseEFinishRotatePkiSuccess) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEFinishRotatePkiSuccessK ¶

type ConnectorEventGetResponseEFinishRotatePkiSuccessK string

Finished PKI rotation

const (
	ConnectorEventGetResponseEFinishRotatePkiSuccessKFinishRotatePkiSuccess ConnectorEventGetResponseEFinishRotatePkiSuccessK = "FinishRotatePkiSuccess"
)

func (ConnectorEventGetResponseEFinishRotatePkiSuccessK) IsKnown ¶

type ConnectorEventGetResponseEFinishUpgradeFailure ¶

type ConnectorEventGetResponseEFinishUpgradeFailure struct {
	// Failed upgrade
	K    ConnectorEventGetResponseEFinishUpgradeFailureK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEFinishUpgradeFailureJSON `json:"-"`
}

func (*ConnectorEventGetResponseEFinishUpgradeFailure) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEFinishUpgradeFailureK ¶

type ConnectorEventGetResponseEFinishUpgradeFailureK string

Failed upgrade

const (
	ConnectorEventGetResponseEFinishUpgradeFailureKFinishUpgradeFailure ConnectorEventGetResponseEFinishUpgradeFailureK = "FinishUpgradeFailure"
)

func (ConnectorEventGetResponseEFinishUpgradeFailureK) IsKnown ¶

type ConnectorEventGetResponseEFinishUpgradeSuccess ¶

type ConnectorEventGetResponseEFinishUpgradeSuccess struct {
	// Finished upgrade
	K    ConnectorEventGetResponseEFinishUpgradeSuccessK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEFinishUpgradeSuccessJSON `json:"-"`
}

func (*ConnectorEventGetResponseEFinishUpgradeSuccess) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEFinishUpgradeSuccessK ¶

type ConnectorEventGetResponseEFinishUpgradeSuccessK string

Finished upgrade

const (
	ConnectorEventGetResponseEFinishUpgradeSuccessKFinishUpgradeSuccess ConnectorEventGetResponseEFinishUpgradeSuccessK = "FinishUpgradeSuccess"
)

func (ConnectorEventGetResponseEFinishUpgradeSuccessK) IsKnown ¶

type ConnectorEventGetResponseEInit ¶

type ConnectorEventGetResponseEInit struct {
	// Initialized process
	K    ConnectorEventGetResponseEInitK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEInitJSON `json:"-"`
}

func (*ConnectorEventGetResponseEInit) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEInitK ¶

type ConnectorEventGetResponseEInitK string

Initialized process

const (
	ConnectorEventGetResponseEInitKInit ConnectorEventGetResponseEInitK = "Init"
)

func (ConnectorEventGetResponseEInitK) IsKnown ¶

type ConnectorEventGetResponseEK ¶

type ConnectorEventGetResponseEK string

Initialized process

const (
	ConnectorEventGetResponseEKInit                        ConnectorEventGetResponseEK = "Init"
	ConnectorEventGetResponseEKLeave                       ConnectorEventGetResponseEK = "Leave"
	ConnectorEventGetResponseEKStartAttestation            ConnectorEventGetResponseEK = "StartAttestation"
	ConnectorEventGetResponseEKFinishAttestationSuccess    ConnectorEventGetResponseEK = "FinishAttestationSuccess"
	ConnectorEventGetResponseEKFinishAttestationFailure    ConnectorEventGetResponseEK = "FinishAttestationFailure"
	ConnectorEventGetResponseEKStartRotateCryptKey         ConnectorEventGetResponseEK = "StartRotateCryptKey"
	ConnectorEventGetResponseEKFinishRotateCryptKeySuccess ConnectorEventGetResponseEK = "FinishRotateCryptKeySuccess"
	ConnectorEventGetResponseEKFinishRotateCryptKeyFailure ConnectorEventGetResponseEK = "FinishRotateCryptKeyFailure"
	ConnectorEventGetResponseEKStartRotatePki              ConnectorEventGetResponseEK = "StartRotatePki"
	ConnectorEventGetResponseEKFinishRotatePkiSuccess      ConnectorEventGetResponseEK = "FinishRotatePkiSuccess"
	ConnectorEventGetResponseEKFinishRotatePkiFailure      ConnectorEventGetResponseEK = "FinishRotatePkiFailure"
	ConnectorEventGetResponseEKStartUpgrade                ConnectorEventGetResponseEK = "StartUpgrade"
	ConnectorEventGetResponseEKFinishUpgradeSuccess        ConnectorEventGetResponseEK = "FinishUpgradeSuccess"
	ConnectorEventGetResponseEKFinishUpgradeFailure        ConnectorEventGetResponseEK = "FinishUpgradeFailure"
	ConnectorEventGetResponseEKBlessSlotSuccess            ConnectorEventGetResponseEK = "BlessSlotSuccess"
	ConnectorEventGetResponseEKBlessSlotPending            ConnectorEventGetResponseEK = "BlessSlotPending"
	ConnectorEventGetResponseEKBlessSlotFailure            ConnectorEventGetResponseEK = "BlessSlotFailure"
	ConnectorEventGetResponseEKReconcile                   ConnectorEventGetResponseEK = "Reconcile"
	ConnectorEventGetResponseEKConfigureCloudflaredTunnel  ConnectorEventGetResponseEK = "ConfigureCloudflaredTunnel"
	ConnectorEventGetResponseEKRekeyInstallBoth            ConnectorEventGetResponseEK = "RekeyInstallBoth"
	ConnectorEventGetResponseEKRekeyStart                  ConnectorEventGetResponseEK = "RekeyStart"
	ConnectorEventGetResponseEKRekeyRestart                ConnectorEventGetResponseEK = "RekeyRestart"
	ConnectorEventGetResponseEKRekeyAdvance                ConnectorEventGetResponseEK = "RekeyAdvance"
	ConnectorEventGetResponseEKRekeyComplete               ConnectorEventGetResponseEK = "RekeyComplete"
	ConnectorEventGetResponseEKRekeyReset                  ConnectorEventGetResponseEK = "RekeyReset"
	ConnectorEventGetResponseEKHaTransition                ConnectorEventGetResponseEK = "HaTransition"
	ConnectorEventGetResponseEKHaError                     ConnectorEventGetResponseEK = "HaError"
	ConnectorEventGetResponseEKHaInit                      ConnectorEventGetResponseEK = "HaInit"
	ConnectorEventGetResponseEKHaLeave                     ConnectorEventGetResponseEK = "HaLeave"
)

func (ConnectorEventGetResponseEK) IsKnown ¶

func (r ConnectorEventGetResponseEK) IsKnown() bool

type ConnectorEventGetResponseELeave ¶

type ConnectorEventGetResponseELeave struct {
	// Stopped process
	K    ConnectorEventGetResponseELeaveK    `json:"k" api:"required"`
	JSON connectorEventGetResponseELeaveJSON `json:"-"`
}

func (*ConnectorEventGetResponseELeave) UnmarshalJSON ¶

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

type ConnectorEventGetResponseELeaveK ¶

type ConnectorEventGetResponseELeaveK string

Stopped process

const (
	ConnectorEventGetResponseELeaveKLeave ConnectorEventGetResponseELeaveK = "Leave"
)

func (ConnectorEventGetResponseELeaveK) IsKnown ¶

type ConnectorEventGetResponseEReconcile ¶

type ConnectorEventGetResponseEReconcile struct {
	// Reconciled
	K    ConnectorEventGetResponseEReconcileK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEReconcileJSON `json:"-"`
}

func (*ConnectorEventGetResponseEReconcile) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEReconcileK ¶

type ConnectorEventGetResponseEReconcileK string

Reconciled

const (
	ConnectorEventGetResponseEReconcileKReconcile ConnectorEventGetResponseEReconcileK = "Reconcile"
)

func (ConnectorEventGetResponseEReconcileK) IsKnown ¶

type ConnectorEventGetResponseERekeyAdvance ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyAdvance struct {
	// Confirmed traffic on new inbound key, swapped outbound to new
	K ConnectorEventGetResponseERekeyAdvanceK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                     `json:"tunnel_id" api:"required"`
	JSON     connectorEventGetResponseERekeyAdvanceJSON `json:"-"`
}

func (*ConnectorEventGetResponseERekeyAdvance) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventGetResponseERekeyAdvanceK ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyAdvanceK string

Confirmed traffic on new inbound key, swapped outbound to new

const (
	ConnectorEventGetResponseERekeyAdvanceKRekeyAdvance ConnectorEventGetResponseERekeyAdvanceK = "RekeyAdvance"
)

func (ConnectorEventGetResponseERekeyAdvanceK) IsKnown ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyComplete ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyComplete struct {
	// Deleted old keys
	K ConnectorEventGetResponseERekeyCompleteK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                      `json:"tunnel_id" api:"required"`
	JSON     connectorEventGetResponseERekeyCompleteJSON `json:"-"`
}

func (*ConnectorEventGetResponseERekeyComplete) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventGetResponseERekeyCompleteK ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyCompleteK string

Deleted old keys

const (
	ConnectorEventGetResponseERekeyCompleteKRekeyComplete ConnectorEventGetResponseERekeyCompleteK = "RekeyComplete"
)

func (ConnectorEventGetResponseERekeyCompleteK) IsKnown ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyInstallBoth ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyInstallBoth struct {
	// Installed initial inbound and outbound keys
	K ConnectorEventGetResponseERekeyInstallBothK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                         `json:"tunnel_id" api:"required"`
	JSON     connectorEventGetResponseERekeyInstallBothJSON `json:"-"`
}

func (*ConnectorEventGetResponseERekeyInstallBoth) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventGetResponseERekeyInstallBothK ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyInstallBothK string

Installed initial inbound and outbound keys

const (
	ConnectorEventGetResponseERekeyInstallBothKRekeyInstallBoth ConnectorEventGetResponseERekeyInstallBothK = "RekeyInstallBoth"
)

func (ConnectorEventGetResponseERekeyInstallBothK) IsKnown ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyReset ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyReset struct {
	// Deleted all keys after receiving an unexpected key
	K ConnectorEventGetResponseERekeyResetK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                   `json:"tunnel_id" api:"required"`
	JSON     connectorEventGetResponseERekeyResetJSON `json:"-"`
}

func (*ConnectorEventGetResponseERekeyReset) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventGetResponseERekeyResetK ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyResetK string

Deleted all keys after receiving an unexpected key

const (
	ConnectorEventGetResponseERekeyResetKRekeyReset ConnectorEventGetResponseERekeyResetK = "RekeyReset"
)

func (ConnectorEventGetResponseERekeyResetK) IsKnown ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyStart ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyStart struct {
	// Installed new inbound key, kept old outbound
	K ConnectorEventGetResponseERekeyStartK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                   `json:"tunnel_id" api:"required"`
	JSON     connectorEventGetResponseERekeyStartJSON `json:"-"`
}

func (*ConnectorEventGetResponseERekeyStart) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventGetResponseERekeyStartK ¶ added in v7.5.0

type ConnectorEventGetResponseERekeyStartK string

Installed new inbound key, kept old outbound

const (
	ConnectorEventGetResponseERekeyStartKRekeyStart ConnectorEventGetResponseERekeyStartK = "RekeyStart"
)

func (ConnectorEventGetResponseERekeyStartK) IsKnown ¶ added in v7.5.0

type ConnectorEventGetResponseEStartAttestation ¶

type ConnectorEventGetResponseEStartAttestation struct {
	// Started attestation
	K    ConnectorEventGetResponseEStartAttestationK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEStartAttestationJSON `json:"-"`
}

func (*ConnectorEventGetResponseEStartAttestation) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEStartAttestationK ¶

type ConnectorEventGetResponseEStartAttestationK string

Started attestation

const (
	ConnectorEventGetResponseEStartAttestationKStartAttestation ConnectorEventGetResponseEStartAttestationK = "StartAttestation"
)

func (ConnectorEventGetResponseEStartAttestationK) IsKnown ¶

type ConnectorEventGetResponseEStartRotateCryptKey ¶

type ConnectorEventGetResponseEStartRotateCryptKey struct {
	// Started crypt key rotation
	K    ConnectorEventGetResponseEStartRotateCryptKeyK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEStartRotateCryptKeyJSON `json:"-"`
}

func (*ConnectorEventGetResponseEStartRotateCryptKey) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEStartRotateCryptKeyK ¶

type ConnectorEventGetResponseEStartRotateCryptKeyK string

Started crypt key rotation

const (
	ConnectorEventGetResponseEStartRotateCryptKeyKStartRotateCryptKey ConnectorEventGetResponseEStartRotateCryptKeyK = "StartRotateCryptKey"
)

func (ConnectorEventGetResponseEStartRotateCryptKeyK) IsKnown ¶

type ConnectorEventGetResponseEStartRotatePki ¶

type ConnectorEventGetResponseEStartRotatePki struct {
	// Started PKI rotation
	K    ConnectorEventGetResponseEStartRotatePkiK    `json:"k" api:"required"`
	JSON connectorEventGetResponseEStartRotatePkiJSON `json:"-"`
}

func (*ConnectorEventGetResponseEStartRotatePki) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEStartRotatePkiK ¶

type ConnectorEventGetResponseEStartRotatePkiK string

Started PKI rotation

const (
	ConnectorEventGetResponseEStartRotatePkiKStartRotatePki ConnectorEventGetResponseEStartRotatePkiK = "StartRotatePki"
)

func (ConnectorEventGetResponseEStartRotatePkiK) IsKnown ¶

type ConnectorEventGetResponseEStartUpgrade ¶

type ConnectorEventGetResponseEStartUpgrade struct {
	// Started upgrade
	K ConnectorEventGetResponseEStartUpgradeK `json:"k" api:"required"`
	// Location of upgrade bundle
	URL  string                                     `json:"url" api:"required"`
	JSON connectorEventGetResponseEStartUpgradeJSON `json:"-"`
}

func (*ConnectorEventGetResponseEStartUpgrade) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEStartUpgradeK ¶

type ConnectorEventGetResponseEStartUpgradeK string

Started upgrade

const (
	ConnectorEventGetResponseEStartUpgradeKStartUpgrade ConnectorEventGetResponseEStartUpgradeK = "StartUpgrade"
)

func (ConnectorEventGetResponseEStartUpgradeK) IsKnown ¶

type ConnectorEventGetResponseEnvelope ¶

type ConnectorEventGetResponseEnvelope struct {
	// Recorded Event
	Result   ConnectorEventGetResponse                   `json:"result" api:"required"`
	Success  bool                                        `json:"success" api:"required"`
	Errors   []ConnectorEventGetResponseEnvelopeErrors   `json:"errors"`
	Messages []ConnectorEventGetResponseEnvelopeMessages `json:"messages"`
	JSON     connectorEventGetResponseEnvelopeJSON       `json:"-"`
}

func (*ConnectorEventGetResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEnvelopeErrors ¶

type ConnectorEventGetResponseEnvelopeErrors struct {
	Code    float64                                     `json:"code" api:"required"`
	Message string                                      `json:"message" api:"required"`
	JSON    connectorEventGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ConnectorEventGetResponseEnvelopeErrors) UnmarshalJSON ¶

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

type ConnectorEventGetResponseEnvelopeMessages ¶

type ConnectorEventGetResponseEnvelopeMessages struct {
	Code    float64                                       `json:"code" api:"required"`
	Message string                                        `json:"message" api:"required"`
	JSON    connectorEventGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ConnectorEventGetResponseEnvelopeMessages) UnmarshalJSON ¶

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

type ConnectorEventLatestListParams ¶

type ConnectorEventLatestListParams struct {
	// Account identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type ConnectorEventLatestListResponse ¶

type ConnectorEventLatestListResponse struct {
	Count float64                                `json:"count" api:"required"`
	Items []ConnectorEventLatestListResponseItem `json:"items" api:"required"`
	JSON  connectorEventLatestListResponseJSON   `json:"-"`
}

func (*ConnectorEventLatestListResponse) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseEnvelope ¶

type ConnectorEventLatestListResponseEnvelope struct {
	Result   ConnectorEventLatestListResponse                   `json:"result" api:"required"`
	Success  bool                                               `json:"success" api:"required"`
	Errors   []ConnectorEventLatestListResponseEnvelopeErrors   `json:"errors"`
	Messages []ConnectorEventLatestListResponseEnvelopeMessages `json:"messages"`
	JSON     connectorEventLatestListResponseEnvelopeJSON       `json:"-"`
}

func (*ConnectorEventLatestListResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseEnvelopeErrors ¶

type ConnectorEventLatestListResponseEnvelopeErrors struct {
	Code    float64                                            `json:"code" api:"required"`
	Message string                                             `json:"message" api:"required"`
	JSON    connectorEventLatestListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseEnvelopeErrors) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseEnvelopeMessages ¶

type ConnectorEventLatestListResponseEnvelopeMessages struct {
	Code    float64                                              `json:"code" api:"required"`
	Message string                                               `json:"message" api:"required"`
	JSON    connectorEventLatestListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseEnvelopeMessages) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItem ¶

type ConnectorEventLatestListResponseItem struct {
	// Event kind plus event-specific payload fields.
	//
	// Event kinds:
	//
	// - `Init`: Initialized process
	// - `Leave`: Stopped process
	// - `StartAttestation`: Started attestation
	// - `FinishAttestationSuccess`: Finished attestation
	// - `FinishAttestationFailure`: Failed attestation
	// - `StartRotateCryptKey`: Started crypt key rotation
	// - `FinishRotateCryptKeySuccess`: Finished crypt key rotation
	// - `FinishRotateCryptKeyFailure`: Failed crypt key rotation
	// - `StartRotatePki`: Started PKI rotation
	// - `FinishRotatePkiSuccess`: Finished PKI rotation
	// - `FinishRotatePkiFailure`: Failed PKI rotation
	// - `StartUpgrade`: Started upgrade
	// - `FinishUpgradeSuccess`: Finished upgrade
	// - `FinishUpgradeFailure`: Failed upgrade
	// - `BlessSlotSuccess`: Blessed boot entry slot
	// - `BlessSlotPending`: Boot entry slot is not yet blessed
	// - `BlessSlotFailure`: Failed to bless boot entry slot
	// - `Reconcile`: Reconciled
	// - `ConfigureCloudflaredTunnel`: Configured Cloudflared tunnel
	// - `RekeyInstallBoth`: Installed initial inbound and outbound keys
	// - `RekeyStart`: Installed new inbound key, kept old outbound
	// - `RekeyRestart`: Restarted in-progress rekey with newer key material
	// - `RekeyAdvance`: Confirmed traffic on new inbound key, swapped outbound to new
	// - `RekeyComplete`: Deleted old keys
	// - `RekeyReset`: Deleted all keys after receiving an unexpected key
	// - `HaTransition`: Completed HA state transition
	// - `HaError`: Received unexpected HA error
	// - `HaInit`: Initialized HA subsystem
	// - `HaLeave`: Stopped HA subsystem
	E ConnectorEventLatestListResponseItemsE `json:"e" api:"required"`
	// Sequence number, used to order events with the same timestamp
	N float64 `json:"n" api:"required"`
	// Time the Event was recorded (seconds since the Unix epoch)
	T float64 `json:"t" api:"required"`
	// Version
	V    string                                   `json:"v"`
	JSON connectorEventLatestListResponseItemJSON `json:"-"`
}

Recorded Event

func (*ConnectorEventLatestListResponseItem) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItemsE ¶

type ConnectorEventLatestListResponseItemsE struct {
	// Initialized process
	K ConnectorEventLatestListResponseItemsEK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string `json:"tunnel_id"`
	// Location of upgrade bundle
	URL  string                                     `json:"url"`
	JSON connectorEventLatestListResponseItemsEJSON `json:"-"`
	// contains filtered or unexported fields
}

Event kind plus event-specific payload fields.

Event kinds:

- `Init`: Initialized process - `Leave`: Stopped process - `StartAttestation`: Started attestation - `FinishAttestationSuccess`: Finished attestation - `FinishAttestationFailure`: Failed attestation - `StartRotateCryptKey`: Started crypt key rotation - `FinishRotateCryptKeySuccess`: Finished crypt key rotation - `FinishRotateCryptKeyFailure`: Failed crypt key rotation - `StartRotatePki`: Started PKI rotation - `FinishRotatePkiSuccess`: Finished PKI rotation - `FinishRotatePkiFailure`: Failed PKI rotation - `StartUpgrade`: Started upgrade - `FinishUpgradeSuccess`: Finished upgrade - `FinishUpgradeFailure`: Failed upgrade - `BlessSlotSuccess`: Blessed boot entry slot - `BlessSlotPending`: Boot entry slot is not yet blessed - `BlessSlotFailure`: Failed to bless boot entry slot - `Reconcile`: Reconciled - `ConfigureCloudflaredTunnel`: Configured Cloudflared tunnel - `RekeyInstallBoth`: Installed initial inbound and outbound keys - `RekeyStart`: Installed new inbound key, kept old outbound - `RekeyRestart`: Restarted in-progress rekey with newer key material - `RekeyAdvance`: Confirmed traffic on new inbound key, swapped outbound to new - `RekeyComplete`: Deleted old keys - `RekeyReset`: Deleted all keys after receiving an unexpected key - `HaTransition`: Completed HA state transition - `HaError`: Received unexpected HA error - `HaInit`: Initialized HA subsystem - `HaLeave`: Stopped HA subsystem

func (ConnectorEventLatestListResponseItemsE) AsUnion ¶

AsUnion returns a ConnectorEventLatestListResponseItemsEUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ConnectorEventLatestListResponseItemsEInit, ConnectorEventLatestListResponseItemsELeave, ConnectorEventLatestListResponseItemsEStartAttestation, ConnectorEventLatestListResponseItemsEFinishAttestationSuccess, ConnectorEventLatestListResponseItemsEFinishAttestationFailure, ConnectorEventLatestListResponseItemsEStartRotateCryptKey, ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccess, ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailure, ConnectorEventLatestListResponseItemsEStartRotatePki, ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccess, ConnectorEventLatestListResponseItemsEFinishRotatePkiFailure, ConnectorEventLatestListResponseItemsEStartUpgrade, ConnectorEventLatestListResponseItemsEFinishUpgradeSuccess, ConnectorEventLatestListResponseItemsEFinishUpgradeFailure, ConnectorEventLatestListResponseItemsEReconcile, ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnel, ConnectorEventLatestListResponseItemsERekeyInstallBoth, ConnectorEventLatestListResponseItemsERekeyStart, ConnectorEventLatestListResponseItemsERekeyAdvance, ConnectorEventLatestListResponseItemsERekeyComplete, ConnectorEventLatestListResponseItemsERekeyReset.

func (*ConnectorEventLatestListResponseItemsE) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnel ¶

type ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnel struct {
	// Configured Cloudflared tunnel
	K    ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnelK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEConfigureCloudflaredTunnelJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnel) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnelK ¶

type ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnelK string

Configured Cloudflared tunnel

const (
	ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnelKConfigureCloudflaredTunnel ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnelK = "ConfigureCloudflaredTunnel"
)

func (ConnectorEventLatestListResponseItemsEConfigureCloudflaredTunnelK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEFinishAttestationFailure ¶

type ConnectorEventLatestListResponseItemsEFinishAttestationFailure struct {
	// Failed attestation
	K    ConnectorEventLatestListResponseItemsEFinishAttestationFailureK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEFinishAttestationFailureJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEFinishAttestationFailure) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEFinishAttestationFailureK ¶

type ConnectorEventLatestListResponseItemsEFinishAttestationFailureK string

Failed attestation

const (
	ConnectorEventLatestListResponseItemsEFinishAttestationFailureKFinishAttestationFailure ConnectorEventLatestListResponseItemsEFinishAttestationFailureK = "FinishAttestationFailure"
)

func (ConnectorEventLatestListResponseItemsEFinishAttestationFailureK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEFinishAttestationSuccess ¶

type ConnectorEventLatestListResponseItemsEFinishAttestationSuccess struct {
	// Finished attestation
	K    ConnectorEventLatestListResponseItemsEFinishAttestationSuccessK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEFinishAttestationSuccessJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEFinishAttestationSuccess) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEFinishAttestationSuccessK ¶

type ConnectorEventLatestListResponseItemsEFinishAttestationSuccessK string

Finished attestation

const (
	ConnectorEventLatestListResponseItemsEFinishAttestationSuccessKFinishAttestationSuccess ConnectorEventLatestListResponseItemsEFinishAttestationSuccessK = "FinishAttestationSuccess"
)

func (ConnectorEventLatestListResponseItemsEFinishAttestationSuccessK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailure ¶

type ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailure struct {
	// Failed crypt key rotation
	K    ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailureK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEFinishRotateCryptKeyFailureJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailure) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailureK ¶

type ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailureK string

Failed crypt key rotation

const (
	ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailureKFinishRotateCryptKeyFailure ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailureK = "FinishRotateCryptKeyFailure"
)

func (ConnectorEventLatestListResponseItemsEFinishRotateCryptKeyFailureK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccess ¶

type ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccess struct {
	// Finished crypt key rotation
	K    ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccessK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEFinishRotateCryptKeySuccessJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccess) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccessK ¶

type ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccessK string

Finished crypt key rotation

const (
	ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccessKFinishRotateCryptKeySuccess ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccessK = "FinishRotateCryptKeySuccess"
)

func (ConnectorEventLatestListResponseItemsEFinishRotateCryptKeySuccessK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEFinishRotatePkiFailure ¶

type ConnectorEventLatestListResponseItemsEFinishRotatePkiFailure struct {
	// Failed PKI rotation
	K    ConnectorEventLatestListResponseItemsEFinishRotatePkiFailureK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEFinishRotatePkiFailureJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEFinishRotatePkiFailure) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEFinishRotatePkiFailureK ¶

type ConnectorEventLatestListResponseItemsEFinishRotatePkiFailureK string

Failed PKI rotation

const (
	ConnectorEventLatestListResponseItemsEFinishRotatePkiFailureKFinishRotatePkiFailure ConnectorEventLatestListResponseItemsEFinishRotatePkiFailureK = "FinishRotatePkiFailure"
)

func (ConnectorEventLatestListResponseItemsEFinishRotatePkiFailureK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccess ¶

type ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccess struct {
	// Finished PKI rotation
	K    ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccessK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEFinishRotatePkiSuccessJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccess) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccessK ¶

type ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccessK string

Finished PKI rotation

const (
	ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccessKFinishRotatePkiSuccess ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccessK = "FinishRotatePkiSuccess"
)

func (ConnectorEventLatestListResponseItemsEFinishRotatePkiSuccessK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEFinishUpgradeFailure ¶

type ConnectorEventLatestListResponseItemsEFinishUpgradeFailure struct {
	// Failed upgrade
	K    ConnectorEventLatestListResponseItemsEFinishUpgradeFailureK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEFinishUpgradeFailureJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEFinishUpgradeFailure) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEFinishUpgradeFailureK ¶

type ConnectorEventLatestListResponseItemsEFinishUpgradeFailureK string

Failed upgrade

const (
	ConnectorEventLatestListResponseItemsEFinishUpgradeFailureKFinishUpgradeFailure ConnectorEventLatestListResponseItemsEFinishUpgradeFailureK = "FinishUpgradeFailure"
)

func (ConnectorEventLatestListResponseItemsEFinishUpgradeFailureK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEFinishUpgradeSuccess ¶

type ConnectorEventLatestListResponseItemsEFinishUpgradeSuccess struct {
	// Finished upgrade
	K    ConnectorEventLatestListResponseItemsEFinishUpgradeSuccessK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEFinishUpgradeSuccessJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEFinishUpgradeSuccess) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEFinishUpgradeSuccessK ¶

type ConnectorEventLatestListResponseItemsEFinishUpgradeSuccessK string

Finished upgrade

const (
	ConnectorEventLatestListResponseItemsEFinishUpgradeSuccessKFinishUpgradeSuccess ConnectorEventLatestListResponseItemsEFinishUpgradeSuccessK = "FinishUpgradeSuccess"
)

func (ConnectorEventLatestListResponseItemsEFinishUpgradeSuccessK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEInit ¶

type ConnectorEventLatestListResponseItemsEInit struct {
	// Initialized process
	K    ConnectorEventLatestListResponseItemsEInitK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEInitJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEInit) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItemsEInitK ¶

type ConnectorEventLatestListResponseItemsEInitK string

Initialized process

const (
	ConnectorEventLatestListResponseItemsEInitKInit ConnectorEventLatestListResponseItemsEInitK = "Init"
)

func (ConnectorEventLatestListResponseItemsEInitK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEK ¶

type ConnectorEventLatestListResponseItemsEK string

Initialized process

const (
	ConnectorEventLatestListResponseItemsEKInit                        ConnectorEventLatestListResponseItemsEK = "Init"
	ConnectorEventLatestListResponseItemsEKLeave                       ConnectorEventLatestListResponseItemsEK = "Leave"
	ConnectorEventLatestListResponseItemsEKStartAttestation            ConnectorEventLatestListResponseItemsEK = "StartAttestation"
	ConnectorEventLatestListResponseItemsEKFinishAttestationSuccess    ConnectorEventLatestListResponseItemsEK = "FinishAttestationSuccess"
	ConnectorEventLatestListResponseItemsEKFinishAttestationFailure    ConnectorEventLatestListResponseItemsEK = "FinishAttestationFailure"
	ConnectorEventLatestListResponseItemsEKStartRotateCryptKey         ConnectorEventLatestListResponseItemsEK = "StartRotateCryptKey"
	ConnectorEventLatestListResponseItemsEKFinishRotateCryptKeySuccess ConnectorEventLatestListResponseItemsEK = "FinishRotateCryptKeySuccess"
	ConnectorEventLatestListResponseItemsEKFinishRotateCryptKeyFailure ConnectorEventLatestListResponseItemsEK = "FinishRotateCryptKeyFailure"
	ConnectorEventLatestListResponseItemsEKStartRotatePki              ConnectorEventLatestListResponseItemsEK = "StartRotatePki"
	ConnectorEventLatestListResponseItemsEKFinishRotatePkiSuccess      ConnectorEventLatestListResponseItemsEK = "FinishRotatePkiSuccess"
	ConnectorEventLatestListResponseItemsEKFinishRotatePkiFailure      ConnectorEventLatestListResponseItemsEK = "FinishRotatePkiFailure"
	ConnectorEventLatestListResponseItemsEKStartUpgrade                ConnectorEventLatestListResponseItemsEK = "StartUpgrade"
	ConnectorEventLatestListResponseItemsEKFinishUpgradeSuccess        ConnectorEventLatestListResponseItemsEK = "FinishUpgradeSuccess"
	ConnectorEventLatestListResponseItemsEKFinishUpgradeFailure        ConnectorEventLatestListResponseItemsEK = "FinishUpgradeFailure"
	ConnectorEventLatestListResponseItemsEKBlessSlotSuccess            ConnectorEventLatestListResponseItemsEK = "BlessSlotSuccess"
	ConnectorEventLatestListResponseItemsEKBlessSlotPending            ConnectorEventLatestListResponseItemsEK = "BlessSlotPending"
	ConnectorEventLatestListResponseItemsEKBlessSlotFailure            ConnectorEventLatestListResponseItemsEK = "BlessSlotFailure"
	ConnectorEventLatestListResponseItemsEKReconcile                   ConnectorEventLatestListResponseItemsEK = "Reconcile"
	ConnectorEventLatestListResponseItemsEKConfigureCloudflaredTunnel  ConnectorEventLatestListResponseItemsEK = "ConfigureCloudflaredTunnel"
	ConnectorEventLatestListResponseItemsEKRekeyInstallBoth            ConnectorEventLatestListResponseItemsEK = "RekeyInstallBoth"
	ConnectorEventLatestListResponseItemsEKRekeyStart                  ConnectorEventLatestListResponseItemsEK = "RekeyStart"
	ConnectorEventLatestListResponseItemsEKRekeyRestart                ConnectorEventLatestListResponseItemsEK = "RekeyRestart"
	ConnectorEventLatestListResponseItemsEKRekeyAdvance                ConnectorEventLatestListResponseItemsEK = "RekeyAdvance"
	ConnectorEventLatestListResponseItemsEKRekeyComplete               ConnectorEventLatestListResponseItemsEK = "RekeyComplete"
	ConnectorEventLatestListResponseItemsEKRekeyReset                  ConnectorEventLatestListResponseItemsEK = "RekeyReset"
	ConnectorEventLatestListResponseItemsEKHaTransition                ConnectorEventLatestListResponseItemsEK = "HaTransition"
	ConnectorEventLatestListResponseItemsEKHaError                     ConnectorEventLatestListResponseItemsEK = "HaError"
	ConnectorEventLatestListResponseItemsEKHaInit                      ConnectorEventLatestListResponseItemsEK = "HaInit"
	ConnectorEventLatestListResponseItemsEKHaLeave                     ConnectorEventLatestListResponseItemsEK = "HaLeave"
)

func (ConnectorEventLatestListResponseItemsEK) IsKnown ¶

type ConnectorEventLatestListResponseItemsELeave ¶

type ConnectorEventLatestListResponseItemsELeave struct {
	// Stopped process
	K    ConnectorEventLatestListResponseItemsELeaveK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsELeaveJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsELeave) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItemsELeaveK ¶

type ConnectorEventLatestListResponseItemsELeaveK string

Stopped process

const (
	ConnectorEventLatestListResponseItemsELeaveKLeave ConnectorEventLatestListResponseItemsELeaveK = "Leave"
)

func (ConnectorEventLatestListResponseItemsELeaveK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEReconcile ¶

type ConnectorEventLatestListResponseItemsEReconcile struct {
	// Reconciled
	K    ConnectorEventLatestListResponseItemsEReconcileK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEReconcileJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEReconcile) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItemsEReconcileK ¶

type ConnectorEventLatestListResponseItemsEReconcileK string

Reconciled

const (
	ConnectorEventLatestListResponseItemsEReconcileKReconcile ConnectorEventLatestListResponseItemsEReconcileK = "Reconcile"
)

func (ConnectorEventLatestListResponseItemsEReconcileK) IsKnown ¶

type ConnectorEventLatestListResponseItemsERekeyAdvance ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyAdvance struct {
	// Confirmed traffic on new inbound key, swapped outbound to new
	K ConnectorEventLatestListResponseItemsERekeyAdvanceK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                                 `json:"tunnel_id" api:"required"`
	JSON     connectorEventLatestListResponseItemsERekeyAdvanceJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsERekeyAdvance) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventLatestListResponseItemsERekeyAdvanceK ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyAdvanceK string

Confirmed traffic on new inbound key, swapped outbound to new

const (
	ConnectorEventLatestListResponseItemsERekeyAdvanceKRekeyAdvance ConnectorEventLatestListResponseItemsERekeyAdvanceK = "RekeyAdvance"
)

func (ConnectorEventLatestListResponseItemsERekeyAdvanceK) IsKnown ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyComplete ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyComplete struct {
	// Deleted old keys
	K ConnectorEventLatestListResponseItemsERekeyCompleteK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                                  `json:"tunnel_id" api:"required"`
	JSON     connectorEventLatestListResponseItemsERekeyCompleteJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsERekeyComplete) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventLatestListResponseItemsERekeyCompleteK ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyCompleteK string

Deleted old keys

const (
	ConnectorEventLatestListResponseItemsERekeyCompleteKRekeyComplete ConnectorEventLatestListResponseItemsERekeyCompleteK = "RekeyComplete"
)

func (ConnectorEventLatestListResponseItemsERekeyCompleteK) IsKnown ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyInstallBoth ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyInstallBoth struct {
	// Installed initial inbound and outbound keys
	K ConnectorEventLatestListResponseItemsERekeyInstallBothK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                                     `json:"tunnel_id" api:"required"`
	JSON     connectorEventLatestListResponseItemsERekeyInstallBothJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsERekeyInstallBoth) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventLatestListResponseItemsERekeyInstallBothK ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyInstallBothK string

Installed initial inbound and outbound keys

const (
	ConnectorEventLatestListResponseItemsERekeyInstallBothKRekeyInstallBoth ConnectorEventLatestListResponseItemsERekeyInstallBothK = "RekeyInstallBoth"
)

func (ConnectorEventLatestListResponseItemsERekeyInstallBothK) IsKnown ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyReset ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyReset struct {
	// Deleted all keys after receiving an unexpected key
	K ConnectorEventLatestListResponseItemsERekeyResetK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                               `json:"tunnel_id" api:"required"`
	JSON     connectorEventLatestListResponseItemsERekeyResetJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsERekeyReset) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventLatestListResponseItemsERekeyResetK ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyResetK string

Deleted all keys after receiving an unexpected key

const (
	ConnectorEventLatestListResponseItemsERekeyResetKRekeyReset ConnectorEventLatestListResponseItemsERekeyResetK = "RekeyReset"
)

func (ConnectorEventLatestListResponseItemsERekeyResetK) IsKnown ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyStart ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyStart struct {
	// Installed new inbound key, kept old outbound
	K ConnectorEventLatestListResponseItemsERekeyStartK `json:"k" api:"required"`
	// Tunnel identifier
	TunnelID string                                               `json:"tunnel_id" api:"required"`
	JSON     connectorEventLatestListResponseItemsERekeyStartJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsERekeyStart) UnmarshalJSON ¶ added in v7.5.0

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

type ConnectorEventLatestListResponseItemsERekeyStartK ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsERekeyStartK string

Installed new inbound key, kept old outbound

const (
	ConnectorEventLatestListResponseItemsERekeyStartKRekeyStart ConnectorEventLatestListResponseItemsERekeyStartK = "RekeyStart"
)

func (ConnectorEventLatestListResponseItemsERekeyStartK) IsKnown ¶ added in v7.5.0

type ConnectorEventLatestListResponseItemsEStartAttestation ¶

type ConnectorEventLatestListResponseItemsEStartAttestation struct {
	// Started attestation
	K    ConnectorEventLatestListResponseItemsEStartAttestationK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEStartAttestationJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEStartAttestation) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItemsEStartAttestationK ¶

type ConnectorEventLatestListResponseItemsEStartAttestationK string

Started attestation

const (
	ConnectorEventLatestListResponseItemsEStartAttestationKStartAttestation ConnectorEventLatestListResponseItemsEStartAttestationK = "StartAttestation"
)

func (ConnectorEventLatestListResponseItemsEStartAttestationK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEStartRotateCryptKey ¶

type ConnectorEventLatestListResponseItemsEStartRotateCryptKey struct {
	// Started crypt key rotation
	K    ConnectorEventLatestListResponseItemsEStartRotateCryptKeyK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEStartRotateCryptKeyJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEStartRotateCryptKey) UnmarshalJSON ¶

type ConnectorEventLatestListResponseItemsEStartRotateCryptKeyK ¶

type ConnectorEventLatestListResponseItemsEStartRotateCryptKeyK string

Started crypt key rotation

const (
	ConnectorEventLatestListResponseItemsEStartRotateCryptKeyKStartRotateCryptKey ConnectorEventLatestListResponseItemsEStartRotateCryptKeyK = "StartRotateCryptKey"
)

func (ConnectorEventLatestListResponseItemsEStartRotateCryptKeyK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEStartRotatePki ¶

type ConnectorEventLatestListResponseItemsEStartRotatePki struct {
	// Started PKI rotation
	K    ConnectorEventLatestListResponseItemsEStartRotatePkiK    `json:"k" api:"required"`
	JSON connectorEventLatestListResponseItemsEStartRotatePkiJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEStartRotatePki) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItemsEStartRotatePkiK ¶

type ConnectorEventLatestListResponseItemsEStartRotatePkiK string

Started PKI rotation

const (
	ConnectorEventLatestListResponseItemsEStartRotatePkiKStartRotatePki ConnectorEventLatestListResponseItemsEStartRotatePkiK = "StartRotatePki"
)

func (ConnectorEventLatestListResponseItemsEStartRotatePkiK) IsKnown ¶

type ConnectorEventLatestListResponseItemsEStartUpgrade ¶

type ConnectorEventLatestListResponseItemsEStartUpgrade struct {
	// Started upgrade
	K ConnectorEventLatestListResponseItemsEStartUpgradeK `json:"k" api:"required"`
	// Location of upgrade bundle
	URL  string                                                 `json:"url" api:"required"`
	JSON connectorEventLatestListResponseItemsEStartUpgradeJSON `json:"-"`
}

func (*ConnectorEventLatestListResponseItemsEStartUpgrade) UnmarshalJSON ¶

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

type ConnectorEventLatestListResponseItemsEStartUpgradeK ¶

type ConnectorEventLatestListResponseItemsEStartUpgradeK string

Started upgrade

const (
	ConnectorEventLatestListResponseItemsEStartUpgradeKStartUpgrade ConnectorEventLatestListResponseItemsEStartUpgradeK = "StartUpgrade"
)

func (ConnectorEventLatestListResponseItemsEStartUpgradeK) IsKnown ¶

type ConnectorEventLatestService ¶

type ConnectorEventLatestService struct {
	Options []option.RequestOption
}

ConnectorEventLatestService 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 NewConnectorEventLatestService method instead.

func NewConnectorEventLatestService ¶

func NewConnectorEventLatestService(opts ...option.RequestOption) (r *ConnectorEventLatestService)

NewConnectorEventLatestService 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 (*ConnectorEventLatestService) List ¶

Gets latest Magic WAN Connector Telemetry Events

type ConnectorEventListParams ¶

type ConnectorEventListParams struct {
	// Account identifier
	AccountID param.Field[string]  `path:"account_id" api:"required"`
	From      param.Field[float64] `query:"from" api:"required"`
	To        param.Field[float64] `query:"to" api:"required"`
	Cursor    param.Field[string]  `query:"cursor"`
	// Filter by event kind
	K     param.Field[string]  `query:"k"`
	Limit param.Field[float64] `query:"limit"`
}

func (ConnectorEventListParams) URLQuery ¶

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

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

type ConnectorEventListResponse ¶

type ConnectorEventListResponse struct {
	Count  float64                          `json:"count" api:"required"`
	Items  []ConnectorEventListResponseItem `json:"items" api:"required"`
	Cursor string                           `json:"cursor"`
	JSON   connectorEventListResponseJSON   `json:"-"`
}

func (*ConnectorEventListResponse) UnmarshalJSON ¶

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

type ConnectorEventListResponseEnvelope ¶

type ConnectorEventListResponseEnvelope struct {
	Result   ConnectorEventListResponse                   `json:"result" api:"required"`
	Success  bool                                         `json:"success" api:"required"`
	Errors   []ConnectorEventListResponseEnvelopeErrors   `json:"errors"`
	Messages []ConnectorEventListResponseEnvelopeMessages `json:"messages"`
	JSON     connectorEventListResponseEnvelopeJSON       `json:"-"`
}

func (*ConnectorEventListResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorEventListResponseEnvelopeErrors ¶

type ConnectorEventListResponseEnvelopeErrors struct {
	Code    float64                                      `json:"code" api:"required"`
	Message string                                       `json:"message" api:"required"`
	JSON    connectorEventListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ConnectorEventListResponseEnvelopeErrors) UnmarshalJSON ¶

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

type ConnectorEventListResponseEnvelopeMessages ¶

type ConnectorEventListResponseEnvelopeMessages struct {
	Code    float64                                        `json:"code" api:"required"`
	Message string                                         `json:"message" api:"required"`
	JSON    connectorEventListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ConnectorEventListResponseEnvelopeMessages) UnmarshalJSON ¶

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

type ConnectorEventListResponseItem ¶

type ConnectorEventListResponseItem struct {
	// Time the Event was collected (seconds since the Unix epoch)
	A float64 `json:"a" api:"required"`
	// Kind
	K string `json:"k" api:"required"`
	// Sequence number, used to order events with the same timestamp
	N float64 `json:"n" api:"required"`
	// Time the Event was recorded (seconds since the Unix epoch)
	T    float64                            `json:"t" api:"required"`
	JSON connectorEventListResponseItemJSON `json:"-"`
}

func (*ConnectorEventListResponseItem) UnmarshalJSON ¶

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

type ConnectorEventService ¶

type ConnectorEventService struct {
	Options []option.RequestOption
	Latest  *ConnectorEventLatestService
}

ConnectorEventService 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 NewConnectorEventService method instead.

func NewConnectorEventService ¶

func NewConnectorEventService(opts ...option.RequestOption) (r *ConnectorEventService)

NewConnectorEventService 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 (*ConnectorEventService) Get ¶

func (r *ConnectorEventService) Get(ctx context.Context, connectorID string, eventT float64, eventN float64, query ConnectorEventGetParams, opts ...option.RequestOption) (res *ConnectorEventGetResponse, err error)

Gets Magic WAN Connector Telemetry Event

func (*ConnectorEventService) List ¶

List Events

type ConnectorGetParams ¶

type ConnectorGetParams struct {
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type ConnectorGetResponse ¶

type ConnectorGetResponse struct {
	ID        string `json:"id" api:"required"`
	Activated bool   `json:"activated" api:"required"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    []ConnectorGetResponseInterruptWindowDaysOfWeek `json:"interrupt_window_days_of_week" api:"required"`
	InterruptWindowDurationHours float64                                         `json:"interrupt_window_duration_hours" api:"required"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates []string                   `json:"interrupt_window_embargo_dates" api:"required"`
	InterruptWindowHourOfDay    float64                    `json:"interrupt_window_hour_of_day" api:"required"`
	LastUpdated                 string                     `json:"last_updated" api:"required"`
	Notes                       string                     `json:"notes" api:"required"`
	Primary                     bool                       `json:"primary" api:"required"`
	Timezone                    string                     `json:"timezone" api:"required"`
	Device                      ConnectorGetResponseDevice `json:"device"`
	LastHeartbeat               string                     `json:"last_heartbeat"`
	LastSeenVersion             string                     `json:"last_seen_version"`
	LicenseKey                  string                     `json:"license_key"`
	SiteID                      string                     `json:"site_id"`
	JSON                        connectorGetResponseJSON   `json:"-"`
}

func (*ConnectorGetResponse) UnmarshalJSON ¶

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

type ConnectorGetResponseDevice ¶

type ConnectorGetResponseDevice struct {
	ID           string                         `json:"id" api:"required"`
	SerialNumber string                         `json:"serial_number"`
	Type         ConnectorGetResponseDeviceType `json:"type"`
	JSON         connectorGetResponseDeviceJSON `json:"-"`
}

func (*ConnectorGetResponseDevice) UnmarshalJSON ¶

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

type ConnectorGetResponseDeviceType ¶

type ConnectorGetResponseDeviceType string
const (
	ConnectorGetResponseDeviceTypeManaged  ConnectorGetResponseDeviceType = "MANAGED"
	ConnectorGetResponseDeviceTypeLicensed ConnectorGetResponseDeviceType = "LICENSED"
)

func (ConnectorGetResponseDeviceType) IsKnown ¶

type ConnectorGetResponseEnvelope ¶

type ConnectorGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo            `json:"errors" api:"required"`
	Messages []shared.ResponseInfo            `json:"messages" api:"required"`
	Result   ConnectorGetResponse             `json:"result" api:"required"`
	Success  bool                             `json:"success" api:"required"`
	JSON     connectorGetResponseEnvelopeJSON `json:"-"`
}

func (*ConnectorGetResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorGetResponseInterruptWindowDaysOfWeek ¶

type ConnectorGetResponseInterruptWindowDaysOfWeek string
const (
	ConnectorGetResponseInterruptWindowDaysOfWeekSunday    ConnectorGetResponseInterruptWindowDaysOfWeek = "Sunday"
	ConnectorGetResponseInterruptWindowDaysOfWeekMonday    ConnectorGetResponseInterruptWindowDaysOfWeek = "Monday"
	ConnectorGetResponseInterruptWindowDaysOfWeekTuesday   ConnectorGetResponseInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorGetResponseInterruptWindowDaysOfWeekWednesday ConnectorGetResponseInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorGetResponseInterruptWindowDaysOfWeekThursday  ConnectorGetResponseInterruptWindowDaysOfWeek = "Thursday"
	ConnectorGetResponseInterruptWindowDaysOfWeekFriday    ConnectorGetResponseInterruptWindowDaysOfWeek = "Friday"
	ConnectorGetResponseInterruptWindowDaysOfWeekSaturday  ConnectorGetResponseInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorGetResponseInterruptWindowDaysOfWeek) IsKnown ¶

type ConnectorInterruptListParams ¶ added in v7.8.0

type ConnectorInterruptListParams struct {
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type ConnectorInterruptListResponse ¶ added in v7.8.0

type ConnectorInterruptListResponse struct {
	SubmittedAt string                                 `json:"submitted_at" api:"required"`
	Reboot      ConnectorInterruptListResponseReboot   `json:"reboot"`
	Restart     ConnectorInterruptListResponseRestart  `json:"restart"`
	Shutdown    ConnectorInterruptListResponseShutdown `json:"shutdown"`
	TriggeredAt string                                 `json:"triggered_at"`
	JSON        connectorInterruptListResponseJSON     `json:"-"`
}

Interrupt action for a connector.

func (*ConnectorInterruptListResponse) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptListResponseReboot ¶ added in v7.8.0

type ConnectorInterruptListResponseReboot struct {
	// Purge connector state.
	Purge bool                                     `json:"purge"`
	JSON  connectorInterruptListResponseRebootJSON `json:"-"`
}

func (*ConnectorInterruptListResponseReboot) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptListResponseRestart ¶ added in v7.8.0

type ConnectorInterruptListResponseRestart struct {
	// Purge connector state.
	Purge bool                                      `json:"purge"`
	JSON  connectorInterruptListResponseRestartJSON `json:"-"`
}

func (*ConnectorInterruptListResponseRestart) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptListResponseShutdown ¶ added in v7.8.0

type ConnectorInterruptListResponseShutdown struct {
	// Purge connector state.
	Purge bool                                       `json:"purge"`
	JSON  connectorInterruptListResponseShutdownJSON `json:"-"`
}

func (*ConnectorInterruptListResponseShutdown) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewParams ¶ added in v7.8.0

type ConnectorInterruptNewParams struct {
	AccountID param.Field[string]                              `path:"account_id" api:"required"`
	Reboot    param.Field[ConnectorInterruptNewParamsReboot]   `json:"reboot"`
	Restart   param.Field[ConnectorInterruptNewParamsRestart]  `json:"restart"`
	Shutdown  param.Field[ConnectorInterruptNewParamsShutdown] `json:"shutdown"`
}

func (ConnectorInterruptNewParams) MarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewParamsReboot ¶ added in v7.8.0

type ConnectorInterruptNewParamsReboot struct {
	// Purge connector state.
	Purge param.Field[bool] `json:"purge"`
}

func (ConnectorInterruptNewParamsReboot) MarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewParamsRestart ¶ added in v7.8.0

type ConnectorInterruptNewParamsRestart struct {
	// Purge connector state.
	Purge param.Field[bool] `json:"purge"`
}

func (ConnectorInterruptNewParamsRestart) MarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewParamsShutdown ¶ added in v7.8.0

type ConnectorInterruptNewParamsShutdown struct {
	// Purge connector state.
	Purge param.Field[bool] `json:"purge"`
}

func (ConnectorInterruptNewParamsShutdown) MarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewResponse ¶ added in v7.8.0

type ConnectorInterruptNewResponse struct {
	SubmittedAt string                                `json:"submitted_at" api:"required"`
	Reboot      ConnectorInterruptNewResponseReboot   `json:"reboot"`
	Restart     ConnectorInterruptNewResponseRestart  `json:"restart"`
	Shutdown    ConnectorInterruptNewResponseShutdown `json:"shutdown"`
	TriggeredAt string                                `json:"triggered_at"`
	JSON        connectorInterruptNewResponseJSON     `json:"-"`
}

Interrupt action for a connector.

func (*ConnectorInterruptNewResponse) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewResponseEnvelope ¶ added in v7.8.0

type ConnectorInterruptNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Interrupt action for a connector.
	Result  ConnectorInterruptNewResponse             `json:"result" api:"required"`
	Success bool                                      `json:"success" api:"required"`
	JSON    connectorInterruptNewResponseEnvelopeJSON `json:"-"`
}

func (*ConnectorInterruptNewResponseEnvelope) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewResponseReboot ¶ added in v7.8.0

type ConnectorInterruptNewResponseReboot struct {
	// Purge connector state.
	Purge bool                                    `json:"purge"`
	JSON  connectorInterruptNewResponseRebootJSON `json:"-"`
}

func (*ConnectorInterruptNewResponseReboot) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewResponseRestart ¶ added in v7.8.0

type ConnectorInterruptNewResponseRestart struct {
	// Purge connector state.
	Purge bool                                     `json:"purge"`
	JSON  connectorInterruptNewResponseRestartJSON `json:"-"`
}

func (*ConnectorInterruptNewResponseRestart) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptNewResponseShutdown ¶ added in v7.8.0

type ConnectorInterruptNewResponseShutdown struct {
	// Purge connector state.
	Purge bool                                      `json:"purge"`
	JSON  connectorInterruptNewResponseShutdownJSON `json:"-"`
}

func (*ConnectorInterruptNewResponseShutdown) UnmarshalJSON ¶ added in v7.8.0

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

type ConnectorInterruptService ¶ added in v7.8.0

type ConnectorInterruptService struct {
	Options []option.RequestOption
}

ConnectorInterruptService 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 NewConnectorInterruptService method instead.

func NewConnectorInterruptService ¶ added in v7.8.0

func NewConnectorInterruptService(opts ...option.RequestOption) (r *ConnectorInterruptService)

NewConnectorInterruptService 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 (*ConnectorInterruptService) List ¶ added in v7.8.0

Lists interrupts for a Magic WAN Connector.

func (*ConnectorInterruptService) ListAutoPaging ¶ added in v7.8.0

Lists interrupts for a Magic WAN Connector.

func (*ConnectorInterruptService) New ¶ added in v7.8.0

Creates an interrupt for a Magic WAN Connector.

type ConnectorListParams ¶

type ConnectorListParams struct {
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Filter connectors by device type.
	DeviceType param.Field[ConnectorListParamsDeviceType] `query:"device_type"`
}

func (ConnectorListParams) URLQuery ¶

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

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

type ConnectorListParamsDeviceType ¶

type ConnectorListParamsDeviceType string

Filter connectors by device type.

const (
	ConnectorListParamsDeviceTypeManaged  ConnectorListParamsDeviceType = "MANAGED"
	ConnectorListParamsDeviceTypeLicensed ConnectorListParamsDeviceType = "LICENSED"
)

func (ConnectorListParamsDeviceType) IsKnown ¶

func (r ConnectorListParamsDeviceType) IsKnown() bool

type ConnectorListResponse ¶

type ConnectorListResponse struct {
	ID        string `json:"id" api:"required"`
	Activated bool   `json:"activated" api:"required"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    []ConnectorListResponseInterruptWindowDaysOfWeek `json:"interrupt_window_days_of_week" api:"required"`
	InterruptWindowDurationHours float64                                          `json:"interrupt_window_duration_hours" api:"required"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates []string                    `json:"interrupt_window_embargo_dates" api:"required"`
	InterruptWindowHourOfDay    float64                     `json:"interrupt_window_hour_of_day" api:"required"`
	LastUpdated                 string                      `json:"last_updated" api:"required"`
	Notes                       string                      `json:"notes" api:"required"`
	Primary                     bool                        `json:"primary" api:"required"`
	Timezone                    string                      `json:"timezone" api:"required"`
	Device                      ConnectorListResponseDevice `json:"device"`
	LastHeartbeat               string                      `json:"last_heartbeat"`
	LastSeenVersion             string                      `json:"last_seen_version"`
	LicenseKey                  string                      `json:"license_key"`
	SiteID                      string                      `json:"site_id"`
	JSON                        connectorListResponseJSON   `json:"-"`
}

func (*ConnectorListResponse) UnmarshalJSON ¶

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

type ConnectorListResponseDevice ¶

type ConnectorListResponseDevice struct {
	ID           string                          `json:"id" api:"required"`
	SerialNumber string                          `json:"serial_number"`
	Type         ConnectorListResponseDeviceType `json:"type"`
	JSON         connectorListResponseDeviceJSON `json:"-"`
}

func (*ConnectorListResponseDevice) UnmarshalJSON ¶

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

type ConnectorListResponseDeviceType ¶

type ConnectorListResponseDeviceType string
const (
	ConnectorListResponseDeviceTypeManaged  ConnectorListResponseDeviceType = "MANAGED"
	ConnectorListResponseDeviceTypeLicensed ConnectorListResponseDeviceType = "LICENSED"
)

func (ConnectorListResponseDeviceType) IsKnown ¶

type ConnectorListResponseInterruptWindowDaysOfWeek ¶

type ConnectorListResponseInterruptWindowDaysOfWeek string
const (
	ConnectorListResponseInterruptWindowDaysOfWeekSunday    ConnectorListResponseInterruptWindowDaysOfWeek = "Sunday"
	ConnectorListResponseInterruptWindowDaysOfWeekMonday    ConnectorListResponseInterruptWindowDaysOfWeek = "Monday"
	ConnectorListResponseInterruptWindowDaysOfWeekTuesday   ConnectorListResponseInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorListResponseInterruptWindowDaysOfWeekWednesday ConnectorListResponseInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorListResponseInterruptWindowDaysOfWeekThursday  ConnectorListResponseInterruptWindowDaysOfWeek = "Thursday"
	ConnectorListResponseInterruptWindowDaysOfWeekFriday    ConnectorListResponseInterruptWindowDaysOfWeek = "Friday"
	ConnectorListResponseInterruptWindowDaysOfWeekSaturday  ConnectorListResponseInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorListResponseInterruptWindowDaysOfWeek) IsKnown ¶

type ConnectorNewParams ¶

type ConnectorNewParams struct {
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Exactly one of id, serial_number, or provision_license must be provided.
	Device    param.Field[ConnectorNewParamsDevice] `json:"device" api:"required"`
	Activated param.Field[bool]                     `json:"activated"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    param.Field[[]ConnectorNewParamsInterruptWindowDaysOfWeek] `json:"interrupt_window_days_of_week"`
	InterruptWindowDurationHours param.Field[float64]                                       `json:"interrupt_window_duration_hours"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates param.Field[[]string] `json:"interrupt_window_embargo_dates"`
	InterruptWindowHourOfDay    param.Field[float64]  `json:"interrupt_window_hour_of_day"`
	Notes                       param.Field[string]   `json:"notes"`
	Primary                     param.Field[bool]     `json:"primary"`
	SiteID                      param.Field[string]   `json:"site_id"`
	Timezone                    param.Field[string]   `json:"timezone"`
}

func (ConnectorNewParams) MarshalJSON ¶

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

type ConnectorNewParamsDevice ¶

type ConnectorNewParamsDevice struct {
	ID param.Field[string] `json:"id"`
	// When true, create and provision a new licence key for the connector.
	ProvisionLicense param.Field[bool]   `json:"provision_license"`
	SerialNumber     param.Field[string] `json:"serial_number"`
}

Exactly one of id, serial_number, or provision_license must be provided.

func (ConnectorNewParamsDevice) MarshalJSON ¶

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

type ConnectorNewParamsInterruptWindowDaysOfWeek ¶

type ConnectorNewParamsInterruptWindowDaysOfWeek string
const (
	ConnectorNewParamsInterruptWindowDaysOfWeekSunday    ConnectorNewParamsInterruptWindowDaysOfWeek = "Sunday"
	ConnectorNewParamsInterruptWindowDaysOfWeekMonday    ConnectorNewParamsInterruptWindowDaysOfWeek = "Monday"
	ConnectorNewParamsInterruptWindowDaysOfWeekTuesday   ConnectorNewParamsInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorNewParamsInterruptWindowDaysOfWeekWednesday ConnectorNewParamsInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorNewParamsInterruptWindowDaysOfWeekThursday  ConnectorNewParamsInterruptWindowDaysOfWeek = "Thursday"
	ConnectorNewParamsInterruptWindowDaysOfWeekFriday    ConnectorNewParamsInterruptWindowDaysOfWeek = "Friday"
	ConnectorNewParamsInterruptWindowDaysOfWeekSaturday  ConnectorNewParamsInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorNewParamsInterruptWindowDaysOfWeek) IsKnown ¶

type ConnectorNewResponse ¶

type ConnectorNewResponse struct {
	ID        string `json:"id" api:"required"`
	Activated bool   `json:"activated" api:"required"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    []ConnectorNewResponseInterruptWindowDaysOfWeek `json:"interrupt_window_days_of_week" api:"required"`
	InterruptWindowDurationHours float64                                         `json:"interrupt_window_duration_hours" api:"required"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates []string                   `json:"interrupt_window_embargo_dates" api:"required"`
	InterruptWindowHourOfDay    float64                    `json:"interrupt_window_hour_of_day" api:"required"`
	LastUpdated                 string                     `json:"last_updated" api:"required"`
	Notes                       string                     `json:"notes" api:"required"`
	Primary                     bool                       `json:"primary" api:"required"`
	Timezone                    string                     `json:"timezone" api:"required"`
	Device                      ConnectorNewResponseDevice `json:"device"`
	LastHeartbeat               string                     `json:"last_heartbeat"`
	LastSeenVersion             string                     `json:"last_seen_version"`
	LicenseKey                  string                     `json:"license_key"`
	SiteID                      string                     `json:"site_id"`
	JSON                        connectorNewResponseJSON   `json:"-"`
}

func (*ConnectorNewResponse) UnmarshalJSON ¶

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

type ConnectorNewResponseDevice ¶

type ConnectorNewResponseDevice struct {
	ID           string                         `json:"id" api:"required"`
	SerialNumber string                         `json:"serial_number"`
	Type         ConnectorNewResponseDeviceType `json:"type"`
	JSON         connectorNewResponseDeviceJSON `json:"-"`
}

func (*ConnectorNewResponseDevice) UnmarshalJSON ¶

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

type ConnectorNewResponseDeviceType ¶

type ConnectorNewResponseDeviceType string
const (
	ConnectorNewResponseDeviceTypeManaged  ConnectorNewResponseDeviceType = "MANAGED"
	ConnectorNewResponseDeviceTypeLicensed ConnectorNewResponseDeviceType = "LICENSED"
)

func (ConnectorNewResponseDeviceType) IsKnown ¶

type ConnectorNewResponseEnvelope ¶

type ConnectorNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo            `json:"errors" api:"required"`
	Messages []shared.ResponseInfo            `json:"messages" api:"required"`
	Result   ConnectorNewResponse             `json:"result" api:"required"`
	Success  bool                             `json:"success" api:"required"`
	JSON     connectorNewResponseEnvelopeJSON `json:"-"`
}

func (*ConnectorNewResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorNewResponseInterruptWindowDaysOfWeek ¶

type ConnectorNewResponseInterruptWindowDaysOfWeek string
const (
	ConnectorNewResponseInterruptWindowDaysOfWeekSunday    ConnectorNewResponseInterruptWindowDaysOfWeek = "Sunday"
	ConnectorNewResponseInterruptWindowDaysOfWeekMonday    ConnectorNewResponseInterruptWindowDaysOfWeek = "Monday"
	ConnectorNewResponseInterruptWindowDaysOfWeekTuesday   ConnectorNewResponseInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorNewResponseInterruptWindowDaysOfWeekWednesday ConnectorNewResponseInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorNewResponseInterruptWindowDaysOfWeekThursday  ConnectorNewResponseInterruptWindowDaysOfWeek = "Thursday"
	ConnectorNewResponseInterruptWindowDaysOfWeekFriday    ConnectorNewResponseInterruptWindowDaysOfWeek = "Friday"
	ConnectorNewResponseInterruptWindowDaysOfWeekSaturday  ConnectorNewResponseInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorNewResponseInterruptWindowDaysOfWeek) IsKnown ¶

type ConnectorService ¶

type ConnectorService struct {
	Options    []option.RequestOption
	Interrupts *ConnectorInterruptService
	Events     *ConnectorEventService
	Snapshots  *ConnectorSnapshotService
}

ConnectorService 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 NewConnectorService method instead.

func NewConnectorService ¶

func NewConnectorService(opts ...option.RequestOption) (r *ConnectorService)

NewConnectorService 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 (*ConnectorService) Delete ¶

func (r *ConnectorService) Delete(ctx context.Context, connectorID string, body ConnectorDeleteParams, opts ...option.RequestOption) (res *ConnectorDeleteResponse, err error)

Deletes a Magic WAN Connector.

func (*ConnectorService) Edit ¶

func (r *ConnectorService) Edit(ctx context.Context, connectorID string, params ConnectorEditParams, opts ...option.RequestOption) (res *ConnectorEditResponse, err error)

Edits properties of a Magic WAN Connector. May be used to re-provision a license key.

func (*ConnectorService) Get ¶

func (r *ConnectorService) Get(ctx context.Context, connectorID string, query ConnectorGetParams, opts ...option.RequestOption) (res *ConnectorGetResponse, err error)

Gets a Magic WAN Connector.

func (*ConnectorService) List ¶

Lists Magic WAN Connectors.

func (*ConnectorService) ListAutoPaging ¶

Lists Magic WAN Connectors.

func (*ConnectorService) New ¶

Creates a Magic WAN Connector.

func (*ConnectorService) Update ¶

func (r *ConnectorService) Update(ctx context.Context, connectorID string, params ConnectorUpdateParams, opts ...option.RequestOption) (res *ConnectorUpdateResponse, err error)

Updates properties of a Magic WAN Connector. May be used to re-provision a license key.

type ConnectorSnapshotGetParams ¶

type ConnectorSnapshotGetParams struct {
	// Account identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type ConnectorSnapshotGetResponse ¶

type ConnectorSnapshotGetResponse struct {
	// Count of failures to reclaim space
	CountReclaimFailures float64 `json:"count_reclaim_failures" api:"required"`
	// Count of reclaimed paths
	CountReclaimedPaths float64 `json:"count_reclaimed_paths" api:"required"`
	// Count of failed snapshot recordings
	CountRecordFailed float64 `json:"count_record_failed" api:"required"`
	// Count of failed snapshot transmissions
	CountTransmitFailures float64 `json:"count_transmit_failures" api:"required"`
	// Time the Snapshot was recorded (seconds since the Unix epoch)
	T float64 `json:"t" api:"required"`
	// Version
	V     string                             `json:"v" api:"required"`
	Bonds []ConnectorSnapshotGetResponseBond `json:"bonds"`
	// Count of processors/cores
	CPUCount float64 `json:"cpu_count"`
	// Percentage of time over a 10 second window that tasks were stalled
	CPUPressure10s float64 `json:"cpu_pressure_10s"`
	// Percentage of time over a 5 minute window that tasks were stalled
	CPUPressure300s float64 `json:"cpu_pressure_300s"`
	// Percentage of time over a 1 minute window that tasks were stalled
	CPUPressure60s float64 `json:"cpu_pressure_60s"`
	// Total stall time (microseconds)
	CPUPressureTotalUs float64 `json:"cpu_pressure_total_us"`
	// Time spent running a virtual CPU or guest OS (milliseconds)
	CPUTimeGuestMs float64 `json:"cpu_time_guest_ms"`
	// Time spent running a niced guest (milliseconds)
	CPUTimeGuestNiceMs float64 `json:"cpu_time_guest_nice_ms"`
	// Time spent in idle state (milliseconds)
	CPUTimeIdleMs float64 `json:"cpu_time_idle_ms"`
	// Time spent wait for I/O to complete (milliseconds)
	CPUTimeIowaitMs float64 `json:"cpu_time_iowait_ms"`
	// Time spent servicing interrupts (milliseconds)
	CPUTimeIrqMs float64 `json:"cpu_time_irq_ms"`
	// Time spent in low-priority user mode (milliseconds)
	CPUTimeNiceMs float64 `json:"cpu_time_nice_ms"`
	// Time spent servicing softirqs (milliseconds)
	CPUTimeSoftirqMs float64 `json:"cpu_time_softirq_ms"`
	// Time stolen (milliseconds)
	CPUTimeStealMs float64 `json:"cpu_time_steal_ms"`
	// Time spent in system mode (milliseconds)
	CPUTimeSystemMs float64 `json:"cpu_time_system_ms"`
	// Time spent in user mode (milliseconds)
	CPUTimeUserMs float64 `json:"cpu_time_user_ms"`
	// Number of network operations applied during state transition
	Delta      float64                                 `json:"delta"`
	DHCPLeases []ConnectorSnapshotGetResponseDHCPLease `json:"dhcp_leases"`
	Disks      []ConnectorSnapshotGetResponseDisk      `json:"disks"`
	// Simulated number of network operations applied during state transition
	Epsilon float64 `json:"epsilon"`
	// Name of high availability state
	HaState string `json:"ha_state"`
	// Numeric value associated with high availability state (0 = disabled, 1 = active,
	// 2 = standby, 3 = stopped, 4 = fault)
	HaValue    float64                                 `json:"ha_value"`
	Interfaces []ConnectorSnapshotGetResponseInterface `json:"interfaces"`
	// Percentage of time over a 10 second window that all tasks were stalled
	IoPressureFull10s float64 `json:"io_pressure_full_10s"`
	// Percentage of time over a 5 minute window that all tasks were stalled
	IoPressureFull300s float64 `json:"io_pressure_full_300s"`
	// Percentage of time over a 1 minute window that all tasks were stalled
	IoPressureFull60s float64 `json:"io_pressure_full_60s"`
	// Total stall time (microseconds)
	IoPressureFullTotalUs float64 `json:"io_pressure_full_total_us"`
	// Percentage of time over a 10 second window that some tasks were stalled
	IoPressureSome10s float64 `json:"io_pressure_some_10s"`
	// Percentage of time over a 3 minute window that some tasks were stalled
	IoPressureSome300s float64 `json:"io_pressure_some_300s"`
	// Percentage of time over a 1 minute window that some tasks were stalled
	IoPressureSome60s float64 `json:"io_pressure_some_60s"`
	// Total stall time (microseconds)
	IoPressureSomeTotalUs float64 `json:"io_pressure_some_total_us"`
	// Boot time (seconds since Unix epoch)
	KernelBtime float64 `json:"kernel_btime"`
	// Number of context switches that the system underwent
	KernelCtxt float64 `json:"kernel_ctxt"`
	// Number of forks since boot
	KernelProcesses float64 `json:"kernel_processes"`
	// Number of processes blocked waiting for I/O
	KernelProcessesBlocked float64 `json:"kernel_processes_blocked"`
	// Number of processes in runnable state
	KernelProcessesRunning float64 `json:"kernel_processes_running"`
	// The fifteen-minute load average
	LoadAverage15m float64 `json:"load_average_15m"`
	// The one-minute load average
	LoadAverage1m float64 `json:"load_average_1m"`
	// The five-minute load average
	LoadAverage5m float64 `json:"load_average_5m"`
	// Number of currently runnable kernel scheduling entities
	LoadAverageCur float64 `json:"load_average_cur"`
	// Number of kernel scheduling entities that currently exist on the system
	LoadAverageMax float64 `json:"load_average_max"`
	// Memory that has been used more recently
	MemoryActiveBytes float64 `json:"memory_active_bytes"`
	// Non-file backed huge pages mapped into user-space page tables
	MemoryAnonHugepagesBytes float64 `json:"memory_anon_hugepages_bytes"`
	// Non-file backed pages mapped into user-space page tables
	MemoryAnonPagesBytes float64 `json:"memory_anon_pages_bytes"`
	// Estimate of how much memory is available for starting new applications
	MemoryAvailableBytes float64 `json:"memory_available_bytes"`
	// Memory used for block device bounce buffers
	MemoryBounceBytes float64 `json:"memory_bounce_bytes"`
	// Relatively temporary storage for raw disk blocks
	MemoryBuffersBytes float64 `json:"memory_buffers_bytes"`
	// In-memory cache for files read from the disk
	MemoryCachedBytes float64 `json:"memory_cached_bytes"`
	// Free CMA (Contiguous Memory Allocator) pages
	MemoryCmaFreeBytes float64 `json:"memory_cma_free_bytes"`
	// Total CMA (Contiguous Memory Allocator) pages
	MemoryCmaTotalBytes float64 `json:"memory_cma_total_bytes"`
	// Total amount of memory currently available to be allocated on the system
	MemoryCommitLimitBytes float64 `json:"memory_commit_limit_bytes"`
	// Amount of memory presently allocated on the system
	MemoryCommittedAsBytes float64 `json:"memory_committed_as_bytes"`
	// Memory which is waiting to get written back to the disk
	MemoryDirtyBytes float64 `json:"memory_dirty_bytes"`
	// The sum of LowFree and HighFree
	MemoryFreeBytes float64 `json:"memory_free_bytes"`
	// Amount of free highmem
	MemoryHighFreeBytes float64 `json:"memory_high_free_bytes"`
	// Total amount of highmem
	MemoryHighTotalBytes float64 `json:"memory_high_total_bytes"`
	// The number of huge pages in the pool that are not yet allocated
	MemoryHugepagesFree float64 `json:"memory_hugepages_free"`
	// Number of huge pages for which a commitment has been made, but no allocation has
	// yet been made
	MemoryHugepagesRsvd float64 `json:"memory_hugepages_rsvd"`
	// Number of huge pages in the pool above the threshold
	MemoryHugepagesSurp float64 `json:"memory_hugepages_surp"`
	// The size of the pool of huge pages
	MemoryHugepagesTotal float64 `json:"memory_hugepages_total"`
	// The size of huge pages
	MemoryHugepagesizeBytes float64 `json:"memory_hugepagesize_bytes"`
	// Memory which has been less recently used
	MemoryInactiveBytes float64 `json:"memory_inactive_bytes"`
	// Kernel allocations that the kernel will attempt to reclaim under memory pressure
	MemoryKReclaimableBytes float64 `json:"memory_k_reclaimable_bytes"`
	// Amount of memory allocated to kernel stacks
	MemoryKernelStackBytes float64 `json:"memory_kernel_stack_bytes"`
	// Amount of free lowmem
	MemoryLowFreeBytes float64 `json:"memory_low_free_bytes"`
	// Total amount of lowmem
	MemoryLowTotalBytes float64 `json:"memory_low_total_bytes"`
	// Files which have been mapped into memory
	MemoryMappedBytes float64 `json:"memory_mapped_bytes"`
	// Amount of memory dedicated to the lowest level of page tables
	MemoryPageTablesBytes float64 `json:"memory_page_tables_bytes"`
	// Memory allocated to the per-cpu alloctor used to back per-cpu allocations
	MemoryPerCPUBytes float64 `json:"memory_per_cpu_bytes"`
	// Percentage of time over a 10 second window that all tasks were stalled
	MemoryPressureFull10s float64 `json:"memory_pressure_full_10s"`
	// Percentage of time over a 5 minute window that all tasks were stalled
	MemoryPressureFull300s float64 `json:"memory_pressure_full_300s"`
	// Percentage of time over a 1 minute window that all tasks were stalled
	MemoryPressureFull60s float64 `json:"memory_pressure_full_60s"`
	// Total stall time (microseconds)
	MemoryPressureFullTotalUs float64 `json:"memory_pressure_full_total_us"`
	// Percentage of time over a 10 second window that some tasks were stalled
	MemoryPressureSome10s float64 `json:"memory_pressure_some_10s"`
	// Percentage of time over a 5 minute window that some tasks were stalled
	MemoryPressureSome300s float64 `json:"memory_pressure_some_300s"`
	// Percentage of time over a 1 minute window that some tasks were stalled
	MemoryPressureSome60s float64 `json:"memory_pressure_some_60s"`
	// Total stall time (microseconds)
	MemoryPressureSomeTotalUs float64 `json:"memory_pressure_some_total_us"`
	// Part of slab that can be reclaimed on memory pressure
	MemorySReclaimableBytes float64 `json:"memory_s_reclaimable_bytes"`
	// Part of slab that cannot be reclaimed on memory pressure
	MemorySUnreclaimBytes float64 `json:"memory_s_unreclaim_bytes"`
	// Amount of memory dedicated to the lowest level of page tables
	MemorySecondaryPageTablesBytes float64 `json:"memory_secondary_page_tables_bytes"`
	// Amount of memory consumed by tmpfs
	MemoryShmemBytes float64 `json:"memory_shmem_bytes"`
	// Memory used by shmem and tmpfs, allocated with huge pages
	MemoryShmemHugepagesBytes float64 `json:"memory_shmem_hugepages_bytes"`
	// Shared memory mapped into user space with huge pages
	MemoryShmemPmdMappedBytes float64 `json:"memory_shmem_pmd_mapped_bytes"`
	// In-kernel data structures cache
	MemorySlabBytes float64 `json:"memory_slab_bytes"`
	// Memory swapped out and back in while still in swap file
	MemorySwapCachedBytes float64 `json:"memory_swap_cached_bytes"`
	// Amount of swap space that is currently unused
	MemorySwapFreeBytes float64 `json:"memory_swap_free_bytes"`
	// Total amount of swap space available
	MemorySwapTotalBytes float64 `json:"memory_swap_total_bytes"`
	// Total usable RAM
	MemoryTotalBytes float64 `json:"memory_total_bytes"`
	// Largest contiguous block of vmalloc area which is free
	MemoryVmallocChunkBytes float64 `json:"memory_vmalloc_chunk_bytes"`
	// Total size of vmalloc memory area
	MemoryVmallocTotalBytes float64 `json:"memory_vmalloc_total_bytes"`
	// Amount of vmalloc area which is used
	MemoryVmallocUsedBytes float64 `json:"memory_vmalloc_used_bytes"`
	// Memory which is actively being written back to the disk
	MemoryWritebackBytes float64 `json:"memory_writeback_bytes"`
	// Memory used by FUSE for temporary writeback buffers
	MemoryWritebackTmpBytes float64 `json:"memory_writeback_tmp_bytes"`
	// Memory consumed by the zswap backend, compressed
	MemoryZSwapBytes float64 `json:"memory_z_swap_bytes"`
	// Amount of anonymous memory stored in zswap, uncompressed
	MemoryZSwappedBytes float64                              `json:"memory_z_swapped_bytes"`
	Mounts              []ConnectorSnapshotGetResponseMount  `json:"mounts"`
	Netdevs             []ConnectorSnapshotGetResponseNetdev `json:"netdevs"`
	// Platform identifier
	Platform string                              `json:"platform"`
	Routes   []ConnectorSnapshotGetResponseRoute `json:"routes"`
	// Site identifier
	SiteID string `json:"site_id"`
	// Number of ICMP Address Mask Reply messages received
	SnmpIcmpInAddrMaskReps float64 `json:"snmp_icmp_in_addr_mask_reps"`
	// Number of ICMP Address Mask Request messages received
	SnmpIcmpInAddrMasks float64 `json:"snmp_icmp_in_addr_masks"`
	// Number of ICMP messages received with bad checksums
	SnmpIcmpInCsumErrors float64 `json:"snmp_icmp_in_csum_errors"`
	// Number of ICMP Destination Unreachable messages received
	SnmpIcmpInDestUnreachs float64 `json:"snmp_icmp_in_dest_unreachs"`
	// Number of ICMP Echo Reply messages received
	SnmpIcmpInEchoReps float64 `json:"snmp_icmp_in_echo_reps"`
	// Number of ICMP Echo (request) messages received
	SnmpIcmpInEchos float64 `json:"snmp_icmp_in_echos"`
	// Number of ICMP messages received with ICMP-specific errors
	SnmpIcmpInErrors float64 `json:"snmp_icmp_in_errors"`
	// Number of ICMP messages received
	SnmpIcmpInMsgs float64 `json:"snmp_icmp_in_msgs"`
	// Number of ICMP Parameter Problem messages received
	SnmpIcmpInParmProbs float64 `json:"snmp_icmp_in_parm_probs"`
	// Number of ICMP Redirect messages received
	SnmpIcmpInRedirects float64 `json:"snmp_icmp_in_redirects"`
	// Number of ICMP Source Quench messages received
	SnmpIcmpInSrcQuenchs float64 `json:"snmp_icmp_in_src_quenchs"`
	// Number of ICMP Time Exceeded messages received
	SnmpIcmpInTimeExcds float64 `json:"snmp_icmp_in_time_excds"`
	// Number of ICMP Address Mask Request messages received
	SnmpIcmpInTimestampReps float64 `json:"snmp_icmp_in_timestamp_reps"`
	// Number of ICMP Timestamp (request) messages received
	SnmpIcmpInTimestamps float64 `json:"snmp_icmp_in_timestamps"`
	// Number of ICMP Address Mask Reply messages sent
	SnmpIcmpOutAddrMaskReps float64 `json:"snmp_icmp_out_addr_mask_reps"`
	// Number of ICMP Address Mask Request messages sent
	SnmpIcmpOutAddrMasks float64 `json:"snmp_icmp_out_addr_masks"`
	// Number of ICMP Destination Unreachable messages sent
	SnmpIcmpOutDestUnreachs float64 `json:"snmp_icmp_out_dest_unreachs"`
	// Number of ICMP Echo Reply messages sent
	SnmpIcmpOutEchoReps float64 `json:"snmp_icmp_out_echo_reps"`
	// Number of ICMP Echo (request) messages sent
	SnmpIcmpOutEchos float64 `json:"snmp_icmp_out_echos"`
	// Number of ICMP messages which this entity did not send due to ICMP-specific
	// errors
	SnmpIcmpOutErrors float64 `json:"snmp_icmp_out_errors"`
	// Number of ICMP messages attempted to send
	SnmpIcmpOutMsgs float64 `json:"snmp_icmp_out_msgs"`
	// Number of ICMP Parameter Problem messages sent
	SnmpIcmpOutParmProbs float64 `json:"snmp_icmp_out_parm_probs"`
	// Number of ICMP Redirect messages sent
	SnmpIcmpOutRedirects float64 `json:"snmp_icmp_out_redirects"`
	// Number of ICMP Source Quench messages sent
	SnmpIcmpOutSrcQuenchs float64 `json:"snmp_icmp_out_src_quenchs"`
	// Number of ICMP Time Exceeded messages sent
	SnmpIcmpOutTimeExcds float64 `json:"snmp_icmp_out_time_excds"`
	// Number of ICMP Timestamp Reply messages sent
	SnmpIcmpOutTimestampReps float64 `json:"snmp_icmp_out_timestamp_reps"`
	// Number of ICMP Timestamp (request) messages sent
	SnmpIcmpOutTimestamps float64 `json:"snmp_icmp_out_timestamps"`
	// Default value of the Time-To-Live field of the IP header
	SnmpIPDefaultTTL float64 `json:"snmp_ip_default_ttl"`
	// Number of datagrams forwarded to their final destination
	SnmpIPForwDatagrams float64 `json:"snmp_ip_forw_datagrams"`
	// Set when acting as an IP gateway
	SnmpIPForwardingEnabled bool `json:"snmp_ip_forwarding_enabled"`
	// Number of datagrams generated by fragmentation
	SnmpIPFragCreates float64 `json:"snmp_ip_frag_creates"`
	// Number of datagrams discarded because fragmentation failed
	SnmpIPFragFails float64 `json:"snmp_ip_frag_fails"`
	// Number of datagrams successfully fragmented
	SnmpIPFragOks float64 `json:"snmp_ip_frag_oks"`
	// Number of input datagrams discarded due to errors in the IP address
	SnmpIPInAddrErrors float64 `json:"snmp_ip_in_addr_errors"`
	// Number of input datagrams successfully delivered to IP user-protocols
	SnmpIPInDelivers float64 `json:"snmp_ip_in_delivers"`
	// Number of input datagrams otherwise discarded
	SnmpIPInDiscards float64 `json:"snmp_ip_in_discards"`
	// Number of input datagrams discarded due to errors in the IP header
	SnmpIPInHdrErrors float64 `json:"snmp_ip_in_hdr_errors"`
	// Number of input datagrams received from interfaces
	SnmpIPInReceives float64 `json:"snmp_ip_in_receives"`
	// Number of input datagrams discarded due unknown or unsupported protocol
	SnmpIPInUnknownProtos float64 `json:"snmp_ip_in_unknown_protos"`
	// Number of output datagrams otherwise discarded
	SnmpIPOutDiscards float64 `json:"snmp_ip_out_discards"`
	// Number of output datagrams discarded because no route matched
	SnmpIPOutNoRoutes float64 `json:"snmp_ip_out_no_routes"`
	// Number of datagrams supplied for transmission
	SnmpIPOutRequests float64 `json:"snmp_ip_out_requests"`
	// Number of failures detected by the reassembly algorithm
	SnmpIPReasmFails float64 `json:"snmp_ip_reasm_fails"`
	// Number of datagrams successfully reassembled
	SnmpIPReasmOks float64 `json:"snmp_ip_reasm_oks"`
	// Number of fragments received which needed to be reassembled
	SnmpIPReasmReqds float64 `json:"snmp_ip_reasm_reqds"`
	// Number of seconds fragments are held while awaiting reassembly
	SnmpIPReasmTimeout float64 `json:"snmp_ip_reasm_timeout"`
	// Number of times TCP transitions to SYN-SENT from CLOSED
	SnmpTCPActiveOpens float64 `json:"snmp_tcp_active_opens"`
	// Number of times TCP transitions to CLOSED from SYN-SENT or SYN-RCVD, plus
	// transitions to LISTEN from SYN-RCVD
	SnmpTCPAttemptFails float64 `json:"snmp_tcp_attempt_fails"`
	// Number of TCP connections in ESTABLISHED or CLOSE-WAIT
	SnmpTCPCurrEstab float64 `json:"snmp_tcp_curr_estab"`
	// Number of times TCP transitions to CLOSED from ESTABLISHED or CLOSE-WAIT
	SnmpTCPEstabResets float64 `json:"snmp_tcp_estab_resets"`
	// Number of TCP segments received with checksum errors
	SnmpTCPInCsumErrors float64 `json:"snmp_tcp_in_csum_errors"`
	// Number of TCP segments received in error
	SnmpTCPInErrs float64 `json:"snmp_tcp_in_errs"`
	// Number of TCP segments received
	SnmpTCPInSegs float64 `json:"snmp_tcp_in_segs"`
	// Limit on the total number of TCP connections
	SnmpTCPMaxConn float64 `json:"snmp_tcp_max_conn"`
	// Number of TCP segments sent with RST flag
	SnmpTCPOutRsts float64 `json:"snmp_tcp_out_rsts"`
	// Number of TCP segments sent
	SnmpTCPOutSegs float64 `json:"snmp_tcp_out_segs"`
	// Number of times TCP transitions to SYN-RCVD from LISTEN
	SnmpTCPPassiveOpens float64 `json:"snmp_tcp_passive_opens"`
	// Number of TCP segments retransmitted
	SnmpTCPRetransSegs float64 `json:"snmp_tcp_retrans_segs"`
	// Maximum value permitted by a TCP implementation for the retransmission timeout
	// (milliseconds)
	SnmpTCPRtoMax float64 `json:"snmp_tcp_rto_max"`
	// Minimum value permitted by a TCP implementation for the retransmission timeout
	// (milliseconds)
	SnmpTCPRtoMin float64 `json:"snmp_tcp_rto_min"`
	// Number of UDP datagrams delivered to UDP applications
	SnmpUdpInDatagrams float64 `json:"snmp_udp_in_datagrams"`
	// Number of UDP datagrams failed to be delivered for reasons other than lack of
	// application at the destination port
	SnmpUdpInErrors float64 `json:"snmp_udp_in_errors"`
	// Number of UDP datagrams received for which there was not application at the
	// destination port
	SnmpUdpNoPorts float64 `json:"snmp_udp_no_ports"`
	// Number of UDP datagrams sent
	SnmpUdpOutDatagrams float64 `json:"snmp_udp_out_datagrams"`
	// Boottime of the system (seconds since the Unix epoch)
	SystemBootTimeS float64                               `json:"system_boot_time_s"`
	Thermals        []ConnectorSnapshotGetResponseThermal `json:"thermals"`
	Tunnels         []ConnectorSnapshotGetResponseTunnel  `json:"tunnels"`
	// Sum of how much time each core has spent idle
	UptimeIdleMs float64 `json:"uptime_idle_ms"`
	// Uptime of the system, including time spent in suspend
	UptimeTotalMs float64                          `json:"uptime_total_ms"`
	JSON          connectorSnapshotGetResponseJSON `json:"-"`
}

Snapshot

func (*ConnectorSnapshotGetResponse) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseBond ¶

type ConnectorSnapshotGetResponseBond struct {
	// Name of the network interface
	Name string `json:"name" api:"required"`
	// Current status of the network interface
	Status string                               `json:"status" api:"required"`
	JSON   connectorSnapshotGetResponseBondJSON `json:"-"`
}

Snapshot Bond

func (*ConnectorSnapshotGetResponseBond) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseDHCPLease ¶

type ConnectorSnapshotGetResponseDHCPLease struct {
	// Client ID of the device the IP Address was leased to
	ClientID string `json:"client_id" api:"required"`
	// Expiry time of the DHCP lease (seconds since the Unix epoch)
	ExpiryTime float64 `json:"expiry_time" api:"required"`
	// Hostname of the device the IP Address was leased to
	Hostname string `json:"hostname" api:"required"`
	// Name of the network interface
	InterfaceName string `json:"interface_name" api:"required"`
	// IP Address that was leased
	IPAddress string `json:"ip_address" api:"required"`
	// MAC Address of the device the IP Address was leased to
	MacAddress string                                    `json:"mac_address" api:"required"`
	JSON       connectorSnapshotGetResponseDHCPLeaseJSON `json:"-"`
}

Snapshot DHCP lease

func (*ConnectorSnapshotGetResponseDHCPLease) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseDisk ¶

type ConnectorSnapshotGetResponseDisk struct {
	// I/Os currently in progress
	InProgress float64 `json:"in_progress" api:"required"`
	// Device major number
	Major float64 `json:"major" api:"required"`
	// Reads merged
	Merged float64 `json:"merged" api:"required"`
	// Device minor number
	Minor float64 `json:"minor" api:"required"`
	// Device name
	Name string `json:"name" api:"required"`
	// Reads completed successfully
	Reads float64 `json:"reads" api:"required"`
	// Sectors read successfully
	SectorsRead float64 `json:"sectors_read" api:"required"`
	// Sectors written successfully
	SectorsWritten float64 `json:"sectors_written" api:"required"`
	// Time spent doing I/Os (milliseconds)
	TimeInProgressMs float64 `json:"time_in_progress_ms" api:"required"`
	// Time spent reading (milliseconds)
	TimeReadingMs float64 `json:"time_reading_ms" api:"required"`
	// Time spent writing (milliseconds)
	TimeWritingMs float64 `json:"time_writing_ms" api:"required"`
	// Weighted time spent doing I/Os (milliseconds)
	WeightedTimeInProgressMs float64 `json:"weighted_time_in_progress_ms" api:"required"`
	// Writes completed
	Writes float64 `json:"writes" api:"required"`
	// Writes merged
	WritesMerged float64 `json:"writes_merged" api:"required"`
	// Discards completed successfully
	Discards float64 `json:"discards"`
	// Discards merged
	DiscardsMerged float64 `json:"discards_merged"`
	// Flushes completed successfully
	Flushes float64 `json:"flushes"`
	// Sectors discarded
	SectorsDiscarded float64 `json:"sectors_discarded"`
	// Time spent discarding (milliseconds)
	TimeDiscardingMs float64 `json:"time_discarding_ms"`
	// Time spent flushing (milliseconds)
	TimeFlushingMs float64                              `json:"time_flushing_ms"`
	JSON           connectorSnapshotGetResponseDiskJSON `json:"-"`
}

Snapshot Disk

func (*ConnectorSnapshotGetResponseDisk) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseEnvelope ¶

type ConnectorSnapshotGetResponseEnvelope struct {
	// Snapshot
	Result   ConnectorSnapshotGetResponse                   `json:"result" api:"required"`
	Success  bool                                           `json:"success" api:"required"`
	Errors   []ConnectorSnapshotGetResponseEnvelopeErrors   `json:"errors"`
	Messages []ConnectorSnapshotGetResponseEnvelopeMessages `json:"messages"`
	JSON     connectorSnapshotGetResponseEnvelopeJSON       `json:"-"`
}

func (*ConnectorSnapshotGetResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseEnvelopeErrors ¶

type ConnectorSnapshotGetResponseEnvelopeErrors struct {
	Code    float64                                        `json:"code" api:"required"`
	Message string                                         `json:"message" api:"required"`
	JSON    connectorSnapshotGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ConnectorSnapshotGetResponseEnvelopeErrors) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseEnvelopeMessages ¶

type ConnectorSnapshotGetResponseEnvelopeMessages struct {
	Code    float64                                          `json:"code" api:"required"`
	Message string                                           `json:"message" api:"required"`
	JSON    connectorSnapshotGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ConnectorSnapshotGetResponseEnvelopeMessages) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseInterface ¶

type ConnectorSnapshotGetResponseInterface struct {
	// Name of the network interface
	Name string `json:"name" api:"required"`
	// UP/DOWN state of the network interface
	Operstate   string                                            `json:"operstate" api:"required"`
	IPAddresses []ConnectorSnapshotGetResponseInterfacesIPAddress `json:"ip_addresses"`
	// Speed of the network interface (bits per second)
	Speed float64                                   `json:"speed"`
	JSON  connectorSnapshotGetResponseInterfaceJSON `json:"-"`
}

Snapshot Interface

func (*ConnectorSnapshotGetResponseInterface) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseInterfacesIPAddress ¶

type ConnectorSnapshotGetResponseInterfacesIPAddress struct {
	// Name of the network interface
	InterfaceName string `json:"interface_name" api:"required"`
	// IP address of the network interface
	IPAddress string                                              `json:"ip_address" api:"required"`
	JSON      connectorSnapshotGetResponseInterfacesIPAddressJSON `json:"-"`
}

Snapshot Interface Address

func (*ConnectorSnapshotGetResponseInterfacesIPAddress) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseMount ¶

type ConnectorSnapshotGetResponseMount struct {
	// File system on disk (EXT4, NTFS, etc.)
	FileSystem string `json:"file_system" api:"required"`
	// Kind of disk (HDD, SSD, etc.)
	Kind string `json:"kind" api:"required"`
	// Path where disk is mounted
	MountPoint string `json:"mount_point" api:"required"`
	// Name of the disk mount
	Name string `json:"name" api:"required"`
	// Available disk size (bytes)
	AvailableBytes float64 `json:"available_bytes"`
	// Available inodes on filesystem
	AvailableInodes float64 `json:"available_inodes"`
	// Determines whether the disk is read-only
	IsReadOnly bool `json:"is_read_only"`
	// Determines whether the disk is removable
	IsRemovable bool `json:"is_removable"`
	// Total disk size (bytes)
	TotalBytes float64 `json:"total_bytes"`
	// Total inodes on filesystem
	TotalInodes float64                               `json:"total_inodes"`
	JSON        connectorSnapshotGetResponseMountJSON `json:"-"`
}

Snapshot Mount

func (*ConnectorSnapshotGetResponseMount) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseNetdev ¶

type ConnectorSnapshotGetResponseNetdev struct {
	// Name of the network device
	Name string `json:"name" api:"required"`
	// Total bytes received
	RecvBytes float64 `json:"recv_bytes" api:"required"`
	// Compressed packets received
	RecvCompressed float64 `json:"recv_compressed" api:"required"`
	// Packets dropped
	RecvDrop float64 `json:"recv_drop" api:"required"`
	// Bad packets received
	RecvErrs float64 `json:"recv_errs" api:"required"`
	// FIFO overruns
	RecvFifo float64 `json:"recv_fifo" api:"required"`
	// Frame alignment errors
	RecvFrame float64 `json:"recv_frame" api:"required"`
	// Multicast packets received
	RecvMulticast float64 `json:"recv_multicast" api:"required"`
	// Total packets received
	RecvPackets float64 `json:"recv_packets" api:"required"`
	// Total bytes transmitted
	SentBytes float64 `json:"sent_bytes" api:"required"`
	// Number of packets not sent due to carrier errors
	SentCarrier float64 `json:"sent_carrier" api:"required"`
	// Number of collisions
	SentColls float64 `json:"sent_colls" api:"required"`
	// Number of compressed packets transmitted
	SentCompressed float64 `json:"sent_compressed" api:"required"`
	// Number of packets dropped during transmission
	SentDrop float64 `json:"sent_drop" api:"required"`
	// Number of transmission errors
	SentErrs float64 `json:"sent_errs" api:"required"`
	// FIFO overruns
	SentFifo float64 `json:"sent_fifo" api:"required"`
	// Total packets transmitted
	SentPackets float64                                `json:"sent_packets" api:"required"`
	JSON        connectorSnapshotGetResponseNetdevJSON `json:"-"`
}

Snapshot Netdev

func (*ConnectorSnapshotGetResponseNetdev) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseRoute ¶ added in v7.10.0

type ConnectorSnapshotGetResponseRoute struct {
	// Route destination as default or an IPv4 CIDR
	Destination string `json:"destination" api:"required"`
	// Interface used by the next hop
	InterfaceName string `json:"interface_name" api:"required"`
	// Routing decision type: tunnel, breakout, or lan
	Kind string `json:"kind" api:"required"`
	// Route metric; lower metrics are preferred
	Metric float64 `json:"metric" api:"required"`
	// Gateway address for the next hop
	Gateway string `json:"gateway"`
	// Relative weight within an equal-cost route
	Weight float64                               `json:"weight"`
	JSON   connectorSnapshotGetResponseRouteJSON `json:"-"`
}

Snapshot Route

func (*ConnectorSnapshotGetResponseRoute) UnmarshalJSON ¶ added in v7.10.0

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

type ConnectorSnapshotGetResponseThermal ¶

type ConnectorSnapshotGetResponseThermal struct {
	// Sensor identifier for the component
	Label string `json:"label" api:"required"`
	// Critical failure temperature of the component (degrees Celsius)
	CriticalCelcius float64 `json:"critical_celcius"`
	// Current temperature of the component (degrees Celsius)
	CurrentCelcius float64 `json:"current_celcius"`
	// Maximum temperature of the component (degrees Celsius)
	MaxCelcius float64                                 `json:"max_celcius"`
	JSON       connectorSnapshotGetResponseThermalJSON `json:"-"`
}

Snapshot Thermal

func (*ConnectorSnapshotGetResponseThermal) UnmarshalJSON ¶

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

type ConnectorSnapshotGetResponseTunnel ¶

type ConnectorSnapshotGetResponseTunnel struct {
	// Name of tunnel health state (unknown, healthy, degraded, down)
	HealthState string `json:"health_state" api:"required"`
	// Numeric value associated with tunnel state (0 = unknown, 1 = healthy, 2 =
	// degraded, 3 = down)
	HealthValue float64 `json:"health_value" api:"required"`
	// The tunnel interface name (i.e. xfrm1, xfrm3.99, etc.)
	InterfaceName string `json:"interface_name" api:"required"`
	// Tunnel identifier
	TunnelID string `json:"tunnel_id" api:"required"`
	// Tunnel round-trip latency variation in milliseconds
	JitterMs float64 `json:"jitter_ms"`
	// 50th percentile tunnel round-trip latency in milliseconds
	LatencyMs float64 `json:"latency_ms"`
	// Public socket address returned by the NAT detector
	NatdResult string `json:"natd_result"`
	// Numeric NAT detector state (0 = detected, 1 = missing result, 2 = stale result)
	NatdState float64 `json:"natd_state"`
	// Target socket address probed by the NAT detector, using the detector source port
	NatdTarget string `json:"natd_target"`
	// MTU as measured between the two ends of the tunnel
	ProbedMtu float64 `json:"probed_mtu"`
	// Number of recent healthy pings for this tunnel
	RecentHealthyPings float64 `json:"recent_healthy_pings"`
	// Number of recent unhealthy pings for this tunnel
	RecentUnhealthyPings float64                                `json:"recent_unhealthy_pings"`
	JSON                 connectorSnapshotGetResponseTunnelJSON `json:"-"`
}

Snapshot Tunnels

func (*ConnectorSnapshotGetResponseTunnel) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListParams ¶

type ConnectorSnapshotLatestListParams struct {
	// Account identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type ConnectorSnapshotLatestListResponse ¶

type ConnectorSnapshotLatestListResponse struct {
	Count float64                                   `json:"count" api:"required"`
	Items []ConnectorSnapshotLatestListResponseItem `json:"items" api:"required"`
	JSON  connectorSnapshotLatestListResponseJSON   `json:"-"`
}

func (*ConnectorSnapshotLatestListResponse) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseEnvelope ¶

type ConnectorSnapshotLatestListResponseEnvelope struct {
	Result   ConnectorSnapshotLatestListResponse                   `json:"result" api:"required"`
	Success  bool                                                  `json:"success" api:"required"`
	Errors   []ConnectorSnapshotLatestListResponseEnvelopeErrors   `json:"errors"`
	Messages []ConnectorSnapshotLatestListResponseEnvelopeMessages `json:"messages"`
	JSON     connectorSnapshotLatestListResponseEnvelopeJSON       `json:"-"`
}

func (*ConnectorSnapshotLatestListResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseEnvelopeErrors ¶

type ConnectorSnapshotLatestListResponseEnvelopeErrors struct {
	Code    float64                                               `json:"code" api:"required"`
	Message string                                                `json:"message" api:"required"`
	JSON    connectorSnapshotLatestListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ConnectorSnapshotLatestListResponseEnvelopeErrors) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseEnvelopeMessages ¶

type ConnectorSnapshotLatestListResponseEnvelopeMessages struct {
	Code    float64                                                 `json:"code" api:"required"`
	Message string                                                  `json:"message" api:"required"`
	JSON    connectorSnapshotLatestListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ConnectorSnapshotLatestListResponseEnvelopeMessages) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItem ¶

type ConnectorSnapshotLatestListResponseItem struct {
	// Count of failures to reclaim space
	CountReclaimFailures float64 `json:"count_reclaim_failures" api:"required"`
	// Count of reclaimed paths
	CountReclaimedPaths float64 `json:"count_reclaimed_paths" api:"required"`
	// Count of failed snapshot recordings
	CountRecordFailed float64 `json:"count_record_failed" api:"required"`
	// Count of failed snapshot transmissions
	CountTransmitFailures float64 `json:"count_transmit_failures" api:"required"`
	// Time the Snapshot was recorded (seconds since the Unix epoch)
	T float64 `json:"t" api:"required"`
	// Version
	V     string                                         `json:"v" api:"required"`
	Bonds []ConnectorSnapshotLatestListResponseItemsBond `json:"bonds"`
	// Count of processors/cores
	CPUCount float64 `json:"cpu_count"`
	// Percentage of time over a 10 second window that tasks were stalled
	CPUPressure10s float64 `json:"cpu_pressure_10s"`
	// Percentage of time over a 5 minute window that tasks were stalled
	CPUPressure300s float64 `json:"cpu_pressure_300s"`
	// Percentage of time over a 1 minute window that tasks were stalled
	CPUPressure60s float64 `json:"cpu_pressure_60s"`
	// Total stall time (microseconds)
	CPUPressureTotalUs float64 `json:"cpu_pressure_total_us"`
	// Time spent running a virtual CPU or guest OS (milliseconds)
	CPUTimeGuestMs float64 `json:"cpu_time_guest_ms"`
	// Time spent running a niced guest (milliseconds)
	CPUTimeGuestNiceMs float64 `json:"cpu_time_guest_nice_ms"`
	// Time spent in idle state (milliseconds)
	CPUTimeIdleMs float64 `json:"cpu_time_idle_ms"`
	// Time spent wait for I/O to complete (milliseconds)
	CPUTimeIowaitMs float64 `json:"cpu_time_iowait_ms"`
	// Time spent servicing interrupts (milliseconds)
	CPUTimeIrqMs float64 `json:"cpu_time_irq_ms"`
	// Time spent in low-priority user mode (milliseconds)
	CPUTimeNiceMs float64 `json:"cpu_time_nice_ms"`
	// Time spent servicing softirqs (milliseconds)
	CPUTimeSoftirqMs float64 `json:"cpu_time_softirq_ms"`
	// Time stolen (milliseconds)
	CPUTimeStealMs float64 `json:"cpu_time_steal_ms"`
	// Time spent in system mode (milliseconds)
	CPUTimeSystemMs float64 `json:"cpu_time_system_ms"`
	// Time spent in user mode (milliseconds)
	CPUTimeUserMs float64 `json:"cpu_time_user_ms"`
	// Number of network operations applied during state transition
	Delta      float64                                             `json:"delta"`
	DHCPLeases []ConnectorSnapshotLatestListResponseItemsDHCPLease `json:"dhcp_leases"`
	Disks      []ConnectorSnapshotLatestListResponseItemsDisk      `json:"disks"`
	// Simulated number of network operations applied during state transition
	Epsilon float64 `json:"epsilon"`
	// Name of high availability state
	HaState string `json:"ha_state"`
	// Numeric value associated with high availability state (0 = disabled, 1 = active,
	// 2 = standby, 3 = stopped, 4 = fault)
	HaValue    float64                                             `json:"ha_value"`
	Interfaces []ConnectorSnapshotLatestListResponseItemsInterface `json:"interfaces"`
	// Percentage of time over a 10 second window that all tasks were stalled
	IoPressureFull10s float64 `json:"io_pressure_full_10s"`
	// Percentage of time over a 5 minute window that all tasks were stalled
	IoPressureFull300s float64 `json:"io_pressure_full_300s"`
	// Percentage of time over a 1 minute window that all tasks were stalled
	IoPressureFull60s float64 `json:"io_pressure_full_60s"`
	// Total stall time (microseconds)
	IoPressureFullTotalUs float64 `json:"io_pressure_full_total_us"`
	// Percentage of time over a 10 second window that some tasks were stalled
	IoPressureSome10s float64 `json:"io_pressure_some_10s"`
	// Percentage of time over a 3 minute window that some tasks were stalled
	IoPressureSome300s float64 `json:"io_pressure_some_300s"`
	// Percentage of time over a 1 minute window that some tasks were stalled
	IoPressureSome60s float64 `json:"io_pressure_some_60s"`
	// Total stall time (microseconds)
	IoPressureSomeTotalUs float64 `json:"io_pressure_some_total_us"`
	// Boot time (seconds since Unix epoch)
	KernelBtime float64 `json:"kernel_btime"`
	// Number of context switches that the system underwent
	KernelCtxt float64 `json:"kernel_ctxt"`
	// Number of forks since boot
	KernelProcesses float64 `json:"kernel_processes"`
	// Number of processes blocked waiting for I/O
	KernelProcessesBlocked float64 `json:"kernel_processes_blocked"`
	// Number of processes in runnable state
	KernelProcessesRunning float64 `json:"kernel_processes_running"`
	// The fifteen-minute load average
	LoadAverage15m float64 `json:"load_average_15m"`
	// The one-minute load average
	LoadAverage1m float64 `json:"load_average_1m"`
	// The five-minute load average
	LoadAverage5m float64 `json:"load_average_5m"`
	// Number of currently runnable kernel scheduling entities
	LoadAverageCur float64 `json:"load_average_cur"`
	// Number of kernel scheduling entities that currently exist on the system
	LoadAverageMax float64 `json:"load_average_max"`
	// Memory that has been used more recently
	MemoryActiveBytes float64 `json:"memory_active_bytes"`
	// Non-file backed huge pages mapped into user-space page tables
	MemoryAnonHugepagesBytes float64 `json:"memory_anon_hugepages_bytes"`
	// Non-file backed pages mapped into user-space page tables
	MemoryAnonPagesBytes float64 `json:"memory_anon_pages_bytes"`
	// Estimate of how much memory is available for starting new applications
	MemoryAvailableBytes float64 `json:"memory_available_bytes"`
	// Memory used for block device bounce buffers
	MemoryBounceBytes float64 `json:"memory_bounce_bytes"`
	// Relatively temporary storage for raw disk blocks
	MemoryBuffersBytes float64 `json:"memory_buffers_bytes"`
	// In-memory cache for files read from the disk
	MemoryCachedBytes float64 `json:"memory_cached_bytes"`
	// Free CMA (Contiguous Memory Allocator) pages
	MemoryCmaFreeBytes float64 `json:"memory_cma_free_bytes"`
	// Total CMA (Contiguous Memory Allocator) pages
	MemoryCmaTotalBytes float64 `json:"memory_cma_total_bytes"`
	// Total amount of memory currently available to be allocated on the system
	MemoryCommitLimitBytes float64 `json:"memory_commit_limit_bytes"`
	// Amount of memory presently allocated on the system
	MemoryCommittedAsBytes float64 `json:"memory_committed_as_bytes"`
	// Memory which is waiting to get written back to the disk
	MemoryDirtyBytes float64 `json:"memory_dirty_bytes"`
	// The sum of LowFree and HighFree
	MemoryFreeBytes float64 `json:"memory_free_bytes"`
	// Amount of free highmem
	MemoryHighFreeBytes float64 `json:"memory_high_free_bytes"`
	// Total amount of highmem
	MemoryHighTotalBytes float64 `json:"memory_high_total_bytes"`
	// The number of huge pages in the pool that are not yet allocated
	MemoryHugepagesFree float64 `json:"memory_hugepages_free"`
	// Number of huge pages for which a commitment has been made, but no allocation has
	// yet been made
	MemoryHugepagesRsvd float64 `json:"memory_hugepages_rsvd"`
	// Number of huge pages in the pool above the threshold
	MemoryHugepagesSurp float64 `json:"memory_hugepages_surp"`
	// The size of the pool of huge pages
	MemoryHugepagesTotal float64 `json:"memory_hugepages_total"`
	// The size of huge pages
	MemoryHugepagesizeBytes float64 `json:"memory_hugepagesize_bytes"`
	// Memory which has been less recently used
	MemoryInactiveBytes float64 `json:"memory_inactive_bytes"`
	// Kernel allocations that the kernel will attempt to reclaim under memory pressure
	MemoryKReclaimableBytes float64 `json:"memory_k_reclaimable_bytes"`
	// Amount of memory allocated to kernel stacks
	MemoryKernelStackBytes float64 `json:"memory_kernel_stack_bytes"`
	// Amount of free lowmem
	MemoryLowFreeBytes float64 `json:"memory_low_free_bytes"`
	// Total amount of lowmem
	MemoryLowTotalBytes float64 `json:"memory_low_total_bytes"`
	// Files which have been mapped into memory
	MemoryMappedBytes float64 `json:"memory_mapped_bytes"`
	// Amount of memory dedicated to the lowest level of page tables
	MemoryPageTablesBytes float64 `json:"memory_page_tables_bytes"`
	// Memory allocated to the per-cpu alloctor used to back per-cpu allocations
	MemoryPerCPUBytes float64 `json:"memory_per_cpu_bytes"`
	// Percentage of time over a 10 second window that all tasks were stalled
	MemoryPressureFull10s float64 `json:"memory_pressure_full_10s"`
	// Percentage of time over a 5 minute window that all tasks were stalled
	MemoryPressureFull300s float64 `json:"memory_pressure_full_300s"`
	// Percentage of time over a 1 minute window that all tasks were stalled
	MemoryPressureFull60s float64 `json:"memory_pressure_full_60s"`
	// Total stall time (microseconds)
	MemoryPressureFullTotalUs float64 `json:"memory_pressure_full_total_us"`
	// Percentage of time over a 10 second window that some tasks were stalled
	MemoryPressureSome10s float64 `json:"memory_pressure_some_10s"`
	// Percentage of time over a 5 minute window that some tasks were stalled
	MemoryPressureSome300s float64 `json:"memory_pressure_some_300s"`
	// Percentage of time over a 1 minute window that some tasks were stalled
	MemoryPressureSome60s float64 `json:"memory_pressure_some_60s"`
	// Total stall time (microseconds)
	MemoryPressureSomeTotalUs float64 `json:"memory_pressure_some_total_us"`
	// Part of slab that can be reclaimed on memory pressure
	MemorySReclaimableBytes float64 `json:"memory_s_reclaimable_bytes"`
	// Part of slab that cannot be reclaimed on memory pressure
	MemorySUnreclaimBytes float64 `json:"memory_s_unreclaim_bytes"`
	// Amount of memory dedicated to the lowest level of page tables
	MemorySecondaryPageTablesBytes float64 `json:"memory_secondary_page_tables_bytes"`
	// Amount of memory consumed by tmpfs
	MemoryShmemBytes float64 `json:"memory_shmem_bytes"`
	// Memory used by shmem and tmpfs, allocated with huge pages
	MemoryShmemHugepagesBytes float64 `json:"memory_shmem_hugepages_bytes"`
	// Shared memory mapped into user space with huge pages
	MemoryShmemPmdMappedBytes float64 `json:"memory_shmem_pmd_mapped_bytes"`
	// In-kernel data structures cache
	MemorySlabBytes float64 `json:"memory_slab_bytes"`
	// Memory swapped out and back in while still in swap file
	MemorySwapCachedBytes float64 `json:"memory_swap_cached_bytes"`
	// Amount of swap space that is currently unused
	MemorySwapFreeBytes float64 `json:"memory_swap_free_bytes"`
	// Total amount of swap space available
	MemorySwapTotalBytes float64 `json:"memory_swap_total_bytes"`
	// Total usable RAM
	MemoryTotalBytes float64 `json:"memory_total_bytes"`
	// Largest contiguous block of vmalloc area which is free
	MemoryVmallocChunkBytes float64 `json:"memory_vmalloc_chunk_bytes"`
	// Total size of vmalloc memory area
	MemoryVmallocTotalBytes float64 `json:"memory_vmalloc_total_bytes"`
	// Amount of vmalloc area which is used
	MemoryVmallocUsedBytes float64 `json:"memory_vmalloc_used_bytes"`
	// Memory which is actively being written back to the disk
	MemoryWritebackBytes float64 `json:"memory_writeback_bytes"`
	// Memory used by FUSE for temporary writeback buffers
	MemoryWritebackTmpBytes float64 `json:"memory_writeback_tmp_bytes"`
	// Memory consumed by the zswap backend, compressed
	MemoryZSwapBytes float64 `json:"memory_z_swap_bytes"`
	// Amount of anonymous memory stored in zswap, uncompressed
	MemoryZSwappedBytes float64                                          `json:"memory_z_swapped_bytes"`
	Mounts              []ConnectorSnapshotLatestListResponseItemsMount  `json:"mounts"`
	Netdevs             []ConnectorSnapshotLatestListResponseItemsNetdev `json:"netdevs"`
	// Platform identifier
	Platform string                                          `json:"platform"`
	Routes   []ConnectorSnapshotLatestListResponseItemsRoute `json:"routes"`
	// Site identifier
	SiteID string `json:"site_id"`
	// Number of ICMP Address Mask Reply messages received
	SnmpIcmpInAddrMaskReps float64 `json:"snmp_icmp_in_addr_mask_reps"`
	// Number of ICMP Address Mask Request messages received
	SnmpIcmpInAddrMasks float64 `json:"snmp_icmp_in_addr_masks"`
	// Number of ICMP messages received with bad checksums
	SnmpIcmpInCsumErrors float64 `json:"snmp_icmp_in_csum_errors"`
	// Number of ICMP Destination Unreachable messages received
	SnmpIcmpInDestUnreachs float64 `json:"snmp_icmp_in_dest_unreachs"`
	// Number of ICMP Echo Reply messages received
	SnmpIcmpInEchoReps float64 `json:"snmp_icmp_in_echo_reps"`
	// Number of ICMP Echo (request) messages received
	SnmpIcmpInEchos float64 `json:"snmp_icmp_in_echos"`
	// Number of ICMP messages received with ICMP-specific errors
	SnmpIcmpInErrors float64 `json:"snmp_icmp_in_errors"`
	// Number of ICMP messages received
	SnmpIcmpInMsgs float64 `json:"snmp_icmp_in_msgs"`
	// Number of ICMP Parameter Problem messages received
	SnmpIcmpInParmProbs float64 `json:"snmp_icmp_in_parm_probs"`
	// Number of ICMP Redirect messages received
	SnmpIcmpInRedirects float64 `json:"snmp_icmp_in_redirects"`
	// Number of ICMP Source Quench messages received
	SnmpIcmpInSrcQuenchs float64 `json:"snmp_icmp_in_src_quenchs"`
	// Number of ICMP Time Exceeded messages received
	SnmpIcmpInTimeExcds float64 `json:"snmp_icmp_in_time_excds"`
	// Number of ICMP Address Mask Request messages received
	SnmpIcmpInTimestampReps float64 `json:"snmp_icmp_in_timestamp_reps"`
	// Number of ICMP Timestamp (request) messages received
	SnmpIcmpInTimestamps float64 `json:"snmp_icmp_in_timestamps"`
	// Number of ICMP Address Mask Reply messages sent
	SnmpIcmpOutAddrMaskReps float64 `json:"snmp_icmp_out_addr_mask_reps"`
	// Number of ICMP Address Mask Request messages sent
	SnmpIcmpOutAddrMasks float64 `json:"snmp_icmp_out_addr_masks"`
	// Number of ICMP Destination Unreachable messages sent
	SnmpIcmpOutDestUnreachs float64 `json:"snmp_icmp_out_dest_unreachs"`
	// Number of ICMP Echo Reply messages sent
	SnmpIcmpOutEchoReps float64 `json:"snmp_icmp_out_echo_reps"`
	// Number of ICMP Echo (request) messages sent
	SnmpIcmpOutEchos float64 `json:"snmp_icmp_out_echos"`
	// Number of ICMP messages which this entity did not send due to ICMP-specific
	// errors
	SnmpIcmpOutErrors float64 `json:"snmp_icmp_out_errors"`
	// Number of ICMP messages attempted to send
	SnmpIcmpOutMsgs float64 `json:"snmp_icmp_out_msgs"`
	// Number of ICMP Parameter Problem messages sent
	SnmpIcmpOutParmProbs float64 `json:"snmp_icmp_out_parm_probs"`
	// Number of ICMP Redirect messages sent
	SnmpIcmpOutRedirects float64 `json:"snmp_icmp_out_redirects"`
	// Number of ICMP Source Quench messages sent
	SnmpIcmpOutSrcQuenchs float64 `json:"snmp_icmp_out_src_quenchs"`
	// Number of ICMP Time Exceeded messages sent
	SnmpIcmpOutTimeExcds float64 `json:"snmp_icmp_out_time_excds"`
	// Number of ICMP Timestamp Reply messages sent
	SnmpIcmpOutTimestampReps float64 `json:"snmp_icmp_out_timestamp_reps"`
	// Number of ICMP Timestamp (request) messages sent
	SnmpIcmpOutTimestamps float64 `json:"snmp_icmp_out_timestamps"`
	// Default value of the Time-To-Live field of the IP header
	SnmpIPDefaultTTL float64 `json:"snmp_ip_default_ttl"`
	// Number of datagrams forwarded to their final destination
	SnmpIPForwDatagrams float64 `json:"snmp_ip_forw_datagrams"`
	// Set when acting as an IP gateway
	SnmpIPForwardingEnabled bool `json:"snmp_ip_forwarding_enabled"`
	// Number of datagrams generated by fragmentation
	SnmpIPFragCreates float64 `json:"snmp_ip_frag_creates"`
	// Number of datagrams discarded because fragmentation failed
	SnmpIPFragFails float64 `json:"snmp_ip_frag_fails"`
	// Number of datagrams successfully fragmented
	SnmpIPFragOks float64 `json:"snmp_ip_frag_oks"`
	// Number of input datagrams discarded due to errors in the IP address
	SnmpIPInAddrErrors float64 `json:"snmp_ip_in_addr_errors"`
	// Number of input datagrams successfully delivered to IP user-protocols
	SnmpIPInDelivers float64 `json:"snmp_ip_in_delivers"`
	// Number of input datagrams otherwise discarded
	SnmpIPInDiscards float64 `json:"snmp_ip_in_discards"`
	// Number of input datagrams discarded due to errors in the IP header
	SnmpIPInHdrErrors float64 `json:"snmp_ip_in_hdr_errors"`
	// Number of input datagrams received from interfaces
	SnmpIPInReceives float64 `json:"snmp_ip_in_receives"`
	// Number of input datagrams discarded due unknown or unsupported protocol
	SnmpIPInUnknownProtos float64 `json:"snmp_ip_in_unknown_protos"`
	// Number of output datagrams otherwise discarded
	SnmpIPOutDiscards float64 `json:"snmp_ip_out_discards"`
	// Number of output datagrams discarded because no route matched
	SnmpIPOutNoRoutes float64 `json:"snmp_ip_out_no_routes"`
	// Number of datagrams supplied for transmission
	SnmpIPOutRequests float64 `json:"snmp_ip_out_requests"`
	// Number of failures detected by the reassembly algorithm
	SnmpIPReasmFails float64 `json:"snmp_ip_reasm_fails"`
	// Number of datagrams successfully reassembled
	SnmpIPReasmOks float64 `json:"snmp_ip_reasm_oks"`
	// Number of fragments received which needed to be reassembled
	SnmpIPReasmReqds float64 `json:"snmp_ip_reasm_reqds"`
	// Number of seconds fragments are held while awaiting reassembly
	SnmpIPReasmTimeout float64 `json:"snmp_ip_reasm_timeout"`
	// Number of times TCP transitions to SYN-SENT from CLOSED
	SnmpTCPActiveOpens float64 `json:"snmp_tcp_active_opens"`
	// Number of times TCP transitions to CLOSED from SYN-SENT or SYN-RCVD, plus
	// transitions to LISTEN from SYN-RCVD
	SnmpTCPAttemptFails float64 `json:"snmp_tcp_attempt_fails"`
	// Number of TCP connections in ESTABLISHED or CLOSE-WAIT
	SnmpTCPCurrEstab float64 `json:"snmp_tcp_curr_estab"`
	// Number of times TCP transitions to CLOSED from ESTABLISHED or CLOSE-WAIT
	SnmpTCPEstabResets float64 `json:"snmp_tcp_estab_resets"`
	// Number of TCP segments received with checksum errors
	SnmpTCPInCsumErrors float64 `json:"snmp_tcp_in_csum_errors"`
	// Number of TCP segments received in error
	SnmpTCPInErrs float64 `json:"snmp_tcp_in_errs"`
	// Number of TCP segments received
	SnmpTCPInSegs float64 `json:"snmp_tcp_in_segs"`
	// Limit on the total number of TCP connections
	SnmpTCPMaxConn float64 `json:"snmp_tcp_max_conn"`
	// Number of TCP segments sent with RST flag
	SnmpTCPOutRsts float64 `json:"snmp_tcp_out_rsts"`
	// Number of TCP segments sent
	SnmpTCPOutSegs float64 `json:"snmp_tcp_out_segs"`
	// Number of times TCP transitions to SYN-RCVD from LISTEN
	SnmpTCPPassiveOpens float64 `json:"snmp_tcp_passive_opens"`
	// Number of TCP segments retransmitted
	SnmpTCPRetransSegs float64 `json:"snmp_tcp_retrans_segs"`
	// Maximum value permitted by a TCP implementation for the retransmission timeout
	// (milliseconds)
	SnmpTCPRtoMax float64 `json:"snmp_tcp_rto_max"`
	// Minimum value permitted by a TCP implementation for the retransmission timeout
	// (milliseconds)
	SnmpTCPRtoMin float64 `json:"snmp_tcp_rto_min"`
	// Number of UDP datagrams delivered to UDP applications
	SnmpUdpInDatagrams float64 `json:"snmp_udp_in_datagrams"`
	// Number of UDP datagrams failed to be delivered for reasons other than lack of
	// application at the destination port
	SnmpUdpInErrors float64 `json:"snmp_udp_in_errors"`
	// Number of UDP datagrams received for which there was not application at the
	// destination port
	SnmpUdpNoPorts float64 `json:"snmp_udp_no_ports"`
	// Number of UDP datagrams sent
	SnmpUdpOutDatagrams float64 `json:"snmp_udp_out_datagrams"`
	// Boottime of the system (seconds since the Unix epoch)
	SystemBootTimeS float64                                           `json:"system_boot_time_s"`
	Thermals        []ConnectorSnapshotLatestListResponseItemsThermal `json:"thermals"`
	Tunnels         []ConnectorSnapshotLatestListResponseItemsTunnel  `json:"tunnels"`
	// Sum of how much time each core has spent idle
	UptimeIdleMs float64 `json:"uptime_idle_ms"`
	// Uptime of the system, including time spent in suspend
	UptimeTotalMs float64                                     `json:"uptime_total_ms"`
	JSON          connectorSnapshotLatestListResponseItemJSON `json:"-"`
}

Snapshot

func (*ConnectorSnapshotLatestListResponseItem) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItemsBond ¶

type ConnectorSnapshotLatestListResponseItemsBond struct {
	// Name of the network interface
	Name string `json:"name" api:"required"`
	// Current status of the network interface
	Status string                                           `json:"status" api:"required"`
	JSON   connectorSnapshotLatestListResponseItemsBondJSON `json:"-"`
}

Snapshot Bond

func (*ConnectorSnapshotLatestListResponseItemsBond) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItemsDHCPLease ¶

type ConnectorSnapshotLatestListResponseItemsDHCPLease struct {
	// Client ID of the device the IP Address was leased to
	ClientID string `json:"client_id" api:"required"`
	// Expiry time of the DHCP lease (seconds since the Unix epoch)
	ExpiryTime float64 `json:"expiry_time" api:"required"`
	// Hostname of the device the IP Address was leased to
	Hostname string `json:"hostname" api:"required"`
	// Name of the network interface
	InterfaceName string `json:"interface_name" api:"required"`
	// IP Address that was leased
	IPAddress string `json:"ip_address" api:"required"`
	// MAC Address of the device the IP Address was leased to
	MacAddress string                                                `json:"mac_address" api:"required"`
	JSON       connectorSnapshotLatestListResponseItemsDHCPLeaseJSON `json:"-"`
}

Snapshot DHCP lease

func (*ConnectorSnapshotLatestListResponseItemsDHCPLease) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItemsDisk ¶

type ConnectorSnapshotLatestListResponseItemsDisk struct {
	// I/Os currently in progress
	InProgress float64 `json:"in_progress" api:"required"`
	// Device major number
	Major float64 `json:"major" api:"required"`
	// Reads merged
	Merged float64 `json:"merged" api:"required"`
	// Device minor number
	Minor float64 `json:"minor" api:"required"`
	// Device name
	Name string `json:"name" api:"required"`
	// Reads completed successfully
	Reads float64 `json:"reads" api:"required"`
	// Sectors read successfully
	SectorsRead float64 `json:"sectors_read" api:"required"`
	// Sectors written successfully
	SectorsWritten float64 `json:"sectors_written" api:"required"`
	// Time spent doing I/Os (milliseconds)
	TimeInProgressMs float64 `json:"time_in_progress_ms" api:"required"`
	// Time spent reading (milliseconds)
	TimeReadingMs float64 `json:"time_reading_ms" api:"required"`
	// Time spent writing (milliseconds)
	TimeWritingMs float64 `json:"time_writing_ms" api:"required"`
	// Weighted time spent doing I/Os (milliseconds)
	WeightedTimeInProgressMs float64 `json:"weighted_time_in_progress_ms" api:"required"`
	// Writes completed
	Writes float64 `json:"writes" api:"required"`
	// Writes merged
	WritesMerged float64 `json:"writes_merged" api:"required"`
	// Discards completed successfully
	Discards float64 `json:"discards"`
	// Discards merged
	DiscardsMerged float64 `json:"discards_merged"`
	// Flushes completed successfully
	Flushes float64 `json:"flushes"`
	// Sectors discarded
	SectorsDiscarded float64 `json:"sectors_discarded"`
	// Time spent discarding (milliseconds)
	TimeDiscardingMs float64 `json:"time_discarding_ms"`
	// Time spent flushing (milliseconds)
	TimeFlushingMs float64                                          `json:"time_flushing_ms"`
	JSON           connectorSnapshotLatestListResponseItemsDiskJSON `json:"-"`
}

Snapshot Disk

func (*ConnectorSnapshotLatestListResponseItemsDisk) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItemsInterface ¶

type ConnectorSnapshotLatestListResponseItemsInterface struct {
	// Name of the network interface
	Name string `json:"name" api:"required"`
	// UP/DOWN state of the network interface
	Operstate   string                                                        `json:"operstate" api:"required"`
	IPAddresses []ConnectorSnapshotLatestListResponseItemsInterfacesIPAddress `json:"ip_addresses"`
	// Speed of the network interface (bits per second)
	Speed float64                                               `json:"speed"`
	JSON  connectorSnapshotLatestListResponseItemsInterfaceJSON `json:"-"`
}

Snapshot Interface

func (*ConnectorSnapshotLatestListResponseItemsInterface) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItemsInterfacesIPAddress ¶

type ConnectorSnapshotLatestListResponseItemsInterfacesIPAddress struct {
	// Name of the network interface
	InterfaceName string `json:"interface_name" api:"required"`
	// IP address of the network interface
	IPAddress string                                                          `json:"ip_address" api:"required"`
	JSON      connectorSnapshotLatestListResponseItemsInterfacesIPAddressJSON `json:"-"`
}

Snapshot Interface Address

func (*ConnectorSnapshotLatestListResponseItemsInterfacesIPAddress) UnmarshalJSON ¶

type ConnectorSnapshotLatestListResponseItemsMount ¶

type ConnectorSnapshotLatestListResponseItemsMount struct {
	// File system on disk (EXT4, NTFS, etc.)
	FileSystem string `json:"file_system" api:"required"`
	// Kind of disk (HDD, SSD, etc.)
	Kind string `json:"kind" api:"required"`
	// Path where disk is mounted
	MountPoint string `json:"mount_point" api:"required"`
	// Name of the disk mount
	Name string `json:"name" api:"required"`
	// Available disk size (bytes)
	AvailableBytes float64 `json:"available_bytes"`
	// Available inodes on filesystem
	AvailableInodes float64 `json:"available_inodes"`
	// Determines whether the disk is read-only
	IsReadOnly bool `json:"is_read_only"`
	// Determines whether the disk is removable
	IsRemovable bool `json:"is_removable"`
	// Total disk size (bytes)
	TotalBytes float64 `json:"total_bytes"`
	// Total inodes on filesystem
	TotalInodes float64                                           `json:"total_inodes"`
	JSON        connectorSnapshotLatestListResponseItemsMountJSON `json:"-"`
}

Snapshot Mount

func (*ConnectorSnapshotLatestListResponseItemsMount) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItemsNetdev ¶

type ConnectorSnapshotLatestListResponseItemsNetdev struct {
	// Name of the network device
	Name string `json:"name" api:"required"`
	// Total bytes received
	RecvBytes float64 `json:"recv_bytes" api:"required"`
	// Compressed packets received
	RecvCompressed float64 `json:"recv_compressed" api:"required"`
	// Packets dropped
	RecvDrop float64 `json:"recv_drop" api:"required"`
	// Bad packets received
	RecvErrs float64 `json:"recv_errs" api:"required"`
	// FIFO overruns
	RecvFifo float64 `json:"recv_fifo" api:"required"`
	// Frame alignment errors
	RecvFrame float64 `json:"recv_frame" api:"required"`
	// Multicast packets received
	RecvMulticast float64 `json:"recv_multicast" api:"required"`
	// Total packets received
	RecvPackets float64 `json:"recv_packets" api:"required"`
	// Total bytes transmitted
	SentBytes float64 `json:"sent_bytes" api:"required"`
	// Number of packets not sent due to carrier errors
	SentCarrier float64 `json:"sent_carrier" api:"required"`
	// Number of collisions
	SentColls float64 `json:"sent_colls" api:"required"`
	// Number of compressed packets transmitted
	SentCompressed float64 `json:"sent_compressed" api:"required"`
	// Number of packets dropped during transmission
	SentDrop float64 `json:"sent_drop" api:"required"`
	// Number of transmission errors
	SentErrs float64 `json:"sent_errs" api:"required"`
	// FIFO overruns
	SentFifo float64 `json:"sent_fifo" api:"required"`
	// Total packets transmitted
	SentPackets float64                                            `json:"sent_packets" api:"required"`
	JSON        connectorSnapshotLatestListResponseItemsNetdevJSON `json:"-"`
}

Snapshot Netdev

func (*ConnectorSnapshotLatestListResponseItemsNetdev) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItemsRoute ¶ added in v7.10.0

type ConnectorSnapshotLatestListResponseItemsRoute struct {
	// Route destination as default or an IPv4 CIDR
	Destination string `json:"destination" api:"required"`
	// Interface used by the next hop
	InterfaceName string `json:"interface_name" api:"required"`
	// Routing decision type: tunnel, breakout, or lan
	Kind string `json:"kind" api:"required"`
	// Route metric; lower metrics are preferred
	Metric float64 `json:"metric" api:"required"`
	// Gateway address for the next hop
	Gateway string `json:"gateway"`
	// Relative weight within an equal-cost route
	Weight float64                                           `json:"weight"`
	JSON   connectorSnapshotLatestListResponseItemsRouteJSON `json:"-"`
}

Snapshot Route

func (*ConnectorSnapshotLatestListResponseItemsRoute) UnmarshalJSON ¶ added in v7.10.0

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

type ConnectorSnapshotLatestListResponseItemsThermal ¶

type ConnectorSnapshotLatestListResponseItemsThermal struct {
	// Sensor identifier for the component
	Label string `json:"label" api:"required"`
	// Critical failure temperature of the component (degrees Celsius)
	CriticalCelcius float64 `json:"critical_celcius"`
	// Current temperature of the component (degrees Celsius)
	CurrentCelcius float64 `json:"current_celcius"`
	// Maximum temperature of the component (degrees Celsius)
	MaxCelcius float64                                             `json:"max_celcius"`
	JSON       connectorSnapshotLatestListResponseItemsThermalJSON `json:"-"`
}

Snapshot Thermal

func (*ConnectorSnapshotLatestListResponseItemsThermal) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestListResponseItemsTunnel ¶

type ConnectorSnapshotLatestListResponseItemsTunnel struct {
	// Name of tunnel health state (unknown, healthy, degraded, down)
	HealthState string `json:"health_state" api:"required"`
	// Numeric value associated with tunnel state (0 = unknown, 1 = healthy, 2 =
	// degraded, 3 = down)
	HealthValue float64 `json:"health_value" api:"required"`
	// The tunnel interface name (i.e. xfrm1, xfrm3.99, etc.)
	InterfaceName string `json:"interface_name" api:"required"`
	// Tunnel identifier
	TunnelID string `json:"tunnel_id" api:"required"`
	// Tunnel round-trip latency variation in milliseconds
	JitterMs float64 `json:"jitter_ms"`
	// 50th percentile tunnel round-trip latency in milliseconds
	LatencyMs float64 `json:"latency_ms"`
	// Public socket address returned by the NAT detector
	NatdResult string `json:"natd_result"`
	// Numeric NAT detector state (0 = detected, 1 = missing result, 2 = stale result)
	NatdState float64 `json:"natd_state"`
	// Target socket address probed by the NAT detector, using the detector source port
	NatdTarget string `json:"natd_target"`
	// MTU as measured between the two ends of the tunnel
	ProbedMtu float64 `json:"probed_mtu"`
	// Number of recent healthy pings for this tunnel
	RecentHealthyPings float64 `json:"recent_healthy_pings"`
	// Number of recent unhealthy pings for this tunnel
	RecentUnhealthyPings float64                                            `json:"recent_unhealthy_pings"`
	JSON                 connectorSnapshotLatestListResponseItemsTunnelJSON `json:"-"`
}

Snapshot Tunnels

func (*ConnectorSnapshotLatestListResponseItemsTunnel) UnmarshalJSON ¶

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

type ConnectorSnapshotLatestService ¶

type ConnectorSnapshotLatestService struct {
	Options []option.RequestOption
}

ConnectorSnapshotLatestService 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 NewConnectorSnapshotLatestService method instead.

func NewConnectorSnapshotLatestService ¶

func NewConnectorSnapshotLatestService(opts ...option.RequestOption) (r *ConnectorSnapshotLatestService)

NewConnectorSnapshotLatestService 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 (*ConnectorSnapshotLatestService) List ¶

Gets latest Magic WAN Connector Telemetry Snapshots

type ConnectorSnapshotListParams ¶

type ConnectorSnapshotListParams struct {
	// Account identifier
	AccountID param.Field[string]  `path:"account_id" api:"required"`
	From      param.Field[float64] `query:"from" api:"required"`
	To        param.Field[float64] `query:"to" api:"required"`
	Cursor    param.Field[string]  `query:"cursor"`
	Limit     param.Field[float64] `query:"limit"`
}

func (ConnectorSnapshotListParams) URLQuery ¶

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

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

type ConnectorSnapshotListResponse ¶

type ConnectorSnapshotListResponse struct {
	Count  float64                             `json:"count" api:"required"`
	Items  []ConnectorSnapshotListResponseItem `json:"items" api:"required"`
	Cursor string                              `json:"cursor"`
	JSON   connectorSnapshotListResponseJSON   `json:"-"`
}

func (*ConnectorSnapshotListResponse) UnmarshalJSON ¶

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

type ConnectorSnapshotListResponseEnvelope ¶

type ConnectorSnapshotListResponseEnvelope struct {
	Result   ConnectorSnapshotListResponse                   `json:"result" api:"required"`
	Success  bool                                            `json:"success" api:"required"`
	Errors   []ConnectorSnapshotListResponseEnvelopeErrors   `json:"errors"`
	Messages []ConnectorSnapshotListResponseEnvelopeMessages `json:"messages"`
	JSON     connectorSnapshotListResponseEnvelopeJSON       `json:"-"`
}

func (*ConnectorSnapshotListResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorSnapshotListResponseEnvelopeErrors ¶

type ConnectorSnapshotListResponseEnvelopeErrors struct {
	Code    float64                                         `json:"code" api:"required"`
	Message string                                          `json:"message" api:"required"`
	JSON    connectorSnapshotListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ConnectorSnapshotListResponseEnvelopeErrors) UnmarshalJSON ¶

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

type ConnectorSnapshotListResponseEnvelopeMessages ¶

type ConnectorSnapshotListResponseEnvelopeMessages struct {
	Code    float64                                           `json:"code" api:"required"`
	Message string                                            `json:"message" api:"required"`
	JSON    connectorSnapshotListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ConnectorSnapshotListResponseEnvelopeMessages) UnmarshalJSON ¶

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

type ConnectorSnapshotListResponseItem ¶

type ConnectorSnapshotListResponseItem struct {
	// Time the Snapshot was collected (seconds since the Unix epoch)
	A float64 `json:"a" api:"required"`
	// Time the Snapshot was recorded (seconds since the Unix epoch)
	T    float64                               `json:"t" api:"required"`
	JSON connectorSnapshotListResponseItemJSON `json:"-"`
}

func (*ConnectorSnapshotListResponseItem) UnmarshalJSON ¶

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

type ConnectorSnapshotService ¶

type ConnectorSnapshotService struct {
	Options []option.RequestOption
	Latest  *ConnectorSnapshotLatestService
}

ConnectorSnapshotService 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 NewConnectorSnapshotService method instead.

func NewConnectorSnapshotService ¶

func NewConnectorSnapshotService(opts ...option.RequestOption) (r *ConnectorSnapshotService)

NewConnectorSnapshotService 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 (*ConnectorSnapshotService) Get ¶

Gets Magic WAN Connector Telemetry Snapshot

func (*ConnectorSnapshotService) List ¶

Lists Magic WAN Connector Telemetry Snapshots

type ConnectorUpdateParams ¶

type ConnectorUpdateParams struct {
	AccountID param.Field[string] `path:"account_id" api:"required"`
	Activated param.Field[bool]   `json:"activated"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    param.Field[[]ConnectorUpdateParamsInterruptWindowDaysOfWeek] `json:"interrupt_window_days_of_week"`
	InterruptWindowDurationHours param.Field[float64]                                          `json:"interrupt_window_duration_hours"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates param.Field[[]string] `json:"interrupt_window_embargo_dates"`
	InterruptWindowHourOfDay    param.Field[float64]  `json:"interrupt_window_hour_of_day"`
	Notes                       param.Field[string]   `json:"notes"`
	Primary                     param.Field[bool]     `json:"primary"`
	// When true, regenerate license key for the connector.
	ProvisionLicense param.Field[bool]   `json:"provision_license"`
	SiteID           param.Field[string] `json:"site_id"`
	Timezone         param.Field[string] `json:"timezone"`
}

func (ConnectorUpdateParams) MarshalJSON ¶

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

type ConnectorUpdateParamsInterruptWindowDaysOfWeek ¶

type ConnectorUpdateParamsInterruptWindowDaysOfWeek string
const (
	ConnectorUpdateParamsInterruptWindowDaysOfWeekSunday    ConnectorUpdateParamsInterruptWindowDaysOfWeek = "Sunday"
	ConnectorUpdateParamsInterruptWindowDaysOfWeekMonday    ConnectorUpdateParamsInterruptWindowDaysOfWeek = "Monday"
	ConnectorUpdateParamsInterruptWindowDaysOfWeekTuesday   ConnectorUpdateParamsInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorUpdateParamsInterruptWindowDaysOfWeekWednesday ConnectorUpdateParamsInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorUpdateParamsInterruptWindowDaysOfWeekThursday  ConnectorUpdateParamsInterruptWindowDaysOfWeek = "Thursday"
	ConnectorUpdateParamsInterruptWindowDaysOfWeekFriday    ConnectorUpdateParamsInterruptWindowDaysOfWeek = "Friday"
	ConnectorUpdateParamsInterruptWindowDaysOfWeekSaturday  ConnectorUpdateParamsInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorUpdateParamsInterruptWindowDaysOfWeek) IsKnown ¶

type ConnectorUpdateResponse ¶

type ConnectorUpdateResponse struct {
	ID        string `json:"id" api:"required"`
	Activated bool   `json:"activated" api:"required"`
	// Allowed days of the week for upgrades. Default is all days.
	InterruptWindowDaysOfWeek    []ConnectorUpdateResponseInterruptWindowDaysOfWeek `json:"interrupt_window_days_of_week" api:"required"`
	InterruptWindowDurationHours float64                                            `json:"interrupt_window_duration_hours" api:"required"`
	// List of dates (YYYY-MM-DD) when upgrades are blocked.
	InterruptWindowEmbargoDates []string                      `json:"interrupt_window_embargo_dates" api:"required"`
	InterruptWindowHourOfDay    float64                       `json:"interrupt_window_hour_of_day" api:"required"`
	LastUpdated                 string                        `json:"last_updated" api:"required"`
	Notes                       string                        `json:"notes" api:"required"`
	Primary                     bool                          `json:"primary" api:"required"`
	Timezone                    string                        `json:"timezone" api:"required"`
	Device                      ConnectorUpdateResponseDevice `json:"device"`
	LastHeartbeat               string                        `json:"last_heartbeat"`
	LastSeenVersion             string                        `json:"last_seen_version"`
	LicenseKey                  string                        `json:"license_key"`
	SiteID                      string                        `json:"site_id"`
	JSON                        connectorUpdateResponseJSON   `json:"-"`
}

func (*ConnectorUpdateResponse) UnmarshalJSON ¶

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

type ConnectorUpdateResponseDevice ¶

type ConnectorUpdateResponseDevice struct {
	ID           string                            `json:"id" api:"required"`
	SerialNumber string                            `json:"serial_number"`
	Type         ConnectorUpdateResponseDeviceType `json:"type"`
	JSON         connectorUpdateResponseDeviceJSON `json:"-"`
}

func (*ConnectorUpdateResponseDevice) UnmarshalJSON ¶

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

type ConnectorUpdateResponseDeviceType ¶

type ConnectorUpdateResponseDeviceType string
const (
	ConnectorUpdateResponseDeviceTypeManaged  ConnectorUpdateResponseDeviceType = "MANAGED"
	ConnectorUpdateResponseDeviceTypeLicensed ConnectorUpdateResponseDeviceType = "LICENSED"
)

func (ConnectorUpdateResponseDeviceType) IsKnown ¶

type ConnectorUpdateResponseEnvelope ¶

type ConnectorUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo               `json:"errors" api:"required"`
	Messages []shared.ResponseInfo               `json:"messages" api:"required"`
	Result   ConnectorUpdateResponse             `json:"result" api:"required"`
	Success  bool                                `json:"success" api:"required"`
	JSON     connectorUpdateResponseEnvelopeJSON `json:"-"`
}

func (*ConnectorUpdateResponseEnvelope) UnmarshalJSON ¶

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

type ConnectorUpdateResponseInterruptWindowDaysOfWeek ¶

type ConnectorUpdateResponseInterruptWindowDaysOfWeek string
const (
	ConnectorUpdateResponseInterruptWindowDaysOfWeekSunday    ConnectorUpdateResponseInterruptWindowDaysOfWeek = "Sunday"
	ConnectorUpdateResponseInterruptWindowDaysOfWeekMonday    ConnectorUpdateResponseInterruptWindowDaysOfWeek = "Monday"
	ConnectorUpdateResponseInterruptWindowDaysOfWeekTuesday   ConnectorUpdateResponseInterruptWindowDaysOfWeek = "Tuesday"
	ConnectorUpdateResponseInterruptWindowDaysOfWeekWednesday ConnectorUpdateResponseInterruptWindowDaysOfWeek = "Wednesday"
	ConnectorUpdateResponseInterruptWindowDaysOfWeekThursday  ConnectorUpdateResponseInterruptWindowDaysOfWeek = "Thursday"
	ConnectorUpdateResponseInterruptWindowDaysOfWeekFriday    ConnectorUpdateResponseInterruptWindowDaysOfWeek = "Friday"
	ConnectorUpdateResponseInterruptWindowDaysOfWeekSaturday  ConnectorUpdateResponseInterruptWindowDaysOfWeek = "Saturday"
)

func (ConnectorUpdateResponseInterruptWindowDaysOfWeek) IsKnown ¶

type DHCPRelay ¶

type DHCPRelay struct {
	// List of DHCP server IPs.
	ServerAddresses []string      `json:"server_addresses"`
	JSON            dhcpRelayJSON `json:"-"`
}

func (*DHCPRelay) UnmarshalJSON ¶

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

type DHCPRelayParam ¶

type DHCPRelayParam struct {
	// List of DHCP server IPs.
	ServerAddresses param.Field[[]string] `json:"server_addresses"`
}

func (DHCPRelayParam) MarshalJSON ¶

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

type DHCPServer ¶

type DHCPServer struct {
	// Optional list of custom DHCP options to include in DHCP responses. Only valid
	// when DHCP server is enabled.
	DHCPOptions []DHCPServerDHCPOption `json:"dhcp_options"`
	// A valid IPv4 address.
	DHCPPoolEnd string `json:"dhcp_pool_end"`
	// A valid IPv4 address.
	DHCPPoolStart string `json:"dhcp_pool_start"`
	// A valid IPv4 address.
	//
	// Deprecated: deprecated
	DNSServer  string   `json:"dns_server"`
	DNSServers []string `json:"dns_servers"`
	// Mapping of MAC addresses to IP addresses
	Reservations map[string]string `json:"reservations"`
	JSON         dhcpServerJSON    `json:"-"`
}

func (*DHCPServer) UnmarshalJSON ¶

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

type DHCPServerDHCPOption ¶

type DHCPServerDHCPOption struct {
	// DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options
	// 3, 6, and 51 are not allowed because they conflict with connector-managed
	// configuration.
	Code int64 `json:"code" api:"required"`
	// The type of the option value. text: a string (max 255 bytes). hex:
	// colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4
	// address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short:
	// an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295
	// (4 bytes).
	Type DHCPServerDHCPOptionsType `json:"type" api:"required"`
	// The option value, interpreted according to the type field.
	Value string                   `json:"value" api:"required"`
	JSON  dhcpServerDHCPOptionJSON `json:"-"`
}

A custom DHCP option to include in DHCP responses.

func (*DHCPServerDHCPOption) UnmarshalJSON ¶

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

type DHCPServerDHCPOptionParam ¶

type DHCPServerDHCPOptionParam struct {
	// DHCP option number (1-254). Options 0 and 255 are reserved by RFC 2132. Options
	// 3, 6, and 51 are not allowed because they conflict with connector-managed
	// configuration.
	Code param.Field[int64] `json:"code" api:"required"`
	// The type of the option value. text: a string (max 255 bytes). hex:
	// colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4
	// address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short:
	// an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295
	// (4 bytes).
	Type param.Field[DHCPServerDHCPOptionsType] `json:"type" api:"required"`
	// The option value, interpreted according to the type field.
	Value param.Field[string] `json:"value" api:"required"`
}

A custom DHCP option to include in DHCP responses.

func (DHCPServerDHCPOptionParam) MarshalJSON ¶

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

type DHCPServerDHCPOptionsType ¶

type DHCPServerDHCPOptionsType string

The type of the option value. text: a string (max 255 bytes). hex: colon-separated hex bytes (e.g. "01:04:aa:bb:cc", max 255 bytes). ip: an IPv4 address (e.g. "10.20.30.40"). byte: an unsigned integer 0-255 (1 byte). short: an unsigned integer 0-65535 (2 bytes). integer: an unsigned integer 0-4294967295 (4 bytes).

const (
	DHCPServerDHCPOptionsTypeText    DHCPServerDHCPOptionsType = "text"
	DHCPServerDHCPOptionsTypeHex     DHCPServerDHCPOptionsType = "hex"
	DHCPServerDHCPOptionsTypeIP      DHCPServerDHCPOptionsType = "ip"
	DHCPServerDHCPOptionsTypeByte    DHCPServerDHCPOptionsType = "byte"
	DHCPServerDHCPOptionsTypeShort   DHCPServerDHCPOptionsType = "short"
	DHCPServerDHCPOptionsTypeInteger DHCPServerDHCPOptionsType = "integer"
)

func (DHCPServerDHCPOptionsType) IsKnown ¶

func (r DHCPServerDHCPOptionsType) IsKnown() bool

type DHCPServerParam ¶

type DHCPServerParam struct {
	// Optional list of custom DHCP options to include in DHCP responses. Only valid
	// when DHCP server is enabled.
	DHCPOptions param.Field[[]DHCPServerDHCPOptionParam] `json:"dhcp_options"`
	// A valid IPv4 address.
	DHCPPoolEnd param.Field[string] `json:"dhcp_pool_end"`
	// A valid IPv4 address.
	DHCPPoolStart param.Field[string] `json:"dhcp_pool_start"`
	// A valid IPv4 address.
	//
	// Deprecated: deprecated
	DNSServer  param.Field[string]   `json:"dns_server"`
	DNSServers param.Field[[]string] `json:"dns_servers"`
	// Mapping of MAC addresses to IP addresses
	Reservations param.Field[map[string]string] `json:"reservations"`
}

func (DHCPServerParam) MarshalJSON ¶

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

type Error ¶

type Error = apierror.Error

type ErrorData ¶

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource ¶

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type GRETunnelBulkUpdateParams ¶

type GRETunnelBulkUpdateParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	Body              interface{}         `json:"body" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

func (GRETunnelBulkUpdateParams) MarshalJSON ¶

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

type GRETunnelBulkUpdateResponse ¶

type GRETunnelBulkUpdateResponse struct {
	Modified           bool                                           `json:"modified"`
	ModifiedGRETunnels []GRETunnelBulkUpdateResponseModifiedGRETunnel `json:"modified_gre_tunnels"`
	JSON               greTunnelBulkUpdateResponseJSON                `json:"-"`
}

func (*GRETunnelBulkUpdateResponse) UnmarshalJSON ¶

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

type GRETunnelBulkUpdateResponseEnvelope ¶

type GRETunnelBulkUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo       `json:"errors" api:"required"`
	Messages []shared.ResponseInfo       `json:"messages" api:"required"`
	Result   GRETunnelBulkUpdateResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success GRETunnelBulkUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    greTunnelBulkUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*GRETunnelBulkUpdateResponseEnvelope) UnmarshalJSON ¶

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

type GRETunnelBulkUpdateResponseEnvelopeSuccess ¶

type GRETunnelBulkUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelBulkUpdateResponseEnvelopeSuccessTrue GRETunnelBulkUpdateResponseEnvelopeSuccess = true
)

func (GRETunnelBulkUpdateResponseEnvelopeSuccess) IsKnown ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnel ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint" api:"required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the tunnel. The name cannot contain spaces or special characters,
	// must be 15 characters or less, and cannot share a name with another GRE tunnel.
	Name string `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                                   `json:"automatic_return_routing"`
	BGP                    GRETunnelBulkUpdateResponseModifiedGRETunnelsBGP       `json:"bgp"`
	BGPStatus              GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the GRE tunnel.
	Description string                                                   `json:"description"`
	HealthCheck GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
	// is 576.
	Mtu int64 `json:"mtu"`
	// Time To Live (TTL) in number of hops of the GRE tunnel.
	TTL  int64                                            `json:"ttl"`
	JSON greTunnelBulkUpdateResponseModifiedGRETunnelJSON `json:"-"`
}

func (*GRETunnelBulkUpdateResponseModifiedGRETunnel) UnmarshalJSON ¶

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

type GRETunnelBulkUpdateResponseModifiedGRETunnelsBGP ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                               `json:"md5_key"`
	JSON   greTunnelBulkUpdateResponseModifiedGRETunnelsBGPJSON `json:"-"`
}

func (*GRETunnelBulkUpdateResponseModifiedGRETunnelsBGP) UnmarshalJSON ¶

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

type GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatus ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatus struct {
	State               GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                                        `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                                   `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                                      `json:"bgp_state"`
	CfSpeakerIP         string                                                      `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                                       `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                                      `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                                       `json:"customer_speaker_port"`
	JSON                greTunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusJSON  `json:"-"`
}

func (*GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatus) UnmarshalJSON ¶

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

type GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusState ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusState string
const (
	GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusStateBGPDown         GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusState = "BGP_DOWN"
	GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusStateBGPUp           GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusState = "BGP_UP"
	GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusStateBGPEstablishing GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusState = "BGP_ESTABLISHING"
)

func (GRETunnelBulkUpdateResponseModifiedGRETunnelsBGPStatusState) IsKnown ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheck ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                              `json:"type"`
	JSON greTunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckJSON `json:"-"`
}

func (*GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheck) UnmarshalJSON ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckDirection ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckDirectionUnidirectional GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckDirection = "unidirectional"
	GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckDirectionBidirectional  GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckDirection = "bidirectional"
)

func (GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckDirection) IsKnown ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetMagicHealthCheckTarget ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                                   `json:"saved"`
	JSON  greTunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetUnion ¶

func (r GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetUnion()

func (*GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetUnion ¶

type GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetUnion interface {
	ImplementsGRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by GRETunnelBulkUpdateResponseModifiedGRETunnelsHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type GRETunnelDeleteParams ¶

type GRETunnelDeleteParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type GRETunnelDeleteResponse ¶

type GRETunnelDeleteResponse struct {
	Deleted          bool                                    `json:"deleted"`
	DeletedGRETunnel GRETunnelDeleteResponseDeletedGRETunnel `json:"deleted_gre_tunnel"`
	JSON             greTunnelDeleteResponseJSON             `json:"-"`
}

func (*GRETunnelDeleteResponse) UnmarshalJSON ¶

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

type GRETunnelDeleteResponseDeletedGRETunnel ¶

type GRETunnelDeleteResponseDeletedGRETunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint" api:"required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the tunnel. The name cannot contain spaces or special characters,
	// must be 15 characters or less, and cannot share a name with another GRE tunnel.
	Name string `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                             `json:"automatic_return_routing"`
	BGP                    GRETunnelDeleteResponseDeletedGRETunnelBGP       `json:"bgp"`
	BGPStatus              GRETunnelDeleteResponseDeletedGRETunnelBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the GRE tunnel.
	Description string                                             `json:"description"`
	HealthCheck GRETunnelDeleteResponseDeletedGRETunnelHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
	// is 576.
	Mtu int64 `json:"mtu"`
	// Time To Live (TTL) in number of hops of the GRE tunnel.
	TTL  int64                                       `json:"ttl"`
	JSON greTunnelDeleteResponseDeletedGRETunnelJSON `json:"-"`
}

func (*GRETunnelDeleteResponseDeletedGRETunnel) UnmarshalJSON ¶

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

type GRETunnelDeleteResponseDeletedGRETunnelBGP ¶

type GRETunnelDeleteResponseDeletedGRETunnelBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                         `json:"md5_key"`
	JSON   greTunnelDeleteResponseDeletedGRETunnelBGPJSON `json:"-"`
}

func (*GRETunnelDeleteResponseDeletedGRETunnelBGP) UnmarshalJSON ¶

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

type GRETunnelDeleteResponseDeletedGRETunnelBGPStatus ¶

type GRETunnelDeleteResponseDeletedGRETunnelBGPStatus struct {
	State               GRETunnelDeleteResponseDeletedGRETunnelBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                                  `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                             `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                                `json:"bgp_state"`
	CfSpeakerIP         string                                                `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                                 `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                                `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                                 `json:"customer_speaker_port"`
	JSON                greTunnelDeleteResponseDeletedGRETunnelBGPStatusJSON  `json:"-"`
}

func (*GRETunnelDeleteResponseDeletedGRETunnelBGPStatus) UnmarshalJSON ¶

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

type GRETunnelDeleteResponseDeletedGRETunnelBGPStatusState ¶

type GRETunnelDeleteResponseDeletedGRETunnelBGPStatusState string
const (
	GRETunnelDeleteResponseDeletedGRETunnelBGPStatusStateBGPDown         GRETunnelDeleteResponseDeletedGRETunnelBGPStatusState = "BGP_DOWN"
	GRETunnelDeleteResponseDeletedGRETunnelBGPStatusStateBGPUp           GRETunnelDeleteResponseDeletedGRETunnelBGPStatusState = "BGP_UP"
	GRETunnelDeleteResponseDeletedGRETunnelBGPStatusStateBGPEstablishing GRETunnelDeleteResponseDeletedGRETunnelBGPStatusState = "BGP_ESTABLISHING"
)

func (GRETunnelDeleteResponseDeletedGRETunnelBGPStatusState) IsKnown ¶

type GRETunnelDeleteResponseDeletedGRETunnelHealthCheck ¶

type GRETunnelDeleteResponseDeletedGRETunnelHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction GRETunnelDeleteResponseDeletedGRETunnelHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                        `json:"type"`
	JSON greTunnelDeleteResponseDeletedGRETunnelHealthCheckJSON `json:"-"`
}

func (*GRETunnelDeleteResponseDeletedGRETunnelHealthCheck) UnmarshalJSON ¶

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

type GRETunnelDeleteResponseDeletedGRETunnelHealthCheckDirection ¶

type GRETunnelDeleteResponseDeletedGRETunnelHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	GRETunnelDeleteResponseDeletedGRETunnelHealthCheckDirectionUnidirectional GRETunnelDeleteResponseDeletedGRETunnelHealthCheckDirection = "unidirectional"
	GRETunnelDeleteResponseDeletedGRETunnelHealthCheckDirectionBidirectional  GRETunnelDeleteResponseDeletedGRETunnelHealthCheckDirection = "bidirectional"
)

func (GRETunnelDeleteResponseDeletedGRETunnelHealthCheckDirection) IsKnown ¶

type GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetMagicHealthCheckTarget ¶

type GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                             `json:"saved"`
	JSON  greTunnelDeleteResponseDeletedGRETunnelHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetUnion ¶

func (r GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetUnion()

func (*GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetUnion ¶

type GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetUnion interface {
	ImplementsGRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by GRETunnelDeleteResponseDeletedGRETunnelHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type GRETunnelDeleteResponseEnvelope ¶

type GRETunnelDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo   `json:"errors" api:"required"`
	Messages []shared.ResponseInfo   `json:"messages" api:"required"`
	Result   GRETunnelDeleteResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success GRETunnelDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    greTunnelDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*GRETunnelDeleteResponseEnvelope) UnmarshalJSON ¶

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

type GRETunnelDeleteResponseEnvelopeSuccess ¶

type GRETunnelDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelDeleteResponseEnvelopeSuccessTrue GRETunnelDeleteResponseEnvelopeSuccess = true
)

func (GRETunnelDeleteResponseEnvelopeSuccess) IsKnown ¶

type GRETunnelGetParams ¶

type GRETunnelGetParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type GRETunnelGetResponse ¶

type GRETunnelGetResponse struct {
	GRETunnel GRETunnelGetResponseGRETunnel `json:"gre_tunnel"`
	JSON      greTunnelGetResponseJSON      `json:"-"`
}

func (*GRETunnelGetResponse) UnmarshalJSON ¶

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

type GRETunnelGetResponseEnvelope ¶

type GRETunnelGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   GRETunnelGetResponse  `json:"result" api:"required"`
	// Whether the API call was successful
	Success GRETunnelGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    greTunnelGetResponseEnvelopeJSON    `json:"-"`
}

func (*GRETunnelGetResponseEnvelope) UnmarshalJSON ¶

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

type GRETunnelGetResponseEnvelopeSuccess ¶

type GRETunnelGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelGetResponseEnvelopeSuccessTrue GRETunnelGetResponseEnvelopeSuccess = true
)

func (GRETunnelGetResponseEnvelopeSuccess) IsKnown ¶

type GRETunnelGetResponseGRETunnel ¶

type GRETunnelGetResponseGRETunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint" api:"required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the tunnel. The name cannot contain spaces or special characters,
	// must be 15 characters or less, and cannot share a name with another GRE tunnel.
	Name string `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                   `json:"automatic_return_routing"`
	BGP                    GRETunnelGetResponseGRETunnelBGP       `json:"bgp"`
	BGPStatus              GRETunnelGetResponseGRETunnelBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the GRE tunnel.
	Description string                                   `json:"description"`
	HealthCheck GRETunnelGetResponseGRETunnelHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
	// is 576.
	Mtu int64 `json:"mtu"`
	// Time To Live (TTL) in number of hops of the GRE tunnel.
	TTL  int64                             `json:"ttl"`
	JSON greTunnelGetResponseGRETunnelJSON `json:"-"`
}

func (*GRETunnelGetResponseGRETunnel) UnmarshalJSON ¶

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

type GRETunnelGetResponseGRETunnelBGP ¶

type GRETunnelGetResponseGRETunnelBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                               `json:"md5_key"`
	JSON   greTunnelGetResponseGRETunnelBGPJSON `json:"-"`
}

func (*GRETunnelGetResponseGRETunnelBGP) UnmarshalJSON ¶

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

type GRETunnelGetResponseGRETunnelBGPStatus ¶

type GRETunnelGetResponseGRETunnelBGPStatus struct {
	State               GRETunnelGetResponseGRETunnelBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                        `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                   `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                      `json:"bgp_state"`
	CfSpeakerIP         string                                      `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                       `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                      `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                       `json:"customer_speaker_port"`
	JSON                greTunnelGetResponseGRETunnelBGPStatusJSON  `json:"-"`
}

func (*GRETunnelGetResponseGRETunnelBGPStatus) UnmarshalJSON ¶

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

type GRETunnelGetResponseGRETunnelBGPStatusState ¶

type GRETunnelGetResponseGRETunnelBGPStatusState string
const (
	GRETunnelGetResponseGRETunnelBGPStatusStateBGPDown         GRETunnelGetResponseGRETunnelBGPStatusState = "BGP_DOWN"
	GRETunnelGetResponseGRETunnelBGPStatusStateBGPUp           GRETunnelGetResponseGRETunnelBGPStatusState = "BGP_UP"
	GRETunnelGetResponseGRETunnelBGPStatusStateBGPEstablishing GRETunnelGetResponseGRETunnelBGPStatusState = "BGP_ESTABLISHING"
)

func (GRETunnelGetResponseGRETunnelBGPStatusState) IsKnown ¶

type GRETunnelGetResponseGRETunnelHealthCheck ¶

type GRETunnelGetResponseGRETunnelHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction GRETunnelGetResponseGRETunnelHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target GRETunnelGetResponseGRETunnelHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                              `json:"type"`
	JSON greTunnelGetResponseGRETunnelHealthCheckJSON `json:"-"`
}

func (*GRETunnelGetResponseGRETunnelHealthCheck) UnmarshalJSON ¶

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

type GRETunnelGetResponseGRETunnelHealthCheckDirection ¶

type GRETunnelGetResponseGRETunnelHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	GRETunnelGetResponseGRETunnelHealthCheckDirectionUnidirectional GRETunnelGetResponseGRETunnelHealthCheckDirection = "unidirectional"
	GRETunnelGetResponseGRETunnelHealthCheckDirectionBidirectional  GRETunnelGetResponseGRETunnelHealthCheckDirection = "bidirectional"
)

func (GRETunnelGetResponseGRETunnelHealthCheckDirection) IsKnown ¶

type GRETunnelGetResponseGRETunnelHealthCheckTargetMagicHealthCheckTarget ¶

type GRETunnelGetResponseGRETunnelHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                   `json:"saved"`
	JSON  greTunnelGetResponseGRETunnelHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (GRETunnelGetResponseGRETunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelGetResponseGRETunnelHealthCheckTargetUnion ¶

func (r GRETunnelGetResponseGRETunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelGetResponseGRETunnelHealthCheckTargetUnion()

func (*GRETunnelGetResponseGRETunnelHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type GRETunnelGetResponseGRETunnelHealthCheckTargetUnion ¶

type GRETunnelGetResponseGRETunnelHealthCheckTargetUnion interface {
	ImplementsGRETunnelGetResponseGRETunnelHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by GRETunnelGetResponseGRETunnelHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type GRETunnelListParams ¶

type GRETunnelListParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type GRETunnelListResponse ¶

type GRETunnelListResponse struct {
	GRETunnels []GRETunnelListResponseGRETunnel `json:"gre_tunnels"`
	JSON       greTunnelListResponseJSON        `json:"-"`
}

func (*GRETunnelListResponse) UnmarshalJSON ¶

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

type GRETunnelListResponseEnvelope ¶

type GRETunnelListResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   GRETunnelListResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success GRETunnelListResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    greTunnelListResponseEnvelopeJSON    `json:"-"`
}

func (*GRETunnelListResponseEnvelope) UnmarshalJSON ¶

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

type GRETunnelListResponseEnvelopeSuccess ¶

type GRETunnelListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelListResponseEnvelopeSuccessTrue GRETunnelListResponseEnvelopeSuccess = true
)

func (GRETunnelListResponseEnvelopeSuccess) IsKnown ¶

type GRETunnelListResponseGRETunnel ¶

type GRETunnelListResponseGRETunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint" api:"required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the tunnel. The name cannot contain spaces or special characters,
	// must be 15 characters or less, and cannot share a name with another GRE tunnel.
	Name string `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                     `json:"automatic_return_routing"`
	BGP                    GRETunnelListResponseGRETunnelsBGP       `json:"bgp"`
	BGPStatus              GRETunnelListResponseGRETunnelsBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the GRE tunnel.
	Description string                                     `json:"description"`
	HealthCheck GRETunnelListResponseGRETunnelsHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
	// is 576.
	Mtu int64 `json:"mtu"`
	// Time To Live (TTL) in number of hops of the GRE tunnel.
	TTL  int64                              `json:"ttl"`
	JSON greTunnelListResponseGRETunnelJSON `json:"-"`
}

func (*GRETunnelListResponseGRETunnel) UnmarshalJSON ¶

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

type GRETunnelListResponseGRETunnelsBGP ¶

type GRETunnelListResponseGRETunnelsBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                 `json:"md5_key"`
	JSON   greTunnelListResponseGRETunnelsBGPJSON `json:"-"`
}

func (*GRETunnelListResponseGRETunnelsBGP) UnmarshalJSON ¶

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

type GRETunnelListResponseGRETunnelsBGPStatus ¶

type GRETunnelListResponseGRETunnelsBGPStatus struct {
	State               GRETunnelListResponseGRETunnelsBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                          `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                     `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                        `json:"bgp_state"`
	CfSpeakerIP         string                                        `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                         `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                        `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                         `json:"customer_speaker_port"`
	JSON                greTunnelListResponseGRETunnelsBGPStatusJSON  `json:"-"`
}

func (*GRETunnelListResponseGRETunnelsBGPStatus) UnmarshalJSON ¶

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

type GRETunnelListResponseGRETunnelsBGPStatusState ¶

type GRETunnelListResponseGRETunnelsBGPStatusState string
const (
	GRETunnelListResponseGRETunnelsBGPStatusStateBGPDown         GRETunnelListResponseGRETunnelsBGPStatusState = "BGP_DOWN"
	GRETunnelListResponseGRETunnelsBGPStatusStateBGPUp           GRETunnelListResponseGRETunnelsBGPStatusState = "BGP_UP"
	GRETunnelListResponseGRETunnelsBGPStatusStateBGPEstablishing GRETunnelListResponseGRETunnelsBGPStatusState = "BGP_ESTABLISHING"
)

func (GRETunnelListResponseGRETunnelsBGPStatusState) IsKnown ¶

type GRETunnelListResponseGRETunnelsHealthCheck ¶

type GRETunnelListResponseGRETunnelsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction GRETunnelListResponseGRETunnelsHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target GRETunnelListResponseGRETunnelsHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                `json:"type"`
	JSON greTunnelListResponseGRETunnelsHealthCheckJSON `json:"-"`
}

func (*GRETunnelListResponseGRETunnelsHealthCheck) UnmarshalJSON ¶

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

type GRETunnelListResponseGRETunnelsHealthCheckDirection ¶

type GRETunnelListResponseGRETunnelsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	GRETunnelListResponseGRETunnelsHealthCheckDirectionUnidirectional GRETunnelListResponseGRETunnelsHealthCheckDirection = "unidirectional"
	GRETunnelListResponseGRETunnelsHealthCheckDirectionBidirectional  GRETunnelListResponseGRETunnelsHealthCheckDirection = "bidirectional"
)

func (GRETunnelListResponseGRETunnelsHealthCheckDirection) IsKnown ¶

type GRETunnelListResponseGRETunnelsHealthCheckTargetMagicHealthCheckTarget ¶

type GRETunnelListResponseGRETunnelsHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                     `json:"saved"`
	JSON  greTunnelListResponseGRETunnelsHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (GRETunnelListResponseGRETunnelsHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelListResponseGRETunnelsHealthCheckTargetUnion ¶

func (r GRETunnelListResponseGRETunnelsHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelListResponseGRETunnelsHealthCheckTargetUnion()

func (*GRETunnelListResponseGRETunnelsHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type GRETunnelListResponseGRETunnelsHealthCheckTargetUnion ¶

type GRETunnelListResponseGRETunnelsHealthCheckTargetUnion interface {
	ImplementsGRETunnelListResponseGRETunnelsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by GRETunnelListResponseGRETunnelsHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type GRETunnelNewParams ¶

type GRETunnelNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint param.Field[string] `json:"cloudflare_gre_endpoint" api:"required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint param.Field[string] `json:"customer_gre_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress param.Field[string] `json:"interface_address" api:"required"`
	// The name of the tunnel. The name cannot contain spaces or special characters,
	// must be 15 characters or less, and cannot share a name with another GRE tunnel.
	Name param.Field[string] `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting param.Field[bool]                  `json:"automatic_return_routing"`
	BGP                    param.Field[GRETunnelNewParamsBGP] `json:"bgp"`
	// An optional description of the GRE tunnel.
	Description param.Field[string]                        `json:"description"`
	HealthCheck param.Field[GRETunnelNewParamsHealthCheck] `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 param.Field[string] `json:"interface_address6"`
	// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
	// is 576.
	Mtu param.Field[int64] `json:"mtu"`
	// Time To Live (TTL) in number of hops of the GRE tunnel.
	TTL               param.Field[int64] `json:"ttl"`
	XMagicNewHcTarget param.Field[bool]  `header:"x-magic-new-hc-target"`
}

func (GRETunnelNewParams) MarshalJSON ¶

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

type GRETunnelNewParamsBGP ¶

type GRETunnelNewParamsBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN param.Field[int64] `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID param.Field[string] `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes param.Field[[]string] `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID param.Field[string] `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key param.Field[string] `json:"md5_key"`
}

func (GRETunnelNewParamsBGP) MarshalJSON ¶

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

type GRETunnelNewParamsHealthCheck ¶

type GRETunnelNewParamsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction param.Field[GRETunnelNewParamsHealthCheckDirection] `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled param.Field[bool] `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate param.Field[HealthCheckRate] `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target param.Field[GRETunnelNewParamsHealthCheckTargetUnion] `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type param.Field[HealthCheckType] `json:"type"`
}

func (GRETunnelNewParamsHealthCheck) MarshalJSON ¶

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

type GRETunnelNewParamsHealthCheckDirection ¶

type GRETunnelNewParamsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	GRETunnelNewParamsHealthCheckDirectionUnidirectional GRETunnelNewParamsHealthCheckDirection = "unidirectional"
	GRETunnelNewParamsHealthCheckDirectionBidirectional  GRETunnelNewParamsHealthCheckDirection = "bidirectional"
)

func (GRETunnelNewParamsHealthCheckDirection) IsKnown ¶

type GRETunnelNewParamsHealthCheckTargetMagicHealthCheckTarget ¶

type GRETunnelNewParamsHealthCheckTargetMagicHealthCheckTarget struct {
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved param.Field[string] `json:"saved"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (GRETunnelNewParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelNewParamsHealthCheckTargetUnion ¶

func (r GRETunnelNewParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelNewParamsHealthCheckTargetUnion()

func (GRETunnelNewParamsHealthCheckTargetMagicHealthCheckTarget) MarshalJSON ¶

type GRETunnelNewParamsHealthCheckTargetUnion ¶

type GRETunnelNewParamsHealthCheckTargetUnion interface {
	ImplementsGRETunnelNewParamsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Satisfied by magic_transit.GRETunnelNewParamsHealthCheckTargetMagicHealthCheckTarget, shared.UnionString.

type GRETunnelNewResponse ¶

type GRETunnelNewResponse struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint" api:"required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the tunnel. The name cannot contain spaces or special characters,
	// must be 15 characters or less, and cannot share a name with another GRE tunnel.
	Name string `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                          `json:"automatic_return_routing"`
	BGP                    GRETunnelNewResponseBGP       `json:"bgp"`
	BGPStatus              GRETunnelNewResponseBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the GRE tunnel.
	Description string                          `json:"description"`
	HealthCheck GRETunnelNewResponseHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
	// is 576.
	Mtu int64 `json:"mtu"`
	// Time To Live (TTL) in number of hops of the GRE tunnel.
	TTL  int64                    `json:"ttl"`
	JSON greTunnelNewResponseJSON `json:"-"`
}

func (*GRETunnelNewResponse) UnmarshalJSON ¶

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

type GRETunnelNewResponseBGP ¶

type GRETunnelNewResponseBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                      `json:"md5_key"`
	JSON   greTunnelNewResponseBGPJSON `json:"-"`
}

func (*GRETunnelNewResponseBGP) UnmarshalJSON ¶

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

type GRETunnelNewResponseBGPStatus ¶

type GRETunnelNewResponseBGPStatus struct {
	State               GRETunnelNewResponseBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                               `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                          `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                             `json:"bgp_state"`
	CfSpeakerIP         string                             `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                              `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                             `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                              `json:"customer_speaker_port"`
	JSON                greTunnelNewResponseBGPStatusJSON  `json:"-"`
}

func (*GRETunnelNewResponseBGPStatus) UnmarshalJSON ¶

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

type GRETunnelNewResponseBGPStatusState ¶

type GRETunnelNewResponseBGPStatusState string
const (
	GRETunnelNewResponseBGPStatusStateBGPDown         GRETunnelNewResponseBGPStatusState = "BGP_DOWN"
	GRETunnelNewResponseBGPStatusStateBGPUp           GRETunnelNewResponseBGPStatusState = "BGP_UP"
	GRETunnelNewResponseBGPStatusStateBGPEstablishing GRETunnelNewResponseBGPStatusState = "BGP_ESTABLISHING"
)

func (GRETunnelNewResponseBGPStatusState) IsKnown ¶

type GRETunnelNewResponseEnvelope ¶

type GRETunnelNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   GRETunnelNewResponse  `json:"result" api:"required"`
	// Whether the API call was successful
	Success GRETunnelNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    greTunnelNewResponseEnvelopeJSON    `json:"-"`
}

func (*GRETunnelNewResponseEnvelope) UnmarshalJSON ¶

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

type GRETunnelNewResponseEnvelopeSuccess ¶

type GRETunnelNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelNewResponseEnvelopeSuccessTrue GRETunnelNewResponseEnvelopeSuccess = true
)

func (GRETunnelNewResponseEnvelopeSuccess) IsKnown ¶

type GRETunnelNewResponseHealthCheck ¶

type GRETunnelNewResponseHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction GRETunnelNewResponseHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target GRETunnelNewResponseHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                     `json:"type"`
	JSON greTunnelNewResponseHealthCheckJSON `json:"-"`
}

func (*GRETunnelNewResponseHealthCheck) UnmarshalJSON ¶

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

type GRETunnelNewResponseHealthCheckDirection ¶

type GRETunnelNewResponseHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	GRETunnelNewResponseHealthCheckDirectionUnidirectional GRETunnelNewResponseHealthCheckDirection = "unidirectional"
	GRETunnelNewResponseHealthCheckDirectionBidirectional  GRETunnelNewResponseHealthCheckDirection = "bidirectional"
)

func (GRETunnelNewResponseHealthCheckDirection) IsKnown ¶

type GRETunnelNewResponseHealthCheckTargetMagicHealthCheckTarget ¶

type GRETunnelNewResponseHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                          `json:"saved"`
	JSON  greTunnelNewResponseHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (GRETunnelNewResponseHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelNewResponseHealthCheckTargetUnion ¶

func (r GRETunnelNewResponseHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelNewResponseHealthCheckTargetUnion()

func (*GRETunnelNewResponseHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type GRETunnelNewResponseHealthCheckTargetUnion ¶

type GRETunnelNewResponseHealthCheckTargetUnion interface {
	ImplementsGRETunnelNewResponseHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by GRETunnelNewResponseHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type GRETunnelService ¶

type GRETunnelService struct {
	Options []option.RequestOption
}

GRETunnelService 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 NewGRETunnelService method instead.

func NewGRETunnelService ¶

func NewGRETunnelService(opts ...option.RequestOption) (r *GRETunnelService)

NewGRETunnelService 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 (*GRETunnelService) BulkUpdate ¶

Updates multiple GRE tunnels. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

func (*GRETunnelService) Delete ¶

func (r *GRETunnelService) Delete(ctx context.Context, greTunnelID string, params GRETunnelDeleteParams, opts ...option.RequestOption) (res *GRETunnelDeleteResponse, err error)

Disables and removes a specific static GRE tunnel. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

func (*GRETunnelService) Get ¶

func (r *GRETunnelService) Get(ctx context.Context, greTunnelID string, params GRETunnelGetParams, opts ...option.RequestOption) (res *GRETunnelGetResponse, err error)

Lists informtion for a specific GRE tunnel.

func (*GRETunnelService) List ¶

Lists GRE tunnels associated with an account.

func (*GRETunnelService) New ¶

Creates a new GRE tunnel. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

func (*GRETunnelService) Update ¶

func (r *GRETunnelService) Update(ctx context.Context, greTunnelID string, params GRETunnelUpdateParams, opts ...option.RequestOption) (res *GRETunnelUpdateResponse, err error)

Updates a specific GRE tunnel. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

type GRETunnelUpdateParams ¶

type GRETunnelUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint param.Field[string] `json:"cloudflare_gre_endpoint" api:"required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint param.Field[string] `json:"customer_gre_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress param.Field[string] `json:"interface_address" api:"required"`
	// The name of the tunnel. The name cannot contain spaces or special characters,
	// must be 15 characters or less, and cannot share a name with another GRE tunnel.
	Name param.Field[string] `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting param.Field[bool] `json:"automatic_return_routing"`
	// An optional description of the GRE tunnel.
	Description param.Field[string]                           `json:"description"`
	HealthCheck param.Field[GRETunnelUpdateParamsHealthCheck] `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 param.Field[string] `json:"interface_address6"`
	// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
	// is 576.
	Mtu param.Field[int64] `json:"mtu"`
	// Time To Live (TTL) in number of hops of the GRE tunnel.
	TTL               param.Field[int64] `json:"ttl"`
	XMagicNewHcTarget param.Field[bool]  `header:"x-magic-new-hc-target"`
}

func (GRETunnelUpdateParams) MarshalJSON ¶

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

type GRETunnelUpdateParamsHealthCheck ¶

type GRETunnelUpdateParamsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction param.Field[GRETunnelUpdateParamsHealthCheckDirection] `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled param.Field[bool] `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate param.Field[HealthCheckRate] `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target param.Field[GRETunnelUpdateParamsHealthCheckTargetUnion] `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type param.Field[HealthCheckType] `json:"type"`
}

func (GRETunnelUpdateParamsHealthCheck) MarshalJSON ¶

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

type GRETunnelUpdateParamsHealthCheckDirection ¶

type GRETunnelUpdateParamsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	GRETunnelUpdateParamsHealthCheckDirectionUnidirectional GRETunnelUpdateParamsHealthCheckDirection = "unidirectional"
	GRETunnelUpdateParamsHealthCheckDirectionBidirectional  GRETunnelUpdateParamsHealthCheckDirection = "bidirectional"
)

func (GRETunnelUpdateParamsHealthCheckDirection) IsKnown ¶

type GRETunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget ¶

type GRETunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget struct {
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved param.Field[string] `json:"saved"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (GRETunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelUpdateParamsHealthCheckTargetUnion ¶

func (r GRETunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelUpdateParamsHealthCheckTargetUnion()

func (GRETunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget) MarshalJSON ¶

type GRETunnelUpdateParamsHealthCheckTargetUnion ¶

type GRETunnelUpdateParamsHealthCheckTargetUnion interface {
	ImplementsGRETunnelUpdateParamsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Satisfied by magic_transit.GRETunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget, shared.UnionString.

type GRETunnelUpdateResponse ¶

type GRETunnelUpdateResponse struct {
	Modified          bool                                     `json:"modified"`
	ModifiedGRETunnel GRETunnelUpdateResponseModifiedGRETunnel `json:"modified_gre_tunnel"`
	JSON              greTunnelUpdateResponseJSON              `json:"-"`
}

func (*GRETunnelUpdateResponse) UnmarshalJSON ¶

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

type GRETunnelUpdateResponseEnvelope ¶

type GRETunnelUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo   `json:"errors" api:"required"`
	Messages []shared.ResponseInfo   `json:"messages" api:"required"`
	Result   GRETunnelUpdateResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success GRETunnelUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    greTunnelUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*GRETunnelUpdateResponseEnvelope) UnmarshalJSON ¶

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

type GRETunnelUpdateResponseEnvelopeSuccess ¶

type GRETunnelUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelUpdateResponseEnvelopeSuccessTrue GRETunnelUpdateResponseEnvelopeSuccess = true
)

func (GRETunnelUpdateResponseEnvelopeSuccess) IsKnown ¶

type GRETunnelUpdateResponseModifiedGRETunnel ¶

type GRETunnelUpdateResponseModifiedGRETunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint" api:"required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the tunnel. The name cannot contain spaces or special characters,
	// must be 15 characters or less, and cannot share a name with another GRE tunnel.
	Name string `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                              `json:"automatic_return_routing"`
	BGP                    GRETunnelUpdateResponseModifiedGRETunnelBGP       `json:"bgp"`
	BGPStatus              GRETunnelUpdateResponseModifiedGRETunnelBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional description of the GRE tunnel.
	Description string                                              `json:"description"`
	HealthCheck GRETunnelUpdateResponseModifiedGRETunnelHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value
	// is 576.
	Mtu int64 `json:"mtu"`
	// Time To Live (TTL) in number of hops of the GRE tunnel.
	TTL  int64                                        `json:"ttl"`
	JSON greTunnelUpdateResponseModifiedGRETunnelJSON `json:"-"`
}

func (*GRETunnelUpdateResponseModifiedGRETunnel) UnmarshalJSON ¶

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

type GRETunnelUpdateResponseModifiedGRETunnelBGP ¶

type GRETunnelUpdateResponseModifiedGRETunnelBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                          `json:"md5_key"`
	JSON   greTunnelUpdateResponseModifiedGRETunnelBGPJSON `json:"-"`
}

func (*GRETunnelUpdateResponseModifiedGRETunnelBGP) UnmarshalJSON ¶

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

type GRETunnelUpdateResponseModifiedGRETunnelBGPStatus ¶

type GRETunnelUpdateResponseModifiedGRETunnelBGPStatus struct {
	State               GRETunnelUpdateResponseModifiedGRETunnelBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                                   `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                              `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                                 `json:"bgp_state"`
	CfSpeakerIP         string                                                 `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                                  `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                                 `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                                  `json:"customer_speaker_port"`
	JSON                greTunnelUpdateResponseModifiedGRETunnelBGPStatusJSON  `json:"-"`
}

func (*GRETunnelUpdateResponseModifiedGRETunnelBGPStatus) UnmarshalJSON ¶

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

type GRETunnelUpdateResponseModifiedGRETunnelBGPStatusState ¶

type GRETunnelUpdateResponseModifiedGRETunnelBGPStatusState string
const (
	GRETunnelUpdateResponseModifiedGRETunnelBGPStatusStateBGPDown         GRETunnelUpdateResponseModifiedGRETunnelBGPStatusState = "BGP_DOWN"
	GRETunnelUpdateResponseModifiedGRETunnelBGPStatusStateBGPUp           GRETunnelUpdateResponseModifiedGRETunnelBGPStatusState = "BGP_UP"
	GRETunnelUpdateResponseModifiedGRETunnelBGPStatusStateBGPEstablishing GRETunnelUpdateResponseModifiedGRETunnelBGPStatusState = "BGP_ESTABLISHING"
)

func (GRETunnelUpdateResponseModifiedGRETunnelBGPStatusState) IsKnown ¶

type GRETunnelUpdateResponseModifiedGRETunnelHealthCheck ¶

type GRETunnelUpdateResponseModifiedGRETunnelHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction GRETunnelUpdateResponseModifiedGRETunnelHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                         `json:"type"`
	JSON greTunnelUpdateResponseModifiedGRETunnelHealthCheckJSON `json:"-"`
}

func (*GRETunnelUpdateResponseModifiedGRETunnelHealthCheck) UnmarshalJSON ¶

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

type GRETunnelUpdateResponseModifiedGRETunnelHealthCheckDirection ¶

type GRETunnelUpdateResponseModifiedGRETunnelHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	GRETunnelUpdateResponseModifiedGRETunnelHealthCheckDirectionUnidirectional GRETunnelUpdateResponseModifiedGRETunnelHealthCheckDirection = "unidirectional"
	GRETunnelUpdateResponseModifiedGRETunnelHealthCheckDirectionBidirectional  GRETunnelUpdateResponseModifiedGRETunnelHealthCheckDirection = "bidirectional"
)

func (GRETunnelUpdateResponseModifiedGRETunnelHealthCheckDirection) IsKnown ¶

type GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetMagicHealthCheckTarget ¶

type GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                              `json:"saved"`
	JSON  greTunnelUpdateResponseModifiedGRETunnelHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetUnion ¶

func (r GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsGRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetUnion()

func (*GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetUnion ¶

type GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetUnion interface {
	ImplementsGRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by GRETunnelUpdateResponseModifiedGRETunnelHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type HealthCheckRate ¶

type HealthCheckRate string

How frequent the health check is run. The default value is `mid`.

const (
	HealthCheckRateLow  HealthCheckRate = "low"
	HealthCheckRateMid  HealthCheckRate = "mid"
	HealthCheckRateHigh HealthCheckRate = "high"
)

func (HealthCheckRate) IsKnown ¶

func (r HealthCheckRate) IsKnown() bool

type HealthCheckType ¶

type HealthCheckType string

The type of healthcheck to run, reply or request. The default value is `reply`.

const (
	HealthCheckTypeReply   HealthCheckType = "reply"
	HealthCheckTypeRequest HealthCheckType = "request"
)

func (HealthCheckType) IsKnown ¶

func (r HealthCheckType) IsKnown() bool

type IPSECTunnelBulkUpdateParams ¶

type IPSECTunnelBulkUpdateParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	Body              interface{}         `json:"body" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

func (IPSECTunnelBulkUpdateParams) MarshalJSON ¶

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

type IPSECTunnelBulkUpdateResponse ¶

type IPSECTunnelBulkUpdateResponse struct {
	Modified             bool                                               `json:"modified"`
	ModifiedIPSECTunnels []IPSECTunnelBulkUpdateResponseModifiedIPSECTunnel `json:"modified_ipsec_tunnels"`
	JSON                 ipsecTunnelBulkUpdateResponseJSON                  `json:"-"`
}

func (*IPSECTunnelBulkUpdateResponse) UnmarshalJSON ¶

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

type IPSECTunnelBulkUpdateResponseEnvelope ¶

type IPSECTunnelBulkUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo         `json:"errors" api:"required"`
	Messages []shared.ResponseInfo         `json:"messages" api:"required"`
	Result   IPSECTunnelBulkUpdateResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success IPSECTunnelBulkUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    ipsecTunnelBulkUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*IPSECTunnelBulkUpdateResponseEnvelope) UnmarshalJSON ¶

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

type IPSECTunnelBulkUpdateResponseEnvelopeSuccess ¶

type IPSECTunnelBulkUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelBulkUpdateResponseEnvelopeSuccessTrue IPSECTunnelBulkUpdateResponseEnvelopeSuccess = true
)

func (IPSECTunnelBulkUpdateResponseEnvelopeSuccess) IsKnown ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnel ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name" api:"required"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                                       `json:"automatic_return_routing"`
	BGP                    IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGP       `json:"bgp"`
	BGPStatus              IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn              time.Time                                                               `json:"created_on" format:"date-time"`
	CustomRemoteIdentities IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsCustomRemoteIdentities `json:"custom_remote_identities"`
	// The IP address assigned to the customer side of the IPsec tunnel. Not required,
	// but must be set for proactive traceroutes to work.
	CustomerEndpoint string `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description string                                                       `json:"description"`
	HealthCheck IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The PSK metadata that includes when the PSK was generated.
	PSKMetadata PSKMetadata `json:"psk_metadata"`
	// If `true`, then IPsec replay protection will be supported in the
	// Cloudflare-to-customer direction.
	ReplayProtection bool                                                 `json:"replay_protection"`
	JSON             ipsecTunnelBulkUpdateResponseModifiedIPSECTunnelJSON `json:"-"`
}

func (*IPSECTunnelBulkUpdateResponseModifiedIPSECTunnel) UnmarshalJSON ¶

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

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGP ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                                   `json:"md5_key"`
	JSON   ipsecTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPJSON `json:"-"`
}

func (*IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGP) UnmarshalJSON ¶

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

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatus ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatus struct {
	State               IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                                            `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                                       `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                                          `json:"bgp_state"`
	CfSpeakerIP         string                                                          `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                                           `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                                          `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                                           `json:"customer_speaker_port"`
	JSON                ipsecTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusJSON  `json:"-"`
}

func (*IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatus) UnmarshalJSON ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusState ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusState string
const (
	IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusStateBGPDown         IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusState = "BGP_DOWN"
	IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusStateBGPUp           IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusState = "BGP_UP"
	IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusStateBGPEstablishing IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusState = "BGP_ESTABLISHING"
)

func (IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsBGPStatusState) IsKnown ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsCustomRemoteIdentities ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsCustomRemoteIdentities struct {
	// A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
	// generated IKE IDs can still be used even if this custom value is specified.
	//
	// Must be of the form `<custom label>.<account ID>.custom.ipsec.cloudflare.com`.
	//
	// This custom ID does not need to be unique. Two IPsec tunnels may have the same
	// custom fqdn_id. However, if another IPsec tunnel has the same value then the two
	// tunnels cannot have the same cloudflare_endpoint.
	FqdnID string                                                                      `json:"fqdn_id"`
	JSON   ipsecTunnelBulkUpdateResponseModifiedIPSECTunnelsCustomRemoteIdentitiesJSON `json:"-"`
}

func (*IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsCustomRemoteIdentities) UnmarshalJSON ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheck ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                                  `json:"type"`
	JSON ipsecTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheck) UnmarshalJSON ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckDirection ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckDirectionUnidirectional IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckDirection = "unidirectional"
	IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckDirectionBidirectional  IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckDirection = "bidirectional"
)

func (IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckDirection) IsKnown ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                                       `json:"saved"`
	JSON  ipsecTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetUnion ¶

func (r IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetUnion()

func (*IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetUnion ¶

type IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetUnion interface {
	ImplementsIPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by IPSECTunnelBulkUpdateResponseModifiedIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type IPSECTunnelDeleteParams ¶

type IPSECTunnelDeleteParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type IPSECTunnelDeleteResponse ¶

type IPSECTunnelDeleteResponse struct {
	Deleted            bool                                        `json:"deleted"`
	DeletedIPSECTunnel IPSECTunnelDeleteResponseDeletedIPSECTunnel `json:"deleted_ipsec_tunnel"`
	JSON               ipsecTunnelDeleteResponseJSON               `json:"-"`
}

func (*IPSECTunnelDeleteResponse) UnmarshalJSON ¶

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

type IPSECTunnelDeleteResponseDeletedIPSECTunnel ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name" api:"required"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                                 `json:"automatic_return_routing"`
	BGP                    IPSECTunnelDeleteResponseDeletedIPSECTunnelBGP       `json:"bgp"`
	BGPStatus              IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn              time.Time                                                         `json:"created_on" format:"date-time"`
	CustomRemoteIdentities IPSECTunnelDeleteResponseDeletedIPSECTunnelCustomRemoteIdentities `json:"custom_remote_identities"`
	// The IP address assigned to the customer side of the IPsec tunnel. Not required,
	// but must be set for proactive traceroutes to work.
	CustomerEndpoint string `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description string                                                 `json:"description"`
	HealthCheck IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The PSK metadata that includes when the PSK was generated.
	PSKMetadata PSKMetadata `json:"psk_metadata"`
	// If `true`, then IPsec replay protection will be supported in the
	// Cloudflare-to-customer direction.
	ReplayProtection bool                                            `json:"replay_protection"`
	JSON             ipsecTunnelDeleteResponseDeletedIPSECTunnelJSON `json:"-"`
}

func (*IPSECTunnelDeleteResponseDeletedIPSECTunnel) UnmarshalJSON ¶

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

type IPSECTunnelDeleteResponseDeletedIPSECTunnelBGP ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                             `json:"md5_key"`
	JSON   ipsecTunnelDeleteResponseDeletedIPSECTunnelBGPJSON `json:"-"`
}

func (*IPSECTunnelDeleteResponseDeletedIPSECTunnelBGP) UnmarshalJSON ¶

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

type IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatus ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatus struct {
	State               IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                                      `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                                 `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                                    `json:"bgp_state"`
	CfSpeakerIP         string                                                    `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                                     `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                                    `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                                     `json:"customer_speaker_port"`
	JSON                ipsecTunnelDeleteResponseDeletedIPSECTunnelBGPStatusJSON  `json:"-"`
}

func (*IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatus) UnmarshalJSON ¶

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

type IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusState ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusState string
const (
	IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusStateBGPDown         IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusState = "BGP_DOWN"
	IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusStateBGPUp           IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusState = "BGP_UP"
	IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusStateBGPEstablishing IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusState = "BGP_ESTABLISHING"
)

func (IPSECTunnelDeleteResponseDeletedIPSECTunnelBGPStatusState) IsKnown ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelCustomRemoteIdentities ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelCustomRemoteIdentities struct {
	// A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
	// generated IKE IDs can still be used even if this custom value is specified.
	//
	// Must be of the form `<custom label>.<account ID>.custom.ipsec.cloudflare.com`.
	//
	// This custom ID does not need to be unique. Two IPsec tunnels may have the same
	// custom fqdn_id. However, if another IPsec tunnel has the same value then the two
	// tunnels cannot have the same cloudflare_endpoint.
	FqdnID string                                                                `json:"fqdn_id"`
	JSON   ipsecTunnelDeleteResponseDeletedIPSECTunnelCustomRemoteIdentitiesJSON `json:"-"`
}

func (*IPSECTunnelDeleteResponseDeletedIPSECTunnelCustomRemoteIdentities) UnmarshalJSON ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheck ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                            `json:"type"`
	JSON ipsecTunnelDeleteResponseDeletedIPSECTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheck) UnmarshalJSON ¶

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

type IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckDirection ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckDirectionUnidirectional IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckDirection = "unidirectional"
	IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckDirectionBidirectional  IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckDirection = "bidirectional"
)

func (IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckDirection) IsKnown ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                                 `json:"saved"`
	JSON  ipsecTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetUnion ¶

func (r IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetUnion()

func (*IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetUnion ¶

type IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetUnion interface {
	ImplementsIPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by IPSECTunnelDeleteResponseDeletedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type IPSECTunnelDeleteResponseEnvelope ¶

type IPSECTunnelDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo     `json:"errors" api:"required"`
	Messages []shared.ResponseInfo     `json:"messages" api:"required"`
	Result   IPSECTunnelDeleteResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success IPSECTunnelDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    ipsecTunnelDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*IPSECTunnelDeleteResponseEnvelope) UnmarshalJSON ¶

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

type IPSECTunnelDeleteResponseEnvelopeSuccess ¶

type IPSECTunnelDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelDeleteResponseEnvelopeSuccessTrue IPSECTunnelDeleteResponseEnvelopeSuccess = true
)

func (IPSECTunnelDeleteResponseEnvelopeSuccess) IsKnown ¶

type IPSECTunnelGetParams ¶

type IPSECTunnelGetParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type IPSECTunnelGetResponse ¶

type IPSECTunnelGetResponse struct {
	IPSECTunnel IPSECTunnelGetResponseIPSECTunnel `json:"ipsec_tunnel"`
	JSON        ipsecTunnelGetResponseJSON        `json:"-"`
}

func (*IPSECTunnelGetResponse) UnmarshalJSON ¶

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

type IPSECTunnelGetResponseEnvelope ¶

type IPSECTunnelGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo  `json:"errors" api:"required"`
	Messages []shared.ResponseInfo  `json:"messages" api:"required"`
	Result   IPSECTunnelGetResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success IPSECTunnelGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    ipsecTunnelGetResponseEnvelopeJSON    `json:"-"`
}

func (*IPSECTunnelGetResponseEnvelope) UnmarshalJSON ¶

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

type IPSECTunnelGetResponseEnvelopeSuccess ¶

type IPSECTunnelGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelGetResponseEnvelopeSuccessTrue IPSECTunnelGetResponseEnvelopeSuccess = true
)

func (IPSECTunnelGetResponseEnvelopeSuccess) IsKnown ¶

type IPSECTunnelGetResponseIPSECTunnel ¶

type IPSECTunnelGetResponseIPSECTunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name" api:"required"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                       `json:"automatic_return_routing"`
	BGP                    IPSECTunnelGetResponseIPSECTunnelBGP       `json:"bgp"`
	BGPStatus              IPSECTunnelGetResponseIPSECTunnelBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn              time.Time                                               `json:"created_on" format:"date-time"`
	CustomRemoteIdentities IPSECTunnelGetResponseIPSECTunnelCustomRemoteIdentities `json:"custom_remote_identities"`
	// The IP address assigned to the customer side of the IPsec tunnel. Not required,
	// but must be set for proactive traceroutes to work.
	CustomerEndpoint string `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description string                                       `json:"description"`
	HealthCheck IPSECTunnelGetResponseIPSECTunnelHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The PSK metadata that includes when the PSK was generated.
	PSKMetadata PSKMetadata `json:"psk_metadata"`
	// If `true`, then IPsec replay protection will be supported in the
	// Cloudflare-to-customer direction.
	ReplayProtection bool                                  `json:"replay_protection"`
	JSON             ipsecTunnelGetResponseIPSECTunnelJSON `json:"-"`
}

func (*IPSECTunnelGetResponseIPSECTunnel) UnmarshalJSON ¶

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

type IPSECTunnelGetResponseIPSECTunnelBGP ¶

type IPSECTunnelGetResponseIPSECTunnelBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                   `json:"md5_key"`
	JSON   ipsecTunnelGetResponseIPSECTunnelBGPJSON `json:"-"`
}

func (*IPSECTunnelGetResponseIPSECTunnelBGP) UnmarshalJSON ¶

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

type IPSECTunnelGetResponseIPSECTunnelBGPStatus ¶

type IPSECTunnelGetResponseIPSECTunnelBGPStatus struct {
	State               IPSECTunnelGetResponseIPSECTunnelBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                            `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                       `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                          `json:"bgp_state"`
	CfSpeakerIP         string                                          `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                           `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                          `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                           `json:"customer_speaker_port"`
	JSON                ipsecTunnelGetResponseIPSECTunnelBGPStatusJSON  `json:"-"`
}

func (*IPSECTunnelGetResponseIPSECTunnelBGPStatus) UnmarshalJSON ¶

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

type IPSECTunnelGetResponseIPSECTunnelBGPStatusState ¶

type IPSECTunnelGetResponseIPSECTunnelBGPStatusState string
const (
	IPSECTunnelGetResponseIPSECTunnelBGPStatusStateBGPDown         IPSECTunnelGetResponseIPSECTunnelBGPStatusState = "BGP_DOWN"
	IPSECTunnelGetResponseIPSECTunnelBGPStatusStateBGPUp           IPSECTunnelGetResponseIPSECTunnelBGPStatusState = "BGP_UP"
	IPSECTunnelGetResponseIPSECTunnelBGPStatusStateBGPEstablishing IPSECTunnelGetResponseIPSECTunnelBGPStatusState = "BGP_ESTABLISHING"
)

func (IPSECTunnelGetResponseIPSECTunnelBGPStatusState) IsKnown ¶

type IPSECTunnelGetResponseIPSECTunnelCustomRemoteIdentities ¶

type IPSECTunnelGetResponseIPSECTunnelCustomRemoteIdentities struct {
	// A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
	// generated IKE IDs can still be used even if this custom value is specified.
	//
	// Must be of the form `<custom label>.<account ID>.custom.ipsec.cloudflare.com`.
	//
	// This custom ID does not need to be unique. Two IPsec tunnels may have the same
	// custom fqdn_id. However, if another IPsec tunnel has the same value then the two
	// tunnels cannot have the same cloudflare_endpoint.
	FqdnID string                                                      `json:"fqdn_id"`
	JSON   ipsecTunnelGetResponseIPSECTunnelCustomRemoteIdentitiesJSON `json:"-"`
}

func (*IPSECTunnelGetResponseIPSECTunnelCustomRemoteIdentities) UnmarshalJSON ¶

type IPSECTunnelGetResponseIPSECTunnelHealthCheck ¶

type IPSECTunnelGetResponseIPSECTunnelHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction IPSECTunnelGetResponseIPSECTunnelHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                  `json:"type"`
	JSON ipsecTunnelGetResponseIPSECTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelGetResponseIPSECTunnelHealthCheck) UnmarshalJSON ¶

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

type IPSECTunnelGetResponseIPSECTunnelHealthCheckDirection ¶

type IPSECTunnelGetResponseIPSECTunnelHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	IPSECTunnelGetResponseIPSECTunnelHealthCheckDirectionUnidirectional IPSECTunnelGetResponseIPSECTunnelHealthCheckDirection = "unidirectional"
	IPSECTunnelGetResponseIPSECTunnelHealthCheckDirectionBidirectional  IPSECTunnelGetResponseIPSECTunnelHealthCheckDirection = "bidirectional"
)

func (IPSECTunnelGetResponseIPSECTunnelHealthCheckDirection) IsKnown ¶

type IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetMagicHealthCheckTarget ¶

type IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                       `json:"saved"`
	JSON  ipsecTunnelGetResponseIPSECTunnelHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelGetResponseIPSECTunnelHealthCheckTargetUnion ¶

func (r IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelGetResponseIPSECTunnelHealthCheckTargetUnion()

func (*IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetUnion ¶

type IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetUnion interface {
	ImplementsIPSECTunnelGetResponseIPSECTunnelHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by IPSECTunnelGetResponseIPSECTunnelHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type IPSECTunnelListParams ¶

type IPSECTunnelListParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type IPSECTunnelListResponse ¶

type IPSECTunnelListResponse struct {
	IPSECTunnels []IPSECTunnelListResponseIPSECTunnel `json:"ipsec_tunnels"`
	JSON         ipsecTunnelListResponseJSON          `json:"-"`
}

func (*IPSECTunnelListResponse) UnmarshalJSON ¶

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

type IPSECTunnelListResponseEnvelope ¶

type IPSECTunnelListResponseEnvelope struct {
	Errors   []shared.ResponseInfo   `json:"errors" api:"required"`
	Messages []shared.ResponseInfo   `json:"messages" api:"required"`
	Result   IPSECTunnelListResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success IPSECTunnelListResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    ipsecTunnelListResponseEnvelopeJSON    `json:"-"`
}

func (*IPSECTunnelListResponseEnvelope) UnmarshalJSON ¶

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

type IPSECTunnelListResponseEnvelopeSuccess ¶

type IPSECTunnelListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelListResponseEnvelopeSuccessTrue IPSECTunnelListResponseEnvelopeSuccess = true
)

func (IPSECTunnelListResponseEnvelopeSuccess) IsKnown ¶

type IPSECTunnelListResponseIPSECTunnel ¶

type IPSECTunnelListResponseIPSECTunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name" api:"required"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                         `json:"automatic_return_routing"`
	BGP                    IPSECTunnelListResponseIPSECTunnelsBGP       `json:"bgp"`
	BGPStatus              IPSECTunnelListResponseIPSECTunnelsBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn              time.Time                                                 `json:"created_on" format:"date-time"`
	CustomRemoteIdentities IPSECTunnelListResponseIPSECTunnelsCustomRemoteIdentities `json:"custom_remote_identities"`
	// The IP address assigned to the customer side of the IPsec tunnel. Not required,
	// but must be set for proactive traceroutes to work.
	CustomerEndpoint string `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description string                                         `json:"description"`
	HealthCheck IPSECTunnelListResponseIPSECTunnelsHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The PSK metadata that includes when the PSK was generated.
	PSKMetadata PSKMetadata `json:"psk_metadata"`
	// If `true`, then IPsec replay protection will be supported in the
	// Cloudflare-to-customer direction.
	ReplayProtection bool                                   `json:"replay_protection"`
	JSON             ipsecTunnelListResponseIPSECTunnelJSON `json:"-"`
}

func (*IPSECTunnelListResponseIPSECTunnel) UnmarshalJSON ¶

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

type IPSECTunnelListResponseIPSECTunnelsBGP ¶

type IPSECTunnelListResponseIPSECTunnelsBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                     `json:"md5_key"`
	JSON   ipsecTunnelListResponseIPSECTunnelsBGPJSON `json:"-"`
}

func (*IPSECTunnelListResponseIPSECTunnelsBGP) UnmarshalJSON ¶

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

type IPSECTunnelListResponseIPSECTunnelsBGPStatus ¶

type IPSECTunnelListResponseIPSECTunnelsBGPStatus struct {
	State               IPSECTunnelListResponseIPSECTunnelsBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                              `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                         `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                            `json:"bgp_state"`
	CfSpeakerIP         string                                            `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                             `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                            `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                             `json:"customer_speaker_port"`
	JSON                ipsecTunnelListResponseIPSECTunnelsBGPStatusJSON  `json:"-"`
}

func (*IPSECTunnelListResponseIPSECTunnelsBGPStatus) UnmarshalJSON ¶

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

type IPSECTunnelListResponseIPSECTunnelsBGPStatusState ¶

type IPSECTunnelListResponseIPSECTunnelsBGPStatusState string
const (
	IPSECTunnelListResponseIPSECTunnelsBGPStatusStateBGPDown         IPSECTunnelListResponseIPSECTunnelsBGPStatusState = "BGP_DOWN"
	IPSECTunnelListResponseIPSECTunnelsBGPStatusStateBGPUp           IPSECTunnelListResponseIPSECTunnelsBGPStatusState = "BGP_UP"
	IPSECTunnelListResponseIPSECTunnelsBGPStatusStateBGPEstablishing IPSECTunnelListResponseIPSECTunnelsBGPStatusState = "BGP_ESTABLISHING"
)

func (IPSECTunnelListResponseIPSECTunnelsBGPStatusState) IsKnown ¶

type IPSECTunnelListResponseIPSECTunnelsCustomRemoteIdentities ¶

type IPSECTunnelListResponseIPSECTunnelsCustomRemoteIdentities struct {
	// A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
	// generated IKE IDs can still be used even if this custom value is specified.
	//
	// Must be of the form `<custom label>.<account ID>.custom.ipsec.cloudflare.com`.
	//
	// This custom ID does not need to be unique. Two IPsec tunnels may have the same
	// custom fqdn_id. However, if another IPsec tunnel has the same value then the two
	// tunnels cannot have the same cloudflare_endpoint.
	FqdnID string                                                        `json:"fqdn_id"`
	JSON   ipsecTunnelListResponseIPSECTunnelsCustomRemoteIdentitiesJSON `json:"-"`
}

func (*IPSECTunnelListResponseIPSECTunnelsCustomRemoteIdentities) UnmarshalJSON ¶

type IPSECTunnelListResponseIPSECTunnelsHealthCheck ¶

type IPSECTunnelListResponseIPSECTunnelsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction IPSECTunnelListResponseIPSECTunnelsHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                    `json:"type"`
	JSON ipsecTunnelListResponseIPSECTunnelsHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelListResponseIPSECTunnelsHealthCheck) UnmarshalJSON ¶

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

type IPSECTunnelListResponseIPSECTunnelsHealthCheckDirection ¶

type IPSECTunnelListResponseIPSECTunnelsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	IPSECTunnelListResponseIPSECTunnelsHealthCheckDirectionUnidirectional IPSECTunnelListResponseIPSECTunnelsHealthCheckDirection = "unidirectional"
	IPSECTunnelListResponseIPSECTunnelsHealthCheckDirectionBidirectional  IPSECTunnelListResponseIPSECTunnelsHealthCheckDirection = "bidirectional"
)

func (IPSECTunnelListResponseIPSECTunnelsHealthCheckDirection) IsKnown ¶

type IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget ¶

type IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                         `json:"saved"`
	JSON  ipsecTunnelListResponseIPSECTunnelsHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelListResponseIPSECTunnelsHealthCheckTargetUnion ¶

func (r IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelListResponseIPSECTunnelsHealthCheckTargetUnion()

func (*IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetUnion ¶

type IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetUnion interface {
	ImplementsIPSECTunnelListResponseIPSECTunnelsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by IPSECTunnelListResponseIPSECTunnelsHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type IPSECTunnelNewParams ¶

type IPSECTunnelNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint param.Field[string] `json:"cloudflare_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress param.Field[string] `json:"interface_address" api:"required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name param.Field[string] `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting param.Field[bool]                                       `json:"automatic_return_routing"`
	BGP                    param.Field[IPSECTunnelNewParamsBGP]                    `json:"bgp"`
	CustomRemoteIdentities param.Field[IPSECTunnelNewParamsCustomRemoteIdentities] `json:"custom_remote_identities"`
	// The IP address assigned to the customer side of the IPsec tunnel. Not required,
	// but must be set for proactive traceroutes to work.
	CustomerEndpoint param.Field[string] `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description param.Field[string]                          `json:"description"`
	HealthCheck param.Field[IPSECTunnelNewParamsHealthCheck] `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 param.Field[string] `json:"interface_address6"`
	// A randomly generated or provided string for use in the IPsec tunnel.
	PSK param.Field[string] `json:"psk"`
	// If `true`, then IPsec replay protection will be supported in the
	// Cloudflare-to-customer direction.
	ReplayProtection  param.Field[bool] `json:"replay_protection"`
	XMagicNewHcTarget param.Field[bool] `header:"x-magic-new-hc-target"`
}

func (IPSECTunnelNewParams) MarshalJSON ¶

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

type IPSECTunnelNewParamsBGP ¶

type IPSECTunnelNewParamsBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN param.Field[int64] `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID param.Field[string] `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes param.Field[[]string] `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID param.Field[string] `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key param.Field[string] `json:"md5_key"`
}

func (IPSECTunnelNewParamsBGP) MarshalJSON ¶

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

type IPSECTunnelNewParamsCustomRemoteIdentities ¶

type IPSECTunnelNewParamsCustomRemoteIdentities struct {
	// A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
	// generated IKE IDs can still be used even if this custom value is specified.
	//
	// Must be of the form `<custom label>.<account ID>.custom.ipsec.cloudflare.com`.
	//
	// This custom ID does not need to be unique. Two IPsec tunnels may have the same
	// custom fqdn_id. However, if another IPsec tunnel has the same value then the two
	// tunnels cannot have the same cloudflare_endpoint.
	FqdnID param.Field[string] `json:"fqdn_id"`
}

func (IPSECTunnelNewParamsCustomRemoteIdentities) MarshalJSON ¶

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

type IPSECTunnelNewParamsHealthCheck ¶

type IPSECTunnelNewParamsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction param.Field[IPSECTunnelNewParamsHealthCheckDirection] `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled param.Field[bool] `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate param.Field[HealthCheckRate] `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target param.Field[IPSECTunnelNewParamsHealthCheckTargetUnion] `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type param.Field[HealthCheckType] `json:"type"`
}

func (IPSECTunnelNewParamsHealthCheck) MarshalJSON ¶

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

type IPSECTunnelNewParamsHealthCheckDirection ¶

type IPSECTunnelNewParamsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	IPSECTunnelNewParamsHealthCheckDirectionUnidirectional IPSECTunnelNewParamsHealthCheckDirection = "unidirectional"
	IPSECTunnelNewParamsHealthCheckDirectionBidirectional  IPSECTunnelNewParamsHealthCheckDirection = "bidirectional"
)

func (IPSECTunnelNewParamsHealthCheckDirection) IsKnown ¶

type IPSECTunnelNewParamsHealthCheckTargetMagicHealthCheckTarget ¶

type IPSECTunnelNewParamsHealthCheckTargetMagicHealthCheckTarget struct {
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved param.Field[string] `json:"saved"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (IPSECTunnelNewParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelNewParamsHealthCheckTargetUnion ¶

func (r IPSECTunnelNewParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelNewParamsHealthCheckTargetUnion()

func (IPSECTunnelNewParamsHealthCheckTargetMagicHealthCheckTarget) MarshalJSON ¶

type IPSECTunnelNewParamsHealthCheckTargetUnion ¶

type IPSECTunnelNewParamsHealthCheckTargetUnion interface {
	ImplementsIPSECTunnelNewParamsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Satisfied by magic_transit.IPSECTunnelNewParamsHealthCheckTargetMagicHealthCheckTarget, shared.UnionString.

type IPSECTunnelNewResponse ¶

type IPSECTunnelNewResponse struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name" api:"required"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                            `json:"automatic_return_routing"`
	BGP                    IPSECTunnelNewResponseBGP       `json:"bgp"`
	BGPStatus              IPSECTunnelNewResponseBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn              time.Time                                    `json:"created_on" format:"date-time"`
	CustomRemoteIdentities IPSECTunnelNewResponseCustomRemoteIdentities `json:"custom_remote_identities"`
	// The IP address assigned to the customer side of the IPsec tunnel. Not required,
	// but must be set for proactive traceroutes to work.
	CustomerEndpoint string `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description string                            `json:"description"`
	HealthCheck IPSECTunnelNewResponseHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The PSK metadata that includes when the PSK was generated.
	PSKMetadata PSKMetadata `json:"psk_metadata"`
	// If `true`, then IPsec replay protection will be supported in the
	// Cloudflare-to-customer direction.
	ReplayProtection bool                       `json:"replay_protection"`
	JSON             ipsecTunnelNewResponseJSON `json:"-"`
}

func (*IPSECTunnelNewResponse) UnmarshalJSON ¶

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

type IPSECTunnelNewResponseBGP ¶

type IPSECTunnelNewResponseBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                        `json:"md5_key"`
	JSON   ipsecTunnelNewResponseBGPJSON `json:"-"`
}

func (*IPSECTunnelNewResponseBGP) UnmarshalJSON ¶

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

type IPSECTunnelNewResponseBGPStatus ¶

type IPSECTunnelNewResponseBGPStatus struct {
	State               IPSECTunnelNewResponseBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                 `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                            `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                               `json:"bgp_state"`
	CfSpeakerIP         string                               `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                               `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                `json:"customer_speaker_port"`
	JSON                ipsecTunnelNewResponseBGPStatusJSON  `json:"-"`
}

func (*IPSECTunnelNewResponseBGPStatus) UnmarshalJSON ¶

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

type IPSECTunnelNewResponseBGPStatusState ¶

type IPSECTunnelNewResponseBGPStatusState string
const (
	IPSECTunnelNewResponseBGPStatusStateBGPDown         IPSECTunnelNewResponseBGPStatusState = "BGP_DOWN"
	IPSECTunnelNewResponseBGPStatusStateBGPUp           IPSECTunnelNewResponseBGPStatusState = "BGP_UP"
	IPSECTunnelNewResponseBGPStatusStateBGPEstablishing IPSECTunnelNewResponseBGPStatusState = "BGP_ESTABLISHING"
)

func (IPSECTunnelNewResponseBGPStatusState) IsKnown ¶

type IPSECTunnelNewResponseCustomRemoteIdentities ¶

type IPSECTunnelNewResponseCustomRemoteIdentities struct {
	// A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
	// generated IKE IDs can still be used even if this custom value is specified.
	//
	// Must be of the form `<custom label>.<account ID>.custom.ipsec.cloudflare.com`.
	//
	// This custom ID does not need to be unique. Two IPsec tunnels may have the same
	// custom fqdn_id. However, if another IPsec tunnel has the same value then the two
	// tunnels cannot have the same cloudflare_endpoint.
	FqdnID string                                           `json:"fqdn_id"`
	JSON   ipsecTunnelNewResponseCustomRemoteIdentitiesJSON `json:"-"`
}

func (*IPSECTunnelNewResponseCustomRemoteIdentities) UnmarshalJSON ¶

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

type IPSECTunnelNewResponseEnvelope ¶

type IPSECTunnelNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo  `json:"errors" api:"required"`
	Messages []shared.ResponseInfo  `json:"messages" api:"required"`
	Result   IPSECTunnelNewResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success IPSECTunnelNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    ipsecTunnelNewResponseEnvelopeJSON    `json:"-"`
}

func (*IPSECTunnelNewResponseEnvelope) UnmarshalJSON ¶

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

type IPSECTunnelNewResponseEnvelopeSuccess ¶

type IPSECTunnelNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelNewResponseEnvelopeSuccessTrue IPSECTunnelNewResponseEnvelopeSuccess = true
)

func (IPSECTunnelNewResponseEnvelopeSuccess) IsKnown ¶

type IPSECTunnelNewResponseHealthCheck ¶

type IPSECTunnelNewResponseHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction IPSECTunnelNewResponseHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target IPSECTunnelNewResponseHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                       `json:"type"`
	JSON ipsecTunnelNewResponseHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelNewResponseHealthCheck) UnmarshalJSON ¶

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

type IPSECTunnelNewResponseHealthCheckDirection ¶

type IPSECTunnelNewResponseHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	IPSECTunnelNewResponseHealthCheckDirectionUnidirectional IPSECTunnelNewResponseHealthCheckDirection = "unidirectional"
	IPSECTunnelNewResponseHealthCheckDirectionBidirectional  IPSECTunnelNewResponseHealthCheckDirection = "bidirectional"
)

func (IPSECTunnelNewResponseHealthCheckDirection) IsKnown ¶

type IPSECTunnelNewResponseHealthCheckTargetMagicHealthCheckTarget ¶

type IPSECTunnelNewResponseHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                            `json:"saved"`
	JSON  ipsecTunnelNewResponseHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (IPSECTunnelNewResponseHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelNewResponseHealthCheckTargetUnion ¶

func (r IPSECTunnelNewResponseHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelNewResponseHealthCheckTargetUnion()

func (*IPSECTunnelNewResponseHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type IPSECTunnelNewResponseHealthCheckTargetUnion ¶

type IPSECTunnelNewResponseHealthCheckTargetUnion interface {
	ImplementsIPSECTunnelNewResponseHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by IPSECTunnelNewResponseHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type IPSECTunnelPSKGenerateParams ¶

type IPSECTunnelPSKGenerateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type IPSECTunnelPSKGenerateResponse ¶

type IPSECTunnelPSKGenerateResponse struct {
	// Identifier
	IPSECTunnelID string `json:"ipsec_tunnel_id"`
	// A randomly generated or provided string for use in the IPsec tunnel.
	PSK string `json:"psk"`
	// The PSK metadata that includes when the PSK was generated.
	PSKMetadata PSKMetadata                        `json:"psk_metadata"`
	JSON        ipsecTunnelPSKGenerateResponseJSON `json:"-"`
}

func (*IPSECTunnelPSKGenerateResponse) UnmarshalJSON ¶

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

type IPSECTunnelPSKGenerateResponseEnvelope ¶

type IPSECTunnelPSKGenerateResponseEnvelope struct {
	Errors   []shared.ResponseInfo          `json:"errors" api:"required"`
	Messages []shared.ResponseInfo          `json:"messages" api:"required"`
	Result   IPSECTunnelPSKGenerateResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success IPSECTunnelPSKGenerateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    ipsecTunnelPSKGenerateResponseEnvelopeJSON    `json:"-"`
}

func (*IPSECTunnelPSKGenerateResponseEnvelope) UnmarshalJSON ¶

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

type IPSECTunnelPSKGenerateResponseEnvelopeSuccess ¶

type IPSECTunnelPSKGenerateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelPSKGenerateResponseEnvelopeSuccessTrue IPSECTunnelPSKGenerateResponseEnvelopeSuccess = true
)

func (IPSECTunnelPSKGenerateResponseEnvelopeSuccess) IsKnown ¶

type IPSECTunnelPSKSetParams ¶ added in v7.6.0

type IPSECTunnelPSKSetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// List of tunnel ID and PSK pairs.
	PSKs param.Field[[]IPSECTunnelPSKSetParamsPSK] `json:"psks" api:"required"`
	// If `true`, only run validation without persisting changes.
	ValidateOnly param.Field[bool] `query:"validate_only"`
}

func (IPSECTunnelPSKSetParams) MarshalJSON ¶ added in v7.6.0

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

func (IPSECTunnelPSKSetParams) URLQuery ¶ added in v7.6.0

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

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

type IPSECTunnelPSKSetParamsPSK ¶ added in v7.6.0

type IPSECTunnelPSKSetParamsPSK struct {
	// The ID of the IPsec tunnel.
	ID param.Field[string] `json:"id" api:"required"`
	// A randomly generated or provided string for use in the IPsec tunnel.
	PSK param.Field[string] `json:"psk" api:"required"`
}

A PSK entry for a specific IPsec tunnel.

func (IPSECTunnelPSKSetParamsPSK) MarshalJSON ¶ added in v7.6.0

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

type IPSECTunnelPSKSetResponse ¶ added in v7.6.0

type IPSECTunnelPSKSetResponse struct {
	// Map of tunnel IDs to successfully applied PSK details.
	SuccessfullyAppliedPSKs map[string]IPSECTunnelPSKSetResponseSuccessfullyAppliedPSK `json:"successfully_applied_psks"`
	// Map of tunnel IDs to failure reasons for PSKs that could not be applied.
	UnappliedPSKs map[string]string             `json:"unapplied_psks"`
	JSON          ipsecTunnelPSKSetResponseJSON `json:"-"`
}

func (*IPSECTunnelPSKSetResponse) UnmarshalJSON ¶ added in v7.6.0

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

type IPSECTunnelPSKSetResponseEnvelope ¶ added in v7.6.0

type IPSECTunnelPSKSetResponseEnvelope struct {
	Errors   []shared.ResponseInfo     `json:"errors" api:"required"`
	Messages []shared.ResponseInfo     `json:"messages" api:"required"`
	Result   IPSECTunnelPSKSetResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success IPSECTunnelPSKSetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    ipsecTunnelPSKSetResponseEnvelopeJSON    `json:"-"`
}

func (*IPSECTunnelPSKSetResponseEnvelope) UnmarshalJSON ¶ added in v7.6.0

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

type IPSECTunnelPSKSetResponseEnvelopeSuccess ¶ added in v7.6.0

type IPSECTunnelPSKSetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelPSKSetResponseEnvelopeSuccessTrue IPSECTunnelPSKSetResponseEnvelopeSuccess = true
)

func (IPSECTunnelPSKSetResponseEnvelopeSuccess) IsKnown ¶ added in v7.6.0

type IPSECTunnelPSKSetResponseSuccessfullyAppliedPSK ¶ added in v7.6.0

type IPSECTunnelPSKSetResponseSuccessfullyAppliedPSK struct {
	// The IKE identifier used for this tunnel on the Cloudflare edge.
	IPSECID string `json:"ipsec_id" api:"required"`
	// Identifier
	IPSECTunnelID string `json:"ipsec_tunnel_id" api:"required"`
	// A randomly generated or provided string for use in the IPsec tunnel.
	PSK string `json:"psk" api:"required"`
	// The PSK metadata that includes when the PSK was generated.
	PSKMetadata PSKMetadata                                         `json:"psk_metadata" api:"required"`
	JSON        ipsecTunnelPSKSetResponseSuccessfullyAppliedPSKJSON `json:"-"`
}

A successfully applied PSK for an IPsec tunnel.

func (*IPSECTunnelPSKSetResponseSuccessfullyAppliedPSK) UnmarshalJSON ¶ added in v7.6.0

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

type IPSECTunnelService ¶

type IPSECTunnelService struct {
	Options []option.RequestOption
}

IPSECTunnelService 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 NewIPSECTunnelService method instead.

func NewIPSECTunnelService ¶

func NewIPSECTunnelService(opts ...option.RequestOption) (r *IPSECTunnelService)

NewIPSECTunnelService 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 (*IPSECTunnelService) BulkUpdate ¶

Update multiple IPsec tunnels associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

func (*IPSECTunnelService) Delete ¶

func (r *IPSECTunnelService) Delete(ctx context.Context, ipsecTunnelID string, params IPSECTunnelDeleteParams, opts ...option.RequestOption) (res *IPSECTunnelDeleteResponse, err error)

Disables and removes a specific static IPsec Tunnel associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

func (*IPSECTunnelService) Get ¶

func (r *IPSECTunnelService) Get(ctx context.Context, ipsecTunnelID string, params IPSECTunnelGetParams, opts ...option.RequestOption) (res *IPSECTunnelGetResponse, err error)

Lists details for a specific IPsec tunnel.

func (*IPSECTunnelService) List ¶

Lists IPsec tunnels associated with an account.

func (*IPSECTunnelService) New ¶

Creates a new IPsec tunnel associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

func (*IPSECTunnelService) PSKGenerate ¶

Generates a Pre-Shared Key for a specific IPsec tunnel used in the IKE session. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. After a PSK is generated, the PSK is immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSK in a safe place.

func (*IPSECTunnelService) PSKSet ¶ added in v7.6.0

Sets Pre-Shared Keys for multiple IPsec tunnels associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes. After PSKs are applied, they are immediately persisted to Cloudflare's edge and cannot be retrieved later. Store the PSKs in a safe place.

func (*IPSECTunnelService) Update ¶

func (r *IPSECTunnelService) Update(ctx context.Context, ipsecTunnelID string, params IPSECTunnelUpdateParams, opts ...option.RequestOption) (res *IPSECTunnelUpdateResponse, err error)

Updates a specific IPsec tunnel associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

type IPSECTunnelUpdateParams ¶

type IPSECTunnelUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint param.Field[string] `json:"cloudflare_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress param.Field[string] `json:"interface_address" api:"required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name param.Field[string] `json:"name" api:"required"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting param.Field[bool]                                          `json:"automatic_return_routing"`
	BGP                    param.Field[IPSECTunnelUpdateParamsBGP]                    `json:"bgp"`
	CustomRemoteIdentities param.Field[IPSECTunnelUpdateParamsCustomRemoteIdentities] `json:"custom_remote_identities"`
	// The IP address assigned to the customer side of the IPsec tunnel. Not required,
	// but must be set for proactive traceroutes to work.
	CustomerEndpoint param.Field[string] `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description param.Field[string]                             `json:"description"`
	HealthCheck param.Field[IPSECTunnelUpdateParamsHealthCheck] `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 param.Field[string] `json:"interface_address6"`
	// A randomly generated or provided string for use in the IPsec tunnel.
	PSK param.Field[string] `json:"psk"`
	// If `true`, then IPsec replay protection will be supported in the
	// Cloudflare-to-customer direction.
	ReplayProtection  param.Field[bool] `json:"replay_protection"`
	XMagicNewHcTarget param.Field[bool] `header:"x-magic-new-hc-target"`
}

func (IPSECTunnelUpdateParams) MarshalJSON ¶

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

type IPSECTunnelUpdateParamsBGP ¶

type IPSECTunnelUpdateParamsBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN param.Field[int64] `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID param.Field[string] `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes param.Field[[]string] `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID param.Field[string] `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key param.Field[string] `json:"md5_key"`
}

func (IPSECTunnelUpdateParamsBGP) MarshalJSON ¶

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

type IPSECTunnelUpdateParamsCustomRemoteIdentities ¶

type IPSECTunnelUpdateParamsCustomRemoteIdentities struct {
	// A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
	// generated IKE IDs can still be used even if this custom value is specified.
	//
	// Must be of the form `<custom label>.<account ID>.custom.ipsec.cloudflare.com`.
	//
	// This custom ID does not need to be unique. Two IPsec tunnels may have the same
	// custom fqdn_id. However, if another IPsec tunnel has the same value then the two
	// tunnels cannot have the same cloudflare_endpoint.
	FqdnID param.Field[string] `json:"fqdn_id"`
}

func (IPSECTunnelUpdateParamsCustomRemoteIdentities) MarshalJSON ¶

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

type IPSECTunnelUpdateParamsHealthCheck ¶

type IPSECTunnelUpdateParamsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction param.Field[IPSECTunnelUpdateParamsHealthCheckDirection] `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled param.Field[bool] `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate param.Field[HealthCheckRate] `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target param.Field[IPSECTunnelUpdateParamsHealthCheckTargetUnion] `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type param.Field[HealthCheckType] `json:"type"`
}

func (IPSECTunnelUpdateParamsHealthCheck) MarshalJSON ¶

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

type IPSECTunnelUpdateParamsHealthCheckDirection ¶

type IPSECTunnelUpdateParamsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	IPSECTunnelUpdateParamsHealthCheckDirectionUnidirectional IPSECTunnelUpdateParamsHealthCheckDirection = "unidirectional"
	IPSECTunnelUpdateParamsHealthCheckDirectionBidirectional  IPSECTunnelUpdateParamsHealthCheckDirection = "bidirectional"
)

func (IPSECTunnelUpdateParamsHealthCheckDirection) IsKnown ¶

type IPSECTunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget ¶

type IPSECTunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget struct {
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved param.Field[string] `json:"saved"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (IPSECTunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelUpdateParamsHealthCheckTargetUnion ¶

func (r IPSECTunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelUpdateParamsHealthCheckTargetUnion()

func (IPSECTunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget) MarshalJSON ¶

type IPSECTunnelUpdateParamsHealthCheckTargetUnion ¶

type IPSECTunnelUpdateParamsHealthCheckTargetUnion interface {
	ImplementsIPSECTunnelUpdateParamsHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Satisfied by magic_transit.IPSECTunnelUpdateParamsHealthCheckTargetMagicHealthCheckTarget, shared.UnionString.

type IPSECTunnelUpdateResponse ¶

type IPSECTunnelUpdateResponse struct {
	Modified            bool                                         `json:"modified"`
	ModifiedIPSECTunnel IPSECTunnelUpdateResponseModifiedIPSECTunnel `json:"modified_ipsec_tunnel"`
	JSON                ipsecTunnelUpdateResponseJSON                `json:"-"`
}

func (*IPSECTunnelUpdateResponse) UnmarshalJSON ¶

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

type IPSECTunnelUpdateResponseEnvelope ¶

type IPSECTunnelUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo     `json:"errors" api:"required"`
	Messages []shared.ResponseInfo     `json:"messages" api:"required"`
	Result   IPSECTunnelUpdateResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success IPSECTunnelUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    ipsecTunnelUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*IPSECTunnelUpdateResponseEnvelope) UnmarshalJSON ¶

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

type IPSECTunnelUpdateResponseEnvelopeSuccess ¶

type IPSECTunnelUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelUpdateResponseEnvelopeSuccessTrue IPSECTunnelUpdateResponseEnvelopeSuccess = true
)

func (IPSECTunnelUpdateResponseEnvelopeSuccess) IsKnown ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnel ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnel struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint" api:"required"`
	// A 31-bit prefix (/31 in CIDR notation) supporting two hosts, one for each side
	// of the tunnel. Select the subnet from the following private IP space:
	// 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255, 192.168.0.0–192.168.255.255.
	InterfaceAddress string `json:"interface_address" api:"required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name" api:"required"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// True if automatic stateful return routing should be enabled for a tunnel, false
	// otherwise. Requires the `coupler_integration` account flag to be enabled;
	// requests setting this to `true` without that flag will be rejected.
	AutomaticReturnRouting bool                                                  `json:"automatic_return_routing"`
	BGP                    IPSECTunnelUpdateResponseModifiedIPSECTunnelBGP       `json:"bgp"`
	BGPStatus              IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatus `json:"bgp_status"`
	// The date and time the tunnel was created.
	CreatedOn              time.Time                                                          `json:"created_on" format:"date-time"`
	CustomRemoteIdentities IPSECTunnelUpdateResponseModifiedIPSECTunnelCustomRemoteIdentities `json:"custom_remote_identities"`
	// The IP address assigned to the customer side of the IPsec tunnel. Not required,
	// but must be set for proactive traceroutes to work.
	CustomerEndpoint string `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description string                                                  `json:"description"`
	HealthCheck IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheck `json:"health_check"`
	// A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the
	// address being the first IP of the subnet and not same as the address of
	// virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 ,
	// interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127
	InterfaceAddress6 string `json:"interface_address6"`
	// The date and time the tunnel was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// The PSK metadata that includes when the PSK was generated.
	PSKMetadata PSKMetadata `json:"psk_metadata"`
	// If `true`, then IPsec replay protection will be supported in the
	// Cloudflare-to-customer direction.
	ReplayProtection bool                                             `json:"replay_protection"`
	JSON             ipsecTunnelUpdateResponseModifiedIPSECTunnelJSON `json:"-"`
}

func (*IPSECTunnelUpdateResponseModifiedIPSECTunnel) UnmarshalJSON ¶

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

type IPSECTunnelUpdateResponseModifiedIPSECTunnelBGP ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelBGP struct {
	// ASN used on the customer end of the BGP session
	CustomerASN int64 `json:"customer_asn" api:"required"`
	// ID of the BGP filter profile applied to routes advertised to the customer.
	ExportFilterID string `json:"export_filter_id"`
	// Prefixes in this list will be advertised to the customer device, in addition to
	// the routes in the Magic routing table.
	ExtraPrefixes []string `json:"extra_prefixes" format:"cidr"`
	// ID of the BGP filter profile applied to routes received from the customer.
	ImportFilterID string `json:"import_filter_id"`
	// MD5 key to use for session authentication.
	//
	// Note that _this is not a security measure_. MD5 is not a valid security
	// mechanism, and the key is not treated as a secret value. This is _only_
	// supported for preventing misconfiguration, not for defending against malicious
	// attacks.
	//
	// The MD5 key, if set, must be of non-zero length and consist only of the
	// following types of character:
	//
	// - ASCII alphanumerics: `[a-zA-Z0-9]`
	// - Special characters in the set `'!@#$%^&*()+[]{}<>/.,;:_-~`= \|`
	//
	// In other words, MD5 keys may contain any printable ASCII character aside from
	// newline (0x0A), quotation mark (`"`), vertical tab (0x0B), carriage return
	// (0x0D), tab (0x09), form feed (0x0C), and the question mark (`?`). Requests
	// specifying an MD5 key with one or more of these disallowed characters will be
	// rejected.
	Md5Key string                                              `json:"md5_key"`
	JSON   ipsecTunnelUpdateResponseModifiedIPSECTunnelBGPJSON `json:"-"`
}

func (*IPSECTunnelUpdateResponseModifiedIPSECTunnelBGP) UnmarshalJSON ¶

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

type IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatus ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatus struct {
	State               IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusState `json:"state" api:"required"`
	TCPEstablished      bool                                                       `json:"tcp_established" api:"required"`
	UpdatedAt           time.Time                                                  `json:"updated_at" api:"required" format:"date-time"`
	BGPState            string                                                     `json:"bgp_state"`
	CfSpeakerIP         string                                                     `json:"cf_speaker_ip" format:"ipv4"`
	CfSpeakerPort       int64                                                      `json:"cf_speaker_port"`
	CustomerSpeakerIP   string                                                     `json:"customer_speaker_ip" format:"ipv4"`
	CustomerSpeakerPort int64                                                      `json:"customer_speaker_port"`
	JSON                ipsecTunnelUpdateResponseModifiedIPSECTunnelBGPStatusJSON  `json:"-"`
}

func (*IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatus) UnmarshalJSON ¶

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

type IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusState ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusState string
const (
	IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusStateBGPDown         IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusState = "BGP_DOWN"
	IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusStateBGPUp           IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusState = "BGP_UP"
	IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusStateBGPEstablishing IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusState = "BGP_ESTABLISHING"
)

func (IPSECTunnelUpdateResponseModifiedIPSECTunnelBGPStatusState) IsKnown ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelCustomRemoteIdentities ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelCustomRemoteIdentities struct {
	// A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
	// generated IKE IDs can still be used even if this custom value is specified.
	//
	// Must be of the form `<custom label>.<account ID>.custom.ipsec.cloudflare.com`.
	//
	// This custom ID does not need to be unique. Two IPsec tunnels may have the same
	// custom fqdn_id. However, if another IPsec tunnel has the same value then the two
	// tunnels cannot have the same cloudflare_endpoint.
	FqdnID string                                                                 `json:"fqdn_id"`
	JSON   ipsecTunnelUpdateResponseModifiedIPSECTunnelCustomRemoteIdentitiesJSON `json:"-"`
}

func (*IPSECTunnelUpdateResponseModifiedIPSECTunnelCustomRemoteIdentities) UnmarshalJSON ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheck ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel.
	Direction IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate HealthCheckRate `json:"rate"`
	// The destination address in a request type health check. After the healthcheck is
	// decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded
	// to this address. This field defaults to `customer_gre_endpoint address`. This
	// field is ignored for bidirectional healthchecks as the interface_address (not
	// assigned to the Cloudflare side of the tunnel) is used as the target. Must be in
	// object form if the x-magic-new-hc-target header is set to true and string form
	// if x-magic-new-hc-target is absent or set to false.
	Target IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetUnion `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                             `json:"type"`
	JSON ipsecTunnelUpdateResponseModifiedIPSECTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheck) UnmarshalJSON ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckDirection ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel.

const (
	IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckDirectionUnidirectional IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckDirection = "unidirectional"
	IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckDirectionBidirectional  IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckDirection = "bidirectional"
)

func (IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckDirection) IsKnown ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget struct {
	// The effective health check target. If 'saved' is empty, then this field will be
	// populated with the calculated default value on GET requests. Ignored in POST,
	// PUT, and PATCH requests.
	Effective string `json:"effective"`
	// The saved health check target. Setting the value to the empty string indicates
	// that the calculated default value will be used.
	Saved string                                                                                  `json:"saved"`
	JSON  ipsecTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetMagicHealthCheckTargetJSON `json:"-"`
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target.

func (IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetUnion ¶

func (r IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) ImplementsIPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetUnion()

func (*IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget) UnmarshalJSON ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetUnion ¶

type IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetUnion interface {
	ImplementsIPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetUnion()
}

The destination address in a request type health check. After the healthcheck is decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded to this address. This field defaults to `customer_gre_endpoint address`. This field is ignored for bidirectional healthchecks as the interface_address (not assigned to the Cloudflare side of the tunnel) is used as the target. Must be in object form if the x-magic-new-hc-target header is set to true and string form if x-magic-new-hc-target is absent or set to false.

Union satisfied by IPSECTunnelUpdateResponseModifiedIPSECTunnelHealthCheckTargetMagicHealthCheckTarget or shared.UnionString.

type LAN ¶

type LAN struct {
	// Identifier
	ID     string `json:"id"`
	BondID int64  `json:"bond_id"`
	// mark true to use this LAN for HA probing. only works for site with HA turned on.
	// only one LAN can be set as the ha_link.
	HaLink bool `json:"ha_link"`
	// mark true to use this LAN for source-based breakout traffic
	IsBreakout bool `json:"is_breakout"`
	// mark true to use this LAN for source-based prioritized traffic
	IsPrioritized bool           `json:"is_prioritized"`
	Name          string         `json:"name"`
	Nat           Nat            `json:"nat"`
	Physport      int64          `json:"physport"`
	RoutedSubnets []RoutedSubnet `json:"routed_subnets"`
	// Identifier
	SiteID string `json:"site_id"`
	// If the site is not configured in high availability mode, this configuration is
	// optional (if omitted, use DHCP). However, if in high availability mode,
	// static_address is required along with secondary and virtual address.
	StaticAddressing LANStaticAddressing `json:"static_addressing"`
	// VLAN ID. Use zero for untagged.
	VlanTag int64   `json:"vlan_tag"`
	JSON    lanJSON `json:"-"`
}

func (*LAN) UnmarshalJSON ¶

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

type LANStaticAddressing ¶

type LANStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address    string     `json:"address" api:"required"`
	DHCPRelay  DHCPRelay  `json:"dhcp_relay"`
	DHCPServer DHCPServer `json:"dhcp_server"`
	// A valid CIDR notation representing an IP range.
	SecondaryAddress string `json:"secondary_address"`
	// A valid CIDR notation representing an IP range.
	VirtualAddress string                  `json:"virtual_address"`
	JSON           lanStaticAddressingJSON `json:"-"`
}

If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address.

func (*LANStaticAddressing) UnmarshalJSON ¶

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

type LANStaticAddressingParam ¶

type LANStaticAddressingParam struct {
	// A valid CIDR notation representing an IP range.
	Address    param.Field[string]          `json:"address" api:"required"`
	DHCPRelay  param.Field[DHCPRelayParam]  `json:"dhcp_relay"`
	DHCPServer param.Field[DHCPServerParam] `json:"dhcp_server"`
	// A valid CIDR notation representing an IP range.
	SecondaryAddress param.Field[string] `json:"secondary_address"`
	// A valid CIDR notation representing an IP range.
	VirtualAddress param.Field[string] `json:"virtual_address"`
}

If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address.

func (LANStaticAddressingParam) MarshalJSON ¶

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

type MagicTransitService ¶

type MagicTransitService struct {
	Options         []option.RequestOption
	Apps            *AppService
	CfInterconnects *CfInterconnectService
	GRETunnels      *GRETunnelService
	IPSECTunnels    *IPSECTunnelService
	Routes          *RouteService
	Sites           *SiteService
	Connectors      *ConnectorService
	Cf1Sites        *Cf1SiteService
	PCAPs           *PCAPService
}

MagicTransitService 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 NewMagicTransitService method instead.

func NewMagicTransitService ¶

func NewMagicTransitService(opts ...option.RequestOption) (r *MagicTransitService)

NewMagicTransitService 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 Member ¶

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess ¶

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup ¶

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta ¶

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup ¶

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta ¶

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope ¶

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

A scope is a combination of scope objects which provides additional context.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject ¶

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

A scope object represents any resource that can have actions applied against invite.

This is an alias to an internal type.

type MemberPolicy ¶

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus ¶

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser ¶

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type Nat ¶

type Nat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string  `json:"static_prefix"`
	JSON         natJSON `json:"-"`
}

func (*Nat) UnmarshalJSON ¶

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

type NatParam ¶

type NatParam struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix param.Field[string] `json:"static_prefix"`
}

func (NatParam) MarshalJSON ¶

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

type Ownership ¶

type Ownership struct {
	// The bucket ID associated with the packet captures API.
	ID string `json:"id" api:"required"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf string `json:"destination_conf" api:"required"`
	// The ownership challenge filename stored in the bucket.
	Filename string `json:"filename" api:"required"`
	// The status of the ownership challenge. Can be pending, success or failed.
	Status OwnershipStatus `json:"status" api:"required"`
	// The RFC 3339 timestamp when the bucket was added to packet captures API.
	Submitted string `json:"submitted" api:"required"`
	// The RFC 3339 timestamp when the bucket was validated.
	Validated string        `json:"validated"`
	JSON      ownershipJSON `json:"-"`
}

func (*Ownership) UnmarshalJSON ¶

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

type OwnershipStatus ¶

type OwnershipStatus string

The status of the ownership challenge. Can be pending, success or failed.

const (
	OwnershipStatusPending OwnershipStatus = "pending"
	OwnershipStatusSuccess OwnershipStatus = "success"
	OwnershipStatusFailed  OwnershipStatus = "failed"
)

func (OwnershipStatus) IsKnown ¶

func (r OwnershipStatus) IsKnown() bool

type PCAP ¶

type PCAP struct {
	// The ID for the packet capture.
	ID string `json:"id"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The RFC 3339 offset timestamp from which to query backwards for packets. Must be
	// within the last 24h. When this field is empty, defaults to time of request.
	OffsetTime time.Time `json:"offset_time" format:"date-time"`
	// The status of the packet capture request.
	Status PCAPStatus `json:"status"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPSystem `json:"system"`
	// The packet capture duration in seconds.
	TimeLimit float64 `json:"time_limit"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type PCAPType `json:"type"`
	JSON pcapJSON `json:"-"`
}

func (*PCAP) UnmarshalJSON ¶

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

type PCAPDownloadGetParams ¶

type PCAPDownloadGetParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type PCAPDownloadService ¶

type PCAPDownloadService struct {
	Options []option.RequestOption
}

PCAPDownloadService 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 NewPCAPDownloadService method instead.

func NewPCAPDownloadService ¶

func NewPCAPDownloadService(opts ...option.RequestOption) (r *PCAPDownloadService)

NewPCAPDownloadService 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 (*PCAPDownloadService) Get ¶

func (r *PCAPDownloadService) Get(ctx context.Context, pcapID string, query PCAPDownloadGetParams, opts ...option.RequestOption) (res *http.Response, err error)

Download PCAP information into a file. Response is a binary PCAP file.

type PCAPFilter ¶

type PCAPFilter struct {
	// The destination IP address of the packet.
	DestinationAddress string `json:"destination_address"`
	// The destination port of the packet.
	DestinationPort float64 `json:"destination_port"`
	// The protocol number of the packet.
	Protocol float64 `json:"protocol"`
	// The source IP address of the packet.
	SourceAddress string `json:"source_address"`
	// The source port of the packet.
	SourcePort float64        `json:"source_port"`
	JSON       pcapFilterJSON `json:"-"`
}

The packet capture filter. When this field is empty, all packets are captured.

func (*PCAPFilter) UnmarshalJSON ¶

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

type PCAPFilterParam ¶

type PCAPFilterParam struct {
	// The destination IP address of the packet.
	DestinationAddress param.Field[string] `json:"destination_address"`
	// The destination port of the packet.
	DestinationPort param.Field[float64] `json:"destination_port"`
	// The protocol number of the packet.
	Protocol param.Field[float64] `json:"protocol"`
	// The source IP address of the packet.
	SourceAddress param.Field[string] `json:"source_address"`
	// The source port of the packet.
	SourcePort param.Field[float64] `json:"source_port"`
}

The packet capture filter. When this field is empty, all packets are captured.

func (PCAPFilterParam) MarshalJSON ¶

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

type PCAPGetParams ¶

type PCAPGetParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type PCAPGetResponse ¶

type PCAPGetResponse struct {
	// The ID for the packet capture.
	ID string `json:"id"`
	// The maximum number of bytes to capture. This field only applies to `full` packet
	// captures.
	ByteLimit float64 `json:"byte_limit"`
	// The name of the data center used for the packet capture. This can be a specific
	// colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
	// packet captures.
	ColoName string `json:"colo_name"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf string `json:"destination_conf"`
	// An error message that describes why the packet capture failed. This field only
	// applies to `full` packet captures.
	ErrorMessage string `json:"error_message"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The RFC 3339 offset timestamp from which to query backwards for packets. Must be
	// within the last 24h. When this field is empty, defaults to time of request.
	OffsetTime time.Time `json:"offset_time" format:"date-time"`
	// The number of packets captured.
	PacketsCaptured int64 `json:"packets_captured"`
	// The status of the packet capture request.
	Status PCAPGetResponseStatus `json:"status"`
	// The RFC 3339 timestamp when stopping the packet capture was requested. This
	// field only applies to `full` packet captures.
	StopRequested time.Time `json:"stop_requested" format:"date-time"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPGetResponseSystem `json:"system"`
	// The packet capture duration in seconds.
	TimeLimit float64 `json:"time_limit"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type PCAPGetResponseType `json:"type"`
	JSON pcapGetResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (PCAPGetResponse) AsUnion ¶

AsUnion returns a PCAPGetResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are PCAP, PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFull.

func (*PCAPGetResponse) UnmarshalJSON ¶

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

type PCAPGetResponseEnvelope ¶

type PCAPGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   PCAPGetResponse       `json:"result" api:"required"`
	// Whether the API call was successful.
	Success PCAPGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    pcapGetResponseEnvelopeJSON    `json:"-"`
}

func (*PCAPGetResponseEnvelope) UnmarshalJSON ¶

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

type PCAPGetResponseEnvelopeSuccess ¶

type PCAPGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	PCAPGetResponseEnvelopeSuccessTrue PCAPGetResponseEnvelopeSuccess = true
)

func (PCAPGetResponseEnvelopeSuccess) IsKnown ¶

type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFull ¶

type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFull struct {
	// The ID for the packet capture.
	ID string `json:"id"`
	// The maximum number of bytes to capture. This field only applies to `full` packet
	// captures.
	ByteLimit float64 `json:"byte_limit"`
	// The name of the data center used for the packet capture. This can be a specific
	// colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
	// packet captures.
	ColoName string `json:"colo_name"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf string `json:"destination_conf"`
	// An error message that describes why the packet capture failed. This field only
	// applies to `full` packet captures.
	ErrorMessage string `json:"error_message"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The number of packets captured.
	PacketsCaptured int64 `json:"packets_captured"`
	// The status of the packet capture request.
	Status PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus `json:"status"`
	// The RFC 3339 timestamp when stopping the packet capture was requested. This
	// field only applies to `full` packet captures.
	StopRequested time.Time `json:"stop_requested" format:"date-time"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullSystem `json:"system"`
	// The packet capture duration in seconds.
	TimeLimit float64 `json:"time_limit"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullType `json:"type"`
	JSON pcapGetResponseMagicVisibilityPCAPsPCAPsResponseFullJSON `json:"-"`
}

func (*PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFull) UnmarshalJSON ¶

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

type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus ¶

type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus string

The status of the packet capture request.

const (
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatusUnknown           PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "unknown"
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatusSuccess           PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "success"
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatusPending           PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "pending"
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatusRunning           PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "running"
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatusConversionPending PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "conversion_pending"
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatusConversionRunning PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "conversion_running"
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatusComplete          PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "complete"
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatusFailed            PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "failed"
)

func (PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullStatus) IsKnown ¶

type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullSystem ¶

type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullSystem string

The system used to collect packet captures.

const (
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullSystemMagicTransit PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullSystem = "magic-transit"
)

func (PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullSystem) IsKnown ¶

type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullType ¶

type PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullTypeSimple PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullType = "simple"
	PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullTypeFull   PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullType = "full"
)

func (PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFullType) IsKnown ¶

type PCAPGetResponseStatus ¶

type PCAPGetResponseStatus string

The status of the packet capture request.

const (
	PCAPGetResponseStatusUnknown           PCAPGetResponseStatus = "unknown"
	PCAPGetResponseStatusSuccess           PCAPGetResponseStatus = "success"
	PCAPGetResponseStatusPending           PCAPGetResponseStatus = "pending"
	PCAPGetResponseStatusRunning           PCAPGetResponseStatus = "running"
	PCAPGetResponseStatusConversionPending PCAPGetResponseStatus = "conversion_pending"
	PCAPGetResponseStatusConversionRunning PCAPGetResponseStatus = "conversion_running"
	PCAPGetResponseStatusComplete          PCAPGetResponseStatus = "complete"
	PCAPGetResponseStatusFailed            PCAPGetResponseStatus = "failed"
)

func (PCAPGetResponseStatus) IsKnown ¶

func (r PCAPGetResponseStatus) IsKnown() bool

type PCAPGetResponseSystem ¶

type PCAPGetResponseSystem string

The system used to collect packet captures.

const (
	PCAPGetResponseSystemMagicTransit PCAPGetResponseSystem = "magic-transit"
)

func (PCAPGetResponseSystem) IsKnown ¶

func (r PCAPGetResponseSystem) IsKnown() bool

type PCAPGetResponseType ¶

type PCAPGetResponseType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPGetResponseTypeSimple PCAPGetResponseType = "simple"
	PCAPGetResponseTypeFull   PCAPGetResponseType = "full"
)

func (PCAPGetResponseType) IsKnown ¶

func (r PCAPGetResponseType) IsKnown() bool

type PCAPGetResponseUnion ¶

type PCAPGetResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by PCAP or PCAPGetResponseMagicVisibilityPCAPsPCAPsResponseFull.

type PCAPListParams ¶

type PCAPListParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type PCAPListResponse ¶

type PCAPListResponse struct {
	// The ID for the packet capture.
	ID string `json:"id"`
	// The maximum number of bytes to capture. This field only applies to `full` packet
	// captures.
	ByteLimit float64 `json:"byte_limit"`
	// The name of the data center used for the packet capture. This can be a specific
	// colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
	// packet captures.
	ColoName string `json:"colo_name"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf string `json:"destination_conf"`
	// An error message that describes why the packet capture failed. This field only
	// applies to `full` packet captures.
	ErrorMessage string `json:"error_message"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The RFC 3339 offset timestamp from which to query backwards for packets. Must be
	// within the last 24h. When this field is empty, defaults to time of request.
	OffsetTime time.Time `json:"offset_time" format:"date-time"`
	// The number of packets captured.
	PacketsCaptured int64 `json:"packets_captured"`
	// The status of the packet capture request.
	Status PCAPListResponseStatus `json:"status"`
	// The RFC 3339 timestamp when stopping the packet capture was requested. This
	// field only applies to `full` packet captures.
	StopRequested time.Time `json:"stop_requested" format:"date-time"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPListResponseSystem `json:"system"`
	// The packet capture duration in seconds.
	TimeLimit float64 `json:"time_limit"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type PCAPListResponseType `json:"type"`
	JSON pcapListResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (PCAPListResponse) AsUnion ¶

AsUnion returns a PCAPListResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are PCAP, PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFull.

func (*PCAPListResponse) UnmarshalJSON ¶

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

type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFull ¶

type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFull struct {
	// The ID for the packet capture.
	ID string `json:"id"`
	// The maximum number of bytes to capture. This field only applies to `full` packet
	// captures.
	ByteLimit float64 `json:"byte_limit"`
	// The name of the data center used for the packet capture. This can be a specific
	// colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
	// packet captures.
	ColoName string `json:"colo_name"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf string `json:"destination_conf"`
	// An error message that describes why the packet capture failed. This field only
	// applies to `full` packet captures.
	ErrorMessage string `json:"error_message"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The number of packets captured.
	PacketsCaptured int64 `json:"packets_captured"`
	// The status of the packet capture request.
	Status PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus `json:"status"`
	// The RFC 3339 timestamp when stopping the packet capture was requested. This
	// field only applies to `full` packet captures.
	StopRequested time.Time `json:"stop_requested" format:"date-time"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullSystem `json:"system"`
	// The packet capture duration in seconds.
	TimeLimit float64 `json:"time_limit"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullType `json:"type"`
	JSON pcapListResponseMagicVisibilityPCAPsPCAPsResponseFullJSON `json:"-"`
}

func (*PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFull) UnmarshalJSON ¶

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

type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus ¶

type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus string

The status of the packet capture request.

const (
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatusUnknown           PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "unknown"
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatusSuccess           PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "success"
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatusPending           PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "pending"
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatusRunning           PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "running"
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatusConversionPending PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "conversion_pending"
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatusConversionRunning PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "conversion_running"
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatusComplete          PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "complete"
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatusFailed            PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "failed"
)

func (PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullStatus) IsKnown ¶

type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullSystem ¶

type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullSystem string

The system used to collect packet captures.

const (
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullSystemMagicTransit PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullSystem = "magic-transit"
)

func (PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullSystem) IsKnown ¶

type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullType ¶

type PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullTypeSimple PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullType = "simple"
	PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullTypeFull   PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullType = "full"
)

func (PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFullType) IsKnown ¶

type PCAPListResponseStatus ¶

type PCAPListResponseStatus string

The status of the packet capture request.

const (
	PCAPListResponseStatusUnknown           PCAPListResponseStatus = "unknown"
	PCAPListResponseStatusSuccess           PCAPListResponseStatus = "success"
	PCAPListResponseStatusPending           PCAPListResponseStatus = "pending"
	PCAPListResponseStatusRunning           PCAPListResponseStatus = "running"
	PCAPListResponseStatusConversionPending PCAPListResponseStatus = "conversion_pending"
	PCAPListResponseStatusConversionRunning PCAPListResponseStatus = "conversion_running"
	PCAPListResponseStatusComplete          PCAPListResponseStatus = "complete"
	PCAPListResponseStatusFailed            PCAPListResponseStatus = "failed"
)

func (PCAPListResponseStatus) IsKnown ¶

func (r PCAPListResponseStatus) IsKnown() bool

type PCAPListResponseSystem ¶

type PCAPListResponseSystem string

The system used to collect packet captures.

const (
	PCAPListResponseSystemMagicTransit PCAPListResponseSystem = "magic-transit"
)

func (PCAPListResponseSystem) IsKnown ¶

func (r PCAPListResponseSystem) IsKnown() bool

type PCAPListResponseType ¶

type PCAPListResponseType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPListResponseTypeSimple PCAPListResponseType = "simple"
	PCAPListResponseTypeFull   PCAPListResponseType = "full"
)

func (PCAPListResponseType) IsKnown ¶

func (r PCAPListResponseType) IsKnown() bool

type PCAPListResponseUnion ¶

type PCAPListResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by PCAP or PCAPListResponseMagicVisibilityPCAPsPCAPsResponseFull.

type PCAPNewParams ¶

type PCAPNewParams struct {
	// Identifier.
	AccountID param.Field[string]    `path:"account_id" api:"required"`
	Body      PCAPNewParamsBodyUnion `json:"body" api:"required"`
}

func (PCAPNewParams) MarshalJSON ¶

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

type PCAPNewParamsBody ¶

type PCAPNewParamsBody struct {
	// The system used to collect packet captures.
	System param.Field[PCAPNewParamsBodySystem] `json:"system" api:"required"`
	// The packet capture duration in seconds.
	TimeLimit param.Field[float64] `json:"time_limit" api:"required"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type param.Field[PCAPNewParamsBodyType] `json:"type" api:"required"`
	// The maximum number of bytes to capture. This field only applies to `full` packet
	// captures.
	ByteLimit param.Field[float64] `json:"byte_limit"`
	// The name of the data center used for the packet capture. This can be a specific
	// colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
	// packet captures.
	ColoName param.Field[string] `json:"colo_name"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf param.Field[string] `json:"destination_conf"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 param.Field[PCAPFilterParam] `json:"filter_v1"`
	// The RFC 3339 offset timestamp from which to query backwards for packets. Must be
	// within the last 24h. When this field is empty, defaults to time of request.
	OffsetTime param.Field[time.Time] `json:"offset_time" format:"date-time"`
	// The limit of packets contained in a packet capture.
	PacketLimit param.Field[float64] `json:"packet_limit"`
}

func (PCAPNewParamsBody) MarshalJSON ¶

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

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFull ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFull struct {
	// The name of the data center used for the packet capture. This can be a specific
	// colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
	// packet captures.
	ColoName param.Field[string] `json:"colo_name" api:"required"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf param.Field[string] `json:"destination_conf" api:"required"`
	// The system used to collect packet captures.
	System param.Field[PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullSystem] `json:"system" api:"required"`
	// The packet capture duration in seconds.
	TimeLimit param.Field[float64] `json:"time_limit" api:"required"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type param.Field[PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullType] `json:"type" api:"required"`
	// The maximum number of bytes to capture. This field only applies to `full` packet
	// captures.
	ByteLimit param.Field[float64] `json:"byte_limit"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 param.Field[PCAPFilterParam] `json:"filter_v1"`
	// The limit of packets contained in a packet capture.
	PacketLimit param.Field[float64] `json:"packet_limit"`
}

func (PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFull) MarshalJSON ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullSystem ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullSystem string

The system used to collect packet captures.

const (
	PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullSystemMagicTransit PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullSystem = "magic-transit"
)

func (PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullSystem) IsKnown ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullType ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullTypeSimple PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullType = "simple"
	PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullTypeFull   PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullType = "full"
)

func (PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestFullType) IsKnown ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimple ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimple struct {
	// The limit of packets contained in a packet capture.
	PacketLimit param.Field[float64] `json:"packet_limit" api:"required"`
	// The system used to collect packet captures.
	System param.Field[PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleSystem] `json:"system" api:"required"`
	// The packet capture duration in seconds.
	TimeLimit param.Field[float64] `json:"time_limit" api:"required"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type param.Field[PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleType] `json:"type" api:"required"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 param.Field[PCAPFilterParam] `json:"filter_v1"`
	// The RFC 3339 offset timestamp from which to query backwards for packets. Must be
	// within the last 24h. When this field is empty, defaults to time of request.
	OffsetTime param.Field[time.Time] `json:"offset_time" format:"date-time"`
}

func (PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimple) MarshalJSON ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleSystem ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleSystem string

The system used to collect packet captures.

const (
	PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleSystemMagicTransit PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleSystem = "magic-transit"
)

func (PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleSystem) IsKnown ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleType ¶

type PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleTypeSimple PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleType = "simple"
	PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleTypeFull   PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleType = "full"
)

func (PCAPNewParamsBodyMagicVisibilityPCAPsPCAPsRequestSimpleType) IsKnown ¶

type PCAPNewParamsBodySystem ¶

type PCAPNewParamsBodySystem string

The system used to collect packet captures.

const (
	PCAPNewParamsBodySystemMagicTransit PCAPNewParamsBodySystem = "magic-transit"
)

func (PCAPNewParamsBodySystem) IsKnown ¶

func (r PCAPNewParamsBodySystem) IsKnown() bool

type PCAPNewParamsBodyType ¶

type PCAPNewParamsBodyType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPNewParamsBodyTypeSimple PCAPNewParamsBodyType = "simple"
	PCAPNewParamsBodyTypeFull   PCAPNewParamsBodyType = "full"
)

func (PCAPNewParamsBodyType) IsKnown ¶

func (r PCAPNewParamsBodyType) IsKnown() bool

type PCAPNewResponse ¶

type PCAPNewResponse struct {
	// The ID for the packet capture.
	ID string `json:"id"`
	// The maximum number of bytes to capture. This field only applies to `full` packet
	// captures.
	ByteLimit float64 `json:"byte_limit"`
	// The name of the data center used for the packet capture. This can be a specific
	// colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
	// packet captures.
	ColoName string `json:"colo_name"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf string `json:"destination_conf"`
	// An error message that describes why the packet capture failed. This field only
	// applies to `full` packet captures.
	ErrorMessage string `json:"error_message"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The RFC 3339 offset timestamp from which to query backwards for packets. Must be
	// within the last 24h. When this field is empty, defaults to time of request.
	OffsetTime time.Time `json:"offset_time" format:"date-time"`
	// The number of packets captured.
	PacketsCaptured int64 `json:"packets_captured"`
	// The status of the packet capture request.
	Status PCAPNewResponseStatus `json:"status"`
	// The RFC 3339 timestamp when stopping the packet capture was requested. This
	// field only applies to `full` packet captures.
	StopRequested time.Time `json:"stop_requested" format:"date-time"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPNewResponseSystem `json:"system"`
	// The packet capture duration in seconds.
	TimeLimit float64 `json:"time_limit"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type PCAPNewResponseType `json:"type"`
	JSON pcapNewResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (PCAPNewResponse) AsUnion ¶

AsUnion returns a PCAPNewResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are PCAP, PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFull.

func (*PCAPNewResponse) UnmarshalJSON ¶

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

type PCAPNewResponseEnvelope ¶

type PCAPNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   PCAPNewResponse       `json:"result" api:"required"`
	// Whether the API call was successful.
	Success PCAPNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    pcapNewResponseEnvelopeJSON    `json:"-"`
}

func (*PCAPNewResponseEnvelope) UnmarshalJSON ¶

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

type PCAPNewResponseEnvelopeSuccess ¶

type PCAPNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	PCAPNewResponseEnvelopeSuccessTrue PCAPNewResponseEnvelopeSuccess = true
)

func (PCAPNewResponseEnvelopeSuccess) IsKnown ¶

type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFull ¶

type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFull struct {
	// The ID for the packet capture.
	ID string `json:"id"`
	// The maximum number of bytes to capture. This field only applies to `full` packet
	// captures.
	ByteLimit float64 `json:"byte_limit"`
	// The name of the data center used for the packet capture. This can be a specific
	// colo (ord02) or a multi-colo name (ORD). This field only applies to `full`
	// packet captures.
	ColoName string `json:"colo_name"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf string `json:"destination_conf"`
	// An error message that describes why the packet capture failed. This field only
	// applies to `full` packet captures.
	ErrorMessage string `json:"error_message"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The number of packets captured.
	PacketsCaptured int64 `json:"packets_captured"`
	// The status of the packet capture request.
	Status PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus `json:"status"`
	// The RFC 3339 timestamp when stopping the packet capture was requested. This
	// field only applies to `full` packet captures.
	StopRequested time.Time `json:"stop_requested" format:"date-time"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullSystem `json:"system"`
	// The packet capture duration in seconds.
	TimeLimit float64 `json:"time_limit"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullType `json:"type"`
	JSON pcapNewResponseMagicVisibilityPCAPsPCAPsResponseFullJSON `json:"-"`
}

func (*PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFull) UnmarshalJSON ¶

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

type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus ¶

type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus string

The status of the packet capture request.

const (
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatusUnknown           PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "unknown"
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatusSuccess           PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "success"
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatusPending           PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "pending"
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatusRunning           PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "running"
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatusConversionPending PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "conversion_pending"
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatusConversionRunning PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "conversion_running"
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatusComplete          PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "complete"
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatusFailed            PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus = "failed"
)

func (PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullStatus) IsKnown ¶

type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullSystem ¶

type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullSystem string

The system used to collect packet captures.

const (
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullSystemMagicTransit PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullSystem = "magic-transit"
)

func (PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullSystem) IsKnown ¶

type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullType ¶

type PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullTypeSimple PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullType = "simple"
	PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullTypeFull   PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullType = "full"
)

func (PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFullType) IsKnown ¶

type PCAPNewResponseStatus ¶

type PCAPNewResponseStatus string

The status of the packet capture request.

const (
	PCAPNewResponseStatusUnknown           PCAPNewResponseStatus = "unknown"
	PCAPNewResponseStatusSuccess           PCAPNewResponseStatus = "success"
	PCAPNewResponseStatusPending           PCAPNewResponseStatus = "pending"
	PCAPNewResponseStatusRunning           PCAPNewResponseStatus = "running"
	PCAPNewResponseStatusConversionPending PCAPNewResponseStatus = "conversion_pending"
	PCAPNewResponseStatusConversionRunning PCAPNewResponseStatus = "conversion_running"
	PCAPNewResponseStatusComplete          PCAPNewResponseStatus = "complete"
	PCAPNewResponseStatusFailed            PCAPNewResponseStatus = "failed"
)

func (PCAPNewResponseStatus) IsKnown ¶

func (r PCAPNewResponseStatus) IsKnown() bool

type PCAPNewResponseSystem ¶

type PCAPNewResponseSystem string

The system used to collect packet captures.

const (
	PCAPNewResponseSystemMagicTransit PCAPNewResponseSystem = "magic-transit"
)

func (PCAPNewResponseSystem) IsKnown ¶

func (r PCAPNewResponseSystem) IsKnown() bool

type PCAPNewResponseType ¶

type PCAPNewResponseType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPNewResponseTypeSimple PCAPNewResponseType = "simple"
	PCAPNewResponseTypeFull   PCAPNewResponseType = "full"
)

func (PCAPNewResponseType) IsKnown ¶

func (r PCAPNewResponseType) IsKnown() bool

type PCAPNewResponseUnion ¶

type PCAPNewResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by PCAP or PCAPNewResponseMagicVisibilityPCAPsPCAPsResponseFull.

type PCAPOwnershipDeleteParams ¶

type PCAPOwnershipDeleteParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type PCAPOwnershipGetParams ¶

type PCAPOwnershipGetParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type PCAPOwnershipNewParams ¶

type PCAPOwnershipNewParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf param.Field[string] `json:"destination_conf" api:"required"`
}

func (PCAPOwnershipNewParams) MarshalJSON ¶

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

type PCAPOwnershipNewResponseEnvelope ¶

type PCAPOwnershipNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Ownership             `json:"result" api:"required"`
	// Whether the API call was successful.
	Success PCAPOwnershipNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    pcapOwnershipNewResponseEnvelopeJSON    `json:"-"`
}

func (*PCAPOwnershipNewResponseEnvelope) UnmarshalJSON ¶

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

type PCAPOwnershipNewResponseEnvelopeSuccess ¶

type PCAPOwnershipNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	PCAPOwnershipNewResponseEnvelopeSuccessTrue PCAPOwnershipNewResponseEnvelopeSuccess = true
)

func (PCAPOwnershipNewResponseEnvelopeSuccess) IsKnown ¶

type PCAPOwnershipService ¶

type PCAPOwnershipService struct {
	Options []option.RequestOption
}

PCAPOwnershipService 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 NewPCAPOwnershipService method instead.

func NewPCAPOwnershipService ¶

func NewPCAPOwnershipService(opts ...option.RequestOption) (r *PCAPOwnershipService)

NewPCAPOwnershipService 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 (*PCAPOwnershipService) Delete ¶

func (r *PCAPOwnershipService) Delete(ctx context.Context, ownershipID string, body PCAPOwnershipDeleteParams, opts ...option.RequestOption) (err error)

Deletes buckets added to the packet captures API.

func (*PCAPOwnershipService) Get ¶

List all buckets configured for use with PCAPs API.

func (*PCAPOwnershipService) GetAutoPaging ¶

List all buckets configured for use with PCAPs API.

func (*PCAPOwnershipService) New ¶

Adds an AWS or GCP bucket to use with full packet captures.

func (*PCAPOwnershipService) Validate ¶

Validates buckets added to the packet captures API.

type PCAPOwnershipValidateParams ¶

type PCAPOwnershipValidateParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf param.Field[string] `json:"destination_conf" api:"required"`
	// The ownership challenge filename stored in the bucket.
	OwnershipChallenge param.Field[string] `json:"ownership_challenge" api:"required"`
}

func (PCAPOwnershipValidateParams) MarshalJSON ¶

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

type PCAPOwnershipValidateResponseEnvelope ¶

type PCAPOwnershipValidateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Ownership             `json:"result" api:"required"`
	// Whether the API call was successful.
	Success PCAPOwnershipValidateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    pcapOwnershipValidateResponseEnvelopeJSON    `json:"-"`
}

func (*PCAPOwnershipValidateResponseEnvelope) UnmarshalJSON ¶

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

type PCAPOwnershipValidateResponseEnvelopeSuccess ¶

type PCAPOwnershipValidateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	PCAPOwnershipValidateResponseEnvelopeSuccessTrue PCAPOwnershipValidateResponseEnvelopeSuccess = true
)

func (PCAPOwnershipValidateResponseEnvelopeSuccess) IsKnown ¶

type PCAPService ¶

type PCAPService struct {
	Options   []option.RequestOption
	Ownership *PCAPOwnershipService
	Download  *PCAPDownloadService
}

PCAPService 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 NewPCAPService method instead.

func NewPCAPService ¶

func NewPCAPService(opts ...option.RequestOption) (r *PCAPService)

NewPCAPService 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 (*PCAPService) Get ¶

func (r *PCAPService) Get(ctx context.Context, pcapID string, query PCAPGetParams, opts ...option.RequestOption) (res *PCAPGetResponse, err error)

Get information for a PCAP request by id.

func (*PCAPService) List ¶

Lists all packet capture requests for an account.

func (*PCAPService) ListAutoPaging ¶

Lists all packet capture requests for an account.

func (*PCAPService) New ¶

func (r *PCAPService) New(ctx context.Context, params PCAPNewParams, opts ...option.RequestOption) (res *PCAPNewResponse, err error)

Create new PCAP request for account.

func (*PCAPService) Stop ¶

func (r *PCAPService) Stop(ctx context.Context, pcapID string, body PCAPStopParams, opts ...option.RequestOption) (err error)

Stop full PCAP.

type PCAPStatus ¶

type PCAPStatus string

The status of the packet capture request.

const (
	PCAPStatusUnknown           PCAPStatus = "unknown"
	PCAPStatusSuccess           PCAPStatus = "success"
	PCAPStatusPending           PCAPStatus = "pending"
	PCAPStatusRunning           PCAPStatus = "running"
	PCAPStatusConversionPending PCAPStatus = "conversion_pending"
	PCAPStatusConversionRunning PCAPStatus = "conversion_running"
	PCAPStatusComplete          PCAPStatus = "complete"
	PCAPStatusFailed            PCAPStatus = "failed"
)

func (PCAPStatus) IsKnown ¶

func (r PCAPStatus) IsKnown() bool

type PCAPStopParams ¶

type PCAPStopParams struct {
	// Identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type PCAPSystem ¶

type PCAPSystem string

The system used to collect packet captures.

const (
	PCAPSystemMagicTransit PCAPSystem = "magic-transit"
)

func (PCAPSystem) IsKnown ¶

func (r PCAPSystem) IsKnown() bool

type PCAPType ¶

type PCAPType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPTypeSimple PCAPType = "simple"
	PCAPTypeFull   PCAPType = "full"
)

func (PCAPType) IsKnown ¶

func (r PCAPType) IsKnown() bool

type PSKMetadata ¶

type PSKMetadata struct {
	// The date and time the tunnel was last modified.
	LastGeneratedOn time.Time       `json:"last_generated_on" format:"date-time"`
	JSON            pskMetadataJSON `json:"-"`
}

The PSK metadata that includes when the PSK was generated.

func (*PSKMetadata) UnmarshalJSON ¶

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

type Permission ¶

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant ¶

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam ¶

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type Ramp ¶ added in v7.6.0

type Ramp struct {
	// Identifier
	ID         string    `json:"id" api:"required"`
	CreatedOn  time.Time `json:"created_on" api:"required" format:"date-time"`
	ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
	// A human-provided name describing the ramp that should be unique within the CF1
	// Site.
	Name string `json:"name" api:"required"`
	// The type of network connection (ramp) linking a CF1 Site to Cloudflare's
	// network.
	Type RampType `json:"type" api:"required"`
	// A human-provided description of the ramp.
	Description      string               `json:"description"`
	GRE              RampGRE              `json:"gre"`
	GREInterconnect  RampGREInterconnect  `json:"gre_interconnect"`
	IPSEC            RampIPSEC            `json:"ipsec"`
	Mconn            RampMconn            `json:"mconn"`
	MplsInterconnect RampMplsInterconnect `json:"mpls_interconnect"`
	JSON             rampJSON             `json:"-"`
}

func (*Ramp) UnmarshalJSON ¶ added in v7.6.0

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

type RampGRE ¶ added in v7.6.0

type RampGRE struct {
	// URL reference to the source network resource that this ramp is managed by.
	ManagedBy string      `json:"managed_by"`
	JSON      rampGREJSON `json:"-"`
}

func (*RampGRE) UnmarshalJSON ¶ added in v7.6.0

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

type RampGREInterconnect ¶ added in v7.6.0

type RampGREInterconnect struct {
	// URL reference to the source network resource that this ramp is managed by.
	ManagedBy string                  `json:"managed_by"`
	JSON      rampGREInterconnectJSON `json:"-"`
}

func (*RampGREInterconnect) UnmarshalJSON ¶ added in v7.6.0

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

type RampIPSEC ¶ added in v7.6.0

type RampIPSEC struct {
	// URL reference to the source network resource that this ramp is managed by.
	ManagedBy string        `json:"managed_by"`
	JSON      rampIPSECJSON `json:"-"`
}

func (*RampIPSEC) UnmarshalJSON ¶ added in v7.6.0

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

type RampMconn ¶ added in v7.6.0

type RampMconn struct {
	// URL reference to the source network resource that this ramp is managed by.
	ManagedBy string        `json:"managed_by"`
	JSON      rampMconnJSON `json:"-"`
}

func (*RampMconn) UnmarshalJSON ¶ added in v7.6.0

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

type RampMplsInterconnect ¶ added in v7.6.0

type RampMplsInterconnect struct {
	// URL reference to the source network resource that this ramp is managed by.
	ManagedBy string                   `json:"managed_by"`
	JSON      rampMplsInterconnectJSON `json:"-"`
}

func (*RampMplsInterconnect) UnmarshalJSON ¶ added in v7.6.0

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

type RampType ¶ added in v7.6.0

type RampType string

The type of network connection (ramp) linking a CF1 Site to Cloudflare's network.

const (
	RampTypeGRE              RampType = "gre"
	RampTypeGREInterconnect  RampType = "gre_interconnect"
	RampTypeMplsInterconnect RampType = "mpls_interconnect"
	RampTypeMconn            RampType = "mconn"
	RampTypeIPSEC            RampType = "ipsec"
)

func (RampType) IsKnown ¶ added in v7.6.0

func (r RampType) IsKnown() bool

type RatePlan ¶

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanID ¶

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam ¶

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo ¶

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource ¶

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role ¶

type Role = shared.Role

This is an alias to an internal type.

type RoleParam ¶

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions ¶

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam ¶

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type RouteBulkUpdateParams ¶

type RouteBulkUpdateParams struct {
	// Identifier
	AccountID param.Field[string]                       `path:"account_id" api:"required"`
	Routes    param.Field[[]RouteBulkUpdateParamsRoute] `json:"routes" api:"required"`
}

func (RouteBulkUpdateParams) MarshalJSON ¶

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

type RouteBulkUpdateParamsRoute ¶

type RouteBulkUpdateParamsRoute struct {
	// Identifier
	ID param.Field[string] `json:"id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop param.Field[string] `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix param.Field[string] `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority param.Field[int64] `json:"priority" api:"required"`
	// An optional human provided description of the static route.
	Description param.Field[string] `json:"description"`
	// Used only for ECMP routes.
	Scope param.Field[ScopeParam] `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight param.Field[int64] `json:"weight"`
}

func (RouteBulkUpdateParamsRoute) MarshalJSON ¶

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

type RouteBulkUpdateResponse ¶

type RouteBulkUpdateResponse struct {
	Modified       bool                                   `json:"modified"`
	ModifiedRoutes []RouteBulkUpdateResponseModifiedRoute `json:"modified_routes"`
	JSON           routeBulkUpdateResponseJSON            `json:"-"`
}

func (*RouteBulkUpdateResponse) UnmarshalJSON ¶

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

type RouteBulkUpdateResponseEnvelope ¶

type RouteBulkUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo   `json:"errors" api:"required"`
	Messages []shared.ResponseInfo   `json:"messages" api:"required"`
	Result   RouteBulkUpdateResponse `json:"result" api:"required"`
	// Whether the API call was successful
	Success RouteBulkUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    routeBulkUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*RouteBulkUpdateResponseEnvelope) UnmarshalJSON ¶

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

type RouteBulkUpdateResponseEnvelopeSuccess ¶

type RouteBulkUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteBulkUpdateResponseEnvelopeSuccessTrue RouteBulkUpdateResponseEnvelopeSuccess = true
)

func (RouteBulkUpdateResponseEnvelopeSuccess) IsKnown ¶

type RouteBulkUpdateResponseModifiedRoute ¶

type RouteBulkUpdateResponseModifiedRoute struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority int64 `json:"priority" api:"required"`
	// When the route was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional human provided description of the static route.
	Description string `json:"description"`
	// When the route was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Used only for ECMP routes.
	Scope Scope `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight int64                                    `json:"weight"`
	JSON   routeBulkUpdateResponseModifiedRouteJSON `json:"-"`
}

func (*RouteBulkUpdateResponseModifiedRoute) UnmarshalJSON ¶

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

type RouteDeleteParams ¶

type RouteDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type RouteDeleteResponse ¶

type RouteDeleteResponse struct {
	Deleted      bool                            `json:"deleted"`
	DeletedRoute RouteDeleteResponseDeletedRoute `json:"deleted_route"`
	JSON         routeDeleteResponseJSON         `json:"-"`
}

func (*RouteDeleteResponse) UnmarshalJSON ¶

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

type RouteDeleteResponseDeletedRoute ¶

type RouteDeleteResponseDeletedRoute struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority int64 `json:"priority" api:"required"`
	// When the route was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional human provided description of the static route.
	Description string `json:"description"`
	// When the route was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Used only for ECMP routes.
	Scope Scope `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight int64                               `json:"weight"`
	JSON   routeDeleteResponseDeletedRouteJSON `json:"-"`
}

func (*RouteDeleteResponseDeletedRoute) UnmarshalJSON ¶

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

type RouteDeleteResponseEnvelope ¶

type RouteDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   RouteDeleteResponse   `json:"result" api:"required"`
	// Whether the API call was successful
	Success RouteDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    routeDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*RouteDeleteResponseEnvelope) UnmarshalJSON ¶

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

type RouteDeleteResponseEnvelopeSuccess ¶

type RouteDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteDeleteResponseEnvelopeSuccessTrue RouteDeleteResponseEnvelopeSuccess = true
)

func (RouteDeleteResponseEnvelopeSuccess) IsKnown ¶

type RouteEmptyParams ¶

type RouteEmptyParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type RouteEmptyResponse ¶

type RouteEmptyResponse struct {
	Deleted       bool                             `json:"deleted"`
	DeletedRoutes []RouteEmptyResponseDeletedRoute `json:"deleted_routes"`
	JSON          routeEmptyResponseJSON           `json:"-"`
}

func (*RouteEmptyResponse) UnmarshalJSON ¶

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

type RouteEmptyResponseDeletedRoute ¶

type RouteEmptyResponseDeletedRoute struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority int64 `json:"priority" api:"required"`
	// When the route was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional human provided description of the static route.
	Description string `json:"description"`
	// When the route was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Used only for ECMP routes.
	Scope Scope `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight int64                              `json:"weight"`
	JSON   routeEmptyResponseDeletedRouteJSON `json:"-"`
}

func (*RouteEmptyResponseDeletedRoute) UnmarshalJSON ¶

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

type RouteEmptyResponseEnvelope ¶

type RouteEmptyResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   RouteEmptyResponse    `json:"result" api:"required"`
	// Whether the API call was successful
	Success RouteEmptyResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    routeEmptyResponseEnvelopeJSON    `json:"-"`
}

func (*RouteEmptyResponseEnvelope) UnmarshalJSON ¶

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

type RouteEmptyResponseEnvelopeSuccess ¶

type RouteEmptyResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteEmptyResponseEnvelopeSuccessTrue RouteEmptyResponseEnvelopeSuccess = true
)

func (RouteEmptyResponseEnvelopeSuccess) IsKnown ¶

type RouteGetParams ¶

type RouteGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type RouteGetResponse ¶

type RouteGetResponse struct {
	Route RouteGetResponseRoute `json:"route"`
	JSON  routeGetResponseJSON  `json:"-"`
}

func (*RouteGetResponse) UnmarshalJSON ¶

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

type RouteGetResponseEnvelope ¶

type RouteGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   RouteGetResponse      `json:"result" api:"required"`
	// Whether the API call was successful
	Success RouteGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    routeGetResponseEnvelopeJSON    `json:"-"`
}

func (*RouteGetResponseEnvelope) UnmarshalJSON ¶

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

type RouteGetResponseEnvelopeSuccess ¶

type RouteGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteGetResponseEnvelopeSuccessTrue RouteGetResponseEnvelopeSuccess = true
)

func (RouteGetResponseEnvelopeSuccess) IsKnown ¶

type RouteGetResponseRoute ¶

type RouteGetResponseRoute struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority int64 `json:"priority" api:"required"`
	// When the route was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional human provided description of the static route.
	Description string `json:"description"`
	// When the route was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Used only for ECMP routes.
	Scope Scope `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight int64                     `json:"weight"`
	JSON   routeGetResponseRouteJSON `json:"-"`
}

func (*RouteGetResponseRoute) UnmarshalJSON ¶

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

type RouteListParams ¶

type RouteListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type RouteListResponse ¶

type RouteListResponse struct {
	Routes []RouteListResponseRoute `json:"routes"`
	JSON   routeListResponseJSON    `json:"-"`
}

func (*RouteListResponse) UnmarshalJSON ¶

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

type RouteListResponseEnvelope ¶

type RouteListResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   RouteListResponse     `json:"result" api:"required"`
	// Whether the API call was successful
	Success RouteListResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    routeListResponseEnvelopeJSON    `json:"-"`
}

func (*RouteListResponseEnvelope) UnmarshalJSON ¶

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

type RouteListResponseEnvelopeSuccess ¶

type RouteListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteListResponseEnvelopeSuccessTrue RouteListResponseEnvelopeSuccess = true
)

func (RouteListResponseEnvelopeSuccess) IsKnown ¶

type RouteListResponseRoute ¶

type RouteListResponseRoute struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority int64 `json:"priority" api:"required"`
	// When the route was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional human provided description of the static route.
	Description string `json:"description"`
	// When the route was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Used only for ECMP routes.
	Scope Scope `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight int64                      `json:"weight"`
	JSON   routeListResponseRouteJSON `json:"-"`
}

func (*RouteListResponseRoute) UnmarshalJSON ¶

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

type RouteNewParams ¶

type RouteNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop param.Field[string] `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix param.Field[string] `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority param.Field[int64] `json:"priority" api:"required"`
	// An optional human provided description of the static route.
	Description param.Field[string] `json:"description"`
	// Used only for ECMP routes.
	Scope param.Field[ScopeParam] `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight param.Field[int64] `json:"weight"`
}

func (RouteNewParams) MarshalJSON ¶

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

type RouteNewResponse ¶

type RouteNewResponse struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority int64 `json:"priority" api:"required"`
	// When the route was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional human provided description of the static route.
	Description string `json:"description"`
	// When the route was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Used only for ECMP routes.
	Scope Scope `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight int64                `json:"weight"`
	JSON   routeNewResponseJSON `json:"-"`
}

func (*RouteNewResponse) UnmarshalJSON ¶

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

type RouteNewResponseEnvelope ¶

type RouteNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   RouteNewResponse      `json:"result" api:"required"`
	// Whether the API call was successful
	Success RouteNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    routeNewResponseEnvelopeJSON    `json:"-"`
}

func (*RouteNewResponseEnvelope) UnmarshalJSON ¶

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

type RouteNewResponseEnvelopeSuccess ¶

type RouteNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteNewResponseEnvelopeSuccessTrue RouteNewResponseEnvelopeSuccess = true
)

func (RouteNewResponseEnvelopeSuccess) IsKnown ¶

type RouteService ¶

type RouteService struct {
	Options []option.RequestOption
}

RouteService 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 NewRouteService method instead.

func NewRouteService ¶

func NewRouteService(opts ...option.RequestOption) (r *RouteService)

NewRouteService 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 (*RouteService) BulkUpdate ¶

func (r *RouteService) BulkUpdate(ctx context.Context, params RouteBulkUpdateParams, opts ...option.RequestOption) (res *RouteBulkUpdateResponse, err error)

Update multiple Magic static routes. Use `?validate_only=true` as an optional query parameter to run validation only without persisting changes. Only fields for a route that need to be changed need be provided.

func (*RouteService) Delete ¶

func (r *RouteService) Delete(ctx context.Context, routeID string, body RouteDeleteParams, opts ...option.RequestOption) (res *RouteDeleteResponse, err error)

Disable and remove a specific Magic static route.

func (*RouteService) Empty ¶

func (r *RouteService) Empty(ctx context.Context, body RouteEmptyParams, opts ...option.RequestOption) (res *RouteEmptyResponse, err error)

Delete multiple Magic static routes.

func (*RouteService) Get ¶

func (r *RouteService) Get(ctx context.Context, routeID string, query RouteGetParams, opts ...option.RequestOption) (res *RouteGetResponse, err error)

Get a specific Magic static route.

func (*RouteService) List ¶

func (r *RouteService) List(ctx context.Context, query RouteListParams, opts ...option.RequestOption) (res *RouteListResponse, err error)

List all Magic static routes.

func (*RouteService) New ¶

func (r *RouteService) New(ctx context.Context, params RouteNewParams, opts ...option.RequestOption) (res *RouteNewResponse, err error)

Creates a new Magic static route. Use `?validate_only=true` as an optional query parameter to run validation only without persisting changes.

func (*RouteService) Update ¶

func (r *RouteService) Update(ctx context.Context, routeID string, params RouteUpdateParams, opts ...option.RequestOption) (res *RouteUpdateResponse, err error)

Update a specific Magic static route. Use `?validate_only=true` as an optional query parameter to run validation only without persisting changes.

type RouteUpdateParams ¶

type RouteUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop param.Field[string] `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix param.Field[string] `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority param.Field[int64] `json:"priority" api:"required"`
	// An optional human provided description of the static route.
	Description param.Field[string] `json:"description"`
	// Used only for ECMP routes.
	Scope param.Field[ScopeParam] `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight param.Field[int64] `json:"weight"`
}

func (RouteUpdateParams) MarshalJSON ¶

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

type RouteUpdateResponse ¶

type RouteUpdateResponse struct {
	Modified      bool                             `json:"modified"`
	ModifiedRoute RouteUpdateResponseModifiedRoute `json:"modified_route"`
	JSON          routeUpdateResponseJSON          `json:"-"`
}

func (*RouteUpdateResponse) UnmarshalJSON ¶

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

type RouteUpdateResponseEnvelope ¶

type RouteUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   RouteUpdateResponse   `json:"result" api:"required"`
	// Whether the API call was successful
	Success RouteUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    routeUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*RouteUpdateResponseEnvelope) UnmarshalJSON ¶

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

type RouteUpdateResponseEnvelopeSuccess ¶

type RouteUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteUpdateResponseEnvelopeSuccessTrue RouteUpdateResponseEnvelopeSuccess = true
)

func (RouteUpdateResponseEnvelopeSuccess) IsKnown ¶

type RouteUpdateResponseModifiedRoute ¶

type RouteUpdateResponseModifiedRoute struct {
	// Identifier
	ID string `json:"id" api:"required"`
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop" api:"required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix" api:"required"`
	// Priority of the static route.
	Priority int64 `json:"priority" api:"required"`
	// When the route was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// An optional human provided description of the static route.
	Description string `json:"description"`
	// When the route was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Used only for ECMP routes.
	Scope Scope `json:"scope"`
	// Optional weight of the ECMP scope - if provided.
	Weight int64                                `json:"weight"`
	JSON   routeUpdateResponseModifiedRouteJSON `json:"-"`
}

func (*RouteUpdateResponseModifiedRoute) UnmarshalJSON ¶

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

type RoutedSubnet ¶

type RoutedSubnet struct {
	// A valid IPv4 address.
	NextHop string `json:"next_hop" api:"required"`
	// A valid CIDR notation representing an IP range.
	Prefix string           `json:"prefix" api:"required"`
	Nat    Nat              `json:"nat"`
	JSON   routedSubnetJSON `json:"-"`
}

func (*RoutedSubnet) UnmarshalJSON ¶

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

type RoutedSubnetParam ¶

type RoutedSubnetParam struct {
	// A valid IPv4 address.
	NextHop param.Field[string] `json:"next_hop" api:"required"`
	// A valid CIDR notation representing an IP range.
	Prefix param.Field[string]   `json:"prefix" api:"required"`
	Nat    param.Field[NatParam] `json:"nat"`
}

func (RoutedSubnetParam) MarshalJSON ¶

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

type Scope ¶

type Scope struct {
	// List of colo names for the ECMP scope.
	ColoNames []string `json:"colo_names"`
	// List of colo regions for the ECMP scope.
	ColoRegions []string  `json:"colo_regions"`
	JSON        scopeJSON `json:"-"`
}

Used only for ECMP routes.

func (*Scope) UnmarshalJSON ¶

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

type ScopeParam ¶

type ScopeParam struct {
	// List of colo names for the ECMP scope.
	ColoNames param.Field[[]string] `json:"colo_names"`
	// List of colo regions for the ECMP scope.
	ColoRegions param.Field[[]string] `json:"colo_regions"`
}

Used only for ECMP routes.

func (ScopeParam) MarshalJSON ¶

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

type Site ¶

type Site struct {
	// Identifier
	ID string `json:"id"`
	// Magic Connector identifier tag.
	ConnectorID string `json:"connector_id"`
	Description string `json:"description"`
	// Site high availability mode. If set to true, the site can have two connectors
	// and runs in high availability mode.
	HaMode bool `json:"ha_mode"`
	// Location of site in latitude and longitude.
	Location SiteLocation `json:"location"`
	// The name of the site.
	Name string `json:"name"`
	// Magic Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID string   `json:"secondary_connector_id"`
	JSON                 siteJSON `json:"-"`
}

func (*Site) UnmarshalJSON ¶

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

type SiteACLDeleteParams ¶

type SiteACLDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteACLDeleteResponseEnvelope ¶

type SiteACLDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteACLDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteACLDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*SiteACLDeleteResponseEnvelope) UnmarshalJSON ¶

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

type SiteACLDeleteResponseEnvelopeSuccess ¶

type SiteACLDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLDeleteResponseEnvelopeSuccessTrue SiteACLDeleteResponseEnvelopeSuccess = true
)

func (SiteACLDeleteResponseEnvelopeSuccess) IsKnown ¶

type SiteACLEditParams ¶

type SiteACLEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Description for the ACL.
	Description param.Field[string] `json:"description"`
	// The desired forwarding action for this ACL policy. If set to "false", the policy
	// will forward traffic to Cloudflare. If set to "true", the policy will forward
	// traffic locally on the Magic Connector. If not included in request, will default
	// to false.
	ForwardLocally param.Field[bool]                  `json:"forward_locally"`
	LAN1           param.Field[ACLConfigurationParam] `json:"lan_1"`
	LAN2           param.Field[ACLConfigurationParam] `json:"lan_2"`
	// The name of the ACL.
	Name      param.Field[string]            `json:"name"`
	Protocols param.Field[[]AllowedProtocol] `json:"protocols"`
	// The desired traffic direction for this ACL policy. If set to "false", the policy
	// will allow bidirectional traffic. If set to "true", the policy will only allow
	// traffic in one direction. If not included in request, will default to false.
	Unidirectional param.Field[bool] `json:"unidirectional"`
}

func (SiteACLEditParams) MarshalJSON ¶

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

type SiteACLEditResponseEnvelope ¶

type SiteACLEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteACLEditResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteACLEditResponseEnvelopeJSON    `json:"-"`
}

func (*SiteACLEditResponseEnvelope) UnmarshalJSON ¶

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

type SiteACLEditResponseEnvelopeSuccess ¶

type SiteACLEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLEditResponseEnvelopeSuccessTrue SiteACLEditResponseEnvelopeSuccess = true
)

func (SiteACLEditResponseEnvelopeSuccess) IsKnown ¶

type SiteACLGetParams ¶

type SiteACLGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteACLGetResponseEnvelope ¶

type SiteACLGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteACLGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteACLGetResponseEnvelopeJSON    `json:"-"`
}

func (*SiteACLGetResponseEnvelope) UnmarshalJSON ¶

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

type SiteACLGetResponseEnvelopeSuccess ¶

type SiteACLGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLGetResponseEnvelopeSuccessTrue SiteACLGetResponseEnvelopeSuccess = true
)

func (SiteACLGetResponseEnvelopeSuccess) IsKnown ¶

type SiteACLListParams ¶

type SiteACLListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteACLNewParams ¶

type SiteACLNewParams struct {
	// Identifier
	AccountID param.Field[string]                `path:"account_id" api:"required"`
	LAN1      param.Field[ACLConfigurationParam] `json:"lan_1" api:"required"`
	LAN2      param.Field[ACLConfigurationParam] `json:"lan_2" api:"required"`
	// The name of the ACL.
	Name param.Field[string] `json:"name" api:"required"`
	// Description for the ACL.
	Description param.Field[string] `json:"description"`
	// The desired forwarding action for this ACL policy. If set to "false", the policy
	// will forward traffic to Cloudflare. If set to "true", the policy will forward
	// traffic locally on the Magic Connector. If not included in request, will default
	// to false.
	ForwardLocally param.Field[bool]              `json:"forward_locally"`
	Protocols      param.Field[[]AllowedProtocol] `json:"protocols"`
	// The desired traffic direction for this ACL policy. If set to "false", the policy
	// will allow bidirectional traffic. If set to "true", the policy will only allow
	// traffic in one direction. If not included in request, will default to false.
	Unidirectional param.Field[bool] `json:"unidirectional"`
}

func (SiteACLNewParams) MarshalJSON ¶

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

type SiteACLNewResponseEnvelope ¶

type SiteACLNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteACLNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteACLNewResponseEnvelopeJSON    `json:"-"`
}

func (*SiteACLNewResponseEnvelope) UnmarshalJSON ¶

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

type SiteACLNewResponseEnvelopeSuccess ¶

type SiteACLNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLNewResponseEnvelopeSuccessTrue SiteACLNewResponseEnvelopeSuccess = true
)

func (SiteACLNewResponseEnvelopeSuccess) IsKnown ¶

type SiteACLService ¶

type SiteACLService struct {
	Options []option.RequestOption
}

SiteACLService 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 NewSiteACLService method instead.

func NewSiteACLService ¶

func NewSiteACLService(opts ...option.RequestOption) (r *SiteACLService)

NewSiteACLService 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 (*SiteACLService) Delete ¶

func (r *SiteACLService) Delete(ctx context.Context, siteID string, aclID string, body SiteACLDeleteParams, opts ...option.RequestOption) (res *ACL, err error)

Remove a specific Site ACL.

func (*SiteACLService) Edit ¶

func (r *SiteACLService) Edit(ctx context.Context, siteID string, aclID string, params SiteACLEditParams, opts ...option.RequestOption) (res *ACL, err error)

Patch a specific Site ACL.

func (*SiteACLService) Get ¶

func (r *SiteACLService) Get(ctx context.Context, siteID string, aclID string, query SiteACLGetParams, opts ...option.RequestOption) (res *ACL, err error)

Get a specific Site ACL.

func (*SiteACLService) List ¶

func (r *SiteACLService) List(ctx context.Context, siteID string, query SiteACLListParams, opts ...option.RequestOption) (res *pagination.SinglePage[ACL], err error)

Lists Site ACLs associated with an account.

func (*SiteACLService) ListAutoPaging ¶

Lists Site ACLs associated with an account.

func (*SiteACLService) New ¶

func (r *SiteACLService) New(ctx context.Context, siteID string, params SiteACLNewParams, opts ...option.RequestOption) (res *ACL, err error)

Creates a new Site ACL.

func (*SiteACLService) Update ¶

func (r *SiteACLService) Update(ctx context.Context, siteID string, aclID string, params SiteACLUpdateParams, opts ...option.RequestOption) (res *ACL, err error)

Update a specific Site ACL.

type SiteACLUpdateParams ¶

type SiteACLUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Description for the ACL.
	Description param.Field[string] `json:"description"`
	// The desired forwarding action for this ACL policy. If set to "false", the policy
	// will forward traffic to Cloudflare. If set to "true", the policy will forward
	// traffic locally on the Magic Connector. If not included in request, will default
	// to false.
	ForwardLocally param.Field[bool]                  `json:"forward_locally"`
	LAN1           param.Field[ACLConfigurationParam] `json:"lan_1"`
	LAN2           param.Field[ACLConfigurationParam] `json:"lan_2"`
	// The name of the ACL.
	Name      param.Field[string]            `json:"name"`
	Protocols param.Field[[]AllowedProtocol] `json:"protocols"`
	// The desired traffic direction for this ACL policy. If set to "false", the policy
	// will allow bidirectional traffic. If set to "true", the policy will only allow
	// traffic in one direction. If not included in request, will default to false.
	Unidirectional param.Field[bool] `json:"unidirectional"`
}

func (SiteACLUpdateParams) MarshalJSON ¶

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

type SiteACLUpdateResponseEnvelope ¶

type SiteACLUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteACLUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteACLUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SiteACLUpdateResponseEnvelope) UnmarshalJSON ¶

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

type SiteACLUpdateResponseEnvelopeSuccess ¶

type SiteACLUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLUpdateResponseEnvelopeSuccessTrue SiteACLUpdateResponseEnvelopeSuccess = true
)

func (SiteACLUpdateResponseEnvelopeSuccess) IsKnown ¶

type SiteDeleteParams ¶

type SiteDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteDeleteResponseEnvelope ¶

type SiteDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Site                  `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*SiteDeleteResponseEnvelope) UnmarshalJSON ¶

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

type SiteDeleteResponseEnvelopeSuccess ¶

type SiteDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteDeleteResponseEnvelopeSuccessTrue SiteDeleteResponseEnvelopeSuccess = true
)

func (SiteDeleteResponseEnvelopeSuccess) IsKnown ¶

type SiteEditParams ¶

type SiteEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Magic Connector identifier tag.
	ConnectorID param.Field[string] `json:"connector_id"`
	Description param.Field[string] `json:"description"`
	// Location of site in latitude and longitude.
	Location param.Field[SiteLocationParam] `json:"location"`
	// The name of the site.
	Name param.Field[string] `json:"name"`
	// Magic Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID param.Field[string] `json:"secondary_connector_id"`
}

func (SiteEditParams) MarshalJSON ¶

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

type SiteEditResponseEnvelope ¶

type SiteEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Site                  `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteEditResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteEditResponseEnvelopeJSON    `json:"-"`
}

func (*SiteEditResponseEnvelope) UnmarshalJSON ¶

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

type SiteEditResponseEnvelopeSuccess ¶

type SiteEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteEditResponseEnvelopeSuccessTrue SiteEditResponseEnvelopeSuccess = true
)

func (SiteEditResponseEnvelopeSuccess) IsKnown ¶

type SiteGetParams ¶

type SiteGetParams struct {
	// Identifier
	AccountID         param.Field[string] `path:"account_id" api:"required"`
	XMagicNewHcTarget param.Field[bool]   `header:"x-magic-new-hc-target"`
}

type SiteGetResponseEnvelope ¶

type SiteGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Site                  `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteGetResponseEnvelopeJSON    `json:"-"`
}

func (*SiteGetResponseEnvelope) UnmarshalJSON ¶

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

type SiteGetResponseEnvelopeSuccess ¶

type SiteGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteGetResponseEnvelopeSuccessTrue SiteGetResponseEnvelopeSuccess = true
)

func (SiteGetResponseEnvelopeSuccess) IsKnown ¶

type SiteLANDeleteParams ¶

type SiteLANDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteLANDeleteResponseEnvelope ¶

type SiteLANDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   LAN                   `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteLANDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteLANDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*SiteLANDeleteResponseEnvelope) UnmarshalJSON ¶

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

type SiteLANDeleteResponseEnvelopeSuccess ¶

type SiteLANDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLANDeleteResponseEnvelopeSuccessTrue SiteLANDeleteResponseEnvelopeSuccess = true
)

func (SiteLANDeleteResponseEnvelopeSuccess) IsKnown ¶

type SiteLANEditParams ¶

type SiteLANEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	BondID    param.Field[int64]  `json:"bond_id"`
	// mark true to use this LAN for source-based breakout traffic
	IsBreakout param.Field[bool] `json:"is_breakout"`
	// mark true to use this LAN for source-based prioritized traffic
	IsPrioritized param.Field[bool]                `json:"is_prioritized"`
	Name          param.Field[string]              `json:"name"`
	Nat           param.Field[NatParam]            `json:"nat"`
	Physport      param.Field[int64]               `json:"physport"`
	RoutedSubnets param.Field[[]RoutedSubnetParam] `json:"routed_subnets"`
	// If the site is not configured in high availability mode, this configuration is
	// optional (if omitted, use DHCP). However, if in high availability mode,
	// static_address is required along with secondary and virtual address.
	StaticAddressing param.Field[LANStaticAddressingParam] `json:"static_addressing"`
	// VLAN ID. Use zero for untagged.
	VlanTag param.Field[int64] `json:"vlan_tag"`
}

func (SiteLANEditParams) MarshalJSON ¶

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

type SiteLANEditResponseEnvelope ¶

type SiteLANEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   LAN                   `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteLANEditResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteLANEditResponseEnvelopeJSON    `json:"-"`
}

func (*SiteLANEditResponseEnvelope) UnmarshalJSON ¶

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

type SiteLANEditResponseEnvelopeSuccess ¶

type SiteLANEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLANEditResponseEnvelopeSuccessTrue SiteLANEditResponseEnvelopeSuccess = true
)

func (SiteLANEditResponseEnvelopeSuccess) IsKnown ¶

type SiteLANGetParams ¶

type SiteLANGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteLANGetResponseEnvelope ¶

type SiteLANGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   LAN                   `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteLANGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteLANGetResponseEnvelopeJSON    `json:"-"`
}

func (*SiteLANGetResponseEnvelope) UnmarshalJSON ¶

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

type SiteLANGetResponseEnvelopeSuccess ¶

type SiteLANGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLANGetResponseEnvelopeSuccessTrue SiteLANGetResponseEnvelopeSuccess = true
)

func (SiteLANGetResponseEnvelopeSuccess) IsKnown ¶

type SiteLANListParams ¶

type SiteLANListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteLANNewParams ¶

type SiteLANNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	BondID    param.Field[int64]  `json:"bond_id"`
	// mark true to use this LAN for HA probing. only works for site with HA turned on.
	// only one LAN can be set as the ha_link.
	HaLink param.Field[bool] `json:"ha_link"`
	// mark true to use this LAN for source-based breakout traffic
	IsBreakout param.Field[bool] `json:"is_breakout"`
	// mark true to use this LAN for source-based prioritized traffic
	IsPrioritized param.Field[bool]                `json:"is_prioritized"`
	Name          param.Field[string]              `json:"name"`
	Nat           param.Field[NatParam]            `json:"nat"`
	Physport      param.Field[int64]               `json:"physport"`
	RoutedSubnets param.Field[[]RoutedSubnetParam] `json:"routed_subnets"`
	// If the site is not configured in high availability mode, this configuration is
	// optional (if omitted, use DHCP). However, if in high availability mode,
	// static_address is required along with secondary and virtual address.
	StaticAddressing param.Field[LANStaticAddressingParam] `json:"static_addressing"`
	// VLAN ID. Use zero for untagged.
	VlanTag param.Field[int64] `json:"vlan_tag"`
}

func (SiteLANNewParams) MarshalJSON ¶

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

type SiteLANService ¶

type SiteLANService struct {
	Options []option.RequestOption
}

SiteLANService 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 NewSiteLANService method instead.

func NewSiteLANService ¶

func NewSiteLANService(opts ...option.RequestOption) (r *SiteLANService)

NewSiteLANService 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 (*SiteLANService) Delete ¶

func (r *SiteLANService) Delete(ctx context.Context, siteID string, lanID string, body SiteLANDeleteParams, opts ...option.RequestOption) (res *LAN, err error)

Remove a specific Site LAN.

func (*SiteLANService) Edit ¶

func (r *SiteLANService) Edit(ctx context.Context, siteID string, lanID string, params SiteLANEditParams, opts ...option.RequestOption) (res *LAN, err error)

Patch a specific Site LAN.

func (*SiteLANService) Get ¶

func (r *SiteLANService) Get(ctx context.Context, siteID string, lanID string, query SiteLANGetParams, opts ...option.RequestOption) (res *LAN, err error)

Get a specific Site LAN.

func (*SiteLANService) List ¶

func (r *SiteLANService) List(ctx context.Context, siteID string, query SiteLANListParams, opts ...option.RequestOption) (res *pagination.SinglePage[LAN], err error)

Lists Site LANs associated with an account.

func (*SiteLANService) ListAutoPaging ¶

Lists Site LANs associated with an account.

func (*SiteLANService) New ¶

func (r *SiteLANService) New(ctx context.Context, siteID string, params SiteLANNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[LAN], err error)

Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.

func (*SiteLANService) NewAutoPaging ¶

Creates a new Site LAN. If the site is in high availability mode, static_addressing is required along with secondary and virtual address.

func (*SiteLANService) Update ¶

func (r *SiteLANService) Update(ctx context.Context, siteID string, lanID string, params SiteLANUpdateParams, opts ...option.RequestOption) (res *LAN, err error)

Update a specific Site LAN.

type SiteLANUpdateParams ¶

type SiteLANUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	BondID    param.Field[int64]  `json:"bond_id"`
	// mark true to use this LAN for source-based breakout traffic
	IsBreakout param.Field[bool] `json:"is_breakout"`
	// mark true to use this LAN for source-based prioritized traffic
	IsPrioritized param.Field[bool]                `json:"is_prioritized"`
	Name          param.Field[string]              `json:"name"`
	Nat           param.Field[NatParam]            `json:"nat"`
	Physport      param.Field[int64]               `json:"physport"`
	RoutedSubnets param.Field[[]RoutedSubnetParam] `json:"routed_subnets"`
	// If the site is not configured in high availability mode, this configuration is
	// optional (if omitted, use DHCP). However, if in high availability mode,
	// static_address is required along with secondary and virtual address.
	StaticAddressing param.Field[LANStaticAddressingParam] `json:"static_addressing"`
	// VLAN ID. Use zero for untagged.
	VlanTag param.Field[int64] `json:"vlan_tag"`
}

func (SiteLANUpdateParams) MarshalJSON ¶

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

type SiteLANUpdateResponseEnvelope ¶

type SiteLANUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   LAN                   `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteLANUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteLANUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SiteLANUpdateResponseEnvelope) UnmarshalJSON ¶

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

type SiteLANUpdateResponseEnvelopeSuccess ¶

type SiteLANUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLANUpdateResponseEnvelopeSuccessTrue SiteLANUpdateResponseEnvelopeSuccess = true
)

func (SiteLANUpdateResponseEnvelopeSuccess) IsKnown ¶

type SiteListParams ¶

type SiteListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Identifier
	Connectorid param.Field[string] `query:"connectorid"`
}

func (SiteListParams) URLQuery ¶

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

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

type SiteLocation ¶

type SiteLocation struct {
	// Latitude
	Lat string `json:"lat"`
	// Longitude
	Lon  string           `json:"lon"`
	JSON siteLocationJSON `json:"-"`
}

Location of site in latitude and longitude.

func (*SiteLocation) UnmarshalJSON ¶

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

type SiteLocationParam ¶

type SiteLocationParam struct {
	// Latitude
	Lat param.Field[string] `json:"lat"`
	// Longitude
	Lon param.Field[string] `json:"lon"`
}

Location of site in latitude and longitude.

func (SiteLocationParam) MarshalJSON ¶

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

type SiteNewParams ¶

type SiteNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// The name of the site.
	Name param.Field[string] `json:"name" api:"required"`
	// Magic Connector identifier tag.
	ConnectorID param.Field[string] `json:"connector_id"`
	Description param.Field[string] `json:"description"`
	// Site high availability mode. If set to true, the site can have two connectors
	// and runs in high availability mode.
	HaMode param.Field[bool] `json:"ha_mode"`
	// Location of site in latitude and longitude.
	Location param.Field[SiteLocationParam] `json:"location"`
	// Magic Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID param.Field[string] `json:"secondary_connector_id"`
}

func (SiteNewParams) MarshalJSON ¶

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

type SiteNewResponseEnvelope ¶

type SiteNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Site                  `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteNewResponseEnvelopeJSON    `json:"-"`
}

func (*SiteNewResponseEnvelope) UnmarshalJSON ¶

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

type SiteNewResponseEnvelopeSuccess ¶

type SiteNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteNewResponseEnvelopeSuccessTrue SiteNewResponseEnvelopeSuccess = true
)

func (SiteNewResponseEnvelopeSuccess) IsKnown ¶

type SiteService ¶

type SiteService struct {
	Options []option.RequestOption
	ACLs    *SiteACLService
	LANs    *SiteLANService
	WANs    *SiteWANService
}

SiteService 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 NewSiteService method instead.

func NewSiteService ¶

func NewSiteService(opts ...option.RequestOption) (r *SiteService)

NewSiteService 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 (*SiteService) Delete ¶

func (r *SiteService) Delete(ctx context.Context, siteID string, body SiteDeleteParams, opts ...option.RequestOption) (res *Site, err error)

Remove a specific Site.

func (*SiteService) Edit ¶

func (r *SiteService) Edit(ctx context.Context, siteID string, params SiteEditParams, opts ...option.RequestOption) (res *Site, err error)

Patch a specific Site.

func (*SiteService) Get ¶

func (r *SiteService) Get(ctx context.Context, siteID string, params SiteGetParams, opts ...option.RequestOption) (res *Site, err error)

Get a specific Site.

func (*SiteService) List ¶

func (r *SiteService) List(ctx context.Context, params SiteListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Site], err error)

Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID.

func (*SiteService) ListAutoPaging ¶

Lists Sites associated with an account. Use connectorid query param to return sites where connectorid matches either site.ConnectorID or site.SecondaryConnectorID.

func (*SiteService) New ¶

func (r *SiteService) New(ctx context.Context, params SiteNewParams, opts ...option.RequestOption) (res *Site, err error)

Creates a new Site

func (*SiteService) Update ¶

func (r *SiteService) Update(ctx context.Context, siteID string, params SiteUpdateParams, opts ...option.RequestOption) (res *Site, err error)

Update a specific Site.

type SiteUpdateParams ¶

type SiteUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Magic Connector identifier tag.
	ConnectorID param.Field[string] `json:"connector_id"`
	Description param.Field[string] `json:"description"`
	// Location of site in latitude and longitude.
	Location param.Field[SiteLocationParam] `json:"location"`
	// The name of the site.
	Name param.Field[string] `json:"name"`
	// Magic Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID param.Field[string] `json:"secondary_connector_id"`
}

func (SiteUpdateParams) MarshalJSON ¶

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

type SiteUpdateResponseEnvelope ¶

type SiteUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   Site                  `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SiteUpdateResponseEnvelope) UnmarshalJSON ¶

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

type SiteUpdateResponseEnvelopeSuccess ¶

type SiteUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteUpdateResponseEnvelopeSuccessTrue SiteUpdateResponseEnvelopeSuccess = true
)

func (SiteUpdateResponseEnvelopeSuccess) IsKnown ¶

type SiteWANDeleteParams ¶

type SiteWANDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteWANDeleteResponseEnvelope ¶

type SiteWANDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   WAN                   `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteWANDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteWANDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*SiteWANDeleteResponseEnvelope) UnmarshalJSON ¶

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

type SiteWANDeleteResponseEnvelopeSuccess ¶

type SiteWANDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWANDeleteResponseEnvelopeSuccessTrue SiteWANDeleteResponseEnvelopeSuccess = true
)

func (SiteWANDeleteResponseEnvelopeSuccess) IsKnown ¶

type SiteWANEditParams ¶

type SiteWANEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	Name      param.Field[string] `json:"name"`
	Physport  param.Field[int64]  `json:"physport"`
	Priority  param.Field[int64]  `json:"priority"`
	// (optional) if omitted, use DHCP. Submit secondary_address when site is in high
	// availability mode.
	StaticAddressing param.Field[WANStaticAddressingParam] `json:"static_addressing"`
	// VLAN ID. Use zero for untagged.
	VlanTag param.Field[int64] `json:"vlan_tag"`
}

func (SiteWANEditParams) MarshalJSON ¶

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

type SiteWANEditResponseEnvelope ¶

type SiteWANEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   WAN                   `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteWANEditResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteWANEditResponseEnvelopeJSON    `json:"-"`
}

func (*SiteWANEditResponseEnvelope) UnmarshalJSON ¶

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

type SiteWANEditResponseEnvelopeSuccess ¶

type SiteWANEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWANEditResponseEnvelopeSuccessTrue SiteWANEditResponseEnvelopeSuccess = true
)

func (SiteWANEditResponseEnvelopeSuccess) IsKnown ¶

type SiteWANGetParams ¶

type SiteWANGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteWANGetResponseEnvelope ¶

type SiteWANGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   WAN                   `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteWANGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteWANGetResponseEnvelopeJSON    `json:"-"`
}

func (*SiteWANGetResponseEnvelope) UnmarshalJSON ¶

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

type SiteWANGetResponseEnvelopeSuccess ¶

type SiteWANGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWANGetResponseEnvelopeSuccessTrue SiteWANGetResponseEnvelopeSuccess = true
)

func (SiteWANGetResponseEnvelopeSuccess) IsKnown ¶

type SiteWANListParams ¶

type SiteWANListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type SiteWANNewParams ¶

type SiteWANNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	Physport  param.Field[int64]  `json:"physport" api:"required"`
	Name      param.Field[string] `json:"name"`
	Priority  param.Field[int64]  `json:"priority"`
	// (optional) if omitted, use DHCP. Submit secondary_address when site is in high
	// availability mode.
	StaticAddressing param.Field[WANStaticAddressingParam] `json:"static_addressing"`
	// VLAN ID. Use zero for untagged.
	VlanTag param.Field[int64] `json:"vlan_tag"`
}

func (SiteWANNewParams) MarshalJSON ¶

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

type SiteWANService ¶

type SiteWANService struct {
	Options []option.RequestOption
}

SiteWANService 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 NewSiteWANService method instead.

func NewSiteWANService ¶

func NewSiteWANService(opts ...option.RequestOption) (r *SiteWANService)

NewSiteWANService 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 (*SiteWANService) Delete ¶

func (r *SiteWANService) Delete(ctx context.Context, siteID string, wanID string, body SiteWANDeleteParams, opts ...option.RequestOption) (res *WAN, err error)

Remove a specific Site WAN.

func (*SiteWANService) Edit ¶

func (r *SiteWANService) Edit(ctx context.Context, siteID string, wanID string, params SiteWANEditParams, opts ...option.RequestOption) (res *WAN, err error)

Patch a specific Site WAN.

func (*SiteWANService) Get ¶

func (r *SiteWANService) Get(ctx context.Context, siteID string, wanID string, query SiteWANGetParams, opts ...option.RequestOption) (res *WAN, err error)

Get a specific Site WAN.

func (*SiteWANService) List ¶

func (r *SiteWANService) List(ctx context.Context, siteID string, query SiteWANListParams, opts ...option.RequestOption) (res *pagination.SinglePage[WAN], err error)

Lists Site WANs associated with an account.

func (*SiteWANService) ListAutoPaging ¶

Lists Site WANs associated with an account.

func (*SiteWANService) New ¶

func (r *SiteWANService) New(ctx context.Context, siteID string, params SiteWANNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[WAN], err error)

Creates a new Site WAN.

func (*SiteWANService) NewAutoPaging ¶

Creates a new Site WAN.

func (*SiteWANService) Update ¶

func (r *SiteWANService) Update(ctx context.Context, siteID string, wanID string, params SiteWANUpdateParams, opts ...option.RequestOption) (res *WAN, err error)

Update a specific Site WAN.

type SiteWANUpdateParams ¶

type SiteWANUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id" api:"required"`
	Name      param.Field[string] `json:"name"`
	Physport  param.Field[int64]  `json:"physport"`
	Priority  param.Field[int64]  `json:"priority"`
	// (optional) if omitted, use DHCP. Submit secondary_address when site is in high
	// availability mode.
	StaticAddressing param.Field[WANStaticAddressingParam] `json:"static_addressing"`
	// VLAN ID. Use zero for untagged.
	VlanTag param.Field[int64] `json:"vlan_tag"`
}

func (SiteWANUpdateParams) MarshalJSON ¶

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

type SiteWANUpdateResponseEnvelope ¶

type SiteWANUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	Result   WAN                   `json:"result" api:"required"`
	// Whether the API call was successful
	Success SiteWANUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    siteWANUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SiteWANUpdateResponseEnvelope) UnmarshalJSON ¶

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

type SiteWANUpdateResponseEnvelopeSuccess ¶

type SiteWANUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWANUpdateResponseEnvelopeSuccessTrue SiteWANUpdateResponseEnvelopeSuccess = true
)

func (SiteWANUpdateResponseEnvelopeSuccess) IsKnown ¶

type SortDirection ¶

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subnet ¶

type Subnet = string

type SubnetParam ¶

type SubnetParam = string

type Subscription ¶

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency ¶

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam ¶

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState ¶

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token ¶

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition ¶

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList ¶

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam ¶

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam ¶

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP ¶

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam ¶

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam ¶

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy ¶

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect ¶

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam ¶

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup ¶

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam ¶

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta ¶

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam ¶

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNested ¶

type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam ¶

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectString ¶

type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam ¶

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesUnion ¶

type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenPolicyResourcesUnionParam ¶

type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenStatus ¶

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue ¶

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

type WAN ¶

type WAN struct {
	// Identifier
	ID string `json:"id"`
	// Magic WAN health check rate for tunnels created on this link. The default value
	// is `mid`.
	HealthCheckRate WANHealthCheckRate `json:"health_check_rate"`
	Name            string             `json:"name"`
	Physport        int64              `json:"physport"`
	// Priority of WAN for traffic loadbalancing.
	Priority int64 `json:"priority"`
	// Identifier
	SiteID string `json:"site_id"`
	// (optional) if omitted, use DHCP. Submit secondary_address when site is in high
	// availability mode.
	StaticAddressing WANStaticAddressing `json:"static_addressing"`
	// VLAN ID. Use zero for untagged.
	VlanTag int64   `json:"vlan_tag"`
	JSON    wanJSON `json:"-"`
}

func (*WAN) UnmarshalJSON ¶

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

type WANHealthCheckRate ¶

type WANHealthCheckRate string

Magic WAN health check rate for tunnels created on this link. The default value is `mid`.

const (
	WANHealthCheckRateLow  WANHealthCheckRate = "low"
	WANHealthCheckRateMid  WANHealthCheckRate = "mid"
	WANHealthCheckRateHigh WANHealthCheckRate = "high"
)

func (WANHealthCheckRate) IsKnown ¶

func (r WANHealthCheckRate) IsKnown() bool

type WANStaticAddressing ¶

type WANStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address string `json:"address" api:"required"`
	// A valid IPv4 address.
	GatewayAddress string `json:"gateway_address" api:"required"`
	// A valid CIDR notation representing an IP range.
	SecondaryAddress string                  `json:"secondary_address"`
	JSON             wanStaticAddressingJSON `json:"-"`
}

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

func (*WANStaticAddressing) UnmarshalJSON ¶

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

type WANStaticAddressingParam ¶

type WANStaticAddressingParam struct {
	// A valid CIDR notation representing an IP range.
	Address param.Field[string] `json:"address" api:"required"`
	// A valid IPv4 address.
	GatewayAddress param.Field[string] `json:"gateway_address" api:"required"`
	// A valid CIDR notation representing an IP range.
	SecondaryAddress param.Field[string] `json:"secondary_address"`
}

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

func (WANStaticAddressingParam) MarshalJSON ¶

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

Jump to

Keyboard shortcuts

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