Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type ErrorDataSource
- type Hostname
- type HostnameParam
- type ListBulkOperationGetParams
- type ListBulkOperationGetResponse
- type ListBulkOperationGetResponseEnvelope
- type ListBulkOperationGetResponseEnvelopeSuccess
- type ListBulkOperationGetResponseObject
- type ListBulkOperationGetResponseObjectStatus
- type ListBulkOperationGetResponseStatus
- type ListBulkOperationGetResponseUnion
- type ListBulkOperationService
- type ListCursor
- type ListDeleteParams
- type ListDeleteResponse
- type ListDeleteResponseEnvelope
- type ListDeleteResponseEnvelopeSuccess
- type ListDeleteResponseID
- type ListDeleteResponseUnion
- type ListGetParams
- type ListGetResponse
- type ListGetResponseEnvelope
- type ListGetResponseEnvelopeSuccess
- type ListGetResponseKind
- type ListGetResponseObject
- type ListGetResponseObjectKind
- type ListGetResponseUnion
- type ListItemDeleteParams
- type ListItemDeleteResponse
- type ListItemDeleteResponseEnvelope
- type ListItemDeleteResponseEnvelopeSuccess
- type ListItemDeleteResponseOperationID
- type ListItemDeleteResponseUnion
- type ListItemGetParams
- type ListItemGetResponse
- type ListItemGetResponseEnvelope
- type ListItemGetResponseEnvelopeSuccess
- type ListItemGetResponseObject
- type ListItemGetResponseUnion
- type ListItemListParams
- type ListItemListResponseEnvelope
- type ListItemListResponseEnvelopeResultInfo
- type ListItemListResponseEnvelopeSuccess
- type ListItemNewParams
- type ListItemNewParamsBody
- type ListItemNewResponse
- type ListItemNewResponseEnvelope
- type ListItemNewResponseEnvelopeSuccess
- type ListItemNewResponseOperationID
- type ListItemNewResponseUnion
- type ListItemService
- func (r *ListItemService) Delete(ctx context.Context, listID string, body ListItemDeleteParams, ...) (res *ListItemDeleteResponse, err error)
- func (r *ListItemService) Get(ctx context.Context, listID string, itemID string, query ListItemGetParams, ...) (res *ListItemGetResponse, err error)
- func (r *ListItemService) List(ctx context.Context, listID string, params ListItemListParams, ...) (res *[]interface{}, err error)
- func (r *ListItemService) New(ctx context.Context, listID string, params ListItemNewParams, ...) (res *ListItemNewResponse, err error)
- func (r *ListItemService) Update(ctx context.Context, listID string, params ListItemUpdateParams, ...) (res *ListItemUpdateResponse, err error)
- type ListItemUpdateParams
- type ListItemUpdateParamsBody
- type ListItemUpdateResponse
- type ListItemUpdateResponseEnvelope
- type ListItemUpdateResponseEnvelopeSuccess
- type ListItemUpdateResponseOperationID
- type ListItemUpdateResponseUnion
- type ListListParams
- type ListListResponseEnvelope
- type ListListResponseEnvelopeSuccess
- type ListNewParams
- type ListNewParamsKind
- type ListNewResponse
- type ListNewResponseEnvelope
- type ListNewResponseEnvelopeSuccess
- type ListNewResponseKind
- type ListNewResponseObject
- type ListNewResponseObjectKind
- type ListNewResponseUnion
- type ListService
- func (r *ListService) Delete(ctx context.Context, listID string, body ListDeleteParams, ...) (res *ListDeleteResponse, err error)
- func (r *ListService) Get(ctx context.Context, listID string, query ListGetParams, ...) (res *ListGetResponse, err error)
- func (r *ListService) List(ctx context.Context, query ListListParams, opts ...option.RequestOption) (res *[]interface{}, err error)
- func (r *ListService) New(ctx context.Context, params ListNewParams, opts ...option.RequestOption) (res *ListNewResponse, err error)
- func (r *ListService) Update(ctx context.Context, listID string, params ListUpdateParams, ...) (res *ListUpdateResponse, err error)
- type ListUpdateParams
- type ListUpdateResponse
- type ListUpdateResponseEnvelope
- type ListUpdateResponseEnvelopeSuccess
- type ListUpdateResponseKind
- type ListUpdateResponseObject
- type ListUpdateResponseObjectKind
- type ListUpdateResponseUnion
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type Redirect
- type RedirectParam
- type RedirectStatusCode
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type RuleService
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenStatus
- type TokenValue
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type CertificateCA ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type ErrorDataSource ¶ added in v4.2.0
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type Hostname ¶
type Hostname struct {
URLHostname string `json:"url_hostname,required"`
JSON hostnameJSON `json:"-"`
}
Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (\*), and the hyphen (-).
func (*Hostname) UnmarshalJSON ¶
type HostnameParam ¶
Valid characters for hostnames are ASCII(7) letters from a to z, the digits from 0 to 9, wildcards (\*), and the hyphen (-).
func (HostnameParam) MarshalJSON ¶
func (r HostnameParam) MarshalJSON() (data []byte, err error)
type ListBulkOperationGetParams ¶ added in v4.3.0
type ListBulkOperationGetResponse ¶
type ListBulkOperationGetResponse struct {
// The unique operation ID of the asynchronous action.
ID string `json:"id"`
// The RFC 3339 timestamp of when the operation was completed.
Completed string `json:"completed"`
// A message describing the error when the status is `failed`.
Error string `json:"error"`
// The current status of the asynchronous operation.
Status ListBulkOperationGetResponseStatus `json:"status"`
JSON listBulkOperationGetResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListBulkOperationGetResponse) AsUnion ¶ added in v4.3.0
func (r ListBulkOperationGetResponse) AsUnion() ListBulkOperationGetResponseUnion
AsUnion returns a ListBulkOperationGetResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListBulkOperationGetResponseObject, ListBulkOperationGetResponseObject.
func (*ListBulkOperationGetResponse) UnmarshalJSON ¶
func (r *ListBulkOperationGetResponse) UnmarshalJSON(data []byte) (err error)
type ListBulkOperationGetResponseEnvelope ¶
type ListBulkOperationGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListBulkOperationGetResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListBulkOperationGetResponseEnvelopeSuccess `json:"success,required"`
JSON listBulkOperationGetResponseEnvelopeJSON `json:"-"`
}
func (*ListBulkOperationGetResponseEnvelope) UnmarshalJSON ¶
func (r *ListBulkOperationGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListBulkOperationGetResponseEnvelopeSuccess ¶
type ListBulkOperationGetResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListBulkOperationGetResponseEnvelopeSuccessTrue ListBulkOperationGetResponseEnvelopeSuccess = true
)
func (ListBulkOperationGetResponseEnvelopeSuccess) IsKnown ¶
func (r ListBulkOperationGetResponseEnvelopeSuccess) IsKnown() bool
type ListBulkOperationGetResponseObject ¶ added in v4.3.0
type ListBulkOperationGetResponseObject struct {
// The unique operation ID of the asynchronous action.
ID string `json:"id"`
// The RFC 3339 timestamp of when the operation was completed.
Completed string `json:"completed"`
// A message describing the error when the status is `failed`.
Error string `json:"error"`
// The current status of the asynchronous operation.
Status ListBulkOperationGetResponseObjectStatus `json:"status"`
JSON listBulkOperationGetResponseObjectJSON `json:"-"`
}
func (*ListBulkOperationGetResponseObject) UnmarshalJSON ¶ added in v4.3.0
func (r *ListBulkOperationGetResponseObject) UnmarshalJSON(data []byte) (err error)
type ListBulkOperationGetResponseObjectStatus ¶ added in v4.3.0
type ListBulkOperationGetResponseObjectStatus string
The current status of the asynchronous operation.
const ( ListBulkOperationGetResponseObjectStatusPending ListBulkOperationGetResponseObjectStatus = "pending" ListBulkOperationGetResponseObjectStatusRunning ListBulkOperationGetResponseObjectStatus = "running" ListBulkOperationGetResponseObjectStatusCompleted ListBulkOperationGetResponseObjectStatus = "completed" ListBulkOperationGetResponseObjectStatusFailed ListBulkOperationGetResponseObjectStatus = "failed" )
func (ListBulkOperationGetResponseObjectStatus) IsKnown ¶ added in v4.3.0
func (r ListBulkOperationGetResponseObjectStatus) IsKnown() bool
type ListBulkOperationGetResponseStatus ¶ added in v4.3.0
type ListBulkOperationGetResponseStatus string
The current status of the asynchronous operation.
const ( ListBulkOperationGetResponseStatusPending ListBulkOperationGetResponseStatus = "pending" ListBulkOperationGetResponseStatusRunning ListBulkOperationGetResponseStatus = "running" ListBulkOperationGetResponseStatusCompleted ListBulkOperationGetResponseStatus = "completed" ListBulkOperationGetResponseStatusFailed ListBulkOperationGetResponseStatus = "failed" )
func (ListBulkOperationGetResponseStatus) IsKnown ¶ added in v4.3.0
func (r ListBulkOperationGetResponseStatus) IsKnown() bool
type ListBulkOperationGetResponseUnion ¶ added in v4.3.0
type ListBulkOperationGetResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListBulkOperationGetResponseObject or ListBulkOperationGetResponseObject.
type ListBulkOperationService ¶
type ListBulkOperationService struct {
Options []option.RequestOption
}
ListBulkOperationService 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 NewListBulkOperationService method instead.
func NewListBulkOperationService ¶
func NewListBulkOperationService(opts ...option.RequestOption) (r *ListBulkOperationService)
NewListBulkOperationService 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 (*ListBulkOperationService) Get ¶
func (r *ListBulkOperationService) Get(ctx context.Context, operationID string, query ListBulkOperationGetParams, opts ...option.RequestOption) (res *ListBulkOperationGetResponse, err error)
Gets the current status of an asynchronous operation on a list.
The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.
type ListCursor ¶
type ListCursor struct {
After string `json:"after"`
Before string `json:"before"`
JSON listCursorJSON `json:"-"`
}
func (*ListCursor) UnmarshalJSON ¶
func (r *ListCursor) UnmarshalJSON(data []byte) (err error)
type ListDeleteParams ¶
type ListDeleteResponse ¶
type ListDeleteResponse struct {
// Defines the unique ID of the item in the List.
ID string `json:"id"`
JSON listDeleteResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListDeleteResponse) AsUnion ¶ added in v4.3.0
func (r ListDeleteResponse) AsUnion() ListDeleteResponseUnion
AsUnion returns a ListDeleteResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListDeleteResponseID, ListDeleteResponseID.
func (*ListDeleteResponse) UnmarshalJSON ¶
func (r *ListDeleteResponse) UnmarshalJSON(data []byte) (err error)
type ListDeleteResponseEnvelope ¶
type ListDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListDeleteResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON listDeleteResponseEnvelopeJSON `json:"-"`
}
func (*ListDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *ListDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListDeleteResponseEnvelopeSuccess ¶
type ListDeleteResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListDeleteResponseEnvelopeSuccessTrue ListDeleteResponseEnvelopeSuccess = true
)
func (ListDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r ListDeleteResponseEnvelopeSuccess) IsKnown() bool
type ListDeleteResponseID ¶ added in v4.3.0
type ListDeleteResponseID struct {
// Defines the unique ID of the item in the List.
ID string `json:"id"`
JSON listDeleteResponseIDJSON `json:"-"`
}
func (*ListDeleteResponseID) UnmarshalJSON ¶ added in v4.3.0
func (r *ListDeleteResponseID) UnmarshalJSON(data []byte) (err error)
type ListDeleteResponseUnion ¶ added in v4.3.0
type ListDeleteResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListDeleteResponseID or ListDeleteResponseID.
type ListGetParams ¶
type ListGetResponse ¶ added in v4.3.0
type ListGetResponse struct {
// The unique ID of the list.
ID string `json:"id"`
// The RFC 3339 timestamp of when the list was created.
CreatedOn string `json:"created_on"`
// An informative summary of the list.
Description string `json:"description"`
// The type of the list. Each type supports specific list items (IP addresses,
// ASNs, hostnames or redirects).
Kind ListGetResponseKind `json:"kind"`
// The RFC 3339 timestamp of when the list was last modified.
ModifiedOn string `json:"modified_on"`
// An informative name for the list. Use this name in filter and rule expressions.
Name string `json:"name"`
// The number of items in the list.
NumItems float64 `json:"num_items"`
// The number of [filters](/operations/filters-list-filters) referencing the list.
NumReferencingFilters float64 `json:"num_referencing_filters"`
JSON listGetResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListGetResponse) AsUnion ¶ added in v4.3.0
func (r ListGetResponse) AsUnion() ListGetResponseUnion
AsUnion returns a ListGetResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListGetResponseObject, ListGetResponseObject.
func (*ListGetResponse) UnmarshalJSON ¶ added in v4.3.0
func (r *ListGetResponse) UnmarshalJSON(data []byte) (err error)
type ListGetResponseEnvelope ¶
type ListGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListGetResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListGetResponseEnvelopeSuccess `json:"success,required"`
JSON listGetResponseEnvelopeJSON `json:"-"`
}
func (*ListGetResponseEnvelope) UnmarshalJSON ¶
func (r *ListGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListGetResponseEnvelopeSuccess ¶
type ListGetResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListGetResponseEnvelopeSuccessTrue ListGetResponseEnvelopeSuccess = true
)
func (ListGetResponseEnvelopeSuccess) IsKnown ¶
func (r ListGetResponseEnvelopeSuccess) IsKnown() bool
type ListGetResponseKind ¶ added in v4.3.0
type ListGetResponseKind string
The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).
const ( ListGetResponseKindIP ListGetResponseKind = "ip" ListGetResponseKindRedirect ListGetResponseKind = "redirect" ListGetResponseKindHostname ListGetResponseKind = "hostname" ListGetResponseKindASN ListGetResponseKind = "asn" )
func (ListGetResponseKind) IsKnown ¶ added in v4.3.0
func (r ListGetResponseKind) IsKnown() bool
type ListGetResponseObject ¶ added in v4.3.0
type ListGetResponseObject struct {
// The unique ID of the list.
ID string `json:"id"`
// The RFC 3339 timestamp of when the list was created.
CreatedOn string `json:"created_on"`
// An informative summary of the list.
Description string `json:"description"`
// The type of the list. Each type supports specific list items (IP addresses,
// ASNs, hostnames or redirects).
Kind ListGetResponseObjectKind `json:"kind"`
// The RFC 3339 timestamp of when the list was last modified.
ModifiedOn string `json:"modified_on"`
// An informative name for the list. Use this name in filter and rule expressions.
Name string `json:"name"`
// The number of items in the list.
NumItems float64 `json:"num_items"`
// The number of [filters](/operations/filters-list-filters) referencing the list.
NumReferencingFilters float64 `json:"num_referencing_filters"`
JSON listGetResponseObjectJSON `json:"-"`
}
func (*ListGetResponseObject) UnmarshalJSON ¶ added in v4.3.0
func (r *ListGetResponseObject) UnmarshalJSON(data []byte) (err error)
type ListGetResponseObjectKind ¶ added in v4.3.0
type ListGetResponseObjectKind string
The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).
const ( ListGetResponseObjectKindIP ListGetResponseObjectKind = "ip" ListGetResponseObjectKindRedirect ListGetResponseObjectKind = "redirect" ListGetResponseObjectKindHostname ListGetResponseObjectKind = "hostname" ListGetResponseObjectKindASN ListGetResponseObjectKind = "asn" )
func (ListGetResponseObjectKind) IsKnown ¶ added in v4.3.0
func (r ListGetResponseObjectKind) IsKnown() bool
type ListGetResponseUnion ¶ added in v4.3.0
type ListGetResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListGetResponseObject or ListGetResponseObject.
type ListItemDeleteParams ¶
type ListItemDeleteResponse ¶
type ListItemDeleteResponse struct {
// The unique operation ID of the asynchronous action.
OperationID string `json:"operation_id"`
JSON listItemDeleteResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListItemDeleteResponse) AsUnion ¶ added in v4.3.0
func (r ListItemDeleteResponse) AsUnion() ListItemDeleteResponseUnion
AsUnion returns a ListItemDeleteResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListItemDeleteResponseOperationID, ListItemDeleteResponseOperationID.
func (*ListItemDeleteResponse) UnmarshalJSON ¶
func (r *ListItemDeleteResponse) UnmarshalJSON(data []byte) (err error)
type ListItemDeleteResponseEnvelope ¶
type ListItemDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListItemDeleteResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListItemDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON listItemDeleteResponseEnvelopeJSON `json:"-"`
}
func (*ListItemDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *ListItemDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListItemDeleteResponseEnvelopeSuccess ¶
type ListItemDeleteResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListItemDeleteResponseEnvelopeSuccessTrue ListItemDeleteResponseEnvelopeSuccess = true
)
func (ListItemDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r ListItemDeleteResponseEnvelopeSuccess) IsKnown() bool
type ListItemDeleteResponseOperationID ¶ added in v4.3.0
type ListItemDeleteResponseOperationID struct {
// The unique operation ID of the asynchronous action.
OperationID string `json:"operation_id"`
JSON listItemDeleteResponseOperationIDJSON `json:"-"`
}
func (*ListItemDeleteResponseOperationID) UnmarshalJSON ¶ added in v4.3.0
func (r *ListItemDeleteResponseOperationID) UnmarshalJSON(data []byte) (err error)
type ListItemDeleteResponseUnion ¶ added in v4.3.0
type ListItemDeleteResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListItemDeleteResponseOperationID or ListItemDeleteResponseOperationID.
type ListItemGetParams ¶ added in v4.3.0
type ListItemGetResponse ¶
type ListItemGetResponse struct {
// The unique ID of the list.
ID string `json:"id"`
// Defines a non-negative 32 bit integer.
ASN int64 `json:"asn"`
// Defines an informative summary of the list item.
Comment string `json:"comment"`
// The RFC 3339 timestamp of when the item was created.
CreatedOn string `json:"created_on"`
// Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
// 0 to 9, wildcards (\*), and the hyphen (-).
Hostname Hostname `json:"hostname"`
// An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a
// maximum of /64.
IP string `json:"ip"`
// The RFC 3339 timestamp of when the item was last modified.
ModifiedOn string `json:"modified_on"`
// The definition of the redirect.
Redirect Redirect `json:"redirect"`
JSON listItemGetResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListItemGetResponse) AsUnion ¶ added in v4.3.0
func (r ListItemGetResponse) AsUnion() ListItemGetResponseUnion
AsUnion returns a ListItemGetResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListItemGetResponseObject, ListItemGetResponseObject.
func (*ListItemGetResponse) UnmarshalJSON ¶
func (r *ListItemGetResponse) UnmarshalJSON(data []byte) (err error)
type ListItemGetResponseEnvelope ¶
type ListItemGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListItemGetResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListItemGetResponseEnvelopeSuccess `json:"success,required"`
JSON listItemGetResponseEnvelopeJSON `json:"-"`
}
func (*ListItemGetResponseEnvelope) UnmarshalJSON ¶
func (r *ListItemGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListItemGetResponseEnvelopeSuccess ¶
type ListItemGetResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListItemGetResponseEnvelopeSuccessTrue ListItemGetResponseEnvelopeSuccess = true
)
func (ListItemGetResponseEnvelopeSuccess) IsKnown ¶
func (r ListItemGetResponseEnvelopeSuccess) IsKnown() bool
type ListItemGetResponseObject ¶ added in v4.3.0
type ListItemGetResponseObject struct {
// The unique ID of the list.
ID string `json:"id"`
// Defines a non-negative 32 bit integer.
ASN int64 `json:"asn"`
// Defines an informative summary of the list item.
Comment string `json:"comment"`
// The RFC 3339 timestamp of when the item was created.
CreatedOn string `json:"created_on"`
// Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
// 0 to 9, wildcards (\*), and the hyphen (-).
Hostname Hostname `json:"hostname"`
// An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a
// maximum of /64.
IP string `json:"ip"`
// The RFC 3339 timestamp of when the item was last modified.
ModifiedOn string `json:"modified_on"`
// The definition of the redirect.
Redirect Redirect `json:"redirect"`
JSON listItemGetResponseObjectJSON `json:"-"`
}
func (*ListItemGetResponseObject) UnmarshalJSON ¶ added in v4.3.0
func (r *ListItemGetResponseObject) UnmarshalJSON(data []byte) (err error)
type ListItemGetResponseUnion ¶ added in v4.3.0
type ListItemGetResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListItemGetResponseObject or ListItemGetResponseObject.
type ListItemListParams ¶
type ListItemListParams struct {
// Defines an identifier.
AccountID param.Field[string] `path:"account_id,required"`
// The pagination cursor. An opaque string token indicating the position from which
// to continue when requesting the next/previous set of records. Cursor values are
// provided under `result_info.cursors` in the response. You should make no
// assumptions about a cursor's content or length.
Cursor param.Field[string] `query:"cursor"`
// Amount of results to include in each paginated response. A non-negative 32 bit
// integer.
PerPage param.Field[int64] `query:"per_page"`
// A search query to filter returned items. Its meaning depends on the list type:
// IP addresses must start with the provided string, hostnames and bulk redirects
// must contain the string, and ASNs must match the string exactly.
Search param.Field[string] `query:"search"`
}
func (ListItemListParams) URLQuery ¶
func (r ListItemListParams) URLQuery() (v url.Values)
URLQuery serializes ListItemListParams's query parameters as `url.Values`.
type ListItemListResponseEnvelope ¶ added in v4.3.0
type ListItemListResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result []interface{} `json:"result,required"`
// Defines whether the API call was successful.
Success ListItemListResponseEnvelopeSuccess `json:"success,required"`
ResultInfo ListItemListResponseEnvelopeResultInfo `json:"result_info"`
JSON listItemListResponseEnvelopeJSON `json:"-"`
}
func (*ListItemListResponseEnvelope) UnmarshalJSON ¶ added in v4.3.0
func (r *ListItemListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListItemListResponseEnvelopeResultInfo ¶ added in v4.3.0
type ListItemListResponseEnvelopeResultInfo struct {
Cursors ListCursor `json:"cursors"`
JSON listItemListResponseEnvelopeResultInfoJSON `json:"-"`
}
func (*ListItemListResponseEnvelopeResultInfo) UnmarshalJSON ¶ added in v4.3.0
func (r *ListItemListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type ListItemListResponseEnvelopeSuccess ¶ added in v4.3.0
type ListItemListResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListItemListResponseEnvelopeSuccessTrue ListItemListResponseEnvelopeSuccess = true
)
func (ListItemListResponseEnvelopeSuccess) IsKnown ¶ added in v4.3.0
func (r ListItemListResponseEnvelopeSuccess) IsKnown() bool
type ListItemNewParams ¶
type ListItemNewParams struct {
// Defines an identifier.
AccountID param.Field[string] `path:"account_id,required"`
Body []ListItemNewParamsBody `json:"body,required"`
}
func (ListItemNewParams) MarshalJSON ¶
func (r ListItemNewParams) MarshalJSON() (data []byte, err error)
type ListItemNewParamsBody ¶
type ListItemNewParamsBody struct {
// Defines a non-negative 32 bit integer.
ASN param.Field[int64] `json:"asn"`
// Defines an informative summary of the list item.
Comment param.Field[string] `json:"comment"`
// Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
// 0 to 9, wildcards (\*), and the hyphen (-).
Hostname param.Field[HostnameParam] `json:"hostname"`
// An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a
// maximum of /64.
IP param.Field[string] `json:"ip"`
// The definition of the redirect.
Redirect param.Field[RedirectParam] `json:"redirect"`
}
func (ListItemNewParamsBody) MarshalJSON ¶
func (r ListItemNewParamsBody) MarshalJSON() (data []byte, err error)
type ListItemNewResponse ¶
type ListItemNewResponse struct {
// The unique operation ID of the asynchronous action.
OperationID string `json:"operation_id"`
JSON listItemNewResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListItemNewResponse) AsUnion ¶ added in v4.3.0
func (r ListItemNewResponse) AsUnion() ListItemNewResponseUnion
AsUnion returns a ListItemNewResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListItemNewResponseOperationID, ListItemNewResponseOperationID.
func (*ListItemNewResponse) UnmarshalJSON ¶
func (r *ListItemNewResponse) UnmarshalJSON(data []byte) (err error)
type ListItemNewResponseEnvelope ¶
type ListItemNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListItemNewResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListItemNewResponseEnvelopeSuccess `json:"success,required"`
JSON listItemNewResponseEnvelopeJSON `json:"-"`
}
func (*ListItemNewResponseEnvelope) UnmarshalJSON ¶
func (r *ListItemNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListItemNewResponseEnvelopeSuccess ¶
type ListItemNewResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListItemNewResponseEnvelopeSuccessTrue ListItemNewResponseEnvelopeSuccess = true
)
func (ListItemNewResponseEnvelopeSuccess) IsKnown ¶
func (r ListItemNewResponseEnvelopeSuccess) IsKnown() bool
type ListItemNewResponseOperationID ¶ added in v4.3.0
type ListItemNewResponseOperationID struct {
// The unique operation ID of the asynchronous action.
OperationID string `json:"operation_id"`
JSON listItemNewResponseOperationIDJSON `json:"-"`
}
func (*ListItemNewResponseOperationID) UnmarshalJSON ¶ added in v4.3.0
func (r *ListItemNewResponseOperationID) UnmarshalJSON(data []byte) (err error)
type ListItemNewResponseUnion ¶ added in v4.3.0
type ListItemNewResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListItemNewResponseOperationID or ListItemNewResponseOperationID.
type ListItemService ¶
type ListItemService struct {
Options []option.RequestOption
}
ListItemService 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 NewListItemService method instead.
func NewListItemService ¶
func NewListItemService(opts ...option.RequestOption) (r *ListItemService)
NewListItemService 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 (*ListItemService) Delete ¶
func (r *ListItemService) Delete(ctx context.Context, listID string, body ListItemDeleteParams, opts ...option.RequestOption) (res *ListItemDeleteResponse, err error)
Removes one or more items from a list.
This operation is asynchronous. To get current the operation status, invoke the [Get bulk operation status](/operations/lists-get-bulk-operation-status) endpoint with the returned `operation_id`.
func (*ListItemService) Get ¶
func (r *ListItemService) Get(ctx context.Context, listID string, itemID string, query ListItemGetParams, opts ...option.RequestOption) (res *ListItemGetResponse, err error)
Fetches a list item in the list.
func (*ListItemService) List ¶
func (r *ListItemService) List(ctx context.Context, listID string, params ListItemListParams, opts ...option.RequestOption) (res *[]interface{}, err error)
Fetches all the items in the list.
func (*ListItemService) New ¶
func (r *ListItemService) New(ctx context.Context, listID string, params ListItemNewParams, opts ...option.RequestOption) (res *ListItemNewResponse, err error)
Appends new items to the list.
This operation is asynchronous. To get current the operation status, invoke the [Get bulk operation status](/operations/lists-get-bulk-operation-status) endpoint with the returned `operation_id`.
func (*ListItemService) Update ¶
func (r *ListItemService) Update(ctx context.Context, listID string, params ListItemUpdateParams, opts ...option.RequestOption) (res *ListItemUpdateResponse, err error)
Removes all existing items from the list and adds the provided items to the list.
This operation is asynchronous. To get current the operation status, invoke the [Get bulk operation status](/operations/lists-get-bulk-operation-status) endpoint with the returned `operation_id`.
type ListItemUpdateParams ¶
type ListItemUpdateParams struct {
// Defines an identifier.
AccountID param.Field[string] `path:"account_id,required"`
Body []ListItemUpdateParamsBody `json:"body,required"`
}
func (ListItemUpdateParams) MarshalJSON ¶
func (r ListItemUpdateParams) MarshalJSON() (data []byte, err error)
type ListItemUpdateParamsBody ¶
type ListItemUpdateParamsBody struct {
// Defines a non-negative 32 bit integer.
ASN param.Field[int64] `json:"asn"`
// Defines an informative summary of the list item.
Comment param.Field[string] `json:"comment"`
// Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
// 0 to 9, wildcards (\*), and the hyphen (-).
Hostname param.Field[HostnameParam] `json:"hostname"`
// An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a
// maximum of /64.
IP param.Field[string] `json:"ip"`
// The definition of the redirect.
Redirect param.Field[RedirectParam] `json:"redirect"`
}
func (ListItemUpdateParamsBody) MarshalJSON ¶
func (r ListItemUpdateParamsBody) MarshalJSON() (data []byte, err error)
type ListItemUpdateResponse ¶
type ListItemUpdateResponse struct {
// The unique operation ID of the asynchronous action.
OperationID string `json:"operation_id"`
JSON listItemUpdateResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListItemUpdateResponse) AsUnion ¶ added in v4.3.0
func (r ListItemUpdateResponse) AsUnion() ListItemUpdateResponseUnion
AsUnion returns a ListItemUpdateResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListItemUpdateResponseOperationID, ListItemUpdateResponseOperationID.
func (*ListItemUpdateResponse) UnmarshalJSON ¶
func (r *ListItemUpdateResponse) UnmarshalJSON(data []byte) (err error)
type ListItemUpdateResponseEnvelope ¶
type ListItemUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListItemUpdateResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListItemUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON listItemUpdateResponseEnvelopeJSON `json:"-"`
}
func (*ListItemUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *ListItemUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListItemUpdateResponseEnvelopeSuccess ¶
type ListItemUpdateResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListItemUpdateResponseEnvelopeSuccessTrue ListItemUpdateResponseEnvelopeSuccess = true
)
func (ListItemUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r ListItemUpdateResponseEnvelopeSuccess) IsKnown() bool
type ListItemUpdateResponseOperationID ¶ added in v4.3.0
type ListItemUpdateResponseOperationID struct {
// The unique operation ID of the asynchronous action.
OperationID string `json:"operation_id"`
JSON listItemUpdateResponseOperationIDJSON `json:"-"`
}
func (*ListItemUpdateResponseOperationID) UnmarshalJSON ¶ added in v4.3.0
func (r *ListItemUpdateResponseOperationID) UnmarshalJSON(data []byte) (err error)
type ListItemUpdateResponseUnion ¶ added in v4.3.0
type ListItemUpdateResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListItemUpdateResponseOperationID or ListItemUpdateResponseOperationID.
type ListListParams ¶
type ListListResponseEnvelope ¶ added in v4.3.0
type ListListResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result []interface{} `json:"result,required"`
// Defines whether the API call was successful.
Success ListListResponseEnvelopeSuccess `json:"success,required"`
JSON listListResponseEnvelopeJSON `json:"-"`
}
func (*ListListResponseEnvelope) UnmarshalJSON ¶ added in v4.3.0
func (r *ListListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListListResponseEnvelopeSuccess ¶ added in v4.3.0
type ListListResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListListResponseEnvelopeSuccessTrue ListListResponseEnvelopeSuccess = true
)
func (ListListResponseEnvelopeSuccess) IsKnown ¶ added in v4.3.0
func (r ListListResponseEnvelopeSuccess) IsKnown() bool
type ListNewParams ¶
type ListNewParams struct {
// Defines an identifier.
AccountID param.Field[string] `path:"account_id,required"`
// The type of the list. Each type supports specific list items (IP addresses,
// ASNs, hostnames or redirects).
Kind param.Field[ListNewParamsKind] `json:"kind,required"`
// An informative name for the list. Use this name in filter and rule expressions.
Name param.Field[string] `json:"name,required"`
// An informative summary of the list.
Description param.Field[string] `json:"description"`
}
func (ListNewParams) MarshalJSON ¶
func (r ListNewParams) MarshalJSON() (data []byte, err error)
type ListNewParamsKind ¶
type ListNewParamsKind string
The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).
const ( ListNewParamsKindIP ListNewParamsKind = "ip" ListNewParamsKindRedirect ListNewParamsKind = "redirect" ListNewParamsKindHostname ListNewParamsKind = "hostname" ListNewParamsKindASN ListNewParamsKind = "asn" )
func (ListNewParamsKind) IsKnown ¶
func (r ListNewParamsKind) IsKnown() bool
type ListNewResponse ¶ added in v4.3.0
type ListNewResponse struct {
// The unique ID of the list.
ID string `json:"id"`
// The RFC 3339 timestamp of when the list was created.
CreatedOn string `json:"created_on"`
// An informative summary of the list.
Description string `json:"description"`
// The type of the list. Each type supports specific list items (IP addresses,
// ASNs, hostnames or redirects).
Kind ListNewResponseKind `json:"kind"`
// The RFC 3339 timestamp of when the list was last modified.
ModifiedOn string `json:"modified_on"`
// An informative name for the list. Use this name in filter and rule expressions.
Name string `json:"name"`
// The number of items in the list.
NumItems float64 `json:"num_items"`
// The number of [filters](/operations/filters-list-filters) referencing the list.
NumReferencingFilters float64 `json:"num_referencing_filters"`
JSON listNewResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListNewResponse) AsUnion ¶ added in v4.3.0
func (r ListNewResponse) AsUnion() ListNewResponseUnion
AsUnion returns a ListNewResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListNewResponseObject, ListNewResponseObject.
func (*ListNewResponse) UnmarshalJSON ¶ added in v4.3.0
func (r *ListNewResponse) UnmarshalJSON(data []byte) (err error)
type ListNewResponseEnvelope ¶
type ListNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListNewResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListNewResponseEnvelopeSuccess `json:"success,required"`
JSON listNewResponseEnvelopeJSON `json:"-"`
}
func (*ListNewResponseEnvelope) UnmarshalJSON ¶
func (r *ListNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListNewResponseEnvelopeSuccess ¶
type ListNewResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListNewResponseEnvelopeSuccessTrue ListNewResponseEnvelopeSuccess = true
)
func (ListNewResponseEnvelopeSuccess) IsKnown ¶
func (r ListNewResponseEnvelopeSuccess) IsKnown() bool
type ListNewResponseKind ¶ added in v4.3.0
type ListNewResponseKind string
The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).
const ( ListNewResponseKindIP ListNewResponseKind = "ip" ListNewResponseKindRedirect ListNewResponseKind = "redirect" ListNewResponseKindHostname ListNewResponseKind = "hostname" ListNewResponseKindASN ListNewResponseKind = "asn" )
func (ListNewResponseKind) IsKnown ¶ added in v4.3.0
func (r ListNewResponseKind) IsKnown() bool
type ListNewResponseObject ¶ added in v4.3.0
type ListNewResponseObject struct {
// The unique ID of the list.
ID string `json:"id"`
// The RFC 3339 timestamp of when the list was created.
CreatedOn string `json:"created_on"`
// An informative summary of the list.
Description string `json:"description"`
// The type of the list. Each type supports specific list items (IP addresses,
// ASNs, hostnames or redirects).
Kind ListNewResponseObjectKind `json:"kind"`
// The RFC 3339 timestamp of when the list was last modified.
ModifiedOn string `json:"modified_on"`
// An informative name for the list. Use this name in filter and rule expressions.
Name string `json:"name"`
// The number of items in the list.
NumItems float64 `json:"num_items"`
// The number of [filters](/operations/filters-list-filters) referencing the list.
NumReferencingFilters float64 `json:"num_referencing_filters"`
JSON listNewResponseObjectJSON `json:"-"`
}
func (*ListNewResponseObject) UnmarshalJSON ¶ added in v4.3.0
func (r *ListNewResponseObject) UnmarshalJSON(data []byte) (err error)
type ListNewResponseObjectKind ¶ added in v4.3.0
type ListNewResponseObjectKind string
The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).
const ( ListNewResponseObjectKindIP ListNewResponseObjectKind = "ip" ListNewResponseObjectKindRedirect ListNewResponseObjectKind = "redirect" ListNewResponseObjectKindHostname ListNewResponseObjectKind = "hostname" ListNewResponseObjectKindASN ListNewResponseObjectKind = "asn" )
func (ListNewResponseObjectKind) IsKnown ¶ added in v4.3.0
func (r ListNewResponseObjectKind) IsKnown() bool
type ListNewResponseUnion ¶ added in v4.3.0
type ListNewResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListNewResponseObject or ListNewResponseObject.
type ListService ¶
type ListService struct {
Options []option.RequestOption
BulkOperations *ListBulkOperationService
Items *ListItemService
}
ListService 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 NewListService method instead.
func NewListService ¶
func NewListService(opts ...option.RequestOption) (r *ListService)
NewListService 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 (*ListService) Delete ¶
func (r *ListService) Delete(ctx context.Context, listID string, body ListDeleteParams, opts ...option.RequestOption) (res *ListDeleteResponse, err error)
Deletes a specific list and all its items.
func (*ListService) Get ¶
func (r *ListService) Get(ctx context.Context, listID string, query ListGetParams, opts ...option.RequestOption) (res *ListGetResponse, err error)
Fetches the details of a list.
func (*ListService) List ¶
func (r *ListService) List(ctx context.Context, query ListListParams, opts ...option.RequestOption) (res *[]interface{}, err error)
Fetches all lists in the account.
func (*ListService) New ¶
func (r *ListService) New(ctx context.Context, params ListNewParams, opts ...option.RequestOption) (res *ListNewResponse, err error)
Creates a new list of the specified type.
func (*ListService) Update ¶
func (r *ListService) Update(ctx context.Context, listID string, params ListUpdateParams, opts ...option.RequestOption) (res *ListUpdateResponse, err error)
Updates the description of a list.
type ListUpdateParams ¶
type ListUpdateParams struct {
// Defines an identifier.
AccountID param.Field[string] `path:"account_id,required"`
// An informative summary of the list.
Description param.Field[string] `json:"description"`
}
func (ListUpdateParams) MarshalJSON ¶
func (r ListUpdateParams) MarshalJSON() (data []byte, err error)
type ListUpdateResponse ¶ added in v4.3.0
type ListUpdateResponse struct {
// The unique ID of the list.
ID string `json:"id"`
// The RFC 3339 timestamp of when the list was created.
CreatedOn string `json:"created_on"`
// An informative summary of the list.
Description string `json:"description"`
// The type of the list. Each type supports specific list items (IP addresses,
// ASNs, hostnames or redirects).
Kind ListUpdateResponseKind `json:"kind"`
// The RFC 3339 timestamp of when the list was last modified.
ModifiedOn string `json:"modified_on"`
// An informative name for the list. Use this name in filter and rule expressions.
Name string `json:"name"`
// The number of items in the list.
NumItems float64 `json:"num_items"`
// The number of [filters](/operations/filters-list-filters) referencing the list.
NumReferencingFilters float64 `json:"num_referencing_filters"`
JSON listUpdateResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (ListUpdateResponse) AsUnion ¶ added in v4.3.0
func (r ListUpdateResponse) AsUnion() ListUpdateResponseUnion
AsUnion returns a ListUpdateResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ListUpdateResponseObject, ListUpdateResponseObject.
func (*ListUpdateResponse) UnmarshalJSON ¶ added in v4.3.0
func (r *ListUpdateResponse) UnmarshalJSON(data []byte) (err error)
type ListUpdateResponseEnvelope ¶
type ListUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result ListUpdateResponse `json:"result,required"`
// Defines whether the API call was successful.
Success ListUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON listUpdateResponseEnvelopeJSON `json:"-"`
}
func (*ListUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *ListUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ListUpdateResponseEnvelopeSuccess ¶
type ListUpdateResponseEnvelopeSuccess bool
Defines whether the API call was successful.
const (
ListUpdateResponseEnvelopeSuccessTrue ListUpdateResponseEnvelopeSuccess = true
)
func (ListUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r ListUpdateResponseEnvelopeSuccess) IsKnown() bool
type ListUpdateResponseKind ¶ added in v4.3.0
type ListUpdateResponseKind string
The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).
const ( ListUpdateResponseKindIP ListUpdateResponseKind = "ip" ListUpdateResponseKindRedirect ListUpdateResponseKind = "redirect" ListUpdateResponseKindHostname ListUpdateResponseKind = "hostname" ListUpdateResponseKindASN ListUpdateResponseKind = "asn" )
func (ListUpdateResponseKind) IsKnown ¶ added in v4.3.0
func (r ListUpdateResponseKind) IsKnown() bool
type ListUpdateResponseObject ¶ added in v4.3.0
type ListUpdateResponseObject struct {
// The unique ID of the list.
ID string `json:"id"`
// The RFC 3339 timestamp of when the list was created.
CreatedOn string `json:"created_on"`
// An informative summary of the list.
Description string `json:"description"`
// The type of the list. Each type supports specific list items (IP addresses,
// ASNs, hostnames or redirects).
Kind ListUpdateResponseObjectKind `json:"kind"`
// The RFC 3339 timestamp of when the list was last modified.
ModifiedOn string `json:"modified_on"`
// An informative name for the list. Use this name in filter and rule expressions.
Name string `json:"name"`
// The number of items in the list.
NumItems float64 `json:"num_items"`
// The number of [filters](/operations/filters-list-filters) referencing the list.
NumReferencingFilters float64 `json:"num_referencing_filters"`
JSON listUpdateResponseObjectJSON `json:"-"`
}
func (*ListUpdateResponseObject) UnmarshalJSON ¶ added in v4.3.0
func (r *ListUpdateResponseObject) UnmarshalJSON(data []byte) (err error)
type ListUpdateResponseObjectKind ¶ added in v4.3.0
type ListUpdateResponseObjectKind string
The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).
const ( ListUpdateResponseObjectKindIP ListUpdateResponseObjectKind = "ip" ListUpdateResponseObjectKindRedirect ListUpdateResponseObjectKind = "redirect" ListUpdateResponseObjectKindHostname ListUpdateResponseObjectKind = "hostname" ListUpdateResponseObjectKindASN ListUpdateResponseObjectKind = "asn" )
func (ListUpdateResponseObjectKind) IsKnown ¶ added in v4.3.0
func (r ListUpdateResponseObjectKind) IsKnown() bool
type ListUpdateResponseUnion ¶ added in v4.3.0
type ListUpdateResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ListUpdateResponseObject or ListUpdateResponseObject.
type MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
A scope is a combination of scope objects which provides additional context.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
This is an alias to an internal type.
type 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 RatePlanID ¶ added in v4.1.0
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
This is an alias to an internal type.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type Redirect ¶
type Redirect struct {
SourceURL string `json:"source_url,required"`
TargetURL string `json:"target_url,required"`
IncludeSubdomains bool `json:"include_subdomains"`
PreservePathSuffix bool `json:"preserve_path_suffix"`
PreserveQueryString bool `json:"preserve_query_string"`
StatusCode RedirectStatusCode `json:"status_code"`
SubpathMatching bool `json:"subpath_matching"`
JSON redirectJSON `json:"-"`
}
The definition of the redirect.
func (*Redirect) UnmarshalJSON ¶
type RedirectParam ¶
type RedirectParam struct {
SourceURL param.Field[string] `json:"source_url,required"`
TargetURL param.Field[string] `json:"target_url,required"`
IncludeSubdomains param.Field[bool] `json:"include_subdomains"`
PreservePathSuffix param.Field[bool] `json:"preserve_path_suffix"`
PreserveQueryString param.Field[bool] `json:"preserve_query_string"`
StatusCode param.Field[RedirectStatusCode] `json:"status_code"`
SubpathMatching param.Field[bool] `json:"subpath_matching"`
}
The definition of the redirect.
func (RedirectParam) MarshalJSON ¶
func (r RedirectParam) MarshalJSON() (data []byte, err error)
type RedirectStatusCode ¶
type RedirectStatusCode int64
const ( RedirectStatusCode301 RedirectStatusCode = 301 RedirectStatusCode302 RedirectStatusCode = 302 RedirectStatusCode307 RedirectStatusCode = 307 RedirectStatusCode308 RedirectStatusCode = 308 )
func (RedirectStatusCode) IsKnown ¶
func (r RedirectStatusCode) IsKnown() bool
type ResponseInfoSource ¶ added in v4.3.0
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
type RuleService ¶
type RuleService struct {
Options []option.RequestOption
Lists *ListService
}
RuleService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRuleService method instead.
func NewRuleService ¶
func NewRuleService(opts ...option.RequestOption) (r *RuleService)
NewRuleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.