magic_transit

package
v2.0.0-beta.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CfInterconnectGetResponse

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

func (*CfInterconnectGetResponse) UnmarshalJSON

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

type CfInterconnectGetResponseEnvelope

type CfInterconnectGetResponseEnvelope struct {
	Errors   []CfInterconnectGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []CfInterconnectGetResponseEnvelopeMessages `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 CfInterconnectGetResponseEnvelopeErrors

type CfInterconnectGetResponseEnvelopeErrors struct {
	Code    int64                                       `json:"code,required"`
	Message string                                      `json:"message,required"`
	JSON    cfInterconnectGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*CfInterconnectGetResponseEnvelopeErrors) UnmarshalJSON

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

type CfInterconnectGetResponseEnvelopeMessages

type CfInterconnectGetResponseEnvelopeMessages struct {
	Code    int64                                         `json:"code,required"`
	Message string                                        `json:"message,required"`
	JSON    cfInterconnectGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*CfInterconnectGetResponseEnvelopeMessages) UnmarshalJSON

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

type CfInterconnectGetResponseEnvelopeSuccess

type CfInterconnectGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CfInterconnectGetResponseEnvelopeSuccessTrue CfInterconnectGetResponseEnvelopeSuccess = true
)

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   []CfInterconnectListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []CfInterconnectListResponseEnvelopeMessages `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 CfInterconnectListResponseEnvelopeErrors

type CfInterconnectListResponseEnvelopeErrors struct {
	Code    int64                                        `json:"code,required"`
	Message string                                       `json:"message,required"`
	JSON    cfInterconnectListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*CfInterconnectListResponseEnvelopeErrors) UnmarshalJSON

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

type CfInterconnectListResponseEnvelopeMessages

type CfInterconnectListResponseEnvelopeMessages struct {
	Code    int64                                          `json:"code,required"`
	Message string                                         `json:"message,required"`
	JSON    cfInterconnectListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*CfInterconnectListResponseEnvelopeMessages) UnmarshalJSON

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

type CfInterconnectListResponseEnvelopeSuccess

type CfInterconnectListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CfInterconnectListResponseEnvelopeSuccessTrue CfInterconnectListResponseEnvelopeSuccess = true
)

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 CfInterconnectListResponseInterconnectsHealthCheckRate `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 CfInterconnectListResponseInterconnectsHealthCheckType `json:"type"`
	JSON cfInterconnectListResponseInterconnectsHealthCheckJSON `json:"-"`
}

func (*CfInterconnectListResponseInterconnectsHealthCheck) UnmarshalJSON

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

type CfInterconnectListResponseInterconnectsHealthCheckRate

type CfInterconnectListResponseInterconnectsHealthCheckRate string

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

const (
	CfInterconnectListResponseInterconnectsHealthCheckRateLow  CfInterconnectListResponseInterconnectsHealthCheckRate = "low"
	CfInterconnectListResponseInterconnectsHealthCheckRateMid  CfInterconnectListResponseInterconnectsHealthCheckRate = "mid"
	CfInterconnectListResponseInterconnectsHealthCheckRateHigh CfInterconnectListResponseInterconnectsHealthCheckRate = "high"
)

type CfInterconnectListResponseInterconnectsHealthCheckType

type CfInterconnectListResponseInterconnectsHealthCheckType string

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

const (
	CfInterconnectListResponseInterconnectsHealthCheckTypeReply   CfInterconnectListResponseInterconnectsHealthCheckType = "reply"
	CfInterconnectListResponseInterconnectsHealthCheckTypeRequest CfInterconnectListResponseInterconnectsHealthCheckType = "request"
)

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

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

Lists details for a specific interconnect.

func (*CfInterconnectService) List

func (r *CfInterconnectService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *CfInterconnectListResponse, err error)

Lists interconnects associated with an account.

func (*CfInterconnectService) Update

func (r *CfInterconnectService) Update(ctx context.Context, accountIdentifier string, tunnelIdentifier string, body CfInterconnectUpdateParams, opts ...option.RequestOption) (res *CfInterconnectUpdateResponse, err error)

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 {
	// 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[CfInterconnectUpdateParamsHealthCheckRate] `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[CfInterconnectUpdateParamsHealthCheckType] `json:"type"`
}

func (CfInterconnectUpdateParamsHealthCheck) MarshalJSON

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

type CfInterconnectUpdateParamsHealthCheckRate

type CfInterconnectUpdateParamsHealthCheckRate string

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

const (
	CfInterconnectUpdateParamsHealthCheckRateLow  CfInterconnectUpdateParamsHealthCheckRate = "low"
	CfInterconnectUpdateParamsHealthCheckRateMid  CfInterconnectUpdateParamsHealthCheckRate = "mid"
	CfInterconnectUpdateParamsHealthCheckRateHigh CfInterconnectUpdateParamsHealthCheckRate = "high"
)

type CfInterconnectUpdateParamsHealthCheckType

type CfInterconnectUpdateParamsHealthCheckType string

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

const (
	CfInterconnectUpdateParamsHealthCheckTypeReply   CfInterconnectUpdateParamsHealthCheckType = "reply"
	CfInterconnectUpdateParamsHealthCheckTypeRequest CfInterconnectUpdateParamsHealthCheckType = "request"
)

type CfInterconnectUpdateResponse

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

func (*CfInterconnectUpdateResponse) UnmarshalJSON

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

type CfInterconnectUpdateResponseEnvelope

type CfInterconnectUpdateResponseEnvelope struct {
	Errors   []CfInterconnectUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []CfInterconnectUpdateResponseEnvelopeMessages `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 CfInterconnectUpdateResponseEnvelopeErrors

type CfInterconnectUpdateResponseEnvelopeErrors struct {
	Code    int64                                          `json:"code,required"`
	Message string                                         `json:"message,required"`
	JSON    cfInterconnectUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*CfInterconnectUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type CfInterconnectUpdateResponseEnvelopeMessages

type CfInterconnectUpdateResponseEnvelopeMessages struct {
	Code    int64                                            `json:"code,required"`
	Message string                                           `json:"message,required"`
	JSON    cfInterconnectUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*CfInterconnectUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type CfInterconnectUpdateResponseEnvelopeSuccess

type CfInterconnectUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CfInterconnectUpdateResponseEnvelopeSuccessTrue CfInterconnectUpdateResponseEnvelopeSuccess = true
)

type Error

type Error = apierror.Error

type GRETunnelDeleteResponse

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

func (*GRETunnelDeleteResponse) UnmarshalJSON

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

type GRETunnelDeleteResponseEnvelope

type GRETunnelDeleteResponseEnvelope struct {
	Errors   []GRETunnelDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []GRETunnelDeleteResponseEnvelopeMessages `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 GRETunnelDeleteResponseEnvelopeErrors

type GRETunnelDeleteResponseEnvelopeErrors struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    greTunnelDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*GRETunnelDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type GRETunnelDeleteResponseEnvelopeMessages

type GRETunnelDeleteResponseEnvelopeMessages struct {
	Code    int64                                       `json:"code,required"`
	Message string                                      `json:"message,required"`
	JSON    greTunnelDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*GRETunnelDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type GRETunnelDeleteResponseEnvelopeSuccess

type GRETunnelDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelDeleteResponseEnvelopeSuccessTrue GRETunnelDeleteResponseEnvelopeSuccess = true
)

type GRETunnelGetResponse

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

func (*GRETunnelGetResponse) UnmarshalJSON

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

type GRETunnelGetResponseEnvelope

type GRETunnelGetResponseEnvelope struct {
	Errors   []GRETunnelGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []GRETunnelGetResponseEnvelopeMessages `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 GRETunnelGetResponseEnvelopeErrors

type GRETunnelGetResponseEnvelopeErrors struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    greTunnelGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*GRETunnelGetResponseEnvelopeErrors) UnmarshalJSON

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

type GRETunnelGetResponseEnvelopeMessages

type GRETunnelGetResponseEnvelopeMessages struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    greTunnelGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*GRETunnelGetResponseEnvelopeMessages) UnmarshalJSON

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

type GRETunnelGetResponseEnvelopeSuccess

type GRETunnelGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelGetResponseEnvelopeSuccessTrue GRETunnelGetResponseEnvelopeSuccess = true
)

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   []GRETunnelListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []GRETunnelListResponseEnvelopeMessages `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 GRETunnelListResponseEnvelopeErrors

type GRETunnelListResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    greTunnelListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*GRETunnelListResponseEnvelopeErrors) UnmarshalJSON

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

type GRETunnelListResponseEnvelopeMessages

type GRETunnelListResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    greTunnelListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*GRETunnelListResponseEnvelopeMessages) UnmarshalJSON

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

type GRETunnelListResponseEnvelopeSuccess

type GRETunnelListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelListResponseEnvelopeSuccessTrue GRETunnelListResponseEnvelopeSuccess = true
)

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 GRETunnelListResponseGRETunnelsHealthCheck `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 GRETunnelListResponseGRETunnelsHealthCheck

type GRETunnelListResponseGRETunnelsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel. 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 GRETunnelListResponseGRETunnelsHealthCheckDirection `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled bool `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate GRETunnelListResponseGRETunnelsHealthCheckRate `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 GRETunnelListResponseGRETunnelsHealthCheckType `json:"type"`
	JSON greTunnelListResponseGRETunnelsHealthCheckJSON `json:"-"`
}

func (*GRETunnelListResponseGRETunnelsHealthCheck) UnmarshalJSON

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

type GRETunnelListResponseGRETunnelsHealthCheckDirection

type GRETunnelListResponseGRETunnelsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. 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 (
	GRETunnelListResponseGRETunnelsHealthCheckDirectionUnidirectional GRETunnelListResponseGRETunnelsHealthCheckDirection = "unidirectional"
	GRETunnelListResponseGRETunnelsHealthCheckDirectionBidirectional  GRETunnelListResponseGRETunnelsHealthCheckDirection = "bidirectional"
)

type GRETunnelListResponseGRETunnelsHealthCheckRate

type GRETunnelListResponseGRETunnelsHealthCheckRate string

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

const (
	GRETunnelListResponseGRETunnelsHealthCheckRateLow  GRETunnelListResponseGRETunnelsHealthCheckRate = "low"
	GRETunnelListResponseGRETunnelsHealthCheckRateMid  GRETunnelListResponseGRETunnelsHealthCheckRate = "mid"
	GRETunnelListResponseGRETunnelsHealthCheckRateHigh GRETunnelListResponseGRETunnelsHealthCheckRate = "high"
)

type GRETunnelListResponseGRETunnelsHealthCheckType

type GRETunnelListResponseGRETunnelsHealthCheckType string

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

const (
	GRETunnelListResponseGRETunnelsHealthCheckTypeReply   GRETunnelListResponseGRETunnelsHealthCheckType = "reply"
	GRETunnelListResponseGRETunnelsHealthCheckTypeRequest GRETunnelListResponseGRETunnelsHealthCheckType = "request"
)

type GRETunnelNewParams

type GRETunnelNewParams struct {
	Body param.Field[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   []GRETunnelNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []GRETunnelNewResponseEnvelopeMessages `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 GRETunnelNewResponseEnvelopeErrors

type GRETunnelNewResponseEnvelopeErrors struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    greTunnelNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*GRETunnelNewResponseEnvelopeErrors) UnmarshalJSON

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

type GRETunnelNewResponseEnvelopeMessages

type GRETunnelNewResponseEnvelopeMessages struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    greTunnelNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*GRETunnelNewResponseEnvelopeMessages) UnmarshalJSON

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

type GRETunnelNewResponseEnvelopeSuccess

type GRETunnelNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelNewResponseEnvelopeSuccessTrue GRETunnelNewResponseEnvelopeSuccess = true
)

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 GRETunnelNewResponseGRETunnelsHealthCheck `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 GRETunnelNewResponseGRETunnelsHealthCheck

type GRETunnelNewResponseGRETunnelsHealthCheck 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 GRETunnelNewResponseGRETunnelsHealthCheckDirection `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 GRETunnelNewResponseGRETunnelsHealthCheckRate `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 GRETunnelNewResponseGRETunnelsHealthCheckType `json:"type"`
	JSON greTunnelNewResponseGRETunnelsHealthCheckJSON `json:"-"`
}

func (*GRETunnelNewResponseGRETunnelsHealthCheck) UnmarshalJSON

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

type GRETunnelNewResponseGRETunnelsHealthCheckDirection

type GRETunnelNewResponseGRETunnelsHealthCheckDirection 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 (
	GRETunnelNewResponseGRETunnelsHealthCheckDirectionUnidirectional GRETunnelNewResponseGRETunnelsHealthCheckDirection = "unidirectional"
	GRETunnelNewResponseGRETunnelsHealthCheckDirectionBidirectional  GRETunnelNewResponseGRETunnelsHealthCheckDirection = "bidirectional"
)

type GRETunnelNewResponseGRETunnelsHealthCheckRate

type GRETunnelNewResponseGRETunnelsHealthCheckRate string

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

const (
	GRETunnelNewResponseGRETunnelsHealthCheckRateLow  GRETunnelNewResponseGRETunnelsHealthCheckRate = "low"
	GRETunnelNewResponseGRETunnelsHealthCheckRateMid  GRETunnelNewResponseGRETunnelsHealthCheckRate = "mid"
	GRETunnelNewResponseGRETunnelsHealthCheckRateHigh GRETunnelNewResponseGRETunnelsHealthCheckRate = "high"
)

type GRETunnelNewResponseGRETunnelsHealthCheckType

type GRETunnelNewResponseGRETunnelsHealthCheckType string

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

const (
	GRETunnelNewResponseGRETunnelsHealthCheckTypeReply   GRETunnelNewResponseGRETunnelsHealthCheckType = "reply"
	GRETunnelNewResponseGRETunnelsHealthCheckTypeRequest GRETunnelNewResponseGRETunnelsHealthCheckType = "request"
)

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, accountIdentifier string, tunnelIdentifier string, 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, accountIdentifier string, tunnelIdentifier string, opts ...option.RequestOption) (res *GRETunnelGetResponse, err error)

Lists informtion for a specific GRE tunnel.

func (*GRETunnelService) List

func (r *GRETunnelService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *GRETunnelListResponse, err error)

Lists GRE tunnels associated with an account.

func (*GRETunnelService) New

func (r *GRETunnelService) New(ctx context.Context, accountIdentifier string, body GRETunnelNewParams, opts ...option.RequestOption) (res *GRETunnelNewResponse, err error)

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, accountIdentifier string, tunnelIdentifier string, body 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 {
	// 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[GRETunnelUpdateParamsHealthCheck] `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 GRETunnelUpdateParamsHealthCheck

type GRETunnelUpdateParamsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel. 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[GRETunnelUpdateParamsHealthCheckDirection] `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled param.Field[bool] `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate param.Field[GRETunnelUpdateParamsHealthCheckRate] `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[GRETunnelUpdateParamsHealthCheckType] `json:"type"`
}

func (GRETunnelUpdateParamsHealthCheck) MarshalJSON

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

type GRETunnelUpdateParamsHealthCheckDirection

type GRETunnelUpdateParamsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. 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 (
	GRETunnelUpdateParamsHealthCheckDirectionUnidirectional GRETunnelUpdateParamsHealthCheckDirection = "unidirectional"
	GRETunnelUpdateParamsHealthCheckDirectionBidirectional  GRETunnelUpdateParamsHealthCheckDirection = "bidirectional"
)

type GRETunnelUpdateParamsHealthCheckRate

type GRETunnelUpdateParamsHealthCheckRate string

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

const (
	GRETunnelUpdateParamsHealthCheckRateLow  GRETunnelUpdateParamsHealthCheckRate = "low"
	GRETunnelUpdateParamsHealthCheckRateMid  GRETunnelUpdateParamsHealthCheckRate = "mid"
	GRETunnelUpdateParamsHealthCheckRateHigh GRETunnelUpdateParamsHealthCheckRate = "high"
)

type GRETunnelUpdateParamsHealthCheckType

type GRETunnelUpdateParamsHealthCheckType string

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

const (
	GRETunnelUpdateParamsHealthCheckTypeReply   GRETunnelUpdateParamsHealthCheckType = "reply"
	GRETunnelUpdateParamsHealthCheckTypeRequest GRETunnelUpdateParamsHealthCheckType = "request"
)

type GRETunnelUpdateResponse

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

func (*GRETunnelUpdateResponse) UnmarshalJSON

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

type GRETunnelUpdateResponseEnvelope

type GRETunnelUpdateResponseEnvelope struct {
	Errors   []GRETunnelUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []GRETunnelUpdateResponseEnvelopeMessages `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 GRETunnelUpdateResponseEnvelopeErrors

type GRETunnelUpdateResponseEnvelopeErrors struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    greTunnelUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*GRETunnelUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type GRETunnelUpdateResponseEnvelopeMessages

type GRETunnelUpdateResponseEnvelopeMessages struct {
	Code    int64                                       `json:"code,required"`
	Message string                                      `json:"message,required"`
	JSON    greTunnelUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*GRETunnelUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type GRETunnelUpdateResponseEnvelopeSuccess

type GRETunnelUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	GRETunnelUpdateResponseEnvelopeSuccessTrue GRETunnelUpdateResponseEnvelopeSuccess = true
)

type IPSECTunnelDeleteResponse

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

func (*IPSECTunnelDeleteResponse) UnmarshalJSON

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

type IPSECTunnelDeleteResponseEnvelope

type IPSECTunnelDeleteResponseEnvelope struct {
	Errors   []IPSECTunnelDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []IPSECTunnelDeleteResponseEnvelopeMessages `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 IPSECTunnelDeleteResponseEnvelopeErrors

type IPSECTunnelDeleteResponseEnvelopeErrors struct {
	Code    int64                                       `json:"code,required"`
	Message string                                      `json:"message,required"`
	JSON    ipsecTunnelDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*IPSECTunnelDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type IPSECTunnelDeleteResponseEnvelopeMessages

type IPSECTunnelDeleteResponseEnvelopeMessages struct {
	Code    int64                                         `json:"code,required"`
	Message string                                        `json:"message,required"`
	JSON    ipsecTunnelDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*IPSECTunnelDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type IPSECTunnelDeleteResponseEnvelopeSuccess

type IPSECTunnelDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelDeleteResponseEnvelopeSuccessTrue IPSECTunnelDeleteResponseEnvelopeSuccess = true
)

type IPSECTunnelGetResponse

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

func (*IPSECTunnelGetResponse) UnmarshalJSON

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

type IPSECTunnelGetResponseEnvelope

type IPSECTunnelGetResponseEnvelope struct {
	Errors   []IPSECTunnelGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []IPSECTunnelGetResponseEnvelopeMessages `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 IPSECTunnelGetResponseEnvelopeErrors

type IPSECTunnelGetResponseEnvelopeErrors struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    ipsecTunnelGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*IPSECTunnelGetResponseEnvelopeErrors) UnmarshalJSON

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

type IPSECTunnelGetResponseEnvelopeMessages

type IPSECTunnelGetResponseEnvelopeMessages struct {
	Code    int64                                      `json:"code,required"`
	Message string                                     `json:"message,required"`
	JSON    ipsecTunnelGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*IPSECTunnelGetResponseEnvelopeMessages) UnmarshalJSON

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

type IPSECTunnelGetResponseEnvelopeSuccess

type IPSECTunnelGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelGetResponseEnvelopeSuccessTrue IPSECTunnelGetResponseEnvelopeSuccess = true
)

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   []IPSECTunnelListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []IPSECTunnelListResponseEnvelopeMessages `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 IPSECTunnelListResponseEnvelopeErrors

type IPSECTunnelListResponseEnvelopeErrors struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    ipsecTunnelListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*IPSECTunnelListResponseEnvelopeErrors) UnmarshalJSON

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

type IPSECTunnelListResponseEnvelopeMessages

type IPSECTunnelListResponseEnvelopeMessages struct {
	Code    int64                                       `json:"code,required"`
	Message string                                      `json:"message,required"`
	JSON    ipsecTunnelListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*IPSECTunnelListResponseEnvelopeMessages) UnmarshalJSON

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

type IPSECTunnelListResponseEnvelopeSuccess

type IPSECTunnelListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelListResponseEnvelopeSuccessTrue IPSECTunnelListResponseEnvelopeSuccess = true
)

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

type IPSECTunnelListResponseIPSECTunnelsPSKMetadata struct {
	// The date and time the tunnel was last modified.
	LastGeneratedOn time.Time                                          `json:"last_generated_on" format:"date-time"`
	JSON            ipsecTunnelListResponseIPSECTunnelsPSKMetadataJSON `json:"-"`
}

The PSK metadata that includes when the PSK was generated.

func (*IPSECTunnelListResponseIPSECTunnelsPSKMetadata) UnmarshalJSON

func (r *IPSECTunnelListResponseIPSECTunnelsPSKMetadata) 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 IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRate `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 IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckType `json:"type"`
	JSON ipsecTunnelListResponseIPSECTunnelsTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheck) UnmarshalJSON

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

type IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRate

type IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRate string

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

const (
	IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRateLow  IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRate = "low"
	IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRateMid  IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRate = "mid"
	IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRateHigh IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckRate = "high"
)

type IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckType

type IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckType string

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

const (
	IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckTypeReply   IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckType = "reply"
	IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckTypeRequest IPSECTunnelListResponseIPSECTunnelsTunnelHealthCheckType = "request"
)

type IPSECTunnelNewParams

type IPSECTunnelNewParams struct {
	// 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.
	CustomerEndpoint param.Field[string] `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description param.Field[string]                          `json:"description"`
	HealthCheck param.Field[IPSECTunnelNewParamsHealthCheck] `json:"health_check"`
	// A 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 IPSECTunnelNewParamsHealthCheck

type IPSECTunnelNewParamsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel. 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[IPSECTunnelNewParamsHealthCheckDirection] `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled param.Field[bool] `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate param.Field[IPSECTunnelNewParamsHealthCheckRate] `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[IPSECTunnelNewParamsHealthCheckType] `json:"type"`
}

func (IPSECTunnelNewParamsHealthCheck) MarshalJSON

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

type IPSECTunnelNewParamsHealthCheckDirection

type IPSECTunnelNewParamsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. 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 (
	IPSECTunnelNewParamsHealthCheckDirectionUnidirectional IPSECTunnelNewParamsHealthCheckDirection = "unidirectional"
	IPSECTunnelNewParamsHealthCheckDirectionBidirectional  IPSECTunnelNewParamsHealthCheckDirection = "bidirectional"
)

type IPSECTunnelNewParamsHealthCheckRate

type IPSECTunnelNewParamsHealthCheckRate string

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

const (
	IPSECTunnelNewParamsHealthCheckRateLow  IPSECTunnelNewParamsHealthCheckRate = "low"
	IPSECTunnelNewParamsHealthCheckRateMid  IPSECTunnelNewParamsHealthCheckRate = "mid"
	IPSECTunnelNewParamsHealthCheckRateHigh IPSECTunnelNewParamsHealthCheckRate = "high"
)

type IPSECTunnelNewParamsHealthCheckType

type IPSECTunnelNewParamsHealthCheckType string

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

const (
	IPSECTunnelNewParamsHealthCheckTypeReply   IPSECTunnelNewParamsHealthCheckType = "reply"
	IPSECTunnelNewParamsHealthCheckTypeRequest IPSECTunnelNewParamsHealthCheckType = "request"
)

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   []IPSECTunnelNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []IPSECTunnelNewResponseEnvelopeMessages `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 IPSECTunnelNewResponseEnvelopeErrors

type IPSECTunnelNewResponseEnvelopeErrors struct {
	Code    int64                                    `json:"code,required"`
	Message string                                   `json:"message,required"`
	JSON    ipsecTunnelNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*IPSECTunnelNewResponseEnvelopeErrors) UnmarshalJSON

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

type IPSECTunnelNewResponseEnvelopeMessages

type IPSECTunnelNewResponseEnvelopeMessages struct {
	Code    int64                                      `json:"code,required"`
	Message string                                     `json:"message,required"`
	JSON    ipsecTunnelNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*IPSECTunnelNewResponseEnvelopeMessages) UnmarshalJSON

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

type IPSECTunnelNewResponseEnvelopeSuccess

type IPSECTunnelNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelNewResponseEnvelopeSuccessTrue IPSECTunnelNewResponseEnvelopeSuccess = true
)

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

type IPSECTunnelNewResponseIPSECTunnelsPSKMetadata struct {
	// The date and time the tunnel was last modified.
	LastGeneratedOn time.Time                                         `json:"last_generated_on" format:"date-time"`
	JSON            ipsecTunnelNewResponseIPSECTunnelsPSKMetadataJSON `json:"-"`
}

The PSK metadata that includes when the PSK was generated.

func (*IPSECTunnelNewResponseIPSECTunnelsPSKMetadata) UnmarshalJSON

func (r *IPSECTunnelNewResponseIPSECTunnelsPSKMetadata) 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 IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRate `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 IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckType `json:"type"`
	JSON ipsecTunnelNewResponseIPSECTunnelsTunnelHealthCheckJSON `json:"-"`
}

func (*IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheck) UnmarshalJSON

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

type IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRate

type IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRate string

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

const (
	IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRateLow  IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRate = "low"
	IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRateMid  IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRate = "mid"
	IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRateHigh IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckRate = "high"
)

type IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckType

type IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckType string

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

const (
	IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckTypeReply   IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckType = "reply"
	IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckTypeRequest IPSECTunnelNewResponseIPSECTunnelsTunnelHealthCheckType = "request"
)

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 IPSECTunnelPSKGenerateResponsePSKMetadata `json:"psk_metadata"`
	JSON        ipsecTunnelPSKGenerateResponseJSON        `json:"-"`
}

func (*IPSECTunnelPSKGenerateResponse) UnmarshalJSON

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

type IPSECTunnelPSKGenerateResponseEnvelope

type IPSECTunnelPSKGenerateResponseEnvelope struct {
	Errors   []IPSECTunnelPSKGenerateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []IPSECTunnelPSKGenerateResponseEnvelopeMessages `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 IPSECTunnelPSKGenerateResponseEnvelopeErrors

type IPSECTunnelPSKGenerateResponseEnvelopeErrors struct {
	Code    int64                                            `json:"code,required"`
	Message string                                           `json:"message,required"`
	JSON    ipsecTunnelPSKGenerateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*IPSECTunnelPSKGenerateResponseEnvelopeErrors) UnmarshalJSON

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

type IPSECTunnelPSKGenerateResponseEnvelopeMessages

type IPSECTunnelPSKGenerateResponseEnvelopeMessages struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    ipsecTunnelPSKGenerateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*IPSECTunnelPSKGenerateResponseEnvelopeMessages) UnmarshalJSON

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

type IPSECTunnelPSKGenerateResponseEnvelopeSuccess

type IPSECTunnelPSKGenerateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelPSKGenerateResponseEnvelopeSuccessTrue IPSECTunnelPSKGenerateResponseEnvelopeSuccess = true
)

type IPSECTunnelPSKGenerateResponsePSKMetadata

type IPSECTunnelPSKGenerateResponsePSKMetadata struct {
	// The date and time the tunnel was last modified.
	LastGeneratedOn time.Time                                     `json:"last_generated_on" format:"date-time"`
	JSON            ipsecTunnelPSKGenerateResponsePSKMetadataJSON `json:"-"`
}

The PSK metadata that includes when the PSK was generated.

func (*IPSECTunnelPSKGenerateResponsePSKMetadata) UnmarshalJSON

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

type IPSECTunnelService

type IPSECTunnelService struct {
	Options []option.RequestOption
}

IPSECTunnelService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIPSECTunnelService method instead.

func NewIPSECTunnelService

func NewIPSECTunnelService(opts ...option.RequestOption) (r *IPSECTunnelService)

NewIPSECTunnelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*IPSECTunnelService) Delete

func (r *IPSECTunnelService) Delete(ctx context.Context, accountIdentifier string, tunnelIdentifier string, 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, accountIdentifier string, tunnelIdentifier string, opts ...option.RequestOption) (res *IPSECTunnelGetResponse, err error)

Lists details for a specific IPsec tunnel.

func (*IPSECTunnelService) List

func (r *IPSECTunnelService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *IPSECTunnelListResponse, err error)

Lists IPsec tunnels associated with an account.

func (*IPSECTunnelService) New

func (r *IPSECTunnelService) New(ctx context.Context, accountIdentifier string, body IPSECTunnelNewParams, opts ...option.RequestOption) (res *IPSECTunnelNewResponse, err error)

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, accountIdentifier string, tunnelIdentifier string, 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, accountIdentifier string, tunnelIdentifier string, body 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 {
	// 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.
	CustomerEndpoint param.Field[string] `json:"customer_endpoint"`
	// An optional description forthe IPsec tunnel.
	Description param.Field[string]                             `json:"description"`
	HealthCheck param.Field[IPSECTunnelUpdateParamsHealthCheck] `json:"health_check"`
	// A 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 IPSECTunnelUpdateParamsHealthCheck

type IPSECTunnelUpdateParamsHealthCheck struct {
	// The direction of the flow of the healthcheck. Either unidirectional, where the
	// probe comes to you via the tunnel and the result comes back to Cloudflare via
	// the open Internet, or bidirectional where both the probe and result come and go
	// via the tunnel. 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[IPSECTunnelUpdateParamsHealthCheckDirection] `json:"direction"`
	// Determines whether to run healthchecks for a tunnel.
	Enabled param.Field[bool] `json:"enabled"`
	// How frequent the health check is run. The default value is `mid`.
	Rate param.Field[IPSECTunnelUpdateParamsHealthCheckRate] `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[IPSECTunnelUpdateParamsHealthCheckType] `json:"type"`
}

func (IPSECTunnelUpdateParamsHealthCheck) MarshalJSON

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

type IPSECTunnelUpdateParamsHealthCheckDirection

type IPSECTunnelUpdateParamsHealthCheckDirection string

The direction of the flow of the healthcheck. Either unidirectional, where the probe comes to you via the tunnel and the result comes back to Cloudflare via the open Internet, or bidirectional where both the probe and result come and go via the tunnel. 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 (
	IPSECTunnelUpdateParamsHealthCheckDirectionUnidirectional IPSECTunnelUpdateParamsHealthCheckDirection = "unidirectional"
	IPSECTunnelUpdateParamsHealthCheckDirectionBidirectional  IPSECTunnelUpdateParamsHealthCheckDirection = "bidirectional"
)

type IPSECTunnelUpdateParamsHealthCheckRate

type IPSECTunnelUpdateParamsHealthCheckRate string

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

const (
	IPSECTunnelUpdateParamsHealthCheckRateLow  IPSECTunnelUpdateParamsHealthCheckRate = "low"
	IPSECTunnelUpdateParamsHealthCheckRateMid  IPSECTunnelUpdateParamsHealthCheckRate = "mid"
	IPSECTunnelUpdateParamsHealthCheckRateHigh IPSECTunnelUpdateParamsHealthCheckRate = "high"
)

type IPSECTunnelUpdateParamsHealthCheckType

type IPSECTunnelUpdateParamsHealthCheckType string

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

const (
	IPSECTunnelUpdateParamsHealthCheckTypeReply   IPSECTunnelUpdateParamsHealthCheckType = "reply"
	IPSECTunnelUpdateParamsHealthCheckTypeRequest IPSECTunnelUpdateParamsHealthCheckType = "request"
)

type IPSECTunnelUpdateResponse

type IPSECTunnelUpdateResponse struct {
	Modified            bool                          `json:"modified"`
	ModifiedIPSECTunnel interface{}                   `json:"modified_ipsec_tunnel"`
	JSON                ipsecTunnelUpdateResponseJSON `json:"-"`
}

func (*IPSECTunnelUpdateResponse) UnmarshalJSON

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

type IPSECTunnelUpdateResponseEnvelope

type IPSECTunnelUpdateResponseEnvelope struct {
	Errors   []IPSECTunnelUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []IPSECTunnelUpdateResponseEnvelopeMessages `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 IPSECTunnelUpdateResponseEnvelopeErrors

type IPSECTunnelUpdateResponseEnvelopeErrors struct {
	Code    int64                                       `json:"code,required"`
	Message string                                      `json:"message,required"`
	JSON    ipsecTunnelUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*IPSECTunnelUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type IPSECTunnelUpdateResponseEnvelopeMessages

type IPSECTunnelUpdateResponseEnvelopeMessages struct {
	Code    int64                                         `json:"code,required"`
	Message string                                        `json:"message,required"`
	JSON    ipsecTunnelUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*IPSECTunnelUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type IPSECTunnelUpdateResponseEnvelopeSuccess

type IPSECTunnelUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	IPSECTunnelUpdateResponseEnvelopeSuccessTrue IPSECTunnelUpdateResponseEnvelopeSuccess = true
)

type MagicTransitService

type MagicTransitService struct {
	Options         []option.RequestOption
	CfInterconnects *CfInterconnectService
	GRETunnels      *GRETunnelService
	IPSECTunnels    *IPSECTunnelService
	Routes          *RouteService
	Sites           *SiteService
}

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 RouteDeleteResponse

type RouteDeleteResponse struct {
	Deleted      bool                    `json:"deleted"`
	DeletedRoute interface{}             `json:"deleted_route"`
	JSON         routeDeleteResponseJSON `json:"-"`
}

func (*RouteDeleteResponse) UnmarshalJSON

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

type RouteDeleteResponseEnvelope

type RouteDeleteResponseEnvelope struct {
	Errors   []RouteDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteDeleteResponseEnvelopeMessages `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 RouteDeleteResponseEnvelopeErrors

type RouteDeleteResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    routeDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RouteDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type RouteDeleteResponseEnvelopeMessages

type RouteDeleteResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    routeDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RouteDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type RouteDeleteResponseEnvelopeSuccess

type RouteDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteDeleteResponseEnvelopeSuccessTrue RouteDeleteResponseEnvelopeSuccess = true
)

type RouteEmptyParams

type RouteEmptyParams struct {
	Routes param.Field[[]RouteEmptyParamsRoute] `json:"routes,required"`
}

func (RouteEmptyParams) MarshalJSON

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

type RouteEmptyParamsRoute

type RouteEmptyParamsRoute struct {
}

func (RouteEmptyParamsRoute) MarshalJSON

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

type RouteEmptyResponse

type RouteEmptyResponse struct {
	Deleted       bool                   `json:"deleted"`
	DeletedRoutes interface{}            `json:"deleted_routes"`
	JSON          routeEmptyResponseJSON `json:"-"`
}

func (*RouteEmptyResponse) UnmarshalJSON

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

type RouteEmptyResponseEnvelope

type RouteEmptyResponseEnvelope struct {
	Errors   []RouteEmptyResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteEmptyResponseEnvelopeMessages `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 RouteEmptyResponseEnvelopeErrors

type RouteEmptyResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    routeEmptyResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RouteEmptyResponseEnvelopeErrors) UnmarshalJSON

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

type RouteEmptyResponseEnvelopeMessages

type RouteEmptyResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    routeEmptyResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RouteEmptyResponseEnvelopeMessages) UnmarshalJSON

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

type RouteEmptyResponseEnvelopeSuccess

type RouteEmptyResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteEmptyResponseEnvelopeSuccessTrue RouteEmptyResponseEnvelopeSuccess = true
)

type RouteGetResponse

type RouteGetResponse struct {
	Route interface{}          `json:"route"`
	JSON  routeGetResponseJSON `json:"-"`
}

func (*RouteGetResponse) UnmarshalJSON

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

type RouteGetResponseEnvelope

type RouteGetResponseEnvelope struct {
	Errors   []RouteGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteGetResponseEnvelopeMessages `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 RouteGetResponseEnvelopeErrors

type RouteGetResponseEnvelopeErrors struct {
	Code    int64                              `json:"code,required"`
	Message string                             `json:"message,required"`
	JSON    routeGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RouteGetResponseEnvelopeErrors) UnmarshalJSON

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

type RouteGetResponseEnvelopeMessages

type RouteGetResponseEnvelopeMessages struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    routeGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RouteGetResponseEnvelopeMessages) UnmarshalJSON

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

type RouteGetResponseEnvelopeSuccess

type RouteGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteGetResponseEnvelopeSuccessTrue RouteGetResponseEnvelopeSuccess = true
)

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   []RouteListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteListResponseEnvelopeMessages `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 RouteListResponseEnvelopeErrors

type RouteListResponseEnvelopeErrors struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    routeListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RouteListResponseEnvelopeErrors) UnmarshalJSON

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

type RouteListResponseEnvelopeMessages

type RouteListResponseEnvelopeMessages struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    routeListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RouteListResponseEnvelopeMessages) UnmarshalJSON

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

type RouteListResponseEnvelopeSuccess

type RouteListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteListResponseEnvelopeSuccessTrue RouteListResponseEnvelopeSuccess = true
)

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 RouteListResponseRoutesScope `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 RouteListResponseRoutesScope

type RouteListResponseRoutesScope 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        routeListResponseRoutesScopeJSON `json:"-"`
}

Used only for ECMP routes.

func (*RouteListResponseRoutesScope) UnmarshalJSON

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

type RouteNewParams

type RouteNewParams struct {
	Body param.Field[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   []RouteNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteNewResponseEnvelopeMessages `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 RouteNewResponseEnvelopeErrors

type RouteNewResponseEnvelopeErrors struct {
	Code    int64                              `json:"code,required"`
	Message string                             `json:"message,required"`
	JSON    routeNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RouteNewResponseEnvelopeErrors) UnmarshalJSON

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

type RouteNewResponseEnvelopeMessages

type RouteNewResponseEnvelopeMessages struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    routeNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RouteNewResponseEnvelopeMessages) UnmarshalJSON

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

type RouteNewResponseEnvelopeSuccess

type RouteNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteNewResponseEnvelopeSuccessTrue RouteNewResponseEnvelopeSuccess = true
)

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 RouteNewResponseRoutesScope `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 RouteNewResponseRoutesScope

type RouteNewResponseRoutesScope 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        routeNewResponseRoutesScopeJSON `json:"-"`
}

Used only for ECMP routes.

func (*RouteNewResponseRoutesScope) UnmarshalJSON

func (r *RouteNewResponseRoutesScope) 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, accountIdentifier string, routeIdentifier string, 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, accountIdentifier string, body RouteEmptyParams, opts ...option.RequestOption) (res *RouteEmptyResponse, err error)

Delete multiple Magic static routes.

func (*RouteService) Get

func (r *RouteService) Get(ctx context.Context, accountIdentifier string, routeIdentifier string, opts ...option.RequestOption) (res *RouteGetResponse, err error)

Get a specific Magic static route.

func (*RouteService) List

func (r *RouteService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *RouteListResponse, err error)

List all Magic static routes.

func (*RouteService) New

func (r *RouteService) New(ctx context.Context, accountIdentifier string, body 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, accountIdentifier string, routeIdentifier string, body 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 {
	// 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[RouteUpdateParamsScope] `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 RouteUpdateParamsScope

type RouteUpdateParamsScope 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 (RouteUpdateParamsScope) MarshalJSON

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

type RouteUpdateResponse

type RouteUpdateResponse struct {
	Modified      bool                    `json:"modified"`
	ModifiedRoute interface{}             `json:"modified_route"`
	JSON          routeUpdateResponseJSON `json:"-"`
}

func (*RouteUpdateResponse) UnmarshalJSON

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

type RouteUpdateResponseEnvelope

type RouteUpdateResponseEnvelope struct {
	Errors   []RouteUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteUpdateResponseEnvelopeMessages `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 RouteUpdateResponseEnvelopeErrors

type RouteUpdateResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    routeUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RouteUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type RouteUpdateResponseEnvelopeMessages

type RouteUpdateResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    routeUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RouteUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type RouteUpdateResponseEnvelopeSuccess

type RouteUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteUpdateResponseEnvelopeSuccessTrue RouteUpdateResponseEnvelopeSuccess = true
)

type SiteACLDeleteResponse

type SiteACLDeleteResponse struct {
	Deleted bool `json:"deleted"`
	// Bidirectional ACL policy for local network traffic within a site.
	DeletedACL SiteACLDeleteResponseDeletedACL `json:"deleted_acl"`
	JSON       siteACLDeleteResponseJSON       `json:"-"`
}

func (*SiteACLDeleteResponse) UnmarshalJSON

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

type SiteACLDeleteResponseDeletedACL

type SiteACLDeleteResponseDeletedACL struct {
	// Identifier
	ID string `json:"id"`
	// Description for the ACL.
	Description string                              `json:"description"`
	Lan1        SiteACLDeleteResponseDeletedACLLan1 `json:"lan_1"`
	Lan2        SiteACLDeleteResponseDeletedACLLan2 `json:"lan_2"`
	// The name of the ACL.
	Name      string                                    `json:"name"`
	Protocols []SiteACLDeleteResponseDeletedACLProtocol `json:"protocols"`
	JSON      siteACLDeleteResponseDeletedACLJSON       `json:"-"`
}

Bidirectional ACL policy for local network traffic within a site.

func (*SiteACLDeleteResponseDeletedACL) UnmarshalJSON

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

type SiteACLDeleteResponseDeletedACLLan1

type SiteACLDeleteResponseDeletedACLLan1 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 []SiteACLDeleteResponseDeletedACLLan1Subnet `json:"subnets"`
	JSON    siteACLDeleteResponseDeletedACLLan1JSON     `json:"-"`
}

func (*SiteACLDeleteResponseDeletedACLLan1) UnmarshalJSON

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

type SiteACLDeleteResponseDeletedACLLan1Subnet

type SiteACLDeleteResponseDeletedACLLan1Subnet interface {
	ImplementsMagicTransitSiteACLDeleteResponseDeletedACLLan1Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLDeleteResponseDeletedACLLan2

type SiteACLDeleteResponseDeletedACLLan2 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 []SiteACLDeleteResponseDeletedACLLan2Subnet `json:"subnets"`
	JSON    siteACLDeleteResponseDeletedACLLan2JSON     `json:"-"`
}

func (*SiteACLDeleteResponseDeletedACLLan2) UnmarshalJSON

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

type SiteACLDeleteResponseDeletedACLLan2Subnet

type SiteACLDeleteResponseDeletedACLLan2Subnet interface {
	ImplementsMagicTransitSiteACLDeleteResponseDeletedACLLan2Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLDeleteResponseDeletedACLProtocol

type SiteACLDeleteResponseDeletedACLProtocol string

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

const (
	SiteACLDeleteResponseDeletedACLProtocolTcp  SiteACLDeleteResponseDeletedACLProtocol = "tcp"
	SiteACLDeleteResponseDeletedACLProtocolUdp  SiteACLDeleteResponseDeletedACLProtocol = "udp"
	SiteACLDeleteResponseDeletedACLProtocolIcmp SiteACLDeleteResponseDeletedACLProtocol = "icmp"
)

type SiteACLDeleteResponseEnvelope

type SiteACLDeleteResponseEnvelope struct {
	Errors   []SiteACLDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteACLDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteACLDeleteResponse                   `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 SiteACLDeleteResponseEnvelopeErrors

type SiteACLDeleteResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteACLDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteACLDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type SiteACLDeleteResponseEnvelopeMessages

type SiteACLDeleteResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    siteACLDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteACLDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type SiteACLDeleteResponseEnvelopeSuccess

type SiteACLDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLDeleteResponseEnvelopeSuccessTrue SiteACLDeleteResponseEnvelopeSuccess = true
)

type SiteACLGetResponse

type SiteACLGetResponse struct {
	// Bidirectional ACL policy for local network traffic within a site.
	ACL  SiteACLGetResponseACL  `json:"acl"`
	JSON siteACLGetResponseJSON `json:"-"`
}

func (*SiteACLGetResponse) UnmarshalJSON

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

type SiteACLGetResponseACL

type SiteACLGetResponseACL struct {
	// Identifier
	ID string `json:"id"`
	// Description for the ACL.
	Description string                    `json:"description"`
	Lan1        SiteACLGetResponseACLLan1 `json:"lan_1"`
	Lan2        SiteACLGetResponseACLLan2 `json:"lan_2"`
	// The name of the ACL.
	Name      string                          `json:"name"`
	Protocols []SiteACLGetResponseACLProtocol `json:"protocols"`
	JSON      siteACLGetResponseACLJSON       `json:"-"`
}

Bidirectional ACL policy for local network traffic within a site.

func (*SiteACLGetResponseACL) UnmarshalJSON

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

type SiteACLGetResponseACLLan1

type SiteACLGetResponseACLLan1 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 []SiteACLGetResponseACLLan1Subnet `json:"subnets"`
	JSON    siteACLGetResponseACLLan1JSON     `json:"-"`
}

func (*SiteACLGetResponseACLLan1) UnmarshalJSON

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

type SiteACLGetResponseACLLan1Subnet

type SiteACLGetResponseACLLan1Subnet interface {
	ImplementsMagicTransitSiteACLGetResponseACLLan1Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLGetResponseACLLan2

type SiteACLGetResponseACLLan2 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 []SiteACLGetResponseACLLan2Subnet `json:"subnets"`
	JSON    siteACLGetResponseACLLan2JSON     `json:"-"`
}

func (*SiteACLGetResponseACLLan2) UnmarshalJSON

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

type SiteACLGetResponseACLLan2Subnet

type SiteACLGetResponseACLLan2Subnet interface {
	ImplementsMagicTransitSiteACLGetResponseACLLan2Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLGetResponseACLProtocol

type SiteACLGetResponseACLProtocol string

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

const (
	SiteACLGetResponseACLProtocolTcp  SiteACLGetResponseACLProtocol = "tcp"
	SiteACLGetResponseACLProtocolUdp  SiteACLGetResponseACLProtocol = "udp"
	SiteACLGetResponseACLProtocolIcmp SiteACLGetResponseACLProtocol = "icmp"
)

type SiteACLGetResponseEnvelope

type SiteACLGetResponseEnvelope struct {
	Errors   []SiteACLGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteACLGetResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteACLGetResponse                   `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 SiteACLGetResponseEnvelopeErrors

type SiteACLGetResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteACLGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteACLGetResponseEnvelopeErrors) UnmarshalJSON

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

type SiteACLGetResponseEnvelopeMessages

type SiteACLGetResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    siteACLGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteACLGetResponseEnvelopeMessages) UnmarshalJSON

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

type SiteACLGetResponseEnvelopeSuccess

type SiteACLGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLGetResponseEnvelopeSuccessTrue SiteACLGetResponseEnvelopeSuccess = true
)

type SiteACLListResponse

type SiteACLListResponse struct {
	ACLs []SiteACLListResponseACL `json:"acls"`
	JSON siteACLListResponseJSON  `json:"-"`
}

func (*SiteACLListResponse) UnmarshalJSON

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

type SiteACLListResponseACL

type SiteACLListResponseACL struct {
	// Identifier
	ID string `json:"id"`
	// Description for the ACL.
	Description string                      `json:"description"`
	Lan1        SiteACLListResponseACLsLan1 `json:"lan_1"`
	Lan2        SiteACLListResponseACLsLan2 `json:"lan_2"`
	// The name of the ACL.
	Name      string                            `json:"name"`
	Protocols []SiteACLListResponseACLsProtocol `json:"protocols"`
	JSON      siteACLListResponseACLJSON        `json:"-"`
}

Bidirectional ACL policy for local network traffic within a site.

func (*SiteACLListResponseACL) UnmarshalJSON

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

type SiteACLListResponseACLsLan1

type SiteACLListResponseACLsLan1 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 []SiteACLListResponseACLsLan1Subnet `json:"subnets"`
	JSON    siteACLListResponseACLsLan1JSON     `json:"-"`
}

func (*SiteACLListResponseACLsLan1) UnmarshalJSON

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

type SiteACLListResponseACLsLan1Subnet

type SiteACLListResponseACLsLan1Subnet interface {
	ImplementsMagicTransitSiteACLListResponseACLsLan1Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLListResponseACLsLan2

type SiteACLListResponseACLsLan2 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 []SiteACLListResponseACLsLan2Subnet `json:"subnets"`
	JSON    siteACLListResponseACLsLan2JSON     `json:"-"`
}

func (*SiteACLListResponseACLsLan2) UnmarshalJSON

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

type SiteACLListResponseACLsLan2Subnet

type SiteACLListResponseACLsLan2Subnet interface {
	ImplementsMagicTransitSiteACLListResponseACLsLan2Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLListResponseACLsProtocol

type SiteACLListResponseACLsProtocol string

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

const (
	SiteACLListResponseACLsProtocolTcp  SiteACLListResponseACLsProtocol = "tcp"
	SiteACLListResponseACLsProtocolUdp  SiteACLListResponseACLsProtocol = "udp"
	SiteACLListResponseACLsProtocolIcmp SiteACLListResponseACLsProtocol = "icmp"
)

type SiteACLListResponseEnvelope

type SiteACLListResponseEnvelope struct {
	Errors   []SiteACLListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteACLListResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteACLListResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteACLListResponseEnvelopeSuccess `json:"success,required"`
	JSON    siteACLListResponseEnvelopeJSON    `json:"-"`
}

func (*SiteACLListResponseEnvelope) UnmarshalJSON

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

type SiteACLListResponseEnvelopeErrors

type SiteACLListResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    siteACLListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteACLListResponseEnvelopeErrors) UnmarshalJSON

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

type SiteACLListResponseEnvelopeMessages

type SiteACLListResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteACLListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteACLListResponseEnvelopeMessages) UnmarshalJSON

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

type SiteACLListResponseEnvelopeSuccess

type SiteACLListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLListResponseEnvelopeSuccessTrue SiteACLListResponseEnvelopeSuccess = true
)

type SiteACLNewParams

type SiteACLNewParams struct {
	ACL param.Field[SiteACLNewParamsACL] `json:"acl"`
}

func (SiteACLNewParams) MarshalJSON

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

type SiteACLNewParamsACL

type SiteACLNewParamsACL struct {
	Lan1 param.Field[SiteACLNewParamsACLLan1] `json:"lan_1,required"`
	Lan2 param.Field[SiteACLNewParamsACLLan2] `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"`
	Protocols   param.Field[[]SiteACLNewParamsACLProtocol] `json:"protocols"`
}

func (SiteACLNewParamsACL) MarshalJSON

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

type SiteACLNewParamsACLLan1

type SiteACLNewParamsACLLan1 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[[]SiteACLNewParamsACLLan1Subnet] `json:"subnets"`
}

func (SiteACLNewParamsACLLan1) MarshalJSON

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

type SiteACLNewParamsACLLan1Subnet

type SiteACLNewParamsACLLan1Subnet interface {
	ImplementsMagicTransitSiteACLNewParamsACLLan1Subnet()
}

A valid IPv4 address.

Satisfied by shared.UnionString, shared.UnionString.

type SiteACLNewParamsACLLan2

type SiteACLNewParamsACLLan2 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[[]SiteACLNewParamsACLLan2Subnet] `json:"subnets"`
}

func (SiteACLNewParamsACLLan2) MarshalJSON

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

type SiteACLNewParamsACLLan2Subnet

type SiteACLNewParamsACLLan2Subnet interface {
	ImplementsMagicTransitSiteACLNewParamsACLLan2Subnet()
}

A valid IPv4 address.

Satisfied by shared.UnionString, shared.UnionString.

type SiteACLNewParamsACLProtocol

type SiteACLNewParamsACLProtocol string

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

const (
	SiteACLNewParamsACLProtocolTcp  SiteACLNewParamsACLProtocol = "tcp"
	SiteACLNewParamsACLProtocolUdp  SiteACLNewParamsACLProtocol = "udp"
	SiteACLNewParamsACLProtocolIcmp SiteACLNewParamsACLProtocol = "icmp"
)

type SiteACLNewResponse

type SiteACLNewResponse struct {
	ACLs []SiteACLNewResponseACL `json:"acls"`
	JSON siteACLNewResponseJSON  `json:"-"`
}

func (*SiteACLNewResponse) UnmarshalJSON

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

type SiteACLNewResponseACL

type SiteACLNewResponseACL struct {
	// Identifier
	ID string `json:"id"`
	// Description for the ACL.
	Description string                     `json:"description"`
	Lan1        SiteACLNewResponseACLsLan1 `json:"lan_1"`
	Lan2        SiteACLNewResponseACLsLan2 `json:"lan_2"`
	// The name of the ACL.
	Name      string                           `json:"name"`
	Protocols []SiteACLNewResponseACLsProtocol `json:"protocols"`
	JSON      siteACLNewResponseACLJSON        `json:"-"`
}

Bidirectional ACL policy for local network traffic within a site.

func (*SiteACLNewResponseACL) UnmarshalJSON

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

type SiteACLNewResponseACLsLan1

type SiteACLNewResponseACLsLan1 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 []SiteACLNewResponseACLsLan1Subnet `json:"subnets"`
	JSON    siteACLNewResponseACLsLan1JSON     `json:"-"`
}

func (*SiteACLNewResponseACLsLan1) UnmarshalJSON

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

type SiteACLNewResponseACLsLan1Subnet

type SiteACLNewResponseACLsLan1Subnet interface {
	ImplementsMagicTransitSiteACLNewResponseACLsLan1Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLNewResponseACLsLan2

type SiteACLNewResponseACLsLan2 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 []SiteACLNewResponseACLsLan2Subnet `json:"subnets"`
	JSON    siteACLNewResponseACLsLan2JSON     `json:"-"`
}

func (*SiteACLNewResponseACLsLan2) UnmarshalJSON

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

type SiteACLNewResponseACLsLan2Subnet

type SiteACLNewResponseACLsLan2Subnet interface {
	ImplementsMagicTransitSiteACLNewResponseACLsLan2Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLNewResponseACLsProtocol

type SiteACLNewResponseACLsProtocol string

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

const (
	SiteACLNewResponseACLsProtocolTcp  SiteACLNewResponseACLsProtocol = "tcp"
	SiteACLNewResponseACLsProtocolUdp  SiteACLNewResponseACLsProtocol = "udp"
	SiteACLNewResponseACLsProtocolIcmp SiteACLNewResponseACLsProtocol = "icmp"
)

type SiteACLNewResponseEnvelope

type SiteACLNewResponseEnvelope struct {
	Errors   []SiteACLNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteACLNewResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteACLNewResponse                   `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 SiteACLNewResponseEnvelopeErrors

type SiteACLNewResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteACLNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteACLNewResponseEnvelopeErrors) UnmarshalJSON

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

type SiteACLNewResponseEnvelopeMessages

type SiteACLNewResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    siteACLNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteACLNewResponseEnvelopeMessages) UnmarshalJSON

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

type SiteACLNewResponseEnvelopeSuccess

type SiteACLNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLNewResponseEnvelopeSuccessTrue SiteACLNewResponseEnvelopeSuccess = true
)

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, accountIdentifier string, siteIdentifier string, aclIdentifier string, opts ...option.RequestOption) (res *SiteACLDeleteResponse, err error)

Remove a specific Site ACL.

func (*SiteACLService) Get

func (r *SiteACLService) Get(ctx context.Context, accountIdentifier string, siteIdentifier string, aclIdentifier string, opts ...option.RequestOption) (res *SiteACLGetResponse, err error)

Get a specific Site ACL.

func (*SiteACLService) List

func (r *SiteACLService) List(ctx context.Context, accountIdentifier string, siteIdentifier string, opts ...option.RequestOption) (res *SiteACLListResponse, err error)

Lists Site ACLs associated with an account.

func (*SiteACLService) New

func (r *SiteACLService) New(ctx context.Context, accountIdentifier string, siteIdentifier string, body SiteACLNewParams, opts ...option.RequestOption) (res *SiteACLNewResponse, err error)

Creates a new Site ACL.

func (*SiteACLService) Update

func (r *SiteACLService) Update(ctx context.Context, accountIdentifier string, siteIdentifier string, aclIdentifier string, body SiteACLUpdateParams, opts ...option.RequestOption) (res *SiteACLUpdateResponse, err error)

Update a specific Site ACL.

type SiteACLUpdateParams

type SiteACLUpdateParams struct {
	ACL param.Field[SiteACLUpdateParamsACL] `json:"acl"`
}

func (SiteACLUpdateParams) MarshalJSON

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

type SiteACLUpdateParamsACL

type SiteACLUpdateParamsACL struct {
	// Description for the ACL.
	Description param.Field[string]                     `json:"description"`
	Lan1        param.Field[SiteACLUpdateParamsACLLan1] `json:"lan_1"`
	Lan2        param.Field[SiteACLUpdateParamsACLLan2] `json:"lan_2"`
	// The name of the ACL.
	Name      param.Field[string]                           `json:"name"`
	Protocols param.Field[[]SiteACLUpdateParamsACLProtocol] `json:"protocols"`
}

func (SiteACLUpdateParamsACL) MarshalJSON

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

type SiteACLUpdateParamsACLLan1

type SiteACLUpdateParamsACLLan1 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[[]SiteACLUpdateParamsACLLan1Subnet] `json:"subnets"`
}

func (SiteACLUpdateParamsACLLan1) MarshalJSON

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

type SiteACLUpdateParamsACLLan1Subnet

type SiteACLUpdateParamsACLLan1Subnet interface {
	ImplementsMagicTransitSiteACLUpdateParamsACLLan1Subnet()
}

A valid IPv4 address.

Satisfied by shared.UnionString, shared.UnionString.

type SiteACLUpdateParamsACLLan2

type SiteACLUpdateParamsACLLan2 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[[]SiteACLUpdateParamsACLLan2Subnet] `json:"subnets"`
}

func (SiteACLUpdateParamsACLLan2) MarshalJSON

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

type SiteACLUpdateParamsACLLan2Subnet

type SiteACLUpdateParamsACLLan2Subnet interface {
	ImplementsMagicTransitSiteACLUpdateParamsACLLan2Subnet()
}

A valid IPv4 address.

Satisfied by shared.UnionString, shared.UnionString.

type SiteACLUpdateParamsACLProtocol

type SiteACLUpdateParamsACLProtocol string

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

const (
	SiteACLUpdateParamsACLProtocolTcp  SiteACLUpdateParamsACLProtocol = "tcp"
	SiteACLUpdateParamsACLProtocolUdp  SiteACLUpdateParamsACLProtocol = "udp"
	SiteACLUpdateParamsACLProtocolIcmp SiteACLUpdateParamsACLProtocol = "icmp"
)

type SiteACLUpdateResponse

type SiteACLUpdateResponse struct {
	// Bidirectional ACL policy for local network traffic within a site.
	ACL  SiteACLUpdateResponseACL  `json:"acl"`
	JSON siteACLUpdateResponseJSON `json:"-"`
}

func (*SiteACLUpdateResponse) UnmarshalJSON

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

type SiteACLUpdateResponseACL

type SiteACLUpdateResponseACL struct {
	// Identifier
	ID string `json:"id"`
	// Description for the ACL.
	Description string                       `json:"description"`
	Lan1        SiteACLUpdateResponseACLLan1 `json:"lan_1"`
	Lan2        SiteACLUpdateResponseACLLan2 `json:"lan_2"`
	// The name of the ACL.
	Name      string                             `json:"name"`
	Protocols []SiteACLUpdateResponseACLProtocol `json:"protocols"`
	JSON      siteACLUpdateResponseACLJSON       `json:"-"`
}

Bidirectional ACL policy for local network traffic within a site.

func (*SiteACLUpdateResponseACL) UnmarshalJSON

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

type SiteACLUpdateResponseACLLan1

type SiteACLUpdateResponseACLLan1 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 []SiteACLUpdateResponseACLLan1Subnet `json:"subnets"`
	JSON    siteACLUpdateResponseACLLan1JSON     `json:"-"`
}

func (*SiteACLUpdateResponseACLLan1) UnmarshalJSON

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

type SiteACLUpdateResponseACLLan1Subnet

type SiteACLUpdateResponseACLLan1Subnet interface {
	ImplementsMagicTransitSiteACLUpdateResponseACLLan1Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLUpdateResponseACLLan2

type SiteACLUpdateResponseACLLan2 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 []SiteACLUpdateResponseACLLan2Subnet `json:"subnets"`
	JSON    siteACLUpdateResponseACLLan2JSON     `json:"-"`
}

func (*SiteACLUpdateResponseACLLan2) UnmarshalJSON

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

type SiteACLUpdateResponseACLLan2Subnet

type SiteACLUpdateResponseACLLan2Subnet interface {
	ImplementsMagicTransitSiteACLUpdateResponseACLLan2Subnet()
}

A valid IPv4 address.

Union satisfied by shared.UnionString or shared.UnionString.

type SiteACLUpdateResponseACLProtocol

type SiteACLUpdateResponseACLProtocol string

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

const (
	SiteACLUpdateResponseACLProtocolTcp  SiteACLUpdateResponseACLProtocol = "tcp"
	SiteACLUpdateResponseACLProtocolUdp  SiteACLUpdateResponseACLProtocol = "udp"
	SiteACLUpdateResponseACLProtocolIcmp SiteACLUpdateResponseACLProtocol = "icmp"
)

type SiteACLUpdateResponseEnvelope

type SiteACLUpdateResponseEnvelope struct {
	Errors   []SiteACLUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteACLUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteACLUpdateResponse                   `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 SiteACLUpdateResponseEnvelopeErrors

type SiteACLUpdateResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteACLUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteACLUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type SiteACLUpdateResponseEnvelopeMessages

type SiteACLUpdateResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    siteACLUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteACLUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type SiteACLUpdateResponseEnvelopeSuccess

type SiteACLUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteACLUpdateResponseEnvelopeSuccessTrue SiteACLUpdateResponseEnvelopeSuccess = true
)

type SiteDeleteResponse

type SiteDeleteResponse struct {
	Deleted     bool                          `json:"deleted"`
	DeletedSite SiteDeleteResponseDeletedSite `json:"deleted_site"`
	JSON        siteDeleteResponseJSON        `json:"-"`
}

func (*SiteDeleteResponse) UnmarshalJSON

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

type SiteDeleteResponseDeletedSite

type SiteDeleteResponseDeletedSite struct {
	// Identifier
	ID string `json:"id"`
	// Magic WAN 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 SiteDeleteResponseDeletedSiteLocation `json:"location"`
	// The name of the site.
	Name string `json:"name"`
	// Magic WAN Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID string                            `json:"secondary_connector_id"`
	JSON                 siteDeleteResponseDeletedSiteJSON `json:"-"`
}

func (*SiteDeleteResponseDeletedSite) UnmarshalJSON

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

type SiteDeleteResponseDeletedSiteLocation

type SiteDeleteResponseDeletedSiteLocation struct {
	// Latitude
	Lat string `json:"lat"`
	// Longitude
	Lon  string                                    `json:"lon"`
	JSON siteDeleteResponseDeletedSiteLocationJSON `json:"-"`
}

Location of site in latitude and longitude.

func (*SiteDeleteResponseDeletedSiteLocation) UnmarshalJSON

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

type SiteDeleteResponseEnvelope

type SiteDeleteResponseEnvelope struct {
	Errors   []SiteDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteDeleteResponse                   `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 SiteDeleteResponseEnvelopeErrors

type SiteDeleteResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type SiteDeleteResponseEnvelopeMessages

type SiteDeleteResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    siteDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type SiteDeleteResponseEnvelopeSuccess

type SiteDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteDeleteResponseEnvelopeSuccessTrue SiteDeleteResponseEnvelopeSuccess = true
)

type SiteGetResponse

type SiteGetResponse struct {
	Site SiteGetResponseSite `json:"site"`
	JSON siteGetResponseJSON `json:"-"`
}

func (*SiteGetResponse) UnmarshalJSON

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

type SiteGetResponseEnvelope

type SiteGetResponseEnvelope struct {
	Errors   []SiteGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteGetResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteGetResponse                   `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 SiteGetResponseEnvelopeErrors

type SiteGetResponseEnvelopeErrors struct {
	Code    int64                             `json:"code,required"`
	Message string                            `json:"message,required"`
	JSON    siteGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteGetResponseEnvelopeErrors) UnmarshalJSON

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

type SiteGetResponseEnvelopeMessages

type SiteGetResponseEnvelopeMessages struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    siteGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteGetResponseEnvelopeMessages) UnmarshalJSON

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

type SiteGetResponseEnvelopeSuccess

type SiteGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteGetResponseEnvelopeSuccessTrue SiteGetResponseEnvelopeSuccess = true
)

type SiteGetResponseSite

type SiteGetResponseSite struct {
	// Identifier
	ID string `json:"id"`
	// Magic WAN 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 SiteGetResponseSiteLocation `json:"location"`
	// The name of the site.
	Name string `json:"name"`
	// Magic WAN Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID string                  `json:"secondary_connector_id"`
	JSON                 siteGetResponseSiteJSON `json:"-"`
}

func (*SiteGetResponseSite) UnmarshalJSON

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

type SiteGetResponseSiteLocation

type SiteGetResponseSiteLocation struct {
	// Latitude
	Lat string `json:"lat"`
	// Longitude
	Lon  string                          `json:"lon"`
	JSON siteGetResponseSiteLocationJSON `json:"-"`
}

Location of site in latitude and longitude.

func (*SiteGetResponseSiteLocation) UnmarshalJSON

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

type SiteLanDeleteResponse

type SiteLanDeleteResponse struct {
	Deleted    bool                            `json:"deleted"`
	DeletedLan SiteLanDeleteResponseDeletedLan `json:"deleted_lan"`
	JSON       siteLanDeleteResponseJSON       `json:"-"`
}

func (*SiteLanDeleteResponse) UnmarshalJSON

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

type SiteLanDeleteResponseDeletedLan

type SiteLanDeleteResponseDeletedLan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	// 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"`
	Nat           SiteLanDeleteResponseDeletedLanNat            `json:"nat"`
	Physport      int64                                         `json:"physport"`
	RoutedSubnets []SiteLanDeleteResponseDeletedLanRoutedSubnet `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 SiteLanDeleteResponseDeletedLanStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                               `json:"vlan_tag"`
	JSON    siteLanDeleteResponseDeletedLanJSON `json:"-"`
}

func (*SiteLanDeleteResponseDeletedLan) UnmarshalJSON

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

type SiteLanDeleteResponseDeletedLanNat

type SiteLanDeleteResponseDeletedLanNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                                 `json:"static_prefix"`
	JSON         siteLanDeleteResponseDeletedLanNatJSON `json:"-"`
}

func (*SiteLanDeleteResponseDeletedLanNat) UnmarshalJSON

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

type SiteLanDeleteResponseDeletedLanRoutedSubnet

type SiteLanDeleteResponseDeletedLanRoutedSubnet 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    SiteLanDeleteResponseDeletedLanRoutedSubnetsNat `json:"nat"`
	JSON   siteLanDeleteResponseDeletedLanRoutedSubnetJSON `json:"-"`
}

func (*SiteLanDeleteResponseDeletedLanRoutedSubnet) UnmarshalJSON

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

type SiteLanDeleteResponseDeletedLanRoutedSubnetsNat

type SiteLanDeleteResponseDeletedLanRoutedSubnetsNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                                              `json:"static_prefix"`
	JSON         siteLanDeleteResponseDeletedLanRoutedSubnetsNatJSON `json:"-"`
}

func (*SiteLanDeleteResponseDeletedLanRoutedSubnetsNat) UnmarshalJSON

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

type SiteLanDeleteResponseDeletedLanStaticAddressing

type SiteLanDeleteResponseDeletedLanStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address    string                                                    `json:"address,required"`
	DhcpRelay  SiteLanDeleteResponseDeletedLanStaticAddressingDhcpRelay  `json:"dhcp_relay"`
	DhcpServer SiteLanDeleteResponseDeletedLanStaticAddressingDhcpServer `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           siteLanDeleteResponseDeletedLanStaticAddressingJSON `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 (*SiteLanDeleteResponseDeletedLanStaticAddressing) UnmarshalJSON

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

type SiteLanDeleteResponseDeletedLanStaticAddressingDhcpRelay

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

func (*SiteLanDeleteResponseDeletedLanStaticAddressingDhcpRelay) UnmarshalJSON

type SiteLanDeleteResponseDeletedLanStaticAddressingDhcpServer

type SiteLanDeleteResponseDeletedLanStaticAddressingDhcpServer 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         siteLanDeleteResponseDeletedLanStaticAddressingDhcpServerJSON `json:"-"`
}

func (*SiteLanDeleteResponseDeletedLanStaticAddressingDhcpServer) UnmarshalJSON

type SiteLanDeleteResponseEnvelope

type SiteLanDeleteResponseEnvelope struct {
	Errors   []SiteLanDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteLanDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteLanDeleteResponse                   `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 SiteLanDeleteResponseEnvelopeErrors

type SiteLanDeleteResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteLanDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteLanDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type SiteLanDeleteResponseEnvelopeMessages

type SiteLanDeleteResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    siteLanDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteLanDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type SiteLanDeleteResponseEnvelopeSuccess

type SiteLanDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLanDeleteResponseEnvelopeSuccessTrue SiteLanDeleteResponseEnvelopeSuccess = true
)

type SiteLanGetResponse

type SiteLanGetResponse struct {
	Lan  SiteLanGetResponseLan  `json:"lan"`
	JSON siteLanGetResponseJSON `json:"-"`
}

func (*SiteLanGetResponse) UnmarshalJSON

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

type SiteLanGetResponseEnvelope

type SiteLanGetResponseEnvelope struct {
	Errors   []SiteLanGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteLanGetResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteLanGetResponse                   `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 SiteLanGetResponseEnvelopeErrors

type SiteLanGetResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteLanGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteLanGetResponseEnvelopeErrors) UnmarshalJSON

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

type SiteLanGetResponseEnvelopeMessages

type SiteLanGetResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    siteLanGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteLanGetResponseEnvelopeMessages) UnmarshalJSON

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

type SiteLanGetResponseEnvelopeSuccess

type SiteLanGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLanGetResponseEnvelopeSuccessTrue SiteLanGetResponseEnvelopeSuccess = true
)

type SiteLanGetResponseLan

type SiteLanGetResponseLan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	// 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"`
	Nat           SiteLanGetResponseLanNat            `json:"nat"`
	Physport      int64                               `json:"physport"`
	RoutedSubnets []SiteLanGetResponseLanRoutedSubnet `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 SiteLanGetResponseLanStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                     `json:"vlan_tag"`
	JSON    siteLanGetResponseLanJSON `json:"-"`
}

func (*SiteLanGetResponseLan) UnmarshalJSON

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

type SiteLanGetResponseLanNat

type SiteLanGetResponseLanNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                       `json:"static_prefix"`
	JSON         siteLanGetResponseLanNatJSON `json:"-"`
}

func (*SiteLanGetResponseLanNat) UnmarshalJSON

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

type SiteLanGetResponseLanRoutedSubnet

type SiteLanGetResponseLanRoutedSubnet 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    SiteLanGetResponseLanRoutedSubnetsNat `json:"nat"`
	JSON   siteLanGetResponseLanRoutedSubnetJSON `json:"-"`
}

func (*SiteLanGetResponseLanRoutedSubnet) UnmarshalJSON

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

type SiteLanGetResponseLanRoutedSubnetsNat

type SiteLanGetResponseLanRoutedSubnetsNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                                    `json:"static_prefix"`
	JSON         siteLanGetResponseLanRoutedSubnetsNatJSON `json:"-"`
}

func (*SiteLanGetResponseLanRoutedSubnetsNat) UnmarshalJSON

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

type SiteLanGetResponseLanStaticAddressing

type SiteLanGetResponseLanStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address    string                                          `json:"address,required"`
	DhcpRelay  SiteLanGetResponseLanStaticAddressingDhcpRelay  `json:"dhcp_relay"`
	DhcpServer SiteLanGetResponseLanStaticAddressingDhcpServer `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           siteLanGetResponseLanStaticAddressingJSON `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 (*SiteLanGetResponseLanStaticAddressing) UnmarshalJSON

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

type SiteLanGetResponseLanStaticAddressingDhcpRelay

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

func (*SiteLanGetResponseLanStaticAddressingDhcpRelay) UnmarshalJSON

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

type SiteLanGetResponseLanStaticAddressingDhcpServer

type SiteLanGetResponseLanStaticAddressingDhcpServer 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         siteLanGetResponseLanStaticAddressingDhcpServerJSON `json:"-"`
}

func (*SiteLanGetResponseLanStaticAddressingDhcpServer) UnmarshalJSON

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

type SiteLanListResponse

type SiteLanListResponse struct {
	Lans []SiteLanListResponseLan `json:"lans"`
	JSON siteLanListResponseJSON  `json:"-"`
}

func (*SiteLanListResponse) UnmarshalJSON

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

type SiteLanListResponseEnvelope

type SiteLanListResponseEnvelope struct {
	Errors   []SiteLanListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteLanListResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteLanListResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteLanListResponseEnvelopeSuccess `json:"success,required"`
	JSON    siteLanListResponseEnvelopeJSON    `json:"-"`
}

func (*SiteLanListResponseEnvelope) UnmarshalJSON

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

type SiteLanListResponseEnvelopeErrors

type SiteLanListResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    siteLanListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteLanListResponseEnvelopeErrors) UnmarshalJSON

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

type SiteLanListResponseEnvelopeMessages

type SiteLanListResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteLanListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteLanListResponseEnvelopeMessages) UnmarshalJSON

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

type SiteLanListResponseEnvelopeSuccess

type SiteLanListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLanListResponseEnvelopeSuccessTrue SiteLanListResponseEnvelopeSuccess = true
)

type SiteLanListResponseLan

type SiteLanListResponseLan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	// 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"`
	Nat           SiteLanListResponseLansNat            `json:"nat"`
	Physport      int64                                 `json:"physport"`
	RoutedSubnets []SiteLanListResponseLansRoutedSubnet `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 SiteLanListResponseLansStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                      `json:"vlan_tag"`
	JSON    siteLanListResponseLanJSON `json:"-"`
}

func (*SiteLanListResponseLan) UnmarshalJSON

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

type SiteLanListResponseLansNat

type SiteLanListResponseLansNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                         `json:"static_prefix"`
	JSON         siteLanListResponseLansNatJSON `json:"-"`
}

func (*SiteLanListResponseLansNat) UnmarshalJSON

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

type SiteLanListResponseLansRoutedSubnet

type SiteLanListResponseLansRoutedSubnet 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    SiteLanListResponseLansRoutedSubnetsNat `json:"nat"`
	JSON   siteLanListResponseLansRoutedSubnetJSON `json:"-"`
}

func (*SiteLanListResponseLansRoutedSubnet) UnmarshalJSON

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

type SiteLanListResponseLansRoutedSubnetsNat

type SiteLanListResponseLansRoutedSubnetsNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                                      `json:"static_prefix"`
	JSON         siteLanListResponseLansRoutedSubnetsNatJSON `json:"-"`
}

func (*SiteLanListResponseLansRoutedSubnetsNat) UnmarshalJSON

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

type SiteLanListResponseLansStaticAddressing

type SiteLanListResponseLansStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address    string                                            `json:"address,required"`
	DhcpRelay  SiteLanListResponseLansStaticAddressingDhcpRelay  `json:"dhcp_relay"`
	DhcpServer SiteLanListResponseLansStaticAddressingDhcpServer `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           siteLanListResponseLansStaticAddressingJSON `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 (*SiteLanListResponseLansStaticAddressing) UnmarshalJSON

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

type SiteLanListResponseLansStaticAddressingDhcpRelay

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

func (*SiteLanListResponseLansStaticAddressingDhcpRelay) UnmarshalJSON

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

type SiteLanListResponseLansStaticAddressingDhcpServer

type SiteLanListResponseLansStaticAddressingDhcpServer 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         siteLanListResponseLansStaticAddressingDhcpServerJSON `json:"-"`
}

func (*SiteLanListResponseLansStaticAddressingDhcpServer) UnmarshalJSON

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

type SiteLanNewParams

type SiteLanNewParams struct {
	Lan param.Field[SiteLanNewParamsLan] `json:"lan"`
}

func (SiteLanNewParams) MarshalJSON

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

type SiteLanNewParamsLan

type SiteLanNewParamsLan struct {
	Physport param.Field[int64] `json:"physport,required"`
	// VLAN port number.
	VlanTag     param.Field[int64]  `json:"vlan_tag,required"`
	Description param.Field[string] `json:"description"`
	// 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"`
	Nat           param.Field[SiteLanNewParamsLanNat]            `json:"nat"`
	RoutedSubnets param.Field[[]SiteLanNewParamsLanRoutedSubnet] `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[SiteLanNewParamsLanStaticAddressing] `json:"static_addressing"`
}

func (SiteLanNewParamsLan) MarshalJSON

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

type SiteLanNewParamsLanNat

type SiteLanNewParamsLanNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix param.Field[string] `json:"static_prefix"`
}

func (SiteLanNewParamsLanNat) MarshalJSON

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

type SiteLanNewParamsLanRoutedSubnet

type SiteLanNewParamsLanRoutedSubnet 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[SiteLanNewParamsLanRoutedSubnetsNat] `json:"nat"`
}

func (SiteLanNewParamsLanRoutedSubnet) MarshalJSON

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

type SiteLanNewParamsLanRoutedSubnetsNat

type SiteLanNewParamsLanRoutedSubnetsNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix param.Field[string] `json:"static_prefix"`
}

func (SiteLanNewParamsLanRoutedSubnetsNat) MarshalJSON

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

type SiteLanNewParamsLanStaticAddressing

type SiteLanNewParamsLanStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address    param.Field[string]                                        `json:"address,required"`
	DhcpRelay  param.Field[SiteLanNewParamsLanStaticAddressingDhcpRelay]  `json:"dhcp_relay"`
	DhcpServer param.Field[SiteLanNewParamsLanStaticAddressingDhcpServer] `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 (SiteLanNewParamsLanStaticAddressing) MarshalJSON

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

type SiteLanNewParamsLanStaticAddressingDhcpRelay

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

func (SiteLanNewParamsLanStaticAddressingDhcpRelay) MarshalJSON

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

type SiteLanNewParamsLanStaticAddressingDhcpServer

type SiteLanNewParamsLanStaticAddressingDhcpServer 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 (SiteLanNewParamsLanStaticAddressingDhcpServer) MarshalJSON

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

type SiteLanNewResponse

type SiteLanNewResponse struct {
	Lans []SiteLanNewResponseLan `json:"lans"`
	JSON siteLanNewResponseJSON  `json:"-"`
}

func (*SiteLanNewResponse) UnmarshalJSON

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

type SiteLanNewResponseEnvelope

type SiteLanNewResponseEnvelope struct {
	Errors   []SiteLanNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteLanNewResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteLanNewResponse                   `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 SiteLanNewResponseEnvelopeErrors

type SiteLanNewResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteLanNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteLanNewResponseEnvelopeErrors) UnmarshalJSON

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

type SiteLanNewResponseEnvelopeMessages

type SiteLanNewResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    siteLanNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteLanNewResponseEnvelopeMessages) UnmarshalJSON

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

type SiteLanNewResponseEnvelopeSuccess

type SiteLanNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLanNewResponseEnvelopeSuccessTrue SiteLanNewResponseEnvelopeSuccess = true
)

type SiteLanNewResponseLan

type SiteLanNewResponseLan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	// 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"`
	Nat           SiteLanNewResponseLansNat            `json:"nat"`
	Physport      int64                                `json:"physport"`
	RoutedSubnets []SiteLanNewResponseLansRoutedSubnet `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 SiteLanNewResponseLansStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                     `json:"vlan_tag"`
	JSON    siteLanNewResponseLanJSON `json:"-"`
}

func (*SiteLanNewResponseLan) UnmarshalJSON

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

type SiteLanNewResponseLansNat

type SiteLanNewResponseLansNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                        `json:"static_prefix"`
	JSON         siteLanNewResponseLansNatJSON `json:"-"`
}

func (*SiteLanNewResponseLansNat) UnmarshalJSON

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

type SiteLanNewResponseLansRoutedSubnet

type SiteLanNewResponseLansRoutedSubnet 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    SiteLanNewResponseLansRoutedSubnetsNat `json:"nat"`
	JSON   siteLanNewResponseLansRoutedSubnetJSON `json:"-"`
}

func (*SiteLanNewResponseLansRoutedSubnet) UnmarshalJSON

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

type SiteLanNewResponseLansRoutedSubnetsNat

type SiteLanNewResponseLansRoutedSubnetsNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                                     `json:"static_prefix"`
	JSON         siteLanNewResponseLansRoutedSubnetsNatJSON `json:"-"`
}

func (*SiteLanNewResponseLansRoutedSubnetsNat) UnmarshalJSON

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

type SiteLanNewResponseLansStaticAddressing

type SiteLanNewResponseLansStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address    string                                           `json:"address,required"`
	DhcpRelay  SiteLanNewResponseLansStaticAddressingDhcpRelay  `json:"dhcp_relay"`
	DhcpServer SiteLanNewResponseLansStaticAddressingDhcpServer `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           siteLanNewResponseLansStaticAddressingJSON `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 (*SiteLanNewResponseLansStaticAddressing) UnmarshalJSON

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

type SiteLanNewResponseLansStaticAddressingDhcpRelay

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

func (*SiteLanNewResponseLansStaticAddressingDhcpRelay) UnmarshalJSON

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

type SiteLanNewResponseLansStaticAddressingDhcpServer

type SiteLanNewResponseLansStaticAddressingDhcpServer 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         siteLanNewResponseLansStaticAddressingDhcpServerJSON `json:"-"`
}

func (*SiteLanNewResponseLansStaticAddressingDhcpServer) UnmarshalJSON

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

type SiteLanService

type SiteLanService struct {
	Options []option.RequestOption
}

SiteLanService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSiteLanService method instead.

func NewSiteLanService

func NewSiteLanService(opts ...option.RequestOption) (r *SiteLanService)

NewSiteLanService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SiteLanService) Delete

func (r *SiteLanService) Delete(ctx context.Context, accountIdentifier string, siteIdentifier string, lanIdentifier string, opts ...option.RequestOption) (res *SiteLanDeleteResponse, err error)

Remove a specific LAN.

func (*SiteLanService) Get

func (r *SiteLanService) Get(ctx context.Context, accountIdentifier string, siteIdentifier string, lanIdentifier string, opts ...option.RequestOption) (res *SiteLanGetResponse, err error)

Get a specific LAN.

func (*SiteLanService) List

func (r *SiteLanService) List(ctx context.Context, accountIdentifier string, siteIdentifier string, opts ...option.RequestOption) (res *SiteLanListResponse, err error)

Lists LANs associated with an account and site.

func (*SiteLanService) New

func (r *SiteLanService) New(ctx context.Context, accountIdentifier string, siteIdentifier string, body SiteLanNewParams, opts ...option.RequestOption) (res *SiteLanNewResponse, err error)

Creates a new 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, accountIdentifier string, siteIdentifier string, lanIdentifier string, body SiteLanUpdateParams, opts ...option.RequestOption) (res *SiteLanUpdateResponse, err error)

Update a specific LAN.

type SiteLanUpdateParams

type SiteLanUpdateParams struct {
	Lan param.Field[SiteLanUpdateParamsLan] `json:"lan"`
}

func (SiteLanUpdateParams) MarshalJSON

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

type SiteLanUpdateParamsLan

type SiteLanUpdateParamsLan struct {
	Description   param.Field[string]                               `json:"description"`
	Nat           param.Field[SiteLanUpdateParamsLanNat]            `json:"nat"`
	Physport      param.Field[int64]                                `json:"physport"`
	RoutedSubnets param.Field[[]SiteLanUpdateParamsLanRoutedSubnet] `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[SiteLanUpdateParamsLanStaticAddressing] `json:"static_addressing"`
	// VLAN port number.
	VlanTag param.Field[int64] `json:"vlan_tag"`
}

func (SiteLanUpdateParamsLan) MarshalJSON

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

type SiteLanUpdateParamsLanNat

type SiteLanUpdateParamsLanNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix param.Field[string] `json:"static_prefix"`
}

func (SiteLanUpdateParamsLanNat) MarshalJSON

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

type SiteLanUpdateParamsLanRoutedSubnet

type SiteLanUpdateParamsLanRoutedSubnet 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[SiteLanUpdateParamsLanRoutedSubnetsNat] `json:"nat"`
}

func (SiteLanUpdateParamsLanRoutedSubnet) MarshalJSON

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

type SiteLanUpdateParamsLanRoutedSubnetsNat

type SiteLanUpdateParamsLanRoutedSubnetsNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix param.Field[string] `json:"static_prefix"`
}

func (SiteLanUpdateParamsLanRoutedSubnetsNat) MarshalJSON

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

type SiteLanUpdateParamsLanStaticAddressing

type SiteLanUpdateParamsLanStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address    param.Field[string]                                           `json:"address,required"`
	DhcpRelay  param.Field[SiteLanUpdateParamsLanStaticAddressingDhcpRelay]  `json:"dhcp_relay"`
	DhcpServer param.Field[SiteLanUpdateParamsLanStaticAddressingDhcpServer] `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 (SiteLanUpdateParamsLanStaticAddressing) MarshalJSON

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

type SiteLanUpdateParamsLanStaticAddressingDhcpRelay

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

func (SiteLanUpdateParamsLanStaticAddressingDhcpRelay) MarshalJSON

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

type SiteLanUpdateParamsLanStaticAddressingDhcpServer

type SiteLanUpdateParamsLanStaticAddressingDhcpServer 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 (SiteLanUpdateParamsLanStaticAddressingDhcpServer) MarshalJSON

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

type SiteLanUpdateResponse

type SiteLanUpdateResponse struct {
	Lan  SiteLanUpdateResponseLan  `json:"lan"`
	JSON siteLanUpdateResponseJSON `json:"-"`
}

func (*SiteLanUpdateResponse) UnmarshalJSON

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

type SiteLanUpdateResponseEnvelope

type SiteLanUpdateResponseEnvelope struct {
	Errors   []SiteLanUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteLanUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteLanUpdateResponse                   `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 SiteLanUpdateResponseEnvelopeErrors

type SiteLanUpdateResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteLanUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteLanUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type SiteLanUpdateResponseEnvelopeMessages

type SiteLanUpdateResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    siteLanUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteLanUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type SiteLanUpdateResponseEnvelopeSuccess

type SiteLanUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteLanUpdateResponseEnvelopeSuccessTrue SiteLanUpdateResponseEnvelopeSuccess = true
)

type SiteLanUpdateResponseLan

type SiteLanUpdateResponseLan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	// 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"`
	Nat           SiteLanUpdateResponseLanNat            `json:"nat"`
	Physport      int64                                  `json:"physport"`
	RoutedSubnets []SiteLanUpdateResponseLanRoutedSubnet `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 SiteLanUpdateResponseLanStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                        `json:"vlan_tag"`
	JSON    siteLanUpdateResponseLanJSON `json:"-"`
}

func (*SiteLanUpdateResponseLan) UnmarshalJSON

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

type SiteLanUpdateResponseLanNat

type SiteLanUpdateResponseLanNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                          `json:"static_prefix"`
	JSON         siteLanUpdateResponseLanNatJSON `json:"-"`
}

func (*SiteLanUpdateResponseLanNat) UnmarshalJSON

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

type SiteLanUpdateResponseLanRoutedSubnet

type SiteLanUpdateResponseLanRoutedSubnet 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    SiteLanUpdateResponseLanRoutedSubnetsNat `json:"nat"`
	JSON   siteLanUpdateResponseLanRoutedSubnetJSON `json:"-"`
}

func (*SiteLanUpdateResponseLanRoutedSubnet) UnmarshalJSON

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

type SiteLanUpdateResponseLanRoutedSubnetsNat

type SiteLanUpdateResponseLanRoutedSubnetsNat struct {
	// A valid CIDR notation representing an IP range.
	StaticPrefix string                                       `json:"static_prefix"`
	JSON         siteLanUpdateResponseLanRoutedSubnetsNatJSON `json:"-"`
}

func (*SiteLanUpdateResponseLanRoutedSubnetsNat) UnmarshalJSON

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

type SiteLanUpdateResponseLanStaticAddressing

type SiteLanUpdateResponseLanStaticAddressing struct {
	// A valid CIDR notation representing an IP range.
	Address    string                                             `json:"address,required"`
	DhcpRelay  SiteLanUpdateResponseLanStaticAddressingDhcpRelay  `json:"dhcp_relay"`
	DhcpServer SiteLanUpdateResponseLanStaticAddressingDhcpServer `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           siteLanUpdateResponseLanStaticAddressingJSON `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 (*SiteLanUpdateResponseLanStaticAddressing) UnmarshalJSON

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

type SiteLanUpdateResponseLanStaticAddressingDhcpRelay

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

func (*SiteLanUpdateResponseLanStaticAddressingDhcpRelay) UnmarshalJSON

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

type SiteLanUpdateResponseLanStaticAddressingDhcpServer

type SiteLanUpdateResponseLanStaticAddressingDhcpServer 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         siteLanUpdateResponseLanStaticAddressingDhcpServerJSON `json:"-"`
}

func (*SiteLanUpdateResponseLanStaticAddressingDhcpServer) UnmarshalJSON

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

type SiteListParams

type SiteListParams struct {
}

type SiteListResponse

type SiteListResponse struct {
	Sites []SiteListResponseSite `json:"sites"`
	JSON  siteListResponseJSON   `json:"-"`
}

func (*SiteListResponse) UnmarshalJSON

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

type SiteListResponseEnvelope

type SiteListResponseEnvelope struct {
	Errors   []SiteListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteListResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteListResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteListResponseEnvelopeSuccess `json:"success,required"`
	JSON    siteListResponseEnvelopeJSON    `json:"-"`
}

func (*SiteListResponseEnvelope) UnmarshalJSON

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

type SiteListResponseEnvelopeErrors

type SiteListResponseEnvelopeErrors struct {
	Code    int64                              `json:"code,required"`
	Message string                             `json:"message,required"`
	JSON    siteListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteListResponseEnvelopeErrors) UnmarshalJSON

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

type SiteListResponseEnvelopeMessages

type SiteListResponseEnvelopeMessages struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteListResponseEnvelopeMessages) UnmarshalJSON

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

type SiteListResponseEnvelopeSuccess

type SiteListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteListResponseEnvelopeSuccessTrue SiteListResponseEnvelopeSuccess = true
)

type SiteListResponseSite

type SiteListResponseSite struct {
	// Identifier
	ID string `json:"id"`
	// Magic WAN 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 SiteListResponseSitesLocation `json:"location"`
	// The name of the site.
	Name string `json:"name"`
	// Magic WAN Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID string                   `json:"secondary_connector_id"`
	JSON                 siteListResponseSiteJSON `json:"-"`
}

func (*SiteListResponseSite) UnmarshalJSON

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

type SiteListResponseSitesLocation

type SiteListResponseSitesLocation struct {
	// Latitude
	Lat string `json:"lat"`
	// Longitude
	Lon  string                            `json:"lon"`
	JSON siteListResponseSitesLocationJSON `json:"-"`
}

Location of site in latitude and longitude.

func (*SiteListResponseSitesLocation) UnmarshalJSON

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

type SiteNewParams

type SiteNewParams struct {
	Site param.Field[SiteNewParamsSite] `json:"site"`
}

func (SiteNewParams) MarshalJSON

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

type SiteNewParamsSite

type SiteNewParamsSite struct {
	// The name of the site.
	Name param.Field[string] `json:"name,required"`
	// Magic WAN 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[SiteNewParamsSiteLocation] `json:"location"`
	// Magic WAN Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID param.Field[string] `json:"secondary_connector_id"`
}

func (SiteNewParamsSite) MarshalJSON

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

type SiteNewParamsSiteLocation

type SiteNewParamsSiteLocation struct {
	// Latitude
	Lat param.Field[string] `json:"lat"`
	// Longitude
	Lon param.Field[string] `json:"lon"`
}

Location of site in latitude and longitude.

func (SiteNewParamsSiteLocation) MarshalJSON

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

type SiteNewResponse

type SiteNewResponse struct {
	Site SiteNewResponseSite `json:"site"`
	JSON siteNewResponseJSON `json:"-"`
}

func (*SiteNewResponse) UnmarshalJSON

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

type SiteNewResponseEnvelope

type SiteNewResponseEnvelope struct {
	Errors   []SiteNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteNewResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteNewResponse                   `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 SiteNewResponseEnvelopeErrors

type SiteNewResponseEnvelopeErrors struct {
	Code    int64                             `json:"code,required"`
	Message string                            `json:"message,required"`
	JSON    siteNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteNewResponseEnvelopeErrors) UnmarshalJSON

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

type SiteNewResponseEnvelopeMessages

type SiteNewResponseEnvelopeMessages struct {
	Code    int64                               `json:"code,required"`
	Message string                              `json:"message,required"`
	JSON    siteNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteNewResponseEnvelopeMessages) UnmarshalJSON

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

type SiteNewResponseEnvelopeSuccess

type SiteNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteNewResponseEnvelopeSuccessTrue SiteNewResponseEnvelopeSuccess = true
)

type SiteNewResponseSite

type SiteNewResponseSite struct {
	// Identifier
	ID string `json:"id"`
	// Magic WAN 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 SiteNewResponseSiteLocation `json:"location"`
	// The name of the site.
	Name string `json:"name"`
	// Magic WAN Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID string                  `json:"secondary_connector_id"`
	JSON                 siteNewResponseSiteJSON `json:"-"`
}

func (*SiteNewResponseSite) UnmarshalJSON

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

type SiteNewResponseSiteLocation

type SiteNewResponseSiteLocation struct {
	// Latitude
	Lat string `json:"lat"`
	// Longitude
	Lon  string                          `json:"lon"`
	JSON siteNewResponseSiteLocationJSON `json:"-"`
}

Location of site in latitude and longitude.

func (*SiteNewResponseSiteLocation) UnmarshalJSON

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

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, accountIdentifier string, siteIdentifier string, opts ...option.RequestOption) (res *SiteDeleteResponse, err error)

Remove a specific Site.

func (*SiteService) Get

func (r *SiteService) Get(ctx context.Context, accountIdentifier string, siteIdentifier string, opts ...option.RequestOption) (res *SiteGetResponse, err error)

Get a specific Site.

func (*SiteService) List

func (r *SiteService) List(ctx context.Context, accountIdentifier string, query SiteListParams, opts ...option.RequestOption) (res *SiteListResponse, 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) New

func (r *SiteService) New(ctx context.Context, accountIdentifier string, body SiteNewParams, opts ...option.RequestOption) (res *SiteNewResponse, err error)

Creates a new Site

func (*SiteService) Update

func (r *SiteService) Update(ctx context.Context, accountIdentifier string, siteIdentifier string, body SiteUpdateParams, opts ...option.RequestOption) (res *SiteUpdateResponse, err error)

Update a specific Site.

type SiteUpdateParams

type SiteUpdateParams struct {
	Site param.Field[SiteUpdateParamsSite] `json:"site"`
}

func (SiteUpdateParams) MarshalJSON

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

type SiteUpdateParamsSite

type SiteUpdateParamsSite struct {
	// Magic WAN 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[SiteUpdateParamsSiteLocation] `json:"location"`
	// The name of the site.
	Name param.Field[string] `json:"name"`
	// Magic WAN Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID param.Field[string] `json:"secondary_connector_id"`
}

func (SiteUpdateParamsSite) MarshalJSON

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

type SiteUpdateParamsSiteLocation

type SiteUpdateParamsSiteLocation struct {
	// Latitude
	Lat param.Field[string] `json:"lat"`
	// Longitude
	Lon param.Field[string] `json:"lon"`
}

Location of site in latitude and longitude.

func (SiteUpdateParamsSiteLocation) MarshalJSON

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

type SiteUpdateResponse

type SiteUpdateResponse struct {
	Site SiteUpdateResponseSite `json:"site"`
	JSON siteUpdateResponseJSON `json:"-"`
}

func (*SiteUpdateResponse) UnmarshalJSON

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

type SiteUpdateResponseEnvelope

type SiteUpdateResponseEnvelope struct {
	Errors   []SiteUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteUpdateResponse                   `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 SiteUpdateResponseEnvelopeErrors

type SiteUpdateResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type SiteUpdateResponseEnvelopeMessages

type SiteUpdateResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    siteUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type SiteUpdateResponseEnvelopeSuccess

type SiteUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteUpdateResponseEnvelopeSuccessTrue SiteUpdateResponseEnvelopeSuccess = true
)

type SiteUpdateResponseSite

type SiteUpdateResponseSite struct {
	// Identifier
	ID string `json:"id"`
	// Magic WAN 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 SiteUpdateResponseSiteLocation `json:"location"`
	// The name of the site.
	Name string `json:"name"`
	// Magic WAN Connector identifier tag. Used when high availability mode is on.
	SecondaryConnectorID string                     `json:"secondary_connector_id"`
	JSON                 siteUpdateResponseSiteJSON `json:"-"`
}

func (*SiteUpdateResponseSite) UnmarshalJSON

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

type SiteUpdateResponseSiteLocation

type SiteUpdateResponseSiteLocation struct {
	// Latitude
	Lat string `json:"lat"`
	// Longitude
	Lon  string                             `json:"lon"`
	JSON siteUpdateResponseSiteLocationJSON `json:"-"`
}

Location of site in latitude and longitude.

func (*SiteUpdateResponseSiteLocation) UnmarshalJSON

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

type SiteWanDeleteResponse

type SiteWanDeleteResponse struct {
	Deleted    bool                            `json:"deleted"`
	DeletedWan SiteWanDeleteResponseDeletedWan `json:"deleted_wan"`
	JSON       siteWanDeleteResponseJSON       `json:"-"`
}

func (*SiteWanDeleteResponse) UnmarshalJSON

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

type SiteWanDeleteResponseDeletedWan

type SiteWanDeleteResponseDeletedWan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	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 SiteWanDeleteResponseDeletedWanStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                               `json:"vlan_tag"`
	JSON    siteWanDeleteResponseDeletedWanJSON `json:"-"`
}

func (*SiteWanDeleteResponseDeletedWan) UnmarshalJSON

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

type SiteWanDeleteResponseDeletedWanStaticAddressing

type SiteWanDeleteResponseDeletedWanStaticAddressing 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             siteWanDeleteResponseDeletedWanStaticAddressingJSON `json:"-"`
}

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

func (*SiteWanDeleteResponseDeletedWanStaticAddressing) UnmarshalJSON

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

type SiteWanDeleteResponseEnvelope

type SiteWanDeleteResponseEnvelope struct {
	Errors   []SiteWanDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteWanDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteWanDeleteResponse                   `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 SiteWanDeleteResponseEnvelopeErrors

type SiteWanDeleteResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteWanDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteWanDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type SiteWanDeleteResponseEnvelopeMessages

type SiteWanDeleteResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    siteWanDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteWanDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type SiteWanDeleteResponseEnvelopeSuccess

type SiteWanDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWanDeleteResponseEnvelopeSuccessTrue SiteWanDeleteResponseEnvelopeSuccess = true
)

type SiteWanGetResponse

type SiteWanGetResponse struct {
	Wan  SiteWanGetResponseWan  `json:"wan"`
	JSON siteWanGetResponseJSON `json:"-"`
}

func (*SiteWanGetResponse) UnmarshalJSON

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

type SiteWanGetResponseEnvelope

type SiteWanGetResponseEnvelope struct {
	Errors   []SiteWanGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteWanGetResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteWanGetResponse                   `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 SiteWanGetResponseEnvelopeErrors

type SiteWanGetResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteWanGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteWanGetResponseEnvelopeErrors) UnmarshalJSON

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

type SiteWanGetResponseEnvelopeMessages

type SiteWanGetResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    siteWanGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteWanGetResponseEnvelopeMessages) UnmarshalJSON

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

type SiteWanGetResponseEnvelopeSuccess

type SiteWanGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWanGetResponseEnvelopeSuccessTrue SiteWanGetResponseEnvelopeSuccess = true
)

type SiteWanGetResponseWan

type SiteWanGetResponseWan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	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 SiteWanGetResponseWanStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                     `json:"vlan_tag"`
	JSON    siteWanGetResponseWanJSON `json:"-"`
}

func (*SiteWanGetResponseWan) UnmarshalJSON

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

type SiteWanGetResponseWanStaticAddressing

type SiteWanGetResponseWanStaticAddressing 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             siteWanGetResponseWanStaticAddressingJSON `json:"-"`
}

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

func (*SiteWanGetResponseWanStaticAddressing) UnmarshalJSON

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

type SiteWanListResponse

type SiteWanListResponse struct {
	Wans []SiteWanListResponseWan `json:"wans"`
	JSON siteWanListResponseJSON  `json:"-"`
}

func (*SiteWanListResponse) UnmarshalJSON

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

type SiteWanListResponseEnvelope

type SiteWanListResponseEnvelope struct {
	Errors   []SiteWanListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteWanListResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteWanListResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success SiteWanListResponseEnvelopeSuccess `json:"success,required"`
	JSON    siteWanListResponseEnvelopeJSON    `json:"-"`
}

func (*SiteWanListResponseEnvelope) UnmarshalJSON

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

type SiteWanListResponseEnvelopeErrors

type SiteWanListResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code,required"`
	Message string                                `json:"message,required"`
	JSON    siteWanListResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteWanListResponseEnvelopeErrors) UnmarshalJSON

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

type SiteWanListResponseEnvelopeMessages

type SiteWanListResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteWanListResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteWanListResponseEnvelopeMessages) UnmarshalJSON

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

type SiteWanListResponseEnvelopeSuccess

type SiteWanListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWanListResponseEnvelopeSuccessTrue SiteWanListResponseEnvelopeSuccess = true
)

type SiteWanListResponseWan

type SiteWanListResponseWan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	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 SiteWanListResponseWansStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                      `json:"vlan_tag"`
	JSON    siteWanListResponseWanJSON `json:"-"`
}

func (*SiteWanListResponseWan) UnmarshalJSON

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

type SiteWanListResponseWansStaticAddressing

type SiteWanListResponseWansStaticAddressing 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             siteWanListResponseWansStaticAddressingJSON `json:"-"`
}

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

func (*SiteWanListResponseWansStaticAddressing) UnmarshalJSON

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

type SiteWanNewParams

type SiteWanNewParams struct {
	Wan param.Field[SiteWanNewParamsWan] `json:"wan"`
}

func (SiteWanNewParams) MarshalJSON

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

type SiteWanNewParamsWan

type SiteWanNewParamsWan struct {
	Physport param.Field[int64] `json:"physport,required"`
	// VLAN port number.
	VlanTag     param.Field[int64]  `json:"vlan_tag,required"`
	Description param.Field[string] `json:"description"`
	Priority    param.Field[int64]  `json:"priority"`
	// (optional) if omitted, use DHCP. Submit secondary_address when site is in high
	// availability mode.
	StaticAddressing param.Field[SiteWanNewParamsWanStaticAddressing] `json:"static_addressing"`
}

func (SiteWanNewParamsWan) MarshalJSON

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

type SiteWanNewParamsWanStaticAddressing

type SiteWanNewParamsWanStaticAddressing 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 (SiteWanNewParamsWanStaticAddressing) MarshalJSON

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

type SiteWanNewResponse

type SiteWanNewResponse struct {
	Wans []SiteWanNewResponseWan `json:"wans"`
	JSON siteWanNewResponseJSON  `json:"-"`
}

func (*SiteWanNewResponse) UnmarshalJSON

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

type SiteWanNewResponseEnvelope

type SiteWanNewResponseEnvelope struct {
	Errors   []SiteWanNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteWanNewResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteWanNewResponse                   `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 SiteWanNewResponseEnvelopeErrors

type SiteWanNewResponseEnvelopeErrors struct {
	Code    int64                                `json:"code,required"`
	Message string                               `json:"message,required"`
	JSON    siteWanNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteWanNewResponseEnvelopeErrors) UnmarshalJSON

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

type SiteWanNewResponseEnvelopeMessages

type SiteWanNewResponseEnvelopeMessages struct {
	Code    int64                                  `json:"code,required"`
	Message string                                 `json:"message,required"`
	JSON    siteWanNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteWanNewResponseEnvelopeMessages) UnmarshalJSON

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

type SiteWanNewResponseEnvelopeSuccess

type SiteWanNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWanNewResponseEnvelopeSuccessTrue SiteWanNewResponseEnvelopeSuccess = true
)

type SiteWanNewResponseWan

type SiteWanNewResponseWan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	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 SiteWanNewResponseWansStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                     `json:"vlan_tag"`
	JSON    siteWanNewResponseWanJSON `json:"-"`
}

func (*SiteWanNewResponseWan) UnmarshalJSON

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

type SiteWanNewResponseWansStaticAddressing

type SiteWanNewResponseWansStaticAddressing 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             siteWanNewResponseWansStaticAddressingJSON `json:"-"`
}

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

func (*SiteWanNewResponseWansStaticAddressing) UnmarshalJSON

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

type SiteWanService

type SiteWanService struct {
	Options []option.RequestOption
}

SiteWanService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSiteWanService method instead.

func NewSiteWanService

func NewSiteWanService(opts ...option.RequestOption) (r *SiteWanService)

NewSiteWanService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SiteWanService) Delete

func (r *SiteWanService) Delete(ctx context.Context, accountIdentifier string, siteIdentifier string, wanIdentifier string, opts ...option.RequestOption) (res *SiteWanDeleteResponse, err error)

Remove a specific WAN.

func (*SiteWanService) Get

func (r *SiteWanService) Get(ctx context.Context, accountIdentifier string, siteIdentifier string, wanIdentifier string, opts ...option.RequestOption) (res *SiteWanGetResponse, err error)

Get a specific WAN.

func (*SiteWanService) List

func (r *SiteWanService) List(ctx context.Context, accountIdentifier string, siteIdentifier string, opts ...option.RequestOption) (res *SiteWanListResponse, err error)

Lists WANs associated with an account and site.

func (*SiteWanService) New

func (r *SiteWanService) New(ctx context.Context, accountIdentifier string, siteIdentifier string, body SiteWanNewParams, opts ...option.RequestOption) (res *SiteWanNewResponse, err error)

Creates a new WAN.

func (*SiteWanService) Update

func (r *SiteWanService) Update(ctx context.Context, accountIdentifier string, siteIdentifier string, wanIdentifier string, body SiteWanUpdateParams, opts ...option.RequestOption) (res *SiteWanUpdateResponse, err error)

Update a specific WAN.

type SiteWanUpdateParams

type SiteWanUpdateParams struct {
	Wan param.Field[SiteWanUpdateParamsWan] `json:"wan"`
}

func (SiteWanUpdateParams) MarshalJSON

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

type SiteWanUpdateParamsWan

type SiteWanUpdateParamsWan struct {
	Description param.Field[string] `json:"description"`
	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[SiteWanUpdateParamsWanStaticAddressing] `json:"static_addressing"`
	// VLAN port number.
	VlanTag param.Field[int64] `json:"vlan_tag"`
}

func (SiteWanUpdateParamsWan) MarshalJSON

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

type SiteWanUpdateParamsWanStaticAddressing

type SiteWanUpdateParamsWanStaticAddressing 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 (SiteWanUpdateParamsWanStaticAddressing) MarshalJSON

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

type SiteWanUpdateResponse

type SiteWanUpdateResponse struct {
	Wan  SiteWanUpdateResponseWan  `json:"wan"`
	JSON siteWanUpdateResponseJSON `json:"-"`
}

func (*SiteWanUpdateResponse) UnmarshalJSON

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

type SiteWanUpdateResponseEnvelope

type SiteWanUpdateResponseEnvelope struct {
	Errors   []SiteWanUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SiteWanUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   SiteWanUpdateResponse                   `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 SiteWanUpdateResponseEnvelopeErrors

type SiteWanUpdateResponseEnvelopeErrors struct {
	Code    int64                                   `json:"code,required"`
	Message string                                  `json:"message,required"`
	JSON    siteWanUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*SiteWanUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type SiteWanUpdateResponseEnvelopeMessages

type SiteWanUpdateResponseEnvelopeMessages struct {
	Code    int64                                     `json:"code,required"`
	Message string                                    `json:"message,required"`
	JSON    siteWanUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*SiteWanUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type SiteWanUpdateResponseEnvelopeSuccess

type SiteWanUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SiteWanUpdateResponseEnvelopeSuccessTrue SiteWanUpdateResponseEnvelopeSuccess = true
)

type SiteWanUpdateResponseWan

type SiteWanUpdateResponseWan struct {
	// Identifier
	ID          string `json:"id"`
	Description string `json:"description"`
	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 SiteWanUpdateResponseWanStaticAddressing `json:"static_addressing"`
	// VLAN port number.
	VlanTag int64                        `json:"vlan_tag"`
	JSON    siteWanUpdateResponseWanJSON `json:"-"`
}

func (*SiteWanUpdateResponseWan) UnmarshalJSON

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

type SiteWanUpdateResponseWanStaticAddressing

type SiteWanUpdateResponseWanStaticAddressing 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             siteWanUpdateResponseWanStaticAddressingJSON `json:"-"`
}

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

func (*SiteWanUpdateResponseWanStaticAddressing) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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