magic_transit

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 16 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 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 CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

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 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.

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"`
	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,required"`
	// The name of the LAN based on the provided lan_id.
	LANName string `json:"lan_name"`
	// Array of ports on the provided LAN that will be included in the ACL. If no ports
	// 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,required"`
	// The name of the LAN based on the provided lan_id.
	LANName param.Field[string] `json:"lan_name"`
	// Array of ports on the provided LAN that will be included in the ACL. If no ports
	// 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,required"`
}

type AppDeleteResponse

type AppDeleteResponse struct {
	// Magic account app ID.
	AccountAppID string `json:"account_app_id,required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// CIDRs to associate with traffic decisions.
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// 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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Custom app defined for an account.
	Result AppDeleteResponse `json:"result,required,nullable"`
	// Whether the API call was successful
	Success AppDeleteResponseEnvelopeSuccess `json:"success,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 AppListParams

type AppListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,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,required"`
	// This field can have the runtime type of [[]string].
	IPSubnets interface{} `json:"ip_subnets,required"`
	// Display name for the app.
	Name string `json:"name"`
	// Category of the app.
	Type string `json:"type"`
	// Managed app ID.
	ManagedAppID string              `json:"managed_app_id"`
	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 magic_transit.AppListResponseMagicAccountApp, magic_transit.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,required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// CIDRs to associate with traffic decisions.
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// 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,required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// CIDRs to associate with traffic decisions.
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// 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 magic_transit.AppListResponseMagicAccountApp or magic_transit.AppListResponseMagicManagedApp.

type AppNewParams

type AppNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Display name for the app.
	Name param.Field[string] `json:"name,required"`
	// Category of the app.
	Type param.Field[string] `json:"type,required"`
	// FQDNs to associate with traffic decisions.
	Hostnames param.Field[[]string] `json:"hostnames"`
	// CIDRs to associate with traffic decisions.
	IPSubnets param.Field[[]string] `json:"ip_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,required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// CIDRs to associate with traffic decisions.
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// 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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Custom app defined for an account.
	Result AppNewResponse `json:"result,required,nullable"`
	// Whether the API call was successful
	Success AppNewResponseEnvelopeSuccess `json:"success,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) 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,required"`
	// FQDNs to associate with traffic decisions.
	Hostnames param.Field[[]string] `json:"hostnames"`
	// CIDRs to associate with traffic decisions.
	IPSubnets param.Field[[]string] `json:"ip_subnets"`
	// Display name for the app.
	Name param.Field[string] `json:"name"`
	// 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,required"`
	// FQDNs to associate with traffic decisions.
	Hostnames []string `json:"hostnames"`
	// CIDRs to associate with traffic decisions.
	IPSubnets []string `json:"ip_subnets"`
	// Display name for the app.
	Name string `json:"name"`
	// 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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Custom app defined for an account.
	Result AppUpdateResponse `json:"result,required,nullable"`
	// Whether the API call was successful
	Success AppUpdateResponseEnvelopeSuccess `json:"success,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 CfInterconnectGetParams

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

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,required"`
	Messages []shared.ResponseInfo     `json:"messages,required"`
	Result   CfInterconnectGetResponse `json:"result,required"`
	// Whether the API call was successful
	Success CfInterconnectGetResponseEnvelopeSuccess `json:"success,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 {
	// Tunnel identifier tag.
	ID string `json:"id"`
	// 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"`
	// The configuration specific to GRE interconnects.
	GRE         CfInterconnectGetResponseInterconnectGRE         `json:"gre"`
	HealthCheck CfInterconnectGetResponseInterconnectHealthCheck `json:"health_check"`
	// 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"`
	// 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"`
	JSON cfInterconnectGetResponseInterconnectJSON `json:"-"`
}

func (*CfInterconnectGetResponseInterconnect) UnmarshalJSON

func (r *CfInterconnectGetResponseInterconnect) 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:"-"`
}

The configuration specific to GRE interconnects.

func (*CfInterconnectGetResponseInterconnectGRE) UnmarshalJSON

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

type CfInterconnectGetResponseInterconnectHealthCheck

type CfInterconnectGetResponseInterconnectHealthCheck struct {
	// 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`.
	Target string `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

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

type CfInterconnectListParams

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

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,required"`
	Messages []shared.ResponseInfo      `json:"messages,required"`
	Result   CfInterconnectListResponse `json:"result,required"`
	// Whether the API call was successful
	Success CfInterconnectListResponseEnvelopeSuccess `json:"success,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 {
	// Tunnel identifier tag.
	ID string `json:"id"`
	// 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"`
	// The configuration specific to GRE interconnects.
	GRE         CfInterconnectListResponseInterconnectsGRE         `json:"gre"`
	HealthCheck CfInterconnectListResponseInterconnectsHealthCheck `json:"health_check"`
	// 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"`
	// 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"`
	JSON cfInterconnectListResponseInterconnectJSON `json:"-"`
}

func (*CfInterconnectListResponseInterconnect) UnmarshalJSON

func (r *CfInterconnectListResponseInterconnect) 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:"-"`
}

The configuration specific to GRE interconnects.

func (*CfInterconnectListResponseInterconnectsGRE) UnmarshalJSON

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

type CfInterconnectListResponseInterconnectsHealthCheck

type CfInterconnectListResponseInterconnectsHealthCheck struct {
	// 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`.
	Target string `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

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

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) Get

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,required"`
	// An optional description of the interconnect.
	Description param.Field[string] `json:"description"`
	// The configuration specific to GRE interconnects.
	GRE         param.Field[CfInterconnectUpdateParamsGRE]         `json:"gre"`
	HealthCheck param.Field[CfInterconnectUpdateParamsHealthCheck] `json:"health_check"`
	// 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"`
	// The Maximum Transmission Unit (MTU) in bytes for the interconnect. The minimum
	// value is 576.
	Mtu param.Field[int64] `json:"mtu"`
}

func (CfInterconnectUpdateParams) MarshalJSON

func (r CfInterconnectUpdateParams) 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"`
}

The configuration specific to GRE interconnects.

func (CfInterconnectUpdateParamsGRE) MarshalJSON

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

type CfInterconnectUpdateParamsHealthCheck

type CfInterconnectUpdateParamsHealthCheck struct {
	// 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`.
	Target param.Field[string] `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

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

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,required"`
	Messages []shared.ResponseInfo        `json:"messages,required"`
	Result   CfInterconnectUpdateResponse `json:"result,required"`
	// Whether the API call was successful
	Success CfInterconnectUpdateResponseEnvelopeSuccess `json:"success,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 {
	// Tunnel identifier tag.
	ID string `json:"id"`
	// 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"`
	// The configuration specific to GRE interconnects.
	GRE         CfInterconnectUpdateResponseModifiedInterconnectGRE         `json:"gre"`
	HealthCheck CfInterconnectUpdateResponseModifiedInterconnectHealthCheck `json:"health_check"`
	// 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"`
	// 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"`
	JSON cfInterconnectUpdateResponseModifiedInterconnectJSON `json:"-"`
}

func (*CfInterconnectUpdateResponseModifiedInterconnect) UnmarshalJSON

func (r *CfInterconnectUpdateResponseModifiedInterconnect) 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:"-"`
}

The configuration specific to GRE interconnects.

func (*CfInterconnectUpdateResponseModifiedInterconnectGRE) UnmarshalJSON

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

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheck

type CfInterconnectUpdateResponseModifiedInterconnectHealthCheck struct {
	// 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`.
	Target string `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

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

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 ConnectorEditParams

type ConnectorEditParams struct {
	// Account identifier
	AccountID                    param.Field[string]  `path:"account_id,required"`
	Activated                    param.Field[bool]    `json:"activated"`
	InterruptWindowDurationHours param.Field[float64] `json:"interrupt_window_duration_hours"`
	InterruptWindowHourOfDay     param.Field[float64] `json:"interrupt_window_hour_of_day"`
	Notes                        param.Field[string]  `json:"notes"`
	Timezone                     param.Field[string]  `json:"timezone"`
}

func (ConnectorEditParams) MarshalJSON

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

type ConnectorEditResponse

type ConnectorEditResponse struct {
	ID                           string                      `json:"id,required"`
	Activated                    bool                        `json:"activated,required"`
	InterruptWindowDurationHours float64                     `json:"interrupt_window_duration_hours,required"`
	InterruptWindowHourOfDay     float64                     `json:"interrupt_window_hour_of_day,required"`
	LastUpdated                  string                      `json:"last_updated,required"`
	Notes                        string                      `json:"notes,required"`
	Timezone                     string                      `json:"timezone,required"`
	Device                       ConnectorEditResponseDevice `json:"device"`
	LastHeartbeat                string                      `json:"last_heartbeat"`
	LastSeenVersion              string                      `json:"last_seen_version"`
	JSON                         connectorEditResponseJSON   `json:"-"`
}

func (*ConnectorEditResponse) UnmarshalJSON

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

type ConnectorEditResponseDevice

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

func (*ConnectorEditResponseDevice) UnmarshalJSON

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

type ConnectorEditResponseEnvelope

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

func (*ConnectorEditResponseEnvelope) UnmarshalJSON

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

type ConnectorGetParams

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

type ConnectorGetResponse

type ConnectorGetResponse struct {
	ID                           string                     `json:"id,required"`
	Activated                    bool                       `json:"activated,required"`
	InterruptWindowDurationHours float64                    `json:"interrupt_window_duration_hours,required"`
	InterruptWindowHourOfDay     float64                    `json:"interrupt_window_hour_of_day,required"`
	LastUpdated                  string                     `json:"last_updated,required"`
	Notes                        string                     `json:"notes,required"`
	Timezone                     string                     `json:"timezone,required"`
	Device                       ConnectorGetResponseDevice `json:"device"`
	LastHeartbeat                string                     `json:"last_heartbeat"`
	LastSeenVersion              string                     `json:"last_seen_version"`
	JSON                         connectorGetResponseJSON   `json:"-"`
}

func (*ConnectorGetResponse) UnmarshalJSON

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

type ConnectorGetResponseDevice

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

func (*ConnectorGetResponseDevice) UnmarshalJSON

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

type ConnectorGetResponseEnvelope

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

func (*ConnectorGetResponseEnvelope) UnmarshalJSON

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

type ConnectorListParams

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

type ConnectorListResponse

type ConnectorListResponse struct {
	ID                           string                      `json:"id,required"`
	Activated                    bool                        `json:"activated,required"`
	InterruptWindowDurationHours float64                     `json:"interrupt_window_duration_hours,required"`
	InterruptWindowHourOfDay     float64                     `json:"interrupt_window_hour_of_day,required"`
	LastUpdated                  string                      `json:"last_updated,required"`
	Notes                        string                      `json:"notes,required"`
	Timezone                     string                      `json:"timezone,required"`
	Device                       ConnectorListResponseDevice `json:"device"`
	LastHeartbeat                string                      `json:"last_heartbeat"`
	LastSeenVersion              string                      `json:"last_seen_version"`
	JSON                         connectorListResponseJSON   `json:"-"`
}

func (*ConnectorListResponse) UnmarshalJSON

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

type ConnectorListResponseDevice

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

func (*ConnectorListResponseDevice) UnmarshalJSON

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

type ConnectorService

type ConnectorService struct {
	Options []option.RequestOption
}

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) Edit

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

Update Connector

func (*ConnectorService) Get

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

Fetch Connector

func (*ConnectorService) List

List Connectors

func (*ConnectorService) ListAutoPaging

List Connectors

func (*ConnectorService) Update

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

Replace Connector

type ConnectorUpdateParams

type ConnectorUpdateParams struct {
	// Account identifier
	AccountID                    param.Field[string]  `path:"account_id,required"`
	Activated                    param.Field[bool]    `json:"activated"`
	InterruptWindowDurationHours param.Field[float64] `json:"interrupt_window_duration_hours"`
	InterruptWindowHourOfDay     param.Field[float64] `json:"interrupt_window_hour_of_day"`
	Notes                        param.Field[string]  `json:"notes"`
	Timezone                     param.Field[string]  `json:"timezone"`
}

func (ConnectorUpdateParams) MarshalJSON

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

type ConnectorUpdateResponse

type ConnectorUpdateResponse struct {
	ID                           string                        `json:"id,required"`
	Activated                    bool                          `json:"activated,required"`
	InterruptWindowDurationHours float64                       `json:"interrupt_window_duration_hours,required"`
	InterruptWindowHourOfDay     float64                       `json:"interrupt_window_hour_of_day,required"`
	LastUpdated                  string                        `json:"last_updated,required"`
	Notes                        string                        `json:"notes,required"`
	Timezone                     string                        `json:"timezone,required"`
	Device                       ConnectorUpdateResponseDevice `json:"device"`
	LastHeartbeat                string                        `json:"last_heartbeat"`
	LastSeenVersion              string                        `json:"last_seen_version"`
	JSON                         connectorUpdateResponseJSON   `json:"-"`
}

func (*ConnectorUpdateResponse) UnmarshalJSON

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

type ConnectorUpdateResponseDevice

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

func (*ConnectorUpdateResponseDevice) UnmarshalJSON

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

type ConnectorUpdateResponseEnvelope

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

func (*ConnectorUpdateResponseEnvelope) UnmarshalJSON

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

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 {
	// A valid IPv4 address.
	DHCPPoolEnd string `json:"dhcp_pool_end"`
	// A valid IPv4 address.
	DHCPPoolStart string `json:"dhcp_pool_start"`
	// A valid IPv4 address.
	DNSServer string `json:"dns_server"`
	// 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 DHCPServerParam

type DHCPServerParam struct {
	// 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.
	DNSServer param.Field[string] `json:"dns_server"`
	// 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 GRETunnelDeleteParams

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

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 {
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint,required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint,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,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,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// 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 HealthCheck `json:"health_check"`
	// 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 GRETunnelDeleteResponseEnvelope

type GRETunnelDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo   `json:"errors,required"`
	Messages []shared.ResponseInfo   `json:"messages,required"`
	Result   GRETunnelDeleteResponse `json:"result,required"`
	// Whether the API call was successful
	Success GRETunnelDeleteResponseEnvelopeSuccess `json:"success,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,required"`
}

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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   GRETunnelGetResponse  `json:"result,required"`
	// Whether the API call was successful
	Success GRETunnelGetResponseEnvelopeSuccess `json:"success,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 {
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint,required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint,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,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,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// 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 HealthCheck `json:"health_check"`
	// 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 GRETunnelListParams

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

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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   GRETunnelListResponse `json:"result,required"`
	// Whether the API call was successful
	Success GRETunnelListResponseEnvelopeSuccess `json:"success,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 {
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint,required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint,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,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,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// 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 HealthCheck `json:"health_check"`
	// 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 GRETunnelNewParams

type GRETunnelNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (GRETunnelNewParams) MarshalJSON

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

type GRETunnelNewResponse

type GRETunnelNewResponse struct {
	GRETunnels []GRETunnelNewResponseGRETunnel `json:"gre_tunnels"`
	JSON       greTunnelNewResponseJSON        `json:"-"`
}

func (*GRETunnelNewResponse) UnmarshalJSON

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

type GRETunnelNewResponseEnvelope

type GRETunnelNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   GRETunnelNewResponse  `json:"result,required"`
	// Whether the API call was successful
	Success GRETunnelNewResponseEnvelopeSuccess `json:"success,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 GRETunnelNewResponseGRETunnel

type GRETunnelNewResponseGRETunnel struct {
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint,required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint,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,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,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// 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 HealthCheck `json:"health_check"`
	// 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 greTunnelNewResponseGRETunnelJSON `json:"-"`
}

func (*GRETunnelNewResponseGRETunnel) UnmarshalJSON

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

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) Delete

func (r *GRETunnelService) Delete(ctx context.Context, greTunnelID string, body 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, query 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 new GRE tunnels. 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,required"`
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint param.Field[string] `json:"cloudflare_gre_endpoint,required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint param.Field[string] `json:"customer_gre_endpoint,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,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,required"`
	// An optional description of the GRE tunnel.
	Description param.Field[string]           `json:"description"`
	HealthCheck param.Field[HealthCheckParam] `json:"health_check"`
	// 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"`
}

func (GRETunnelUpdateParams) MarshalJSON

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

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,required"`
	Messages []shared.ResponseInfo   `json:"messages,required"`
	Result   GRETunnelUpdateResponse `json:"result,required"`
	// Whether the API call was successful
	Success GRETunnelUpdateResponseEnvelopeSuccess `json:"success,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 {
	// The IP address assigned to the Cloudflare side of the GRE tunnel.
	CloudflareGREEndpoint string `json:"cloudflare_gre_endpoint,required"`
	// The IP address assigned to the customer side of the GRE tunnel.
	CustomerGREEndpoint string `json:"customer_gre_endpoint,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,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,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// 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 HealthCheck `json:"health_check"`
	// 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 HealthCheck

type HealthCheck 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. Note in the case of bidirecitonal healthchecks, the target field
	// in health_check is ignored as the interface_address is used to send traffic into
	// the tunnel.
	Direction HealthCheckDirection `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.
	Target string `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType `json:"type"`
	JSON healthCheckJSON `json:"-"`
}

func (*HealthCheck) UnmarshalJSON

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

type HealthCheckDirection

type HealthCheckDirection 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. Note in the case of bidirecitonal healthchecks, the target field in health_check is ignored as the interface_address is used to send traffic into the tunnel.

const (
	HealthCheckDirectionUnidirectional HealthCheckDirection = "unidirectional"
	HealthCheckDirectionBidirectional  HealthCheckDirection = "bidirectional"
)

func (HealthCheckDirection) IsKnown

func (r HealthCheckDirection) IsKnown() bool

type HealthCheckParam

type HealthCheckParam 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. Note in the case of bidirecitonal healthchecks, the target field
	// in health_check is ignored as the interface_address is used to send traffic into
	// the tunnel.
	Direction param.Field[HealthCheckDirection] `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.
	Target param.Field[string] `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type param.Field[HealthCheckType] `json:"type"`
}

func (HealthCheckParam) MarshalJSON

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

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 IPSECTunnelDeleteParams

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

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 {
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint,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,required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// 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"`
	// 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"`
	TunnelHealthCheck IPSECTunnelDeleteResponseDeletedIPSECTunnelTunnelHealthCheck `json:"tunnel_health_check"`
	JSON              ipsecTunnelDeleteResponseDeletedIPSECTunnelJSON              `json:"-"`
}

func (*IPSECTunnelDeleteResponseDeletedIPSECTunnel) UnmarshalJSON

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

type IPSECTunnelDeleteResponseDeletedIPSECTunnelTunnelHealthCheck

type IPSECTunnelDeleteResponseDeletedIPSECTunnelTunnelHealthCheck struct {
	// 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`.
	Target string `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                                  `json:"type"`
	JSON ipsecTunnelDeleteResponseDeletedIPSECTunnelTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelDeleteResponseDeletedIPSECTunnelTunnelHealthCheck) UnmarshalJSON

type IPSECTunnelDeleteResponseEnvelope

type IPSECTunnelDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo     `json:"errors,required"`
	Messages []shared.ResponseInfo     `json:"messages,required"`
	Result   IPSECTunnelDeleteResponse `json:"result,required"`
	// Whether the API call was successful
	Success IPSECTunnelDeleteResponseEnvelopeSuccess `json:"success,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,required"`
}

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,required"`
	Messages []shared.ResponseInfo  `json:"messages,required"`
	Result   IPSECTunnelGetResponse `json:"result,required"`
	// Whether the API call was successful
	Success IPSECTunnelGetResponseEnvelopeSuccess `json:"success,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 {
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint,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,required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// 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"`
	// 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"`
	TunnelHealthCheck IPSECTunnelGetResponseIPSECTunnelTunnelHealthCheck `json:"tunnel_health_check"`
	JSON              ipsecTunnelGetResponseIPSECTunnelJSON              `json:"-"`
}

func (*IPSECTunnelGetResponseIPSECTunnel) UnmarshalJSON

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

type IPSECTunnelGetResponseIPSECTunnelTunnelHealthCheck

type IPSECTunnelGetResponseIPSECTunnelTunnelHealthCheck struct {
	// 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`.
	Target string `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                        `json:"type"`
	JSON ipsecTunnelGetResponseIPSECTunnelTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelGetResponseIPSECTunnelTunnelHealthCheck) UnmarshalJSON

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

type IPSECTunnelListParams

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

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,required"`
	Messages []shared.ResponseInfo   `json:"messages,required"`
	Result   IPSECTunnelListResponse `json:"result,required"`
	// Whether the API call was successful
	Success IPSECTunnelListResponseEnvelopeSuccess `json:"success,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 {
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint,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,required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// 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"`
	// 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"`
	TunnelHealthCheck IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheck `json:"tunnel_health_check"`
	JSON              ipsecTunnelListResponseIPSECTunnelJSON               `json:"-"`
}

func (*IPSECTunnelListResponseIPSECTunnel) UnmarshalJSON

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

type IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheck

type IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheck struct {
	// 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`.
	Target string `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                          `json:"type"`
	JSON ipsecTunnelListResponseIPSECTunnelsTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheck) UnmarshalJSON

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

type IPSECTunnelNewParams

type IPSECTunnelNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint param.Field[string] `json:"cloudflare_endpoint,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,required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name param.Field[string] `json:"name,required"`
	// 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[HealthCheckParam] `json:"health_check"`
	// 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"`
}

func (IPSECTunnelNewParams) MarshalJSON

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

type IPSECTunnelNewResponse

type IPSECTunnelNewResponse struct {
	IPSECTunnels []IPSECTunnelNewResponseIPSECTunnel `json:"ipsec_tunnels"`
	JSON         ipsecTunnelNewResponseJSON          `json:"-"`
}

func (*IPSECTunnelNewResponse) UnmarshalJSON

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

type IPSECTunnelNewResponseEnvelope

type IPSECTunnelNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo  `json:"errors,required"`
	Messages []shared.ResponseInfo  `json:"messages,required"`
	Result   IPSECTunnelNewResponse `json:"result,required"`
	// Whether the API call was successful
	Success IPSECTunnelNewResponseEnvelopeSuccess `json:"success,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 IPSECTunnelNewResponseIPSECTunnel

type IPSECTunnelNewResponseIPSECTunnel struct {
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint,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,required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// 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"`
	// 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"`
	TunnelHealthCheck IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheck `json:"tunnel_health_check"`
	JSON              ipsecTunnelNewResponseIPSECTunnelJSON               `json:"-"`
}

func (*IPSECTunnelNewResponseIPSECTunnel) UnmarshalJSON

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

type IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheck

type IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheck struct {
	// 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`.
	Target string `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                         `json:"type"`
	JSON ipsecTunnelNewResponseIPSECTunnelsTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheck) UnmarshalJSON

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

type IPSECTunnelPSKGenerateParams

type IPSECTunnelPSKGenerateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (IPSECTunnelPSKGenerateParams) MarshalJSON

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

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,required"`
	Messages []shared.ResponseInfo          `json:"messages,required"`
	Result   IPSECTunnelPSKGenerateResponse `json:"result,required"`
	// Whether the API call was successful
	Success IPSECTunnelPSKGenerateResponseEnvelopeSuccess `json:"success,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 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) Delete

func (r *IPSECTunnelService) Delete(ctx context.Context, ipsecTunnelID string, body 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, query 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 new IPsec tunnels associated with an account. Use `?validate_only=true` as an optional query parameter to only run validation without persisting changes.

func (*IPSECTunnelService) PSKGenerate

func (r *IPSECTunnelService) PSKGenerate(ctx context.Context, ipsecTunnelID string, params IPSECTunnelPSKGenerateParams, opts ...option.RequestOption) (res *IPSECTunnelPSKGenerateResponse, err error)

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. Note the PSK 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,required"`
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint param.Field[string] `json:"cloudflare_endpoint,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,required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name param.Field[string] `json:"name,required"`
	// 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[HealthCheckParam] `json:"health_check"`
	// 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"`
}

func (IPSECTunnelUpdateParams) MarshalJSON

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

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,required"`
	Messages []shared.ResponseInfo     `json:"messages,required"`
	Result   IPSECTunnelUpdateResponse `json:"result,required"`
	// Whether the API call was successful
	Success IPSECTunnelUpdateResponseEnvelopeSuccess `json:"success,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 {
	// The IP address assigned to the Cloudflare side of the IPsec tunnel.
	CloudflareEndpoint string `json:"cloudflare_endpoint,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,required"`
	// The name of the IPsec tunnel. The name cannot share a name with other tunnels.
	Name string `json:"name,required"`
	// Tunnel identifier tag.
	ID string `json:"id"`
	// When `true`, the tunnel can use a null-cipher (`ENCR_NULL`) in the ESP tunnel
	// (Phase 2).
	AllowNullCipher bool `json:"allow_null_cipher"`
	// The date and time the tunnel was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// 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"`
	// 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"`
	TunnelHealthCheck IPSECTunnelUpdateResponseModifiedIPSECTunnelTunnelHealthCheck `json:"tunnel_health_check"`
	JSON              ipsecTunnelUpdateResponseModifiedIPSECTunnelJSON              `json:"-"`
}

func (*IPSECTunnelUpdateResponseModifiedIPSECTunnel) UnmarshalJSON

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

type IPSECTunnelUpdateResponseModifiedIPSECTunnelTunnelHealthCheck

type IPSECTunnelUpdateResponseModifiedIPSECTunnelTunnelHealthCheck struct {
	// 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`.
	Target string `json:"target"`
	// The type of healthcheck to run, reply or request. The default value is `reply`.
	Type HealthCheckType                                                   `json:"type"`
	JSON ipsecTunnelUpdateResponseModifiedIPSECTunnelTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelUpdateResponseModifiedIPSECTunnelTunnelHealthCheck) UnmarshalJSON

type LAN

type LAN struct {
	// Identifier
	ID string `json:"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"`
	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 port number.
	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,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,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
	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 MemberParam

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

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 MemberUserParam

type MemberUserParam = shared.MemberUserParam

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,required"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf string `json:"destination_conf,required"`
	// The ownership challenge filename stored in the bucket.
	Filename string `json:"filename,required"`
	// The status of the ownership challenge. Can be pending, success or failed.
	Status OwnershipStatus `json:"status,required"`
	// The RFC 3339 timestamp when the bucket was added to packet captures API.
	Submitted string `json:"submitted,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 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,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,required"`
}

type PCAPGetResponse

type PCAPGetResponse struct {
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The ID for the packet capture.
	ID string `json:"id"`
	// The status of the packet capture request.
	Status PCAPGetResponseStatus `json:"status"`
	// 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"`
	// 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"`
	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 magic_transit.PCAP, magic_transit.PCAPGetResponseMagicVisibilityPCAPsResponseFull.

func (*PCAPGetResponse) UnmarshalJSON

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

type PCAPGetResponseEnvelope

type PCAPGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   PCAPGetResponse       `json:"result,required"`
	// Whether the API call was successful
	Success PCAPGetResponseEnvelopeSuccess `json:"success,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 PCAPGetResponseMagicVisibilityPCAPsResponseFull

type PCAPGetResponseMagicVisibilityPCAPsResponseFull 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 status of the packet capture request.
	Status PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus `json:"status"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPGetResponseMagicVisibilityPCAPsResponseFullSystem `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 PCAPGetResponseMagicVisibilityPCAPsResponseFullType `json:"type"`
	JSON pcapGetResponseMagicVisibilityPCAPsResponseFullJSON `json:"-"`
}

func (*PCAPGetResponseMagicVisibilityPCAPsResponseFull) UnmarshalJSON

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

type PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus

type PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus string

The status of the packet capture request.

const (
	PCAPGetResponseMagicVisibilityPCAPsResponseFullStatusUnknown           PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus = "unknown"
	PCAPGetResponseMagicVisibilityPCAPsResponseFullStatusSuccess           PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus = "success"
	PCAPGetResponseMagicVisibilityPCAPsResponseFullStatusPending           PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus = "pending"
	PCAPGetResponseMagicVisibilityPCAPsResponseFullStatusRunning           PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus = "running"
	PCAPGetResponseMagicVisibilityPCAPsResponseFullStatusConversionPending PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus = "conversion_pending"
	PCAPGetResponseMagicVisibilityPCAPsResponseFullStatusConversionRunning PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus = "conversion_running"
	PCAPGetResponseMagicVisibilityPCAPsResponseFullStatusComplete          PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus = "complete"
	PCAPGetResponseMagicVisibilityPCAPsResponseFullStatusFailed            PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus = "failed"
)

func (PCAPGetResponseMagicVisibilityPCAPsResponseFullStatus) IsKnown

type PCAPGetResponseMagicVisibilityPCAPsResponseFullSystem

type PCAPGetResponseMagicVisibilityPCAPsResponseFullSystem string

The system used to collect packet captures.

const (
	PCAPGetResponseMagicVisibilityPCAPsResponseFullSystemMagicTransit PCAPGetResponseMagicVisibilityPCAPsResponseFullSystem = "magic-transit"
)

func (PCAPGetResponseMagicVisibilityPCAPsResponseFullSystem) IsKnown

type PCAPGetResponseMagicVisibilityPCAPsResponseFullType

type PCAPGetResponseMagicVisibilityPCAPsResponseFullType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPGetResponseMagicVisibilityPCAPsResponseFullTypeSimple PCAPGetResponseMagicVisibilityPCAPsResponseFullType = "simple"
	PCAPGetResponseMagicVisibilityPCAPsResponseFullTypeFull   PCAPGetResponseMagicVisibilityPCAPsResponseFullType = "full"
)

func (PCAPGetResponseMagicVisibilityPCAPsResponseFullType) 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 magic_transit.PCAP or magic_transit.PCAPGetResponseMagicVisibilityPCAPsResponseFull.

type PCAPListParams

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

type PCAPListResponse

type PCAPListResponse struct {
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The ID for the packet capture.
	ID string `json:"id"`
	// The status of the packet capture request.
	Status PCAPListResponseStatus `json:"status"`
	// 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"`
	// 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"`
	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 magic_transit.PCAP, magic_transit.PCAPListResponseMagicVisibilityPCAPsResponseFull.

func (*PCAPListResponse) UnmarshalJSON

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

type PCAPListResponseMagicVisibilityPCAPsResponseFull

type PCAPListResponseMagicVisibilityPCAPsResponseFull 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 status of the packet capture request.
	Status PCAPListResponseMagicVisibilityPCAPsResponseFullStatus `json:"status"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPListResponseMagicVisibilityPCAPsResponseFullSystem `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 PCAPListResponseMagicVisibilityPCAPsResponseFullType `json:"type"`
	JSON pcapListResponseMagicVisibilityPCAPsResponseFullJSON `json:"-"`
}

func (*PCAPListResponseMagicVisibilityPCAPsResponseFull) UnmarshalJSON

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

type PCAPListResponseMagicVisibilityPCAPsResponseFullStatus

type PCAPListResponseMagicVisibilityPCAPsResponseFullStatus string

The status of the packet capture request.

const (
	PCAPListResponseMagicVisibilityPCAPsResponseFullStatusUnknown           PCAPListResponseMagicVisibilityPCAPsResponseFullStatus = "unknown"
	PCAPListResponseMagicVisibilityPCAPsResponseFullStatusSuccess           PCAPListResponseMagicVisibilityPCAPsResponseFullStatus = "success"
	PCAPListResponseMagicVisibilityPCAPsResponseFullStatusPending           PCAPListResponseMagicVisibilityPCAPsResponseFullStatus = "pending"
	PCAPListResponseMagicVisibilityPCAPsResponseFullStatusRunning           PCAPListResponseMagicVisibilityPCAPsResponseFullStatus = "running"
	PCAPListResponseMagicVisibilityPCAPsResponseFullStatusConversionPending PCAPListResponseMagicVisibilityPCAPsResponseFullStatus = "conversion_pending"
	PCAPListResponseMagicVisibilityPCAPsResponseFullStatusConversionRunning PCAPListResponseMagicVisibilityPCAPsResponseFullStatus = "conversion_running"
	PCAPListResponseMagicVisibilityPCAPsResponseFullStatusComplete          PCAPListResponseMagicVisibilityPCAPsResponseFullStatus = "complete"
	PCAPListResponseMagicVisibilityPCAPsResponseFullStatusFailed            PCAPListResponseMagicVisibilityPCAPsResponseFullStatus = "failed"
)

func (PCAPListResponseMagicVisibilityPCAPsResponseFullStatus) IsKnown

type PCAPListResponseMagicVisibilityPCAPsResponseFullSystem

type PCAPListResponseMagicVisibilityPCAPsResponseFullSystem string

The system used to collect packet captures.

const (
	PCAPListResponseMagicVisibilityPCAPsResponseFullSystemMagicTransit PCAPListResponseMagicVisibilityPCAPsResponseFullSystem = "magic-transit"
)

func (PCAPListResponseMagicVisibilityPCAPsResponseFullSystem) IsKnown

type PCAPListResponseMagicVisibilityPCAPsResponseFullType

type PCAPListResponseMagicVisibilityPCAPsResponseFullType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPListResponseMagicVisibilityPCAPsResponseFullTypeSimple PCAPListResponseMagicVisibilityPCAPsResponseFullType = "simple"
	PCAPListResponseMagicVisibilityPCAPsResponseFullTypeFull   PCAPListResponseMagicVisibilityPCAPsResponseFullType = "full"
)

func (PCAPListResponseMagicVisibilityPCAPsResponseFullType) 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 magic_transit.PCAP or magic_transit.PCAPListResponseMagicVisibilityPCAPsResponseFull.

type PCAPNewParams

type PCAPNewParams struct {
	// Identifier
	AccountID param.Field[string]    `path:"account_id,required"`
	Body      PCAPNewParamsBodyUnion `json:"body,required"`
}

func (PCAPNewParams) MarshalJSON

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

type PCAPNewParamsBody

type PCAPNewParamsBody struct {
	// 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"`
	// The system used to collect packet captures.
	System param.Field[PCAPNewParamsBodySystem] `json:"system,required"`
	// The packet capture duration in seconds.
	TimeLimit param.Field[float64] `json:"time_limit,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,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"`
}

func (PCAPNewParamsBody) MarshalJSON

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

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestFull

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestFull 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,required"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf param.Field[string] `json:"destination_conf,required"`
	// The system used to collect packet captures.
	System param.Field[PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullSystem] `json:"system,required"`
	// The packet capture duration in seconds.
	TimeLimit param.Field[float64] `json:"time_limit,required"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type param.Field[PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullType] `json:"type,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 (PCAPNewParamsBodyMagicVisibilityPCAPsRequestFull) MarshalJSON

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

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullSystem

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullSystem string

The system used to collect packet captures.

const (
	PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullSystemMagicTransit PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullSystem = "magic-transit"
)

func (PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullSystem) IsKnown

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullType

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullTypeSimple PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullType = "simple"
	PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullTypeFull   PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullType = "full"
)

func (PCAPNewParamsBodyMagicVisibilityPCAPsRequestFullType) IsKnown

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimple

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimple struct {
	// The limit of packets contained in a packet capture.
	PacketLimit param.Field[float64] `json:"packet_limit,required"`
	// The system used to collect packet captures.
	System param.Field[PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleSystem] `json:"system,required"`
	// The packet capture duration in seconds.
	TimeLimit param.Field[float64] `json:"time_limit,required"`
	// The type of packet capture. `Simple` captures sampled packets, and `full`
	// captures entire payloads and non-sampled packets.
	Type param.Field[PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleType] `json:"type,required"`
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 param.Field[PCAPFilterParam] `json:"filter_v1"`
}

func (PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimple) MarshalJSON

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

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleSystem

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleSystem string

The system used to collect packet captures.

const (
	PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleSystemMagicTransit PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleSystem = "magic-transit"
)

func (PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleSystem) IsKnown

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleType

type PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleTypeSimple PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleType = "simple"
	PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleTypeFull   PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleType = "full"
)

func (PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimpleType) 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 PCAPNewParamsBodyUnion

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

Satisfied by magic_transit.PCAPNewParamsBodyMagicVisibilityPCAPsRequestSimple, magic_transit.PCAPNewParamsBodyMagicVisibilityPCAPsRequestFull, PCAPNewParamsBody.

type PCAPNewResponse

type PCAPNewResponse struct {
	// The packet capture filter. When this field is empty, all packets are captured.
	FilterV1 PCAPFilter `json:"filter_v1"`
	// The ID for the packet capture.
	ID string `json:"id"`
	// The status of the packet capture request.
	Status PCAPNewResponseStatus `json:"status"`
	// 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"`
	// 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"`
	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 magic_transit.PCAP, magic_transit.PCAPNewResponseMagicVisibilityPCAPsResponseFull.

func (*PCAPNewResponse) UnmarshalJSON

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

type PCAPNewResponseEnvelope

type PCAPNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   PCAPNewResponse       `json:"result,required"`
	// Whether the API call was successful
	Success PCAPNewResponseEnvelopeSuccess `json:"success,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 PCAPNewResponseMagicVisibilityPCAPsResponseFull

type PCAPNewResponseMagicVisibilityPCAPsResponseFull 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 status of the packet capture request.
	Status PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus `json:"status"`
	// The RFC 3339 timestamp when the packet capture was created.
	Submitted string `json:"submitted"`
	// The system used to collect packet captures.
	System PCAPNewResponseMagicVisibilityPCAPsResponseFullSystem `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 PCAPNewResponseMagicVisibilityPCAPsResponseFullType `json:"type"`
	JSON pcapNewResponseMagicVisibilityPCAPsResponseFullJSON `json:"-"`
}

func (*PCAPNewResponseMagicVisibilityPCAPsResponseFull) UnmarshalJSON

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

type PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus

type PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus string

The status of the packet capture request.

const (
	PCAPNewResponseMagicVisibilityPCAPsResponseFullStatusUnknown           PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus = "unknown"
	PCAPNewResponseMagicVisibilityPCAPsResponseFullStatusSuccess           PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus = "success"
	PCAPNewResponseMagicVisibilityPCAPsResponseFullStatusPending           PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus = "pending"
	PCAPNewResponseMagicVisibilityPCAPsResponseFullStatusRunning           PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus = "running"
	PCAPNewResponseMagicVisibilityPCAPsResponseFullStatusConversionPending PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus = "conversion_pending"
	PCAPNewResponseMagicVisibilityPCAPsResponseFullStatusConversionRunning PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus = "conversion_running"
	PCAPNewResponseMagicVisibilityPCAPsResponseFullStatusComplete          PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus = "complete"
	PCAPNewResponseMagicVisibilityPCAPsResponseFullStatusFailed            PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus = "failed"
)

func (PCAPNewResponseMagicVisibilityPCAPsResponseFullStatus) IsKnown

type PCAPNewResponseMagicVisibilityPCAPsResponseFullSystem

type PCAPNewResponseMagicVisibilityPCAPsResponseFullSystem string

The system used to collect packet captures.

const (
	PCAPNewResponseMagicVisibilityPCAPsResponseFullSystemMagicTransit PCAPNewResponseMagicVisibilityPCAPsResponseFullSystem = "magic-transit"
)

func (PCAPNewResponseMagicVisibilityPCAPsResponseFullSystem) IsKnown

type PCAPNewResponseMagicVisibilityPCAPsResponseFullType

type PCAPNewResponseMagicVisibilityPCAPsResponseFullType string

The type of packet capture. `Simple` captures sampled packets, and `full` captures entire payloads and non-sampled packets.

const (
	PCAPNewResponseMagicVisibilityPCAPsResponseFullTypeSimple PCAPNewResponseMagicVisibilityPCAPsResponseFullType = "simple"
	PCAPNewResponseMagicVisibilityPCAPsResponseFullTypeFull   PCAPNewResponseMagicVisibilityPCAPsResponseFullType = "full"
)

func (PCAPNewResponseMagicVisibilityPCAPsResponseFullType) 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 magic_transit.PCAP or magic_transit.PCAPNewResponseMagicVisibilityPCAPsResponseFull.

type PCAPOwnershipDeleteParams

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

type PCAPOwnershipGetParams

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

type PCAPOwnershipGetResponseEnvelope

type PCAPOwnershipGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   []Ownership           `json:"result,required,nullable"`
	// Whether the API call was successful
	Success    PCAPOwnershipGetResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo PCAPOwnershipGetResponseEnvelopeResultInfo `json:"result_info"`
	JSON       pcapOwnershipGetResponseEnvelopeJSON       `json:"-"`
}

func (*PCAPOwnershipGetResponseEnvelope) UnmarshalJSON

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

type PCAPOwnershipGetResponseEnvelopeResultInfo

type PCAPOwnershipGetResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service
	Count float64 `json:"count"`
	// Current page within paginated list of results
	Page float64 `json:"page"`
	// Number of results per page of results
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters
	TotalCount float64                                        `json:"total_count"`
	JSON       pcapOwnershipGetResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*PCAPOwnershipGetResponseEnvelopeResultInfo) UnmarshalJSON

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

type PCAPOwnershipGetResponseEnvelopeSuccess

type PCAPOwnershipGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PCAPOwnershipGetResponseEnvelopeSuccessTrue PCAPOwnershipGetResponseEnvelopeSuccess = true
)

func (PCAPOwnershipGetResponseEnvelopeSuccess) IsKnown

type PCAPOwnershipNewParams

type PCAPOwnershipNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf param.Field[string] `json:"destination_conf,required"`
}

func (PCAPOwnershipNewParams) MarshalJSON

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

type PCAPOwnershipNewResponseEnvelope

type PCAPOwnershipNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Ownership             `json:"result,required"`
	// Whether the API call was successful
	Success PCAPOwnershipNewResponseEnvelopeSuccess `json:"success,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) 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,required"`
	// The full URI for the bucket. This field only applies to `full` packet captures.
	DestinationConf param.Field[string] `json:"destination_conf,required"`
	// The ownership challenge filename stored in the bucket.
	OwnershipChallenge param.Field[string] `json:"ownership_challenge,required"`
}

func (PCAPOwnershipValidateParams) MarshalJSON

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

type PCAPOwnershipValidateResponseEnvelope

type PCAPOwnershipValidateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Ownership             `json:"result,required"`
	// Whether the API call was successful
	Success PCAPOwnershipValidateResponseEnvelopeSuccess `json:"success,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.

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 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 RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

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 Role

type Role = shared.Role

This is an alias to an internal type.

type RouteDeleteParams

type RouteDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,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 {
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix,required"`
	// Priority of the static route.
	Priority int64 `json:"priority,required"`
	// Identifier
	ID string `json:"id"`
	// 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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   RouteDeleteResponse   `json:"result,required"`
	// Whether the API call was successful
	Success RouteDeleteResponseEnvelopeSuccess `json:"success,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,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 {
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix,required"`
	// Priority of the static route.
	Priority int64 `json:"priority,required"`
	// Identifier
	ID string `json:"id"`
	// 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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   RouteEmptyResponse    `json:"result,required"`
	// Whether the API call was successful
	Success RouteEmptyResponseEnvelopeSuccess `json:"success,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,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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   RouteGetResponse      `json:"result,required"`
	// Whether the API call was successful
	Success RouteGetResponseEnvelopeSuccess `json:"success,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 {
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix,required"`
	// Priority of the static route.
	Priority int64 `json:"priority,required"`
	// Identifier
	ID string `json:"id"`
	// 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,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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   RouteListResponse     `json:"result,required"`
	// Whether the API call was successful
	Success RouteListResponseEnvelopeSuccess `json:"success,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 {
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix,required"`
	// Priority of the static route.
	Priority int64 `json:"priority,required"`
	// Identifier
	ID string `json:"id"`
	// 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,required"`
	Body      interface{}         `json:"body,required"`
}

func (RouteNewParams) MarshalJSON

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

type RouteNewResponse

type RouteNewResponse struct {
	Routes []RouteNewResponseRoute `json:"routes"`
	JSON   routeNewResponseJSON    `json:"-"`
}

func (*RouteNewResponse) UnmarshalJSON

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

type RouteNewResponseEnvelope

type RouteNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   RouteNewResponse      `json:"result,required"`
	// Whether the API call was successful
	Success RouteNewResponseEnvelopeSuccess `json:"success,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 RouteNewResponseRoute

type RouteNewResponseRoute struct {
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix,required"`
	// Priority of the static route.
	Priority int64 `json:"priority,required"`
	// Identifier
	ID string `json:"id"`
	// 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   routeNewResponseRouteJSON `json:"-"`
}

func (*RouteNewResponseRoute) UnmarshalJSON

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

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) 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,required"`
	// The next-hop IP Address for the static route.
	Nexthop param.Field[string] `json:"nexthop,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix param.Field[string] `json:"prefix,required"`
	// Priority of the static route.
	Priority param.Field[int64] `json:"priority,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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   RouteUpdateResponse   `json:"result,required"`
	// Whether the API call was successful
	Success RouteUpdateResponseEnvelopeSuccess `json:"success,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 {
	// The next-hop IP Address for the static route.
	Nexthop string `json:"nexthop,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	Prefix string `json:"prefix,required"`
	// Priority of the static route.
	Priority int64 `json:"priority,required"`
	// Identifier
	ID string `json:"id"`
	// 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,required"`
	// A valid CIDR notation representing an IP range.
	Prefix string           `json:"prefix,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,required"`
	// A valid CIDR notation representing an IP range.
	Prefix param.Field[string]   `json:"prefix,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,required"`
}

type SiteACLDeleteResponseEnvelope

type SiteACLDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result,required"`
	// Whether the API call was successful
	Success SiteACLDeleteResponseEnvelopeSuccess `json:"success,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,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"`
}

func (SiteACLEditParams) MarshalJSON

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

type SiteACLEditResponseEnvelope

type SiteACLEditResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result,required"`
	// Whether the API call was successful
	Success SiteACLEditResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteACLGetResponseEnvelope

type SiteACLGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result,required"`
	// Whether the API call was successful
	Success SiteACLGetResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteACLNewParams

type SiteACLNewParams struct {
	// Identifier
	AccountID param.Field[string]                `path:"account_id,required"`
	LAN1      param.Field[ACLConfigurationParam] `json:"lan_1,required"`
	LAN2      param.Field[ACLConfigurationParam] `json:"lan_2,required"`
	// The name of the ACL.
	Name param.Field[string] `json:"name,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"`
}

func (SiteACLNewParams) MarshalJSON

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

type SiteACLNewResponseEnvelope

type SiteACLNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result,required"`
	// Whether the API call was successful
	Success SiteACLNewResponseEnvelopeSuccess `json:"success,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,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"`
}

func (SiteACLUpdateParams) MarshalJSON

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

type SiteACLUpdateResponseEnvelope

type SiteACLUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Bidirectional ACL policy for network traffic within a site.
	Result ACL `json:"result,required"`
	// Whether the API call was successful
	Success SiteACLUpdateResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteDeleteResponseEnvelope

type SiteDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Site                  `json:"result,required"`
	// Whether the API call was successful
	Success SiteDeleteResponseEnvelopeSuccess `json:"success,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,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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Site                  `json:"result,required"`
	// Whether the API call was successful
	Success SiteEditResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteGetResponseEnvelope

type SiteGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Site                  `json:"result,required"`
	// Whether the API call was successful
	Success SiteGetResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteLANDeleteResponseEnvelope

type SiteLANDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   LAN                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteLANDeleteResponseEnvelopeSuccess `json:"success,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,required"`
	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 port number.
	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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   LAN                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteLANEditResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteLANGetResponseEnvelope

type SiteLANGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   LAN                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteLANGetResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteLANNewParams

type SiteLANNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	Physport  param.Field[int64]  `json:"physport,required"`
	// VLAN port number.
	VlanTag param.Field[int64] `json:"vlan_tag,required"`
	// 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"`
	Name          param.Field[string]              `json:"name"`
	Nat           param.Field[NatParam]            `json:"nat"`
	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"`
}

func (SiteLANNewParams) MarshalJSON

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

type SiteLANNewResponseEnvelope

type SiteLANNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   []LAN                 `json:"result,required"`
	// Whether the API call was successful
	Success SiteLANNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    siteLANNewResponseEnvelopeJSON    `json:"-"`
}

func (*SiteLANNewResponseEnvelope) UnmarshalJSON

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

type SiteLANNewResponseEnvelopeSuccess

type SiteLANNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLANNewResponseEnvelopeSuccessTrue SiteLANNewResponseEnvelopeSuccess = true
)

func (SiteLANNewResponseEnvelopeSuccess) IsKnown

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 *[]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) 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,required"`
	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 port number.
	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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   LAN                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteLANUpdateResponseEnvelopeSuccess `json:"success,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,required"`
	// Identifier
	ConnectorIdentifier param.Field[string] `query:"connector_identifier"`
}

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,required"`
	// The name of the site.
	Name param.Field[string] `json:"name,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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Site                  `json:"result,required"`
	// Whether the API call was successful
	Success SiteNewResponseEnvelopeSuccess `json:"success,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, query 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 connector_identifier query param to return sites where connector_identifier matches either site.ConnectorID or site.SecondaryConnectorID.

func (*SiteService) ListAutoPaging

Lists Sites associated with an account. Use connector_identifier query param to return sites where connector_identifier 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,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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   Site                  `json:"result,required"`
	// Whether the API call was successful
	Success SiteUpdateResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteWANDeleteResponseEnvelope

type SiteWANDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   WAN                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteWANDeleteResponseEnvelopeSuccess `json:"success,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,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 port number.
	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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   WAN                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteWANEditResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteWANGetResponseEnvelope

type SiteWANGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   WAN                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteWANGetResponseEnvelopeSuccess `json:"success,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,required"`
}

type SiteWANNewParams

type SiteWANNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	Physport  param.Field[int64]  `json:"physport,required"`
	// VLAN port number.
	VlanTag  param.Field[int64]  `json:"vlan_tag,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"`
}

func (SiteWANNewParams) MarshalJSON

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

type SiteWANNewResponseEnvelope

type SiteWANNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   []WAN                 `json:"result,required"`
	// Whether the API call was successful
	Success SiteWANNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    siteWANNewResponseEnvelopeJSON    `json:"-"`
}

func (*SiteWANNewResponseEnvelope) UnmarshalJSON

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

type SiteWANNewResponseEnvelopeSuccess

type SiteWANNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWANNewResponseEnvelopeSuccessTrue SiteWANNewResponseEnvelopeSuccess = true
)

func (SiteWANNewResponseEnvelopeSuccess) IsKnown

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 *[]WAN, err error)

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,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 port number.
	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,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   WAN                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteWANUpdateResponseEnvelopeSuccess `json:"success,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 WAN

type WAN struct {
	// Identifier
	ID       string `json:"id"`
	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 port number.
	VlanTag int64   `json:"vlan_tag"`
	JSON    wanJSON `json:"-"`
}

func (*WAN) UnmarshalJSON

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

type WANStaticAddressing

type WANStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address string `json:"address,required"`
	// A valid IPv4 address.
	GatewayAddress string `json:"gateway_address,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,required"`
	// A valid IPv4 address.
	GatewayAddress param.Field[string] `json:"gateway_address,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