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 Hostname
- type HostnameParam
- type ListBulkOperationGetResponse
- type ListBulkOperationGetResponseEnvelope
- type ListBulkOperationGetResponseEnvelopeSuccess
- type ListBulkOperationService
- type ListCursor
- type ListDeleteResponse
- type ListDeleteResponseEnvelope
- type ListDeleteResponseEnvelopeSuccess
- type ListGetResponse
- type ListGetResponseEnvelope
- type ListGetResponseEnvelopeSuccess
- type ListItemDeleteResponse
- type ListItemDeleteResponseEnvelope
- type ListItemDeleteResponseEnvelopeSuccess
- type ListItemGetResponseEnvelope
- type ListItemGetResponseEnvelopeSuccess
- type ListItemGetResponseUnion
- type ListItemListParams
- type ListItemListResponse
- type ListItemNewParams
- type ListItemNewParamsBody
- type ListItemNewResponse
- type ListItemNewResponseEnvelope
- type ListItemNewResponseEnvelopeSuccess
- type ListItemService
- func (r *ListItemService) Delete(ctx context.Context, accountID string, listID string, ...) (res *ListItemDeleteResponse, err error)
- func (r *ListItemService) Get(ctx context.Context, accountIdentifier string, listID string, itemID string, ...) (res *ListItemGetResponseUnion, err error)
- func (r *ListItemService) List(ctx context.Context, accountID string, listID string, query ListItemListParams, ...) (res *pagination.CursorPagination[ListItemListResponse], err error)
- func (r *ListItemService) ListAutoPaging(ctx context.Context, accountID string, listID string, query ListItemListParams, ...) *pagination.CursorPaginationAutoPager[ListItemListResponse]
- func (r *ListItemService) New(ctx context.Context, accountID string, listID string, body ListItemNewParams, ...) (res *ListItemNewResponse, err error)
- func (r *ListItemService) Update(ctx context.Context, accountID string, listID string, ...) (res *ListItemUpdateResponse, err error)
- type ListItemUpdateParams
- type ListItemUpdateParamsBody
- type ListItemUpdateResponse
- type ListItemUpdateResponseEnvelope
- type ListItemUpdateResponseEnvelopeSuccess
- type ListNewParams
- type ListNewParamsKind
- type ListNewResponse
- type ListNewResponseEnvelope
- type ListNewResponseEnvelopeSuccess
- type ListService
- func (r *ListService) Delete(ctx context.Context, accountID string, listID string, ...) (res *ListDeleteResponse, err error)
- func (r *ListService) Get(ctx context.Context, accountID string, listID string, ...) (res *ListsList, err error)
- func (r *ListService) List(ctx context.Context, accountID string, opts ...option.RequestOption) (res *pagination.SinglePage[ListsList], err error)
- func (r *ListService) ListAutoPaging(ctx context.Context, accountID string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ListsList]
- func (r *ListService) New(ctx context.Context, accountID string, body ListNewParams, ...) (res *ListsList, err error)
- func (r *ListService) Update(ctx context.Context, accountID string, listID string, body ListUpdateParams, ...) (res *ListsList, err error)
- type ListUpdateParams
- type ListUpdateResponse
- type ListUpdateResponseEnvelope
- type ListUpdateResponseEnvelopeSuccess
- type ListsList
- type ListsListKind
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Redirect
- type RedirectParam
- type RedirectStatusCode
- type ResponseInfo
- type Role
- type RuleService
- type SortDirection
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 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 CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
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 SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
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 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) ImplementsRulesListItemGetResponseUnion ¶
func (r Hostname) ImplementsRulesListItemGetResponseUnion()
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 ListBulkOperationGetResponse ¶
type ListBulkOperationGetResponse = interface{}
type ListBulkOperationGetResponseEnvelope ¶
type ListBulkOperationGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result []ListBulkOperationGetResponse `json:"result,required,nullable"` // 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
Whether the API call was successful
const (
ListBulkOperationGetResponseEnvelopeSuccessTrue ListBulkOperationGetResponseEnvelopeSuccess = true
)
func (ListBulkOperationGetResponseEnvelopeSuccess) IsKnown ¶
func (r ListBulkOperationGetResponseEnvelopeSuccess) IsKnown() bool
type ListBulkOperationService ¶
type ListBulkOperationService struct {
Options []option.RequestOption
}
ListBulkOperationService contains methods and other services that help with interacting with the testcloudflare 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, accountIdentifier string, operationID string, 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 ListDeleteResponse ¶
type ListDeleteResponse struct { // The unique ID of the item in the List. ID string `json:"id"` JSON listDeleteResponseJSON `json:"-"` }
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,nullable"` // 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
Whether the API call was successful
const (
ListDeleteResponseEnvelopeSuccessTrue ListDeleteResponseEnvelopeSuccess = true
)
func (ListDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r ListDeleteResponseEnvelopeSuccess) IsKnown() bool
type ListGetResponse ¶
type ListGetResponse = interface{}
type ListGetResponseEnvelope ¶
type ListGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ListsList `json:"result,required,nullable"` // 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
Whether the API call was successful
const (
ListGetResponseEnvelopeSuccessTrue ListGetResponseEnvelopeSuccess = true
)
func (ListGetResponseEnvelopeSuccess) IsKnown ¶
func (r ListGetResponseEnvelopeSuccess) IsKnown() bool
type ListItemDeleteResponse ¶
type ListItemDeleteResponse struct { // The unique operation ID of the asynchronous action. OperationID string `json:"operation_id"` JSON listItemDeleteResponseJSON `json:"-"` }
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,nullable"` // 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
Whether the API call was successful
const (
ListItemDeleteResponseEnvelopeSuccessTrue ListItemDeleteResponseEnvelopeSuccess = true
)
func (ListItemDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r ListItemDeleteResponseEnvelopeSuccess) IsKnown() bool
type ListItemGetResponseEnvelope ¶
type ListItemGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a // maximum of /64. Result ListItemGetResponseUnion `json:"result,required,nullable"` // 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
Whether the API call was successful
const (
ListItemGetResponseEnvelopeSuccessTrue ListItemGetResponseEnvelopeSuccess = true
)
func (ListItemGetResponseEnvelopeSuccess) IsKnown ¶
func (r ListItemGetResponseEnvelopeSuccess) IsKnown() bool
type ListItemGetResponseUnion ¶
type ListItemGetResponseUnion interface {
ImplementsRulesListItemGetResponseUnion()
}
An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a maximum of /64.
Union satisfied by shared.UnionString, rules.Redirect, rules.Hostname or shared.UnionInt.
type ListItemListParams ¶
type ListItemListParams struct { // 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 ListItemListResponse ¶
type ListItemListResponse = interface{}
type ListItemNewParams ¶
type ListItemNewParams struct {
Body []ListItemNewParamsBody `json:"body,required"`
}
func (ListItemNewParams) MarshalJSON ¶
func (r ListItemNewParams) MarshalJSON() (data []byte, err error)
type ListItemNewParamsBody ¶
type ListItemNewParamsBody struct { // A non-negative 32 bit integer ASN param.Field[int64] `json:"asn"` // 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:"-"` }
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,nullable"` // 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
Whether the API call was successful
const (
ListItemNewResponseEnvelopeSuccessTrue ListItemNewResponseEnvelopeSuccess = true
)
func (ListItemNewResponseEnvelopeSuccess) IsKnown ¶
func (r ListItemNewResponseEnvelopeSuccess) IsKnown() bool
type ListItemService ¶
type ListItemService struct {
Options []option.RequestOption
}
ListItemService contains methods and other services that help with interacting with the testcloudflare 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, accountID string, listID string, 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, accountIdentifier string, listID string, itemID string, opts ...option.RequestOption) (res *ListItemGetResponseUnion, err error)
Fetches a list item in the list.
func (*ListItemService) List ¶
func (r *ListItemService) List(ctx context.Context, accountID string, listID string, query ListItemListParams, opts ...option.RequestOption) (res *pagination.CursorPagination[ListItemListResponse], err error)
Fetches all the items in the list.
func (*ListItemService) ListAutoPaging ¶
func (r *ListItemService) ListAutoPaging(ctx context.Context, accountID string, listID string, query ListItemListParams, opts ...option.RequestOption) *pagination.CursorPaginationAutoPager[ListItemListResponse]
Fetches all the items in the list.
func (*ListItemService) New ¶
func (r *ListItemService) New(ctx context.Context, accountID string, listID string, body 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, accountID string, listID string, body 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 {
Body []ListItemUpdateParamsBody `json:"body,required"`
}
func (ListItemUpdateParams) MarshalJSON ¶
func (r ListItemUpdateParams) MarshalJSON() (data []byte, err error)
type ListItemUpdateParamsBody ¶
type ListItemUpdateParamsBody struct { // A non-negative 32 bit integer ASN param.Field[int64] `json:"asn"` // 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:"-"` }
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,nullable"` // 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
Whether the API call was successful
const (
ListItemUpdateResponseEnvelopeSuccessTrue ListItemUpdateResponseEnvelopeSuccess = true
)
func (ListItemUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r ListItemUpdateResponseEnvelopeSuccess) IsKnown() bool
type ListNewParams ¶
type ListNewParams struct { // 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 ¶
type ListNewResponse = interface{}
type ListNewResponseEnvelope ¶
type ListNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ListsList `json:"result,required,nullable"` // 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
Whether the API call was successful
const (
ListNewResponseEnvelopeSuccessTrue ListNewResponseEnvelopeSuccess = true
)
func (ListNewResponseEnvelopeSuccess) IsKnown ¶
func (r ListNewResponseEnvelopeSuccess) IsKnown() bool
type ListService ¶
type ListService struct { Options []option.RequestOption BulkOperations *ListBulkOperationService Items *ListItemService }
ListService contains methods and other services that help with interacting with the testcloudflare 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, accountID string, listID string, 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, accountID string, listID string, opts ...option.RequestOption) (res *ListsList, err error)
Fetches the details of a list.
func (*ListService) List ¶
func (r *ListService) List(ctx context.Context, accountID string, opts ...option.RequestOption) (res *pagination.SinglePage[ListsList], err error)
Fetches all lists in the account.
func (*ListService) ListAutoPaging ¶
func (r *ListService) ListAutoPaging(ctx context.Context, accountID string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ListsList]
Fetches all lists in the account.
func (*ListService) New ¶
func (r *ListService) New(ctx context.Context, accountID string, body ListNewParams, opts ...option.RequestOption) (res *ListsList, err error)
Creates a new list of the specified type.
func (*ListService) Update ¶
func (r *ListService) Update(ctx context.Context, accountID string, listID string, body ListUpdateParams, opts ...option.RequestOption) (res *ListsList, err error)
Updates the description of a list.
type ListUpdateParams ¶
type ListUpdateParams struct { // 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 ¶
type ListUpdateResponse = interface{}
type ListUpdateResponseEnvelope ¶
type ListUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ListsList `json:"result,required,nullable"` // 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
Whether the API call was successful
const (
ListUpdateResponseEnvelopeSuccessTrue ListUpdateResponseEnvelopeSuccess = true
)
func (ListUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r ListUpdateResponseEnvelopeSuccess) IsKnown() bool
type ListsList ¶
type ListsList 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 ListsListKind `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 listsListJSON `json:"-"` }
func (*ListsList) UnmarshalJSON ¶
type ListsListKind ¶
type ListsListKind string
The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects).
const ( ListsListKindIP ListsListKind = "ip" ListsListKindRedirect ListsListKind = "redirect" ListsListKindHostname ListsListKind = "hostname" ListsListKindASN ListsListKind = "asn" )
func (ListsListKind) IsKnown ¶
func (r ListsListKind) IsKnown() bool
type MemberRoleParam ¶
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
This is an alias to an internal type.
type 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 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) ImplementsRulesListItemGetResponseUnion ¶
func (r Redirect) ImplementsRulesListItemGetResponseUnion()
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 RuleService ¶
type RuleService struct { Options []option.RequestOption Lists *ListService }
RuleService contains methods and other services that help with interacting with the testcloudflare 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.