addressing

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AddressMap

type AddressMap struct {
	// Identifier
	ID string `json:"id"`
	// If set to false, then the Address Map cannot be deleted via API. This is true
	// for Cloudflare-managed maps.
	CanDelete bool `json:"can_delete"`
	// If set to false, then the IPs on the Address Map cannot be modified via the API.
	// This is true for Cloudflare-managed maps.
	CanModifyIPs bool      `json:"can_modify_ips"`
	CreatedAt    time.Time `json:"created_at" format:"date-time"`
	// If you have legacy TLS clients which do not send the TLS server name indicator,
	// then you can specify one default SNI on the map. If Cloudflare receives a TLS
	// handshake from a client without an SNI, it will respond with the default SNI on
	// those IPs. The default SNI can be any valid zone or subdomain owned by the
	// account.
	DefaultSni string `json:"default_sni,nullable"`
	// An optional description field which may be used to describe the types of IPs or
	// zones on the map.
	Description string `json:"description,nullable"`
	// Whether the Address Map is enabled or not. Cloudflare's DNS will not respond
	// with IP addresses on an Address Map until the map is enabled.
	Enabled    bool           `json:"enabled,nullable"`
	ModifiedAt time.Time      `json:"modified_at" format:"date-time"`
	JSON       addressMapJSON `json:"-"`
}

func (*AddressMap) UnmarshalJSON

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

type AddressMapAccountDeleteParams

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

func (AddressMapAccountDeleteParams) MarshalJSON

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

type AddressMapAccountDeleteResponse added in v2.1.0

type AddressMapAccountDeleteResponse = interface{}

type AddressMapAccountDeleteResponseEnvelope

type AddressMapAccountDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    AddressMapAccountDeleteResponseEnvelopeSuccess    `json:"success,required"`
	Result     []AddressMapAccountDeleteResponse                 `json:"result,nullable"`
	ResultInfo AddressMapAccountDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       addressMapAccountDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*AddressMapAccountDeleteResponseEnvelope) UnmarshalJSON

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

type AddressMapAccountDeleteResponseEnvelopeResultInfo

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

func (*AddressMapAccountDeleteResponseEnvelopeResultInfo) UnmarshalJSON

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

type AddressMapAccountDeleteResponseEnvelopeSuccess

type AddressMapAccountDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapAccountDeleteResponseEnvelopeSuccessTrue AddressMapAccountDeleteResponseEnvelopeSuccess = true
)

func (AddressMapAccountDeleteResponseEnvelopeSuccess) IsKnown

type AddressMapAccountService

type AddressMapAccountService struct {
	Options []option.RequestOption
}

AddressMapAccountService 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 NewAddressMapAccountService method instead.

func NewAddressMapAccountService

func NewAddressMapAccountService(opts ...option.RequestOption) (r *AddressMapAccountService)

NewAddressMapAccountService 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 (*AddressMapAccountService) Delete

Remove an account as a member of a particular address map.

func (*AddressMapAccountService) Update

Add an account as a member of a particular address map.

type AddressMapAccountUpdateParams

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

func (AddressMapAccountUpdateParams) MarshalJSON

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

type AddressMapAccountUpdateResponse added in v2.1.0

type AddressMapAccountUpdateResponse = interface{}

type AddressMapAccountUpdateResponseEnvelope

type AddressMapAccountUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    AddressMapAccountUpdateResponseEnvelopeSuccess    `json:"success,required"`
	Result     []AddressMapAccountUpdateResponse                 `json:"result,nullable"`
	ResultInfo AddressMapAccountUpdateResponseEnvelopeResultInfo `json:"result_info"`
	JSON       addressMapAccountUpdateResponseEnvelopeJSON       `json:"-"`
}

func (*AddressMapAccountUpdateResponseEnvelope) UnmarshalJSON

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

type AddressMapAccountUpdateResponseEnvelopeResultInfo

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

func (*AddressMapAccountUpdateResponseEnvelopeResultInfo) UnmarshalJSON

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

type AddressMapAccountUpdateResponseEnvelopeSuccess

type AddressMapAccountUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapAccountUpdateResponseEnvelopeSuccessTrue AddressMapAccountUpdateResponseEnvelopeSuccess = true
)

func (AddressMapAccountUpdateResponseEnvelopeSuccess) IsKnown

type AddressMapDeleteParams

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

func (AddressMapDeleteParams) MarshalJSON

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

type AddressMapDeleteResponse added in v2.1.0

type AddressMapDeleteResponse = interface{}

type AddressMapDeleteResponseEnvelope

type AddressMapDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    AddressMapDeleteResponseEnvelopeSuccess    `json:"success,required"`
	Result     []AddressMapDeleteResponse                 `json:"result,nullable"`
	ResultInfo AddressMapDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       addressMapDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*AddressMapDeleteResponseEnvelope) UnmarshalJSON

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

type AddressMapDeleteResponseEnvelopeResultInfo

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

func (*AddressMapDeleteResponseEnvelopeResultInfo) UnmarshalJSON

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

type AddressMapDeleteResponseEnvelopeSuccess

type AddressMapDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapDeleteResponseEnvelopeSuccessTrue AddressMapDeleteResponseEnvelopeSuccess = true
)

func (AddressMapDeleteResponseEnvelopeSuccess) IsKnown

type AddressMapEditParams

type AddressMapEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// If you have legacy TLS clients which do not send the TLS server name indicator,
	// then you can specify one default SNI on the map. If Cloudflare receives a TLS
	// handshake from a client without an SNI, it will respond with the default SNI on
	// those IPs. The default SNI can be any valid zone or subdomain owned by the
	// account.
	DefaultSni param.Field[string] `json:"default_sni"`
	// An optional description field which may be used to describe the types of IPs or
	// zones on the map.
	Description param.Field[string] `json:"description"`
	// Whether the Address Map is enabled or not. Cloudflare's DNS will not respond
	// with IP addresses on an Address Map until the map is enabled.
	Enabled param.Field[bool] `json:"enabled"`
}

func (AddressMapEditParams) MarshalJSON

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

type AddressMapEditResponseEnvelope

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

func (*AddressMapEditResponseEnvelope) UnmarshalJSON

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

type AddressMapEditResponseEnvelopeSuccess

type AddressMapEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapEditResponseEnvelopeSuccessTrue AddressMapEditResponseEnvelopeSuccess = true
)

func (AddressMapEditResponseEnvelopeSuccess) IsKnown

type AddressMapGetParams

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

type AddressMapGetResponse

type AddressMapGetResponse struct {
	// Identifier
	ID string `json:"id"`
	// If set to false, then the Address Map cannot be deleted via API. This is true
	// for Cloudflare-managed maps.
	CanDelete bool `json:"can_delete"`
	// If set to false, then the IPs on the Address Map cannot be modified via the API.
	// This is true for Cloudflare-managed maps.
	CanModifyIPs bool      `json:"can_modify_ips"`
	CreatedAt    time.Time `json:"created_at" format:"date-time"`
	// If you have legacy TLS clients which do not send the TLS server name indicator,
	// then you can specify one default SNI on the map. If Cloudflare receives a TLS
	// handshake from a client without an SNI, it will respond with the default SNI on
	// those IPs. The default SNI can be any valid zone or subdomain owned by the
	// account.
	DefaultSni string `json:"default_sni,nullable"`
	// An optional description field which may be used to describe the types of IPs or
	// zones on the map.
	Description string `json:"description,nullable"`
	// Whether the Address Map is enabled or not. Cloudflare's DNS will not respond
	// with IP addresses on an Address Map until the map is enabled.
	Enabled bool `json:"enabled,nullable"`
	// The set of IPs on the Address Map.
	IPs []AddressMapGetResponseIP `json:"ips"`
	// Zones and Accounts which will be assigned IPs on this Address Map. A zone
	// membership will take priority over an account membership.
	Memberships []AddressMapGetResponseMembership `json:"memberships"`
	ModifiedAt  time.Time                         `json:"modified_at" format:"date-time"`
	JSON        addressMapGetResponseJSON         `json:"-"`
}

func (*AddressMapGetResponse) UnmarshalJSON

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

type AddressMapGetResponseEnvelope

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

func (*AddressMapGetResponseEnvelope) UnmarshalJSON

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

type AddressMapGetResponseEnvelopeSuccess

type AddressMapGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapGetResponseEnvelopeSuccessTrue AddressMapGetResponseEnvelopeSuccess = true
)

func (AddressMapGetResponseEnvelopeSuccess) IsKnown

type AddressMapGetResponseIP

type AddressMapGetResponseIP struct {
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// An IPv4 or IPv6 address.
	IP   string                      `json:"ip"`
	JSON addressMapGetResponseIPJSON `json:"-"`
}

func (*AddressMapGetResponseIP) UnmarshalJSON

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

type AddressMapGetResponseMembership

type AddressMapGetResponseMembership struct {
	// Controls whether the membership can be deleted via the API or not.
	CanDelete bool      `json:"can_delete"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Identifier
	Identifier string `json:"identifier"`
	// The type of the membership.
	Kind AddressMapGetResponseMembershipsKind `json:"kind"`
	JSON addressMapGetResponseMembershipJSON  `json:"-"`
}

func (*AddressMapGetResponseMembership) UnmarshalJSON

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

type AddressMapGetResponseMembershipsKind

type AddressMapGetResponseMembershipsKind string

The type of the membership.

const (
	AddressMapGetResponseMembershipsKindZone    AddressMapGetResponseMembershipsKind = "zone"
	AddressMapGetResponseMembershipsKindAccount AddressMapGetResponseMembershipsKind = "account"
)

func (AddressMapGetResponseMembershipsKind) IsKnown

type AddressMapIPDeleteParams

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

func (AddressMapIPDeleteParams) MarshalJSON

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

type AddressMapIPDeleteResponse added in v2.1.0

type AddressMapIPDeleteResponse = interface{}

type AddressMapIPDeleteResponseEnvelope

type AddressMapIPDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    AddressMapIPDeleteResponseEnvelopeSuccess    `json:"success,required"`
	Result     []AddressMapIPDeleteResponse                 `json:"result,nullable"`
	ResultInfo AddressMapIPDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       addressMapIPDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*AddressMapIPDeleteResponseEnvelope) UnmarshalJSON

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

type AddressMapIPDeleteResponseEnvelopeResultInfo

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

func (*AddressMapIPDeleteResponseEnvelopeResultInfo) UnmarshalJSON

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

type AddressMapIPDeleteResponseEnvelopeSuccess

type AddressMapIPDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapIPDeleteResponseEnvelopeSuccessTrue AddressMapIPDeleteResponseEnvelopeSuccess = true
)

func (AddressMapIPDeleteResponseEnvelopeSuccess) IsKnown

type AddressMapIPService

type AddressMapIPService struct {
	Options []option.RequestOption
}

AddressMapIPService 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 NewAddressMapIPService method instead.

func NewAddressMapIPService

func NewAddressMapIPService(opts ...option.RequestOption) (r *AddressMapIPService)

NewAddressMapIPService 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 (*AddressMapIPService) Delete

func (r *AddressMapIPService) Delete(ctx context.Context, addressMapID string, ipAddress string, params AddressMapIPDeleteParams, opts ...option.RequestOption) (res *[]AddressMapIPDeleteResponse, err error)

Remove an IP from a particular address map.

func (*AddressMapIPService) Update

func (r *AddressMapIPService) Update(ctx context.Context, addressMapID string, ipAddress string, params AddressMapIPUpdateParams, opts ...option.RequestOption) (res *[]AddressMapIPUpdateResponse, err error)

Add an IP from a prefix owned by the account to a particular address map.

type AddressMapIPUpdateParams

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

func (AddressMapIPUpdateParams) MarshalJSON

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

type AddressMapIPUpdateResponse added in v2.1.0

type AddressMapIPUpdateResponse = interface{}

type AddressMapIPUpdateResponseEnvelope

type AddressMapIPUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    AddressMapIPUpdateResponseEnvelopeSuccess    `json:"success,required"`
	Result     []AddressMapIPUpdateResponse                 `json:"result,nullable"`
	ResultInfo AddressMapIPUpdateResponseEnvelopeResultInfo `json:"result_info"`
	JSON       addressMapIPUpdateResponseEnvelopeJSON       `json:"-"`
}

func (*AddressMapIPUpdateResponseEnvelope) UnmarshalJSON

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

type AddressMapIPUpdateResponseEnvelopeResultInfo

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

func (*AddressMapIPUpdateResponseEnvelopeResultInfo) UnmarshalJSON

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

type AddressMapIPUpdateResponseEnvelopeSuccess

type AddressMapIPUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapIPUpdateResponseEnvelopeSuccessTrue AddressMapIPUpdateResponseEnvelopeSuccess = true
)

func (AddressMapIPUpdateResponseEnvelopeSuccess) IsKnown

type AddressMapListParams

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

type AddressMapNewParams

type AddressMapNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// An optional description field which may be used to describe the types of IPs or
	// zones on the map.
	Description param.Field[string] `json:"description"`
	// Whether the Address Map is enabled or not. Cloudflare's DNS will not respond
	// with IP addresses on an Address Map until the map is enabled.
	Enabled param.Field[bool] `json:"enabled"`
}

func (AddressMapNewParams) MarshalJSON

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

type AddressMapNewResponse

type AddressMapNewResponse struct {
	// Identifier
	ID string `json:"id"`
	// If set to false, then the Address Map cannot be deleted via API. This is true
	// for Cloudflare-managed maps.
	CanDelete bool `json:"can_delete"`
	// If set to false, then the IPs on the Address Map cannot be modified via the API.
	// This is true for Cloudflare-managed maps.
	CanModifyIPs bool      `json:"can_modify_ips"`
	CreatedAt    time.Time `json:"created_at" format:"date-time"`
	// If you have legacy TLS clients which do not send the TLS server name indicator,
	// then you can specify one default SNI on the map. If Cloudflare receives a TLS
	// handshake from a client without an SNI, it will respond with the default SNI on
	// those IPs. The default SNI can be any valid zone or subdomain owned by the
	// account.
	DefaultSni string `json:"default_sni,nullable"`
	// An optional description field which may be used to describe the types of IPs or
	// zones on the map.
	Description string `json:"description,nullable"`
	// Whether the Address Map is enabled or not. Cloudflare's DNS will not respond
	// with IP addresses on an Address Map until the map is enabled.
	Enabled bool `json:"enabled,nullable"`
	// The set of IPs on the Address Map.
	IPs []AddressMapNewResponseIP `json:"ips"`
	// Zones and Accounts which will be assigned IPs on this Address Map. A zone
	// membership will take priority over an account membership.
	Memberships []AddressMapNewResponseMembership `json:"memberships"`
	ModifiedAt  time.Time                         `json:"modified_at" format:"date-time"`
	JSON        addressMapNewResponseJSON         `json:"-"`
}

func (*AddressMapNewResponse) UnmarshalJSON

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

type AddressMapNewResponseEnvelope

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

func (*AddressMapNewResponseEnvelope) UnmarshalJSON

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

type AddressMapNewResponseEnvelopeSuccess

type AddressMapNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapNewResponseEnvelopeSuccessTrue AddressMapNewResponseEnvelopeSuccess = true
)

func (AddressMapNewResponseEnvelopeSuccess) IsKnown

type AddressMapNewResponseIP

type AddressMapNewResponseIP struct {
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// An IPv4 or IPv6 address.
	IP   string                      `json:"ip"`
	JSON addressMapNewResponseIPJSON `json:"-"`
}

func (*AddressMapNewResponseIP) UnmarshalJSON

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

type AddressMapNewResponseMembership

type AddressMapNewResponseMembership struct {
	// Controls whether the membership can be deleted via the API or not.
	CanDelete bool      `json:"can_delete"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Identifier
	Identifier string `json:"identifier"`
	// The type of the membership.
	Kind AddressMapNewResponseMembershipsKind `json:"kind"`
	JSON addressMapNewResponseMembershipJSON  `json:"-"`
}

func (*AddressMapNewResponseMembership) UnmarshalJSON

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

type AddressMapNewResponseMembershipsKind

type AddressMapNewResponseMembershipsKind string

The type of the membership.

const (
	AddressMapNewResponseMembershipsKindZone    AddressMapNewResponseMembershipsKind = "zone"
	AddressMapNewResponseMembershipsKindAccount AddressMapNewResponseMembershipsKind = "account"
)

func (AddressMapNewResponseMembershipsKind) IsKnown

type AddressMapService

type AddressMapService struct {
	Options  []option.RequestOption
	Accounts *AddressMapAccountService
	IPs      *AddressMapIPService
	Zones    *AddressMapZoneService
}

AddressMapService 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 NewAddressMapService method instead.

func NewAddressMapService

func NewAddressMapService(opts ...option.RequestOption) (r *AddressMapService)

NewAddressMapService 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 (*AddressMapService) Delete

func (r *AddressMapService) Delete(ctx context.Context, addressMapID string, params AddressMapDeleteParams, opts ...option.RequestOption) (res *[]AddressMapDeleteResponse, err error)

Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted.

func (*AddressMapService) Edit

func (r *AddressMapService) Edit(ctx context.Context, addressMapID string, params AddressMapEditParams, opts ...option.RequestOption) (res *AddressMap, err error)

Modify properties of an address map owned by the account.

func (*AddressMapService) Get

func (r *AddressMapService) Get(ctx context.Context, addressMapID string, query AddressMapGetParams, opts ...option.RequestOption) (res *AddressMapGetResponse, err error)

Show a particular address map owned by the account.

func (*AddressMapService) List

List all address maps owned by the account.

func (*AddressMapService) ListAutoPaging

List all address maps owned by the account.

func (*AddressMapService) New

Create a new address map under the account.

type AddressMapZoneDeleteParams

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

func (AddressMapZoneDeleteParams) MarshalJSON

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

type AddressMapZoneDeleteResponse added in v2.1.0

type AddressMapZoneDeleteResponse = interface{}

type AddressMapZoneDeleteResponseEnvelope

type AddressMapZoneDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    AddressMapZoneDeleteResponseEnvelopeSuccess    `json:"success,required"`
	Result     []AddressMapZoneDeleteResponse                 `json:"result,nullable"`
	ResultInfo AddressMapZoneDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       addressMapZoneDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*AddressMapZoneDeleteResponseEnvelope) UnmarshalJSON

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

type AddressMapZoneDeleteResponseEnvelopeResultInfo

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

func (*AddressMapZoneDeleteResponseEnvelopeResultInfo) UnmarshalJSON

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

type AddressMapZoneDeleteResponseEnvelopeSuccess

type AddressMapZoneDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapZoneDeleteResponseEnvelopeSuccessTrue AddressMapZoneDeleteResponseEnvelopeSuccess = true
)

func (AddressMapZoneDeleteResponseEnvelopeSuccess) IsKnown

type AddressMapZoneService

type AddressMapZoneService struct {
	Options []option.RequestOption
}

AddressMapZoneService 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 NewAddressMapZoneService method instead.

func NewAddressMapZoneService

func NewAddressMapZoneService(opts ...option.RequestOption) (r *AddressMapZoneService)

NewAddressMapZoneService 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 (*AddressMapZoneService) Delete

Remove a zone as a member of a particular address map.

func (*AddressMapZoneService) Update

Add a zone as a member of a particular address map.

type AddressMapZoneUpdateParams

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

func (AddressMapZoneUpdateParams) MarshalJSON

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

type AddressMapZoneUpdateResponse added in v2.1.0

type AddressMapZoneUpdateResponse = interface{}

type AddressMapZoneUpdateResponseEnvelope

type AddressMapZoneUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    AddressMapZoneUpdateResponseEnvelopeSuccess    `json:"success,required"`
	Result     []AddressMapZoneUpdateResponse                 `json:"result,nullable"`
	ResultInfo AddressMapZoneUpdateResponseEnvelopeResultInfo `json:"result_info"`
	JSON       addressMapZoneUpdateResponseEnvelopeJSON       `json:"-"`
}

func (*AddressMapZoneUpdateResponseEnvelope) UnmarshalJSON

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

type AddressMapZoneUpdateResponseEnvelopeResultInfo

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

func (*AddressMapZoneUpdateResponseEnvelopeResultInfo) UnmarshalJSON

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

type AddressMapZoneUpdateResponseEnvelopeSuccess

type AddressMapZoneUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AddressMapZoneUpdateResponseEnvelopeSuccessTrue AddressMapZoneUpdateResponseEnvelopeSuccess = true
)

func (AddressMapZoneUpdateResponseEnvelopeSuccess) IsKnown

type AddressingService

type AddressingService struct {
	Options      []option.RequestOption
	Services     *ServiceService
	AddressMaps  *AddressMapService
	LOADocuments *LOADocumentService
	Prefixes     *PrefixService
}

AddressingService 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 NewAddressingService method instead.

func NewAddressingService

func NewAddressingService(opts ...option.RequestOption) (r *AddressingService)

NewAddressingService 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 AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type BGPPrefix

type BGPPrefix struct {
	// Identifier
	ID string `json:"id"`
	// Autonomous System Number (ASN) the prefix will be advertised under.
	ASN           int64                  `json:"asn,nullable"`
	BGPSignalOpts BGPPrefixBGPSignalOpts `json:"bgp_signal_opts"`
	// IP Prefix in Classless Inter-Domain Routing format.
	CIDR       string            `json:"cidr"`
	CreatedAt  time.Time         `json:"created_at" format:"date-time"`
	ModifiedAt time.Time         `json:"modified_at" format:"date-time"`
	OnDemand   BGPPrefixOnDemand `json:"on_demand"`
	JSON       bgpPrefixJSON     `json:"-"`
}

func (*BGPPrefix) UnmarshalJSON

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

type BGPPrefixBGPSignalOpts

type BGPPrefixBGPSignalOpts struct {
	// Whether control of advertisement of the prefix to the Internet is enabled to be
	// performed via BGP signal
	Enabled bool `json:"enabled"`
	// Last time BGP signaling control was toggled. This field is null if BGP signaling
	// has never been enabled.
	ModifiedAt time.Time                  `json:"modified_at,nullable" format:"date-time"`
	JSON       bgpPrefixBGPSignalOptsJSON `json:"-"`
}

func (*BGPPrefixBGPSignalOpts) UnmarshalJSON

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

type BGPPrefixOnDemand

type BGPPrefixOnDemand struct {
	// Prefix advertisement status to the Internet. This field is only not 'null' if on
	// demand is enabled.
	Advertised bool `json:"advertised,nullable"`
	// Last time the advertisement status was changed. This field is only not 'null' if
	// on demand is enabled.
	AdvertisedModifiedAt time.Time `json:"advertised_modified_at,nullable" format:"date-time"`
	// Whether advertisement of the prefix to the Internet may be dynamically enabled
	// or disabled.
	OnDemandEnabled bool `json:"on_demand_enabled"`
	// Whether advertisement status of the prefix is locked, meaning it cannot be
	// changed.
	OnDemandLocked bool                  `json:"on_demand_locked"`
	JSON           bgpPrefixOnDemandJSON `json:"-"`
}

func (*BGPPrefixOnDemand) UnmarshalJSON

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

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

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

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Delegations

type Delegations struct {
	// Delegation identifier tag.
	ID string `json:"id"`
	// IP Prefix in Classless Inter-Domain Routing format.
	CIDR      string    `json:"cidr"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Account identifier for the account to which prefix is being delegated.
	DelegatedAccountID string    `json:"delegated_account_id"`
	ModifiedAt         time.Time `json:"modified_at" format:"date-time"`
	// Identifier
	ParentPrefixID string          `json:"parent_prefix_id"`
	JSON           delegationsJSON `json:"-"`
}

func (*Delegations) UnmarshalJSON

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

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type LOADocumentDownloadGetParams

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

type LOADocumentDownloadGetResponse

type LOADocumentDownloadGetResponse = interface{}

type LOADocumentDownloadService

type LOADocumentDownloadService struct {
	Options []option.RequestOption
}

LOADocumentDownloadService 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 NewLOADocumentDownloadService method instead.

func NewLOADocumentDownloadService

func NewLOADocumentDownloadService(opts ...option.RequestOption) (r *LOADocumentDownloadService)

NewLOADocumentDownloadService 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 (*LOADocumentDownloadService) Get

Download specified LOA document under the account.

type LOADocumentNewParams

type LOADocumentNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// LOA document to upload.
	LOADocument param.Field[string] `json:"loa_document,required"`
}

func (LOADocumentNewParams) MarshalJSON

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

type LOADocumentNewResponse

type LOADocumentNewResponse struct {
	// Name of LOA document.
	Filename string                     `json:"filename"`
	JSON     loaDocumentNewResponseJSON `json:"-"`
}

func (*LOADocumentNewResponse) UnmarshalJSON

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

type LOADocumentNewResponseEnvelope

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

func (*LOADocumentNewResponseEnvelope) UnmarshalJSON

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

type LOADocumentNewResponseEnvelopeSuccess

type LOADocumentNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	LOADocumentNewResponseEnvelopeSuccessTrue LOADocumentNewResponseEnvelopeSuccess = true
)

func (LOADocumentNewResponseEnvelopeSuccess) IsKnown

type LOADocumentService

type LOADocumentService struct {
	Options   []option.RequestOption
	Downloads *LOADocumentDownloadService
}

LOADocumentService 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 NewLOADocumentService method instead.

func NewLOADocumentService

func NewLOADocumentService(opts ...option.RequestOption) (r *LOADocumentService)

NewLOADocumentService 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 (*LOADocumentService) New

Submit LOA document (pdf format) under the account.

type Member added in v2.1.0

type Member = shared.Member

This is an alias to an internal type.

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRole added in v2.1.0

type MemberRole = shared.MemberRole

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissions added in v2.1.0

type MemberRolesPermissions = shared.MemberRolesPermissions

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberUser added in v2.1.0

type MemberUser = shared.MemberUser

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

This is an alias to an internal type.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type Prefix

type Prefix struct {
	// Identifier
	ID string `json:"id"`
	// Identifier
	AccountID string `json:"account_id"`
	// Prefix advertisement status to the Internet. This field is only not 'null' if on
	// demand is enabled.
	Advertised bool `json:"advertised,nullable"`
	// Last time the advertisement status was changed. This field is only not 'null' if
	// on demand is enabled.
	AdvertisedModifiedAt time.Time `json:"advertised_modified_at,nullable" format:"date-time"`
	// Approval state of the prefix (P = pending, V = active).
	Approved string `json:"approved"`
	// Autonomous System Number (ASN) the prefix will be advertised under.
	ASN int64 `json:"asn,nullable"`
	// IP Prefix in Classless Inter-Domain Routing format.
	CIDR      string    `json:"cidr"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Description of the prefix.
	Description string `json:"description"`
	// Identifier for the uploaded LOA document.
	LOADocumentID string    `json:"loa_document_id,nullable"`
	ModifiedAt    time.Time `json:"modified_at" format:"date-time"`
	// Whether advertisement of the prefix to the Internet may be dynamically enabled
	// or disabled.
	OnDemandEnabled bool `json:"on_demand_enabled"`
	// Whether advertisement status of the prefix is locked, meaning it cannot be
	// changed.
	OnDemandLocked bool       `json:"on_demand_locked"`
	JSON           prefixJSON `json:"-"`
}

func (*Prefix) UnmarshalJSON

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

type PrefixBGPBindingDeleteParams

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

type PrefixBGPBindingDeleteResponse added in v2.1.0

type PrefixBGPBindingDeleteResponse struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success PrefixBGPBindingDeleteResponseSuccess `json:"success,required"`
	JSON    prefixBGPBindingDeleteResponseJSON    `json:"-"`
}

func (*PrefixBGPBindingDeleteResponse) UnmarshalJSON added in v2.1.0

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

type PrefixBGPBindingDeleteResponseSuccess added in v2.1.0

type PrefixBGPBindingDeleteResponseSuccess bool

Whether the API call was successful

const (
	PrefixBGPBindingDeleteResponseSuccessTrue PrefixBGPBindingDeleteResponseSuccess = true
)

func (PrefixBGPBindingDeleteResponseSuccess) IsKnown added in v2.1.0

type PrefixBGPBindingGetParams

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

type PrefixBGPBindingGetResponseEnvelope

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

func (*PrefixBGPBindingGetResponseEnvelope) UnmarshalJSON

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

type PrefixBGPBindingGetResponseEnvelopeSuccess

type PrefixBGPBindingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixBGPBindingGetResponseEnvelopeSuccessTrue PrefixBGPBindingGetResponseEnvelopeSuccess = true
)

func (PrefixBGPBindingGetResponseEnvelopeSuccess) IsKnown

type PrefixBGPBindingListParams

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

type PrefixBGPBindingNewParams

type PrefixBGPBindingNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	CIDR param.Field[string] `json:"cidr"`
	// Identifier
	ServiceID param.Field[string] `json:"service_id"`
}

func (PrefixBGPBindingNewParams) MarshalJSON

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

type PrefixBGPBindingNewResponseEnvelope

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

func (*PrefixBGPBindingNewResponseEnvelope) UnmarshalJSON

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

type PrefixBGPBindingNewResponseEnvelopeSuccess

type PrefixBGPBindingNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixBGPBindingNewResponseEnvelopeSuccessTrue PrefixBGPBindingNewResponseEnvelopeSuccess = true
)

func (PrefixBGPBindingNewResponseEnvelopeSuccess) IsKnown

type PrefixBGPBindingService

type PrefixBGPBindingService struct {
	Options []option.RequestOption
}

PrefixBGPBindingService 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 NewPrefixBGPBindingService method instead.

func NewPrefixBGPBindingService

func NewPrefixBGPBindingService(opts ...option.RequestOption) (r *PrefixBGPBindingService)

NewPrefixBGPBindingService 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 (*PrefixBGPBindingService) Delete

Delete a Service Binding

func (*PrefixBGPBindingService) Get

func (r *PrefixBGPBindingService) Get(ctx context.Context, prefixID string, bindingID string, query PrefixBGPBindingGetParams, opts ...option.RequestOption) (res *ServiceBinding, err error)

Fetch a single Service Binding

func (*PrefixBGPBindingService) List

List the Cloudflare services this prefix is currently bound to. Traffic sent to an address within an IP prefix will be routed to the Cloudflare service of the most-specific Service Binding matching the address. **Example:** binding `192.0.2.0/24` to Cloudflare Magic Transit and `192.0.2.1/32` to the Cloudflare CDN would route traffic for `192.0.2.1` to the CDN, and traffic for all other IPs in the prefix to Cloudflare Magic Transit.

func (*PrefixBGPBindingService) ListAutoPaging

List the Cloudflare services this prefix is currently bound to. Traffic sent to an address within an IP prefix will be routed to the Cloudflare service of the most-specific Service Binding matching the address. **Example:** binding `192.0.2.0/24` to Cloudflare Magic Transit and `192.0.2.1/32` to the Cloudflare CDN would route traffic for `192.0.2.1` to the CDN, and traffic for all other IPs in the prefix to Cloudflare Magic Transit.

func (*PrefixBGPBindingService) New

Creates a new Service Binding, routing traffic to IPs within the given CIDR to a service running on Cloudflare's network. **Note:** This API may only be used on prefixes currently configured with a Magic Transit service binding, and only allows creating service bindings for the Cloudflare CDN or Cloudflare Spectrum.

type PrefixBGPPrefixEditParams

type PrefixBGPPrefixEditParams struct {
	// Identifier
	AccountID param.Field[string]                            `path:"account_id,required"`
	OnDemand  param.Field[PrefixBGPPrefixEditParamsOnDemand] `json:"on_demand"`
}

func (PrefixBGPPrefixEditParams) MarshalJSON

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

type PrefixBGPPrefixEditParamsOnDemand

type PrefixBGPPrefixEditParamsOnDemand struct {
	Advertised param.Field[bool] `json:"advertised"`
}

func (PrefixBGPPrefixEditParamsOnDemand) MarshalJSON

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

type PrefixBGPPrefixEditResponseEnvelope

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

func (*PrefixBGPPrefixEditResponseEnvelope) UnmarshalJSON

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

type PrefixBGPPrefixEditResponseEnvelopeSuccess

type PrefixBGPPrefixEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixBGPPrefixEditResponseEnvelopeSuccessTrue PrefixBGPPrefixEditResponseEnvelopeSuccess = true
)

func (PrefixBGPPrefixEditResponseEnvelopeSuccess) IsKnown

type PrefixBGPPrefixGetParams

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

type PrefixBGPPrefixGetResponseEnvelope

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

func (*PrefixBGPPrefixGetResponseEnvelope) UnmarshalJSON

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

type PrefixBGPPrefixGetResponseEnvelopeSuccess

type PrefixBGPPrefixGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixBGPPrefixGetResponseEnvelopeSuccessTrue PrefixBGPPrefixGetResponseEnvelopeSuccess = true
)

func (PrefixBGPPrefixGetResponseEnvelopeSuccess) IsKnown

type PrefixBGPPrefixListParams

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

type PrefixBGPPrefixService

type PrefixBGPPrefixService struct {
	Options []option.RequestOption
}

PrefixBGPPrefixService 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 NewPrefixBGPPrefixService method instead.

func NewPrefixBGPPrefixService

func NewPrefixBGPPrefixService(opts ...option.RequestOption) (r *PrefixBGPPrefixService)

NewPrefixBGPPrefixService 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 (*PrefixBGPPrefixService) Edit

func (r *PrefixBGPPrefixService) Edit(ctx context.Context, prefixID string, bgpPrefixID string, params PrefixBGPPrefixEditParams, opts ...option.RequestOption) (res *BGPPrefix, err error)

Update the properties of a BGP Prefix, such as the on demand advertisement status (advertised or withdrawn).

func (*PrefixBGPPrefixService) Get

func (r *PrefixBGPPrefixService) Get(ctx context.Context, prefixID string, bgpPrefixID string, query PrefixBGPPrefixGetParams, opts ...option.RequestOption) (res *BGPPrefix, err error)

Retrieve a single BGP Prefix according to its identifier

func (*PrefixBGPPrefixService) List

List all BGP Prefixes within the specified IP Prefix. BGP Prefixes are used to control which specific subnets are advertised to the Internet. It is possible to advertise subnets more specific than an IP Prefix by creating more specific BGP Prefixes.

func (*PrefixBGPPrefixService) ListAutoPaging

List all BGP Prefixes within the specified IP Prefix. BGP Prefixes are used to control which specific subnets are advertised to the Internet. It is possible to advertise subnets more specific than an IP Prefix by creating more specific BGP Prefixes.

type PrefixBGPService

type PrefixBGPService struct {
	Options  []option.RequestOption
	Bindings *PrefixBGPBindingService
	Prefixes *PrefixBGPPrefixService
	Statuses *PrefixBGPStatusService
}

PrefixBGPService 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 NewPrefixBGPService method instead.

func NewPrefixBGPService

func NewPrefixBGPService(opts ...option.RequestOption) (r *PrefixBGPService)

NewPrefixBGPService 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 PrefixBGPStatusEditParams

type PrefixBGPStatusEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Enablement of prefix advertisement to the Internet.
	Advertised param.Field[bool] `json:"advertised,required"`
}

func (PrefixBGPStatusEditParams) MarshalJSON

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

type PrefixBGPStatusEditResponse

type PrefixBGPStatusEditResponse struct {
	// Enablement of prefix advertisement to the Internet.
	Advertised bool `json:"advertised"`
	// Last time the advertisement status was changed. This field is only not 'null' if
	// on demand is enabled.
	AdvertisedModifiedAt time.Time                       `json:"advertised_modified_at,nullable" format:"date-time"`
	JSON                 prefixBGPStatusEditResponseJSON `json:"-"`
}

func (*PrefixBGPStatusEditResponse) UnmarshalJSON

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

type PrefixBGPStatusEditResponseEnvelope

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

func (*PrefixBGPStatusEditResponseEnvelope) UnmarshalJSON

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

type PrefixBGPStatusEditResponseEnvelopeSuccess

type PrefixBGPStatusEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixBGPStatusEditResponseEnvelopeSuccessTrue PrefixBGPStatusEditResponseEnvelopeSuccess = true
)

func (PrefixBGPStatusEditResponseEnvelopeSuccess) IsKnown

type PrefixBGPStatusGetParams

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

type PrefixBGPStatusGetResponse

type PrefixBGPStatusGetResponse struct {
	// Enablement of prefix advertisement to the Internet.
	Advertised bool `json:"advertised"`
	// Last time the advertisement status was changed. This field is only not 'null' if
	// on demand is enabled.
	AdvertisedModifiedAt time.Time                      `json:"advertised_modified_at,nullable" format:"date-time"`
	JSON                 prefixBGPStatusGetResponseJSON `json:"-"`
}

func (*PrefixBGPStatusGetResponse) UnmarshalJSON

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

type PrefixBGPStatusGetResponseEnvelope

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

func (*PrefixBGPStatusGetResponseEnvelope) UnmarshalJSON

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

type PrefixBGPStatusGetResponseEnvelopeSuccess

type PrefixBGPStatusGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixBGPStatusGetResponseEnvelopeSuccessTrue PrefixBGPStatusGetResponseEnvelopeSuccess = true
)

func (PrefixBGPStatusGetResponseEnvelopeSuccess) IsKnown

type PrefixBGPStatusService

type PrefixBGPStatusService struct {
	Options []option.RequestOption
}

PrefixBGPStatusService 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 NewPrefixBGPStatusService method instead.

func NewPrefixBGPStatusService

func NewPrefixBGPStatusService(opts ...option.RequestOption) (r *PrefixBGPStatusService)

NewPrefixBGPStatusService 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 (*PrefixBGPStatusService) Edit

Advertise or withdraw BGP route for a prefix.

func (*PrefixBGPStatusService) Get

List the current advertisement state for a prefix.

type PrefixDelegationDeleteParams

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

func (PrefixDelegationDeleteParams) MarshalJSON

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

type PrefixDelegationDeleteResponse

type PrefixDelegationDeleteResponse struct {
	// Delegation identifier tag.
	ID   string                             `json:"id"`
	JSON prefixDelegationDeleteResponseJSON `json:"-"`
}

func (*PrefixDelegationDeleteResponse) UnmarshalJSON

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

type PrefixDelegationDeleteResponseEnvelope

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

func (*PrefixDelegationDeleteResponseEnvelope) UnmarshalJSON

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

type PrefixDelegationDeleteResponseEnvelopeSuccess

type PrefixDelegationDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixDelegationDeleteResponseEnvelopeSuccessTrue PrefixDelegationDeleteResponseEnvelopeSuccess = true
)

func (PrefixDelegationDeleteResponseEnvelopeSuccess) IsKnown

type PrefixDelegationListParams

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

type PrefixDelegationNewParams

type PrefixDelegationNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	CIDR param.Field[string] `json:"cidr,required"`
	// Account identifier for the account to which prefix is being delegated.
	DelegatedAccountID param.Field[string] `json:"delegated_account_id,required"`
}

func (PrefixDelegationNewParams) MarshalJSON

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

type PrefixDelegationNewResponseEnvelope

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

func (*PrefixDelegationNewResponseEnvelope) UnmarshalJSON

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

type PrefixDelegationNewResponseEnvelopeSuccess

type PrefixDelegationNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixDelegationNewResponseEnvelopeSuccessTrue PrefixDelegationNewResponseEnvelopeSuccess = true
)

func (PrefixDelegationNewResponseEnvelopeSuccess) IsKnown

type PrefixDelegationService

type PrefixDelegationService struct {
	Options []option.RequestOption
}

PrefixDelegationService 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 NewPrefixDelegationService method instead.

func NewPrefixDelegationService

func NewPrefixDelegationService(opts ...option.RequestOption) (r *PrefixDelegationService)

NewPrefixDelegationService 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 (*PrefixDelegationService) Delete

Delete an account delegation for a given IP prefix.

func (*PrefixDelegationService) List

List all delegations for a given account IP prefix.

func (*PrefixDelegationService) ListAutoPaging

List all delegations for a given account IP prefix.

func (*PrefixDelegationService) New

Create a new account delegation for a given IP prefix.

type PrefixDeleteParams

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

func (PrefixDeleteParams) MarshalJSON

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

type PrefixDeleteResponse added in v2.1.0

type PrefixDeleteResponse = interface{}

type PrefixDeleteResponseEnvelope

type PrefixDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    PrefixDeleteResponseEnvelopeSuccess    `json:"success,required"`
	Result     []PrefixDeleteResponse                 `json:"result,nullable"`
	ResultInfo PrefixDeleteResponseEnvelopeResultInfo `json:"result_info"`
	JSON       prefixDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*PrefixDeleteResponseEnvelope) UnmarshalJSON

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

type PrefixDeleteResponseEnvelopeResultInfo

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

func (*PrefixDeleteResponseEnvelopeResultInfo) UnmarshalJSON

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

type PrefixDeleteResponseEnvelopeSuccess

type PrefixDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixDeleteResponseEnvelopeSuccessTrue PrefixDeleteResponseEnvelopeSuccess = true
)

func (PrefixDeleteResponseEnvelopeSuccess) IsKnown

type PrefixEditParams

type PrefixEditParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Description of the prefix.
	Description param.Field[string] `json:"description,required"`
}

func (PrefixEditParams) MarshalJSON

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

type PrefixEditResponseEnvelope

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

func (*PrefixEditResponseEnvelope) UnmarshalJSON

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

type PrefixEditResponseEnvelopeSuccess

type PrefixEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixEditResponseEnvelopeSuccessTrue PrefixEditResponseEnvelopeSuccess = true
)

func (PrefixEditResponseEnvelopeSuccess) IsKnown

type PrefixGetParams

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

type PrefixGetResponseEnvelope

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

func (*PrefixGetResponseEnvelope) UnmarshalJSON

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

type PrefixGetResponseEnvelopeSuccess

type PrefixGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixGetResponseEnvelopeSuccessTrue PrefixGetResponseEnvelopeSuccess = true
)

func (PrefixGetResponseEnvelopeSuccess) IsKnown

type PrefixListParams

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

type PrefixNewParams

type PrefixNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Autonomous System Number (ASN) the prefix will be advertised under.
	ASN param.Field[int64] `json:"asn,required"`
	// IP Prefix in Classless Inter-Domain Routing format.
	CIDR param.Field[string] `json:"cidr,required"`
	// Identifier for the uploaded LOA document.
	LOADocumentID param.Field[string] `json:"loa_document_id,required"`
}

func (PrefixNewParams) MarshalJSON

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

type PrefixNewResponseEnvelope

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

func (*PrefixNewResponseEnvelope) UnmarshalJSON

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

type PrefixNewResponseEnvelopeSuccess

type PrefixNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	PrefixNewResponseEnvelopeSuccessTrue PrefixNewResponseEnvelopeSuccess = true
)

func (PrefixNewResponseEnvelopeSuccess) IsKnown

type PrefixService

type PrefixService struct {
	Options     []option.RequestOption
	BGP         *PrefixBGPService
	Delegations *PrefixDelegationService
}

PrefixService 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 NewPrefixService method instead.

func NewPrefixService

func NewPrefixService(opts ...option.RequestOption) (r *PrefixService)

NewPrefixService 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 (*PrefixService) Delete

func (r *PrefixService) Delete(ctx context.Context, prefixID string, params PrefixDeleteParams, opts ...option.RequestOption) (res *[]PrefixDeleteResponse, err error)

Delete an unapproved prefix owned by the account.

func (*PrefixService) Edit

func (r *PrefixService) Edit(ctx context.Context, prefixID string, params PrefixEditParams, opts ...option.RequestOption) (res *Prefix, err error)

Modify the description for a prefix owned by the account.

func (*PrefixService) Get

func (r *PrefixService) Get(ctx context.Context, prefixID string, query PrefixGetParams, opts ...option.RequestOption) (res *Prefix, err error)

List a particular prefix owned by the account.

func (*PrefixService) List

List all prefixes owned by the account.

func (*PrefixService) ListAutoPaging

List all prefixes owned by the account.

func (*PrefixService) New

func (r *PrefixService) New(ctx context.Context, params PrefixNewParams, opts ...option.RequestOption) (res *Prefix, err error)

Add a new prefix under the account.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type ServiceBinding

type ServiceBinding struct {
	// Identifier
	ID string `json:"id"`
	// IP Prefix in Classless Inter-Domain Routing format.
	CIDR string `json:"cidr"`
	// Status of a Service Binding's deployment to the Cloudflare network
	Provisioning ServiceBindingProvisioning `json:"provisioning"`
	// Identifier
	ServiceID string `json:"service_id"`
	// Name of a service running on the Cloudflare network
	ServiceName string             `json:"service_name"`
	JSON        serviceBindingJSON `json:"-"`
}

func (*ServiceBinding) UnmarshalJSON

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

type ServiceBindingParam

type ServiceBindingParam struct {
	// IP Prefix in Classless Inter-Domain Routing format.
	CIDR param.Field[string] `json:"cidr"`
	// Status of a Service Binding's deployment to the Cloudflare network
	Provisioning param.Field[ServiceBindingProvisioningParam] `json:"provisioning"`
	// Identifier
	ServiceID param.Field[string] `json:"service_id"`
	// Name of a service running on the Cloudflare network
	ServiceName param.Field[string] `json:"service_name"`
}

func (ServiceBindingParam) MarshalJSON

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

type ServiceBindingProvisioning

type ServiceBindingProvisioning struct {
	// When a binding has been deployed to a majority of Cloudflare datacenters, the
	// binding will become active and can be used with its associated service.
	State ServiceBindingProvisioningState `json:"state"`
	JSON  serviceBindingProvisioningJSON  `json:"-"`
}

Status of a Service Binding's deployment to the Cloudflare network

func (*ServiceBindingProvisioning) UnmarshalJSON

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

type ServiceBindingProvisioningParam

type ServiceBindingProvisioningParam struct {
	// When a binding has been deployed to a majority of Cloudflare datacenters, the
	// binding will become active and can be used with its associated service.
	State param.Field[ServiceBindingProvisioningState] `json:"state"`
}

Status of a Service Binding's deployment to the Cloudflare network

func (ServiceBindingProvisioningParam) MarshalJSON

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

type ServiceBindingProvisioningState

type ServiceBindingProvisioningState string

When a binding has been deployed to a majority of Cloudflare datacenters, the binding will become active and can be used with its associated service.

const (
	ServiceBindingProvisioningStateProvisioning ServiceBindingProvisioningState = "provisioning"
	ServiceBindingProvisioningStateActive       ServiceBindingProvisioningState = "active"
)

func (ServiceBindingProvisioningState) IsKnown

type ServiceListParams

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

type ServiceListResponse

type ServiceListResponse struct {
	// Identifier
	ID string `json:"id"`
	// Name of a service running on the Cloudflare network
	Name string                  `json:"name"`
	JSON serviceListResponseJSON `json:"-"`
}

func (*ServiceListResponse) UnmarshalJSON

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

type ServiceService

type ServiceService struct {
	Options []option.RequestOption
}

ServiceService 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 NewServiceService method instead.

func NewServiceService

func NewServiceService(opts ...option.RequestOption) (r *ServiceService)

NewServiceService 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 (*ServiceService) List

Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a service running on the Cloudflare network to enable a Cloudflare product on the IP addresses. This endpoint can be used as a reference of available services on the Cloudflare network, and their service IDs.

func (*ServiceService) ListAutoPaging

Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a service running on the Cloudflare network to enable a Cloudflare product on the IP addresses. This endpoint can be used as a reference of available services on the Cloudflare network, and their service IDs.

Jump to

Keyboard shortcuts

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