Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogListParams
- type AuditLogListParamsAction
- type AuditLogListParamsActor
- type AuditLogListParamsBeforeUnion
- type AuditLogListParamsDirection
- type AuditLogListParamsSinceUnion
- type AuditLogListParamsZone
- type AuditLogOwner
- type AuditLogResource
- type AuditLogService
- func (r *AuditLogService) List(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[shared.AuditLog], err error)
- func (r *AuditLogService) ListAutoPaging(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[shared.AuditLog]
- type BillingHistory
- type BillingHistoryListParams
- type BillingHistoryListParamsOrder
- type BillingHistoryService
- func (r *BillingHistoryService) List(ctx context.Context, query BillingHistoryListParams, ...) (res *pagination.V4PagePaginationArray[BillingHistory], err error)
- func (r *BillingHistoryService) ListAutoPaging(ctx context.Context, query BillingHistoryListParams, ...) *pagination.V4PagePaginationArrayAutoPager[BillingHistory]
- type BillingHistoryZone
- type BillingProfileGetResponse
- type BillingProfileGetResponseEnvelope
- type BillingProfileGetResponseEnvelopeSuccess
- type BillingProfileService
- type BillingService
- type CIDRList
- type CIDRListParam
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type Invite
- type InviteEditParams
- type InviteEditParamsStatus
- type InviteEditResponse
- type InviteEditResponseEnvelope
- type InviteEditResponseEnvelopeSuccess
- type InviteGetResponse
- type InviteGetResponseEnvelope
- type InviteGetResponseEnvelopeSuccess
- type InviteService
- func (r *InviteService) Edit(ctx context.Context, inviteID string, body InviteEditParams, ...) (res *InviteEditResponse, err error)
- func (r *InviteService) Get(ctx context.Context, inviteID string, opts ...option.RequestOption) (res *InviteGetResponse, err error)
- func (r *InviteService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[Invite], err error)
- func (r *InviteService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Invite]
- type InviteStatus
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Organization
- type OrganizationDeleteResponse
- type OrganizationGetResponse
- type OrganizationGetResponseEnvelope
- type OrganizationGetResponseEnvelopeSuccess
- type OrganizationListParams
- type OrganizationListParamsDirection
- type OrganizationListParamsMatch
- type OrganizationListParamsOrder
- type OrganizationListParamsStatus
- type OrganizationService
- func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)
- func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
- func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, ...) (res *pagination.V4PagePaginationArray[Organization], err error)
- func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, ...) *pagination.V4PagePaginationArrayAutoPager[Organization]
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Policy
- type PolicyEffect
- type PolicyParam
- type PolicyPermissionGroup
- type PolicyPermissionGroupParam
- type PolicyPermissionGroupsMeta
- type PolicyPermissionGroupsMetaParam
- type PolicyResources
- type PolicyResourcesParam
- type RatePlan
- type RatePlanParam
- type ResponseInfo
- type Role
- type SortDirection
- type Subscription
- type SubscriptionDeleteResponse
- type SubscriptionFrequency
- type SubscriptionGetResponseEnvelope
- type SubscriptionGetResponseEnvelopeResultInfo
- type SubscriptionGetResponseEnvelopeSuccess
- type SubscriptionParam
- type SubscriptionService
- func (r *SubscriptionService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error)
- func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOption) (res *[]shared.Subscription, err error)
- func (r *SubscriptionService) Update(ctx context.Context, identifier string, body SubscriptionUpdateParams, ...) (res *interface{}, err error)
- type SubscriptionState
- type SubscriptionUpdateParams
- type SubscriptionUpdateResponseEnvelope
- type SubscriptionUpdateResponseEnvelopeSuccess
- type TokenConditionParam
- type TokenConditionRequestIPParam
- type TokenDeleteResponse
- type TokenDeleteResponseEnvelope
- type TokenDeleteResponseEnvelopeSuccess
- type TokenGetResponse
- type TokenGetResponseCondition
- type TokenGetResponseConditionRequestIP
- type TokenGetResponseEnvelope
- type TokenGetResponseEnvelopeSuccess
- type TokenGetResponseStatus
- type TokenListParams
- type TokenListParamsDirection
- type TokenListResponse
- type TokenListResponseCondition
- type TokenListResponseConditionRequestIP
- type TokenListResponseStatus
- type TokenNewParams
- type TokenNewParamsCondition
- type TokenNewParamsConditionRequestIP
- type TokenNewResponse
- type TokenNewResponseCondition
- type TokenNewResponseConditionRequestIP
- type TokenNewResponseEnvelope
- type TokenNewResponseEnvelopeSuccess
- type TokenNewResponseStatus
- type TokenParam
- type TokenPermissionGroupListResponse
- type TokenPermissionGroupService
- func (r *TokenPermissionGroupService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[TokenPermissionGroupListResponse], err error)
- func (r *TokenPermissionGroupService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TokenPermissionGroupListResponse]
- type TokenService
- func (r *TokenService) Delete(ctx context.Context, tokenID string, opts ...option.RequestOption) (res *TokenDeleteResponse, err error)
- func (r *TokenService) Get(ctx context.Context, tokenID string, opts ...option.RequestOption) (res *TokenGetResponse, err error)
- func (r *TokenService) List(ctx context.Context, query TokenListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[TokenListResponse], err error)
- func (r *TokenService) ListAutoPaging(ctx context.Context, query TokenListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[TokenListResponse]
- func (r *TokenService) New(ctx context.Context, body TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error)
- func (r *TokenService) Update(ctx context.Context, tokenID string, body TokenUpdateParams, ...) (res *TokenUpdateResponse, err error)
- func (r *TokenService) Verify(ctx context.Context, opts ...option.RequestOption) (res *TokenVerifyResponse, err error)
- type TokenStatus
- type TokenUpdateParams
- type TokenUpdateResponse
- type TokenUpdateResponseCondition
- type TokenUpdateResponseConditionRequestIP
- type TokenUpdateResponseEnvelope
- type TokenUpdateResponseEnvelopeSuccess
- type TokenUpdateResponseStatus
- type TokenValueService
- type TokenValueUpdateParams
- type TokenValueUpdateResponseEnvelope
- type TokenValueUpdateResponseEnvelopeSuccess
- type TokenVerifyResponse
- type TokenVerifyResponseEnvelope
- type TokenVerifyResponseEnvelopeSuccess
- type TokenVerifyResponseStatus
- type UserEditParams
- type UserEditResponse
- type UserEditResponseEnvelope
- type UserEditResponseEnvelopeSuccess
- type UserGetResponse
- type UserGetResponseEnvelope
- type UserGetResponseEnvelopeSuccess
- type UserService
- type Value
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 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.
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.
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 AuditLogListParams ¶
type AuditLogListParams struct {
// Finds a specific log by its ID.
ID param.Field[string] `query:"id"`
Action param.Field[AuditLogListParamsAction] `query:"action"`
Actor param.Field[AuditLogListParamsActor] `query:"actor"`
// Limits the returned results to logs older than the specified date. A `full-date`
// that conforms to RFC3339.
Before param.Field[AuditLogListParamsBeforeUnion] `query:"before" format:"date"`
// Changes the direction of the chronological sorting.
Direction param.Field[AuditLogListParamsDirection] `query:"direction"`
// Indicates that this request is an export of logs in CSV format.
Export param.Field[bool] `query:"export"`
// Indicates whether or not to hide user level audit logs.
HideUserLogs param.Field[bool] `query:"hide_user_logs"`
// Defines which page of results to return.
Page param.Field[float64] `query:"page"`
// Sets the number of results to return per page.
PerPage param.Field[float64] `query:"per_page"`
// Limits the returned results to logs newer than the specified date. A `full-date`
// that conforms to RFC3339.
Since param.Field[AuditLogListParamsSinceUnion] `query:"since" format:"date"`
Zone param.Field[AuditLogListParamsZone] `query:"zone"`
}
func (AuditLogListParams) URLQuery ¶
func (r AuditLogListParams) URLQuery() (v url.Values)
URLQuery serializes AuditLogListParams's query parameters as `url.Values`.
type AuditLogListParamsAction ¶
type AuditLogListParamsAction struct {
// Filters by the action type.
Type param.Field[string] `query:"type"`
}
func (AuditLogListParamsAction) URLQuery ¶
func (r AuditLogListParamsAction) URLQuery() (v url.Values)
URLQuery serializes AuditLogListParamsAction's query parameters as `url.Values`.
type AuditLogListParamsActor ¶
type AuditLogListParamsActor struct {
// Filters by the email address of the actor that made the change.
Email param.Field[string] `query:"email" format:"email"`
// Filters by the IP address of the request that made the change by specific IP
// address or valid CIDR Range.
IP param.Field[string] `query:"ip"`
}
func (AuditLogListParamsActor) URLQuery ¶
func (r AuditLogListParamsActor) URLQuery() (v url.Values)
URLQuery serializes AuditLogListParamsActor's query parameters as `url.Values`.
type AuditLogListParamsBeforeUnion ¶
type AuditLogListParamsBeforeUnion interface {
ImplementsUserAuditLogListParamsBeforeUnion()
}
Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339.
Satisfied by shared.UnionTime, shared.UnionTime.
type AuditLogListParamsDirection ¶
type AuditLogListParamsDirection string
Changes the direction of the chronological sorting.
const ( AuditLogListParamsDirectionDesc AuditLogListParamsDirection = "desc" AuditLogListParamsDirectionAsc AuditLogListParamsDirection = "asc" )
func (AuditLogListParamsDirection) IsKnown ¶
func (r AuditLogListParamsDirection) IsKnown() bool
type AuditLogListParamsSinceUnion ¶
type AuditLogListParamsSinceUnion interface {
ImplementsUserAuditLogListParamsSinceUnion()
}
Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339.
Satisfied by shared.UnionTime, shared.UnionTime.
type AuditLogListParamsZone ¶
type AuditLogListParamsZone struct {
// Filters by the name of the zone associated to the change.
Name param.Field[string] `query:"name"`
}
func (AuditLogListParamsZone) URLQuery ¶
func (r AuditLogListParamsZone) URLQuery() (v url.Values)
URLQuery serializes AuditLogListParamsZone's query parameters as `url.Values`.
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 AuditLogService ¶
type AuditLogService struct {
Options []option.RequestOption
}
AuditLogService 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 NewAuditLogService method instead.
func NewAuditLogService ¶
func NewAuditLogService(opts ...option.RequestOption) (r *AuditLogService)
NewAuditLogService 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 (*AuditLogService) List ¶
func (r *AuditLogService) List(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[shared.AuditLog], err error)
Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.
func (*AuditLogService) ListAutoPaging ¶
func (r *AuditLogService) ListAutoPaging(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[shared.AuditLog]
Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.
type BillingHistory ¶
type BillingHistory struct {
// Billing item identifier tag.
ID string `json:"id,required"`
// The billing item action.
Action string `json:"action,required"`
// The amount associated with this billing item.
Amount float64 `json:"amount,required"`
// The monetary unit in which pricing information is displayed.
Currency string `json:"currency,required"`
// The billing item description.
Description string `json:"description,required"`
// When the billing item was created.
OccurredAt time.Time `json:"occurred_at,required" format:"date-time"`
// The billing item type.
Type string `json:"type,required"`
Zone BillingHistoryZone `json:"zone,required"`
JSON billingHistoryJSON `json:"-"`
}
func (*BillingHistory) UnmarshalJSON ¶
func (r *BillingHistory) UnmarshalJSON(data []byte) (err error)
type BillingHistoryListParams ¶
type BillingHistoryListParams struct {
// The billing item action.
Action param.Field[string] `query:"action"`
// When the billing item was created.
OccurredAt param.Field[time.Time] `query:"occurred_at" format:"date-time"`
// Field to order billing history by.
Order param.Field[BillingHistoryListParamsOrder] `query:"order"`
// Page number of paginated results.
Page param.Field[float64] `query:"page"`
// Number of items per page.
PerPage param.Field[float64] `query:"per_page"`
// The billing item type.
Type param.Field[string] `query:"type"`
}
func (BillingHistoryListParams) URLQuery ¶
func (r BillingHistoryListParams) URLQuery() (v url.Values)
URLQuery serializes BillingHistoryListParams's query parameters as `url.Values`.
type BillingHistoryListParamsOrder ¶
type BillingHistoryListParamsOrder string
Field to order billing history by.
const ( BillingHistoryListParamsOrderType BillingHistoryListParamsOrder = "type" BillingHistoryListParamsOrderOccurredAt BillingHistoryListParamsOrder = "occurred_at" BillingHistoryListParamsOrderAction BillingHistoryListParamsOrder = "action" )
func (BillingHistoryListParamsOrder) IsKnown ¶
func (r BillingHistoryListParamsOrder) IsKnown() bool
type BillingHistoryService ¶
type BillingHistoryService struct {
Options []option.RequestOption
}
BillingHistoryService 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 NewBillingHistoryService method instead.
func NewBillingHistoryService ¶
func NewBillingHistoryService(opts ...option.RequestOption) (r *BillingHistoryService)
NewBillingHistoryService 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 (*BillingHistoryService) List ¶
func (r *BillingHistoryService) List(ctx context.Context, query BillingHistoryListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[BillingHistory], err error)
Accesses your billing history object.
func (*BillingHistoryService) ListAutoPaging ¶
func (r *BillingHistoryService) ListAutoPaging(ctx context.Context, query BillingHistoryListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[BillingHistory]
Accesses your billing history object.
type BillingHistoryZone ¶
type BillingHistoryZone struct {
Name string `json:"name"`
JSON billingHistoryZoneJSON `json:"-"`
}
func (*BillingHistoryZone) UnmarshalJSON ¶
func (r *BillingHistoryZone) UnmarshalJSON(data []byte) (err error)
type BillingProfileGetResponse ¶
type BillingProfileGetResponse struct {
// Billing item identifier tag.
ID string `json:"id"`
AccountType string `json:"account_type"`
Address string `json:"address"`
Address2 string `json:"address2"`
Balance string `json:"balance"`
CardExpiryMonth int64 `json:"card_expiry_month"`
CardExpiryYear int64 `json:"card_expiry_year"`
CardNumber string `json:"card_number"`
City string `json:"city"`
Company string `json:"company"`
Country string `json:"country"`
CreatedOn time.Time `json:"created_on" format:"date-time"`
DeviceData string `json:"device_data"`
EditedOn time.Time `json:"edited_on" format:"date-time"`
EnterpriseBillingEmail string `json:"enterprise_billing_email"`
EnterprisePrimaryEmail string `json:"enterprise_primary_email"`
FirstName string `json:"first_name"`
IsPartner bool `json:"is_partner"`
LastName string `json:"last_name"`
NextBillDate time.Time `json:"next_bill_date" format:"date-time"`
PaymentAddress string `json:"payment_address"`
PaymentAddress2 string `json:"payment_address2"`
PaymentCity string `json:"payment_city"`
PaymentCountry string `json:"payment_country"`
PaymentEmail string `json:"payment_email"`
PaymentFirstName string `json:"payment_first_name"`
PaymentGateway string `json:"payment_gateway"`
PaymentLastName string `json:"payment_last_name"`
PaymentNonce string `json:"payment_nonce"`
PaymentState string `json:"payment_state"`
PaymentZipcode string `json:"payment_zipcode"`
PrimaryEmail string `json:"primary_email"`
State string `json:"state"`
TaxIDType string `json:"tax_id_type"`
Telephone string `json:"telephone"`
UseLegacy bool `json:"use_legacy"`
ValidationCode string `json:"validation_code"`
Vat string `json:"vat"`
Zipcode string `json:"zipcode"`
JSON billingProfileGetResponseJSON `json:"-"`
}
func (*BillingProfileGetResponse) UnmarshalJSON ¶
func (r *BillingProfileGetResponse) UnmarshalJSON(data []byte) (err error)
type BillingProfileGetResponseEnvelope ¶
type BillingProfileGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result BillingProfileGetResponse `json:"result,required"`
// Whether the API call was successful
Success BillingProfileGetResponseEnvelopeSuccess `json:"success,required"`
JSON billingProfileGetResponseEnvelopeJSON `json:"-"`
}
func (*BillingProfileGetResponseEnvelope) UnmarshalJSON ¶
func (r *BillingProfileGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BillingProfileGetResponseEnvelopeSuccess ¶
type BillingProfileGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BillingProfileGetResponseEnvelopeSuccessTrue BillingProfileGetResponseEnvelopeSuccess = true
)
func (BillingProfileGetResponseEnvelopeSuccess) IsKnown ¶
func (r BillingProfileGetResponseEnvelopeSuccess) IsKnown() bool
type BillingProfileService ¶
type BillingProfileService struct {
Options []option.RequestOption
}
BillingProfileService 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 NewBillingProfileService method instead.
func NewBillingProfileService ¶
func NewBillingProfileService(opts ...option.RequestOption) (r *BillingProfileService)
NewBillingProfileService 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 (*BillingProfileService) Get ¶
func (r *BillingProfileService) Get(ctx context.Context, opts ...option.RequestOption) (res *BillingProfileGetResponse, err error)
Accesses your billing profile object.
type BillingService ¶
type BillingService struct {
Options []option.RequestOption
History *BillingHistoryService
Profile *BillingProfileService
}
BillingService 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 NewBillingService method instead.
func NewBillingService ¶
func NewBillingService(opts ...option.RequestOption) (r *BillingService)
NewBillingService 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 CIDRListParam ¶
type CIDRListParam = string
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 Invite ¶
type Invite struct {
// ID of the user to add to the organization.
InvitedMemberID string `json:"invited_member_id,required,nullable"`
// ID of the organization the user will be added to.
OrganizationID string `json:"organization_id,required"`
// Invite identifier tag.
ID string `json:"id"`
// When the invite is no longer active.
ExpiresOn time.Time `json:"expires_on" format:"date-time"`
// The email address of the user who created the invite.
InvitedBy string `json:"invited_by"`
// Email address of the user to add to the organization.
InvitedMemberEmail string `json:"invited_member_email"`
// When the invite was sent.
InvitedOn time.Time `json:"invited_on" format:"date-time"`
// Organization name.
OrganizationName string `json:"organization_name"`
// Roles to be assigned to this user.
Roles []shared.Role `json:"roles"`
// Current status of the invitation.
Status InviteStatus `json:"status"`
JSON inviteJSON `json:"-"`
}
func (*Invite) UnmarshalJSON ¶
type InviteEditParams ¶
type InviteEditParams struct {
// Status of your response to the invitation (rejected or accepted).
Status param.Field[InviteEditParamsStatus] `json:"status,required"`
}
func (InviteEditParams) MarshalJSON ¶
func (r InviteEditParams) MarshalJSON() (data []byte, err error)
type InviteEditParamsStatus ¶
type InviteEditParamsStatus string
Status of your response to the invitation (rejected or accepted).
const ( InviteEditParamsStatusAccepted InviteEditParamsStatus = "accepted" InviteEditParamsStatusRejected InviteEditParamsStatus = "rejected" )
func (InviteEditParamsStatus) IsKnown ¶
func (r InviteEditParamsStatus) IsKnown() bool
type InviteEditResponse ¶
type InviteEditResponse = interface{}
type InviteEditResponseEnvelope ¶
type InviteEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success InviteEditResponseEnvelopeSuccess `json:"success,required"`
Result InviteEditResponse `json:"result"`
JSON inviteEditResponseEnvelopeJSON `json:"-"`
}
func (*InviteEditResponseEnvelope) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type InviteEditResponseEnvelopeSuccess ¶
type InviteEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
InviteEditResponseEnvelopeSuccessTrue InviteEditResponseEnvelopeSuccess = true
)
func (InviteEditResponseEnvelopeSuccess) IsKnown ¶
func (r InviteEditResponseEnvelopeSuccess) IsKnown() bool
type InviteGetResponse ¶
type InviteGetResponse = interface{}
type InviteGetResponseEnvelope ¶
type InviteGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success InviteGetResponseEnvelopeSuccess `json:"success,required"`
Result InviteGetResponse `json:"result"`
JSON inviteGetResponseEnvelopeJSON `json:"-"`
}
func (*InviteGetResponseEnvelope) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type InviteGetResponseEnvelopeSuccess ¶
type InviteGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
InviteGetResponseEnvelopeSuccessTrue InviteGetResponseEnvelopeSuccess = true
)
func (InviteGetResponseEnvelopeSuccess) IsKnown ¶
func (r InviteGetResponseEnvelopeSuccess) IsKnown() bool
type InviteService ¶
type InviteService struct {
Options []option.RequestOption
}
InviteService 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 NewInviteService method instead.
func NewInviteService ¶
func NewInviteService(opts ...option.RequestOption) (r *InviteService)
NewInviteService 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 (*InviteService) Edit ¶
func (r *InviteService) Edit(ctx context.Context, inviteID string, body InviteEditParams, opts ...option.RequestOption) (res *InviteEditResponse, err error)
Responds to an invitation.
func (*InviteService) Get ¶
func (r *InviteService) Get(ctx context.Context, inviteID string, opts ...option.RequestOption) (res *InviteGetResponse, err error)
Gets the details of an invitation.
func (*InviteService) List ¶
func (r *InviteService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[Invite], err error)
Lists all invitations associated with my user.
func (*InviteService) ListAutoPaging ¶
func (r *InviteService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Invite]
Lists all invitations associated with my user.
type InviteStatus ¶
type InviteStatus string
Current status of the invitation.
const ( InviteStatusPending InviteStatus = "pending" InviteStatusAccepted InviteStatus = "accepted" InviteStatusRejected InviteStatus = "rejected" InviteStatusExpired InviteStatus = "expired" )
func (InviteStatus) IsKnown ¶
func (r InviteStatus) 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 Organization ¶
type Organization struct {
// Identifier
ID string `json:"id"`
// Organization name.
Name string `json:"name"`
// Access permissions for this User.
Permissions []shared.Permission `json:"permissions"`
// List of roles that a user has within an organization.
Roles []string `json:"roles"`
// Whether the user is a member of the organization or has an invitation pending.
Status accounts.Status `json:"status"`
JSON organizationJSON `json:"-"`
}
func (*Organization) UnmarshalJSON ¶
func (r *Organization) UnmarshalJSON(data []byte) (err error)
type OrganizationDeleteResponse ¶
type OrganizationDeleteResponse struct {
// Identifier
ID string `json:"id"`
JSON organizationDeleteResponseJSON `json:"-"`
}
func (*OrganizationDeleteResponse) UnmarshalJSON ¶
func (r *OrganizationDeleteResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponse ¶
type OrganizationGetResponse = interface{}
type OrganizationGetResponseEnvelope ¶
type OrganizationGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success OrganizationGetResponseEnvelopeSuccess `json:"success,required"`
Result OrganizationGetResponse `json:"result"`
JSON organizationGetResponseEnvelopeJSON `json:"-"`
}
func (*OrganizationGetResponseEnvelope) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseEnvelopeSuccess ¶
type OrganizationGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
OrganizationGetResponseEnvelopeSuccessTrue OrganizationGetResponseEnvelopeSuccess = true
)
func (OrganizationGetResponseEnvelopeSuccess) IsKnown ¶
func (r OrganizationGetResponseEnvelopeSuccess) IsKnown() bool
type OrganizationListParams ¶
type OrganizationListParams struct {
// Direction to order organizations.
Direction param.Field[OrganizationListParamsDirection] `query:"direction"`
// Whether to match all search requirements or at least one (any).
Match param.Field[OrganizationListParamsMatch] `query:"match"`
// Organization name.
Name param.Field[string] `query:"name"`
// Field to order organizations by.
Order param.Field[OrganizationListParamsOrder] `query:"order"`
// Page number of paginated results.
Page param.Field[float64] `query:"page"`
// Number of organizations per page.
PerPage param.Field[float64] `query:"per_page"`
// Whether the user is a member of the organization or has an inivitation pending.
Status param.Field[OrganizationListParamsStatus] `query:"status"`
}
func (OrganizationListParams) URLQuery ¶
func (r OrganizationListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationListParams's query parameters as `url.Values`.
type OrganizationListParamsDirection ¶
type OrganizationListParamsDirection string
Direction to order organizations.
const ( OrganizationListParamsDirectionAsc OrganizationListParamsDirection = "asc" OrganizationListParamsDirectionDesc OrganizationListParamsDirection = "desc" )
func (OrganizationListParamsDirection) IsKnown ¶
func (r OrganizationListParamsDirection) IsKnown() bool
type OrganizationListParamsMatch ¶
type OrganizationListParamsMatch string
Whether to match all search requirements or at least one (any).
const ( OrganizationListParamsMatchAny OrganizationListParamsMatch = "any" OrganizationListParamsMatchAll OrganizationListParamsMatch = "all" )
func (OrganizationListParamsMatch) IsKnown ¶
func (r OrganizationListParamsMatch) IsKnown() bool
type OrganizationListParamsOrder ¶
type OrganizationListParamsOrder string
Field to order organizations by.
const ( OrganizationListParamsOrderID OrganizationListParamsOrder = "id" OrganizationListParamsOrderName OrganizationListParamsOrder = "name" OrganizationListParamsOrderStatus OrganizationListParamsOrder = "status" )
func (OrganizationListParamsOrder) IsKnown ¶
func (r OrganizationListParamsOrder) IsKnown() bool
type OrganizationListParamsStatus ¶
type OrganizationListParamsStatus string
Whether the user is a member of the organization or has an inivitation pending.
const ( OrganizationListParamsStatusMember OrganizationListParamsStatus = "member" OrganizationListParamsStatusInvited OrganizationListParamsStatus = "invited" )
func (OrganizationListParamsStatus) IsKnown ¶
func (r OrganizationListParamsStatus) IsKnown() bool
type OrganizationService ¶
type OrganizationService struct {
Options []option.RequestOption
}
OrganizationService 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 NewOrganizationService method instead.
func NewOrganizationService ¶
func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)
NewOrganizationService 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 (*OrganizationService) Delete ¶
func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)
Removes association to an organization.
func (*OrganizationService) Get ¶
func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
Gets a specific organization the user is associated with.
func (*OrganizationService) List ¶
func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Organization], err error)
Lists organizations the user is associated with.
func (*OrganizationService) ListAutoPaging ¶
func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Organization]
Lists organizations the user is associated with.
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 Policy ¶
type Policy struct {
// Policy identifier.
ID string `json:"id,required"`
// Allow or deny operations against the resources.
Effect PolicyEffect `json:"effect,required"`
// A set of permission groups that are specified to the policy.
PermissionGroups []PolicyPermissionGroup `json:"permission_groups,required"`
// A list of resource names that the policy applies to.
Resources PolicyResources `json:"resources,required"`
JSON policyJSON `json:"-"`
}
func (*Policy) UnmarshalJSON ¶
type PolicyEffect ¶
type PolicyEffect string
Allow or deny operations against the resources.
const ( PolicyEffectAllow PolicyEffect = "allow" PolicyEffectDeny PolicyEffect = "deny" )
func (PolicyEffect) IsKnown ¶
func (r PolicyEffect) IsKnown() bool
type PolicyParam ¶
type PolicyParam struct {
// Allow or deny operations against the resources.
Effect param.Field[PolicyEffect] `json:"effect,required"`
// A set of permission groups that are specified to the policy.
PermissionGroups param.Field[[]PolicyPermissionGroupParam] `json:"permission_groups,required"`
// A list of resource names that the policy applies to.
Resources param.Field[PolicyResourcesParam] `json:"resources,required"`
}
func (PolicyParam) MarshalJSON ¶
func (r PolicyParam) MarshalJSON() (data []byte, err error)
type PolicyPermissionGroup ¶
type PolicyPermissionGroup struct {
// Identifier of the group.
ID string `json:"id,required"`
// Attributes associated to the permission group.
Meta PolicyPermissionGroupsMeta `json:"meta"`
// Name of the group.
Name string `json:"name"`
JSON policyPermissionGroupJSON `json:"-"`
}
A named group of permissions that map to a group of operations against resources.
func (*PolicyPermissionGroup) UnmarshalJSON ¶
func (r *PolicyPermissionGroup) UnmarshalJSON(data []byte) (err error)
type PolicyPermissionGroupParam ¶
type PolicyPermissionGroupParam struct {
// Attributes associated to the permission group.
Meta param.Field[PolicyPermissionGroupsMetaParam] `json:"meta"`
}
A named group of permissions that map to a group of operations against resources.
func (PolicyPermissionGroupParam) MarshalJSON ¶
func (r PolicyPermissionGroupParam) MarshalJSON() (data []byte, err error)
type PolicyPermissionGroupsMeta ¶
type PolicyPermissionGroupsMeta struct {
Key string `json:"key"`
Value string `json:"value"`
JSON policyPermissionGroupsMetaJSON `json:"-"`
}
Attributes associated to the permission group.
func (*PolicyPermissionGroupsMeta) UnmarshalJSON ¶
func (r *PolicyPermissionGroupsMeta) UnmarshalJSON(data []byte) (err error)
type PolicyPermissionGroupsMetaParam ¶
type PolicyPermissionGroupsMetaParam struct {
Key param.Field[string] `json:"key"`
Value param.Field[string] `json:"value"`
}
Attributes associated to the permission group.
func (PolicyPermissionGroupsMetaParam) MarshalJSON ¶
func (r PolicyPermissionGroupsMetaParam) MarshalJSON() (data []byte, err error)
type PolicyResources ¶
type PolicyResources struct {
Resource string `json:"resource"`
Scope string `json:"scope"`
JSON policyResourcesJSON `json:"-"`
}
A list of resource names that the policy applies to.
func (*PolicyResources) UnmarshalJSON ¶
func (r *PolicyResources) UnmarshalJSON(data []byte) (err error)
type PolicyResourcesParam ¶
type PolicyResourcesParam struct {
Resource param.Field[string] `json:"resource"`
Scope param.Field[string] `json:"scope"`
}
A list of resource names that the policy applies to.
func (PolicyResourcesParam) MarshalJSON ¶
func (r PolicyResourcesParam) MarshalJSON() (data []byte, err error)
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionDeleteResponse ¶
type SubscriptionDeleteResponse struct {
// Subscription identifier tag.
SubscriptionID string `json:"subscription_id"`
JSON subscriptionDeleteResponseJSON `json:"-"`
}
func (*SubscriptionDeleteResponse) UnmarshalJSON ¶
func (r *SubscriptionDeleteResponse) UnmarshalJSON(data []byte) (err error)
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionGetResponseEnvelope ¶
type SubscriptionGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result []shared.Subscription `json:"result,required,nullable"`
// Whether the API call was successful
Success SubscriptionGetResponseEnvelopeSuccess `json:"success,required"`
ResultInfo SubscriptionGetResponseEnvelopeResultInfo `json:"result_info"`
JSON subscriptionGetResponseEnvelopeJSON `json:"-"`
}
func (*SubscriptionGetResponseEnvelope) UnmarshalJSON ¶
func (r *SubscriptionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelopeResultInfo ¶
type SubscriptionGetResponseEnvelopeResultInfo struct {
// Total number of results for the requested service
Count float64 `json:"count"`
// Current page within paginated list of results
Page float64 `json:"page"`
// Number of results per page of results
PerPage float64 `json:"per_page"`
// Total results available without any search parameters
TotalCount float64 `json:"total_count"`
JSON subscriptionGetResponseEnvelopeResultInfoJSON `json:"-"`
}
func (*SubscriptionGetResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *SubscriptionGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelopeSuccess ¶
type SubscriptionGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SubscriptionGetResponseEnvelopeSuccessTrue SubscriptionGetResponseEnvelopeSuccess = true
)
func (SubscriptionGetResponseEnvelopeSuccess) IsKnown ¶
func (r SubscriptionGetResponseEnvelopeSuccess) IsKnown() bool
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionService ¶
type SubscriptionService struct {
Options []option.RequestOption
}
SubscriptionService 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 NewSubscriptionService method instead.
func NewSubscriptionService ¶
func NewSubscriptionService(opts ...option.RequestOption) (r *SubscriptionService)
NewSubscriptionService 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 (*SubscriptionService) Delete ¶
func (r *SubscriptionService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error)
Deletes a user's subscription.
func (*SubscriptionService) Get ¶
func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOption) (res *[]shared.Subscription, err error)
Lists all of a user's subscriptions.
func (*SubscriptionService) Update ¶
func (r *SubscriptionService) Update(ctx context.Context, identifier string, body SubscriptionUpdateParams, opts ...option.RequestOption) (res *interface{}, err error)
Updates a user's subscriptions.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type SubscriptionUpdateParams ¶
type SubscriptionUpdateParams struct {
Subscription shared.SubscriptionParam `json:"subscription,required"`
}
func (SubscriptionUpdateParams) MarshalJSON ¶
func (r SubscriptionUpdateParams) MarshalJSON() (data []byte, err error)
type SubscriptionUpdateResponseEnvelope ¶
type SubscriptionUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result interface{} `json:"result,required"`
// Whether the API call was successful
Success SubscriptionUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON subscriptionUpdateResponseEnvelopeJSON `json:"-"`
}
func (*SubscriptionUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *SubscriptionUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SubscriptionUpdateResponseEnvelopeSuccess ¶
type SubscriptionUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SubscriptionUpdateResponseEnvelopeSuccessTrue SubscriptionUpdateResponseEnvelopeSuccess = true
)
func (SubscriptionUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r SubscriptionUpdateResponseEnvelopeSuccess) IsKnown() bool
type TokenConditionParam ¶
type TokenConditionParam struct {
// Client IP restrictions.
RequestIP param.Field[TokenConditionRequestIPParam] `json:"request.ip"`
}
func (TokenConditionParam) MarshalJSON ¶
func (r TokenConditionParam) MarshalJSON() (data []byte, err error)
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam struct {
// List of IPv4/IPv6 CIDR addresses.
In param.Field[[]CIDRListParam] `json:"in"`
// List of IPv4/IPv6 CIDR addresses.
NotIn param.Field[[]CIDRListParam] `json:"not_in"`
}
Client IP restrictions.
func (TokenConditionRequestIPParam) MarshalJSON ¶
func (r TokenConditionRequestIPParam) MarshalJSON() (data []byte, err error)
type TokenDeleteResponse ¶
type TokenDeleteResponse struct {
// Identifier
ID string `json:"id,required"`
JSON tokenDeleteResponseJSON `json:"-"`
}
func (*TokenDeleteResponse) UnmarshalJSON ¶
func (r *TokenDeleteResponse) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelope ¶
type TokenDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success TokenDeleteResponseEnvelopeSuccess `json:"success,required"`
Result TokenDeleteResponse `json:"result,nullable"`
JSON tokenDeleteResponseEnvelopeJSON `json:"-"`
}
func (*TokenDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelopeSuccess ¶
type TokenDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenDeleteResponseEnvelopeSuccessTrue TokenDeleteResponseEnvelopeSuccess = true
)
func (TokenDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r TokenDeleteResponseEnvelopeSuccess) IsKnown() bool
type TokenGetResponse ¶
type TokenGetResponse struct {
// Token identifier tag.
ID string `json:"id"`
Condition TokenGetResponseCondition `json:"condition"`
// The expiration time on or after which the JWT MUST NOT be accepted for
// processing.
ExpiresOn time.Time `json:"expires_on" format:"date-time"`
// The time on which the token was created.
IssuedOn time.Time `json:"issued_on" format:"date-time"`
// Last time the token was used.
LastUsedOn time.Time `json:"last_used_on" format:"date-time"`
// Last time the token was modified.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// Token name.
Name string `json:"name"`
// The time before which the token MUST NOT be accepted for processing.
NotBefore time.Time `json:"not_before" format:"date-time"`
// List of access policies assigned to the token.
Policies []Policy `json:"policies"`
// Status of the token.
Status TokenGetResponseStatus `json:"status"`
JSON tokenGetResponseJSON `json:"-"`
}
func (*TokenGetResponse) UnmarshalJSON ¶
func (r *TokenGetResponse) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseCondition ¶
type TokenGetResponseCondition struct {
// Client IP restrictions.
RequestIP TokenGetResponseConditionRequestIP `json:"request.ip"`
JSON tokenGetResponseConditionJSON `json:"-"`
}
func (*TokenGetResponseCondition) UnmarshalJSON ¶
func (r *TokenGetResponseCondition) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseConditionRequestIP ¶
type TokenGetResponseConditionRequestIP struct {
// List of IPv4/IPv6 CIDR addresses.
In []CIDRList `json:"in"`
// List of IPv4/IPv6 CIDR addresses.
NotIn []CIDRList `json:"not_in"`
JSON tokenGetResponseConditionRequestIPJSON `json:"-"`
}
Client IP restrictions.
func (*TokenGetResponseConditionRequestIP) UnmarshalJSON ¶
func (r *TokenGetResponseConditionRequestIP) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelope ¶
type TokenGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success TokenGetResponseEnvelopeSuccess `json:"success,required"`
Result TokenGetResponse `json:"result"`
JSON tokenGetResponseEnvelopeJSON `json:"-"`
}
func (*TokenGetResponseEnvelope) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelopeSuccess ¶
type TokenGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenGetResponseEnvelopeSuccessTrue TokenGetResponseEnvelopeSuccess = true
)
func (TokenGetResponseEnvelopeSuccess) IsKnown ¶
func (r TokenGetResponseEnvelopeSuccess) IsKnown() bool
type TokenGetResponseStatus ¶
type TokenGetResponseStatus string
Status of the token.
const ( TokenGetResponseStatusActive TokenGetResponseStatus = "active" TokenGetResponseStatusDisabled TokenGetResponseStatus = "disabled" TokenGetResponseStatusExpired TokenGetResponseStatus = "expired" )
func (TokenGetResponseStatus) IsKnown ¶
func (r TokenGetResponseStatus) IsKnown() bool
type TokenListParams ¶
type TokenListParams struct {
// Direction to order results.
Direction param.Field[TokenListParamsDirection] `query:"direction"`
// Page number of paginated results.
Page param.Field[float64] `query:"page"`
// Maximum number of results per page.
PerPage param.Field[float64] `query:"per_page"`
}
func (TokenListParams) URLQuery ¶
func (r TokenListParams) URLQuery() (v url.Values)
URLQuery serializes TokenListParams's query parameters as `url.Values`.
type TokenListParamsDirection ¶
type TokenListParamsDirection string
Direction to order results.
const ( TokenListParamsDirectionAsc TokenListParamsDirection = "asc" TokenListParamsDirectionDesc TokenListParamsDirection = "desc" )
func (TokenListParamsDirection) IsKnown ¶
func (r TokenListParamsDirection) IsKnown() bool
type TokenListResponse ¶
type TokenListResponse struct {
// Token identifier tag.
ID string `json:"id"`
Condition TokenListResponseCondition `json:"condition"`
// The expiration time on or after which the JWT MUST NOT be accepted for
// processing.
ExpiresOn time.Time `json:"expires_on" format:"date-time"`
// The time on which the token was created.
IssuedOn time.Time `json:"issued_on" format:"date-time"`
// Last time the token was used.
LastUsedOn time.Time `json:"last_used_on" format:"date-time"`
// Last time the token was modified.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// Token name.
Name string `json:"name"`
// The time before which the token MUST NOT be accepted for processing.
NotBefore time.Time `json:"not_before" format:"date-time"`
// List of access policies assigned to the token.
Policies []Policy `json:"policies"`
// Status of the token.
Status TokenListResponseStatus `json:"status"`
JSON tokenListResponseJSON `json:"-"`
}
func (*TokenListResponse) UnmarshalJSON ¶
func (r *TokenListResponse) UnmarshalJSON(data []byte) (err error)
type TokenListResponseCondition ¶
type TokenListResponseCondition struct {
// Client IP restrictions.
RequestIP TokenListResponseConditionRequestIP `json:"request.ip"`
JSON tokenListResponseConditionJSON `json:"-"`
}
func (*TokenListResponseCondition) UnmarshalJSON ¶
func (r *TokenListResponseCondition) UnmarshalJSON(data []byte) (err error)
type TokenListResponseConditionRequestIP ¶
type TokenListResponseConditionRequestIP struct {
// List of IPv4/IPv6 CIDR addresses.
In []CIDRList `json:"in"`
// List of IPv4/IPv6 CIDR addresses.
NotIn []CIDRList `json:"not_in"`
JSON tokenListResponseConditionRequestIPJSON `json:"-"`
}
Client IP restrictions.
func (*TokenListResponseConditionRequestIP) UnmarshalJSON ¶
func (r *TokenListResponseConditionRequestIP) UnmarshalJSON(data []byte) (err error)
type TokenListResponseStatus ¶
type TokenListResponseStatus string
Status of the token.
const ( TokenListResponseStatusActive TokenListResponseStatus = "active" TokenListResponseStatusDisabled TokenListResponseStatus = "disabled" TokenListResponseStatusExpired TokenListResponseStatus = "expired" )
func (TokenListResponseStatus) IsKnown ¶
func (r TokenListResponseStatus) IsKnown() bool
type TokenNewParams ¶
type TokenNewParams struct {
// Token name.
Name param.Field[string] `json:"name,required"`
// List of access policies assigned to the token.
Policies param.Field[[]PolicyParam] `json:"policies,required"`
Condition param.Field[TokenNewParamsCondition] `json:"condition"`
// The expiration time on or after which the JWT MUST NOT be accepted for
// processing.
ExpiresOn param.Field[time.Time] `json:"expires_on" format:"date-time"`
// The time before which the token MUST NOT be accepted for processing.
NotBefore param.Field[time.Time] `json:"not_before" format:"date-time"`
}
func (TokenNewParams) MarshalJSON ¶
func (r TokenNewParams) MarshalJSON() (data []byte, err error)
type TokenNewParamsCondition ¶
type TokenNewParamsCondition struct {
// Client IP restrictions.
RequestIP param.Field[TokenNewParamsConditionRequestIP] `json:"request.ip"`
}
func (TokenNewParamsCondition) MarshalJSON ¶
func (r TokenNewParamsCondition) MarshalJSON() (data []byte, err error)
type TokenNewParamsConditionRequestIP ¶
type TokenNewParamsConditionRequestIP struct {
// List of IPv4/IPv6 CIDR addresses.
In param.Field[[]CIDRListParam] `json:"in"`
// List of IPv4/IPv6 CIDR addresses.
NotIn param.Field[[]CIDRListParam] `json:"not_in"`
}
Client IP restrictions.
func (TokenNewParamsConditionRequestIP) MarshalJSON ¶
func (r TokenNewParamsConditionRequestIP) MarshalJSON() (data []byte, err error)
type TokenNewResponse ¶
type TokenNewResponse struct {
// Token identifier tag.
ID string `json:"id"`
Condition TokenNewResponseCondition `json:"condition"`
// The expiration time on or after which the JWT MUST NOT be accepted for
// processing.
ExpiresOn time.Time `json:"expires_on" format:"date-time"`
// The time on which the token was created.
IssuedOn time.Time `json:"issued_on" format:"date-time"`
// Last time the token was used.
LastUsedOn time.Time `json:"last_used_on" format:"date-time"`
// Last time the token was modified.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// Token name.
Name string `json:"name"`
// The time before which the token MUST NOT be accepted for processing.
NotBefore time.Time `json:"not_before" format:"date-time"`
// List of access policies assigned to the token.
Policies []Policy `json:"policies"`
// Status of the token.
Status TokenNewResponseStatus `json:"status"`
// The token value.
Value Value `json:"value"`
JSON tokenNewResponseJSON `json:"-"`
}
func (*TokenNewResponse) UnmarshalJSON ¶
func (r *TokenNewResponse) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseCondition ¶
type TokenNewResponseCondition struct {
// Client IP restrictions.
RequestIP TokenNewResponseConditionRequestIP `json:"request.ip"`
JSON tokenNewResponseConditionJSON `json:"-"`
}
func (*TokenNewResponseCondition) UnmarshalJSON ¶
func (r *TokenNewResponseCondition) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseConditionRequestIP ¶
type TokenNewResponseConditionRequestIP struct {
// List of IPv4/IPv6 CIDR addresses.
In []CIDRList `json:"in"`
// List of IPv4/IPv6 CIDR addresses.
NotIn []CIDRList `json:"not_in"`
JSON tokenNewResponseConditionRequestIPJSON `json:"-"`
}
Client IP restrictions.
func (*TokenNewResponseConditionRequestIP) UnmarshalJSON ¶
func (r *TokenNewResponseConditionRequestIP) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelope ¶
type TokenNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success TokenNewResponseEnvelopeSuccess `json:"success,required"`
Result TokenNewResponse `json:"result"`
JSON tokenNewResponseEnvelopeJSON `json:"-"`
}
func (*TokenNewResponseEnvelope) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeSuccess ¶
type TokenNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenNewResponseEnvelopeSuccessTrue TokenNewResponseEnvelopeSuccess = true
)
func (TokenNewResponseEnvelopeSuccess) IsKnown ¶
func (r TokenNewResponseEnvelopeSuccess) IsKnown() bool
type TokenNewResponseStatus ¶
type TokenNewResponseStatus string
Status of the token.
const ( TokenNewResponseStatusActive TokenNewResponseStatus = "active" TokenNewResponseStatusDisabled TokenNewResponseStatus = "disabled" TokenNewResponseStatusExpired TokenNewResponseStatus = "expired" )
func (TokenNewResponseStatus) IsKnown ¶
func (r TokenNewResponseStatus) IsKnown() bool
type TokenParam ¶
type TokenParam struct {
// Token name.
Name param.Field[string] `json:"name,required"`
// List of access policies assigned to the token.
Policies param.Field[[]PolicyParam] `json:"policies,required"`
// Status of the token.
Status param.Field[TokenStatus] `json:"status,required"`
Condition param.Field[TokenConditionParam] `json:"condition"`
// The expiration time on or after which the JWT MUST NOT be accepted for
// processing.
ExpiresOn param.Field[time.Time] `json:"expires_on" format:"date-time"`
// The time before which the token MUST NOT be accepted for processing.
NotBefore param.Field[time.Time] `json:"not_before" format:"date-time"`
}
func (TokenParam) MarshalJSON ¶
func (r TokenParam) MarshalJSON() (data []byte, err error)
type TokenPermissionGroupListResponse ¶
type TokenPermissionGroupListResponse = interface{}
type TokenPermissionGroupService ¶
type TokenPermissionGroupService struct {
Options []option.RequestOption
}
TokenPermissionGroupService 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 NewTokenPermissionGroupService method instead.
func NewTokenPermissionGroupService ¶
func NewTokenPermissionGroupService(opts ...option.RequestOption) (r *TokenPermissionGroupService)
NewTokenPermissionGroupService 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 (*TokenPermissionGroupService) List ¶
func (r *TokenPermissionGroupService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[TokenPermissionGroupListResponse], err error)
Find all available permission groups for API Tokens
func (*TokenPermissionGroupService) ListAutoPaging ¶
func (r *TokenPermissionGroupService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TokenPermissionGroupListResponse]
Find all available permission groups for API Tokens
type TokenService ¶
type TokenService struct {
Options []option.RequestOption
PermissionGroups *TokenPermissionGroupService
Value *TokenValueService
}
TokenService 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 NewTokenService method instead.
func NewTokenService ¶
func NewTokenService(opts ...option.RequestOption) (r *TokenService)
NewTokenService 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 (*TokenService) Delete ¶
func (r *TokenService) Delete(ctx context.Context, tokenID string, opts ...option.RequestOption) (res *TokenDeleteResponse, err error)
Destroy a token.
func (*TokenService) Get ¶
func (r *TokenService) Get(ctx context.Context, tokenID string, opts ...option.RequestOption) (res *TokenGetResponse, err error)
Get information about a specific token.
func (*TokenService) List ¶
func (r *TokenService) List(ctx context.Context, query TokenListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[TokenListResponse], err error)
List all access tokens you created.
func (*TokenService) ListAutoPaging ¶
func (r *TokenService) ListAutoPaging(ctx context.Context, query TokenListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[TokenListResponse]
List all access tokens you created.
func (*TokenService) New ¶
func (r *TokenService) New(ctx context.Context, body TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error)
Create a new access token.
func (*TokenService) Update ¶
func (r *TokenService) Update(ctx context.Context, tokenID string, body TokenUpdateParams, opts ...option.RequestOption) (res *TokenUpdateResponse, err error)
Update an existing token.
func (*TokenService) Verify ¶
func (r *TokenService) Verify(ctx context.Context, opts ...option.RequestOption) (res *TokenVerifyResponse, err error)
Test whether a token works.
type TokenStatus ¶
type TokenStatus string
Status of the token.
const ( TokenStatusActive TokenStatus = "active" TokenStatusDisabled TokenStatus = "disabled" TokenStatusExpired TokenStatus = "expired" )
func (TokenStatus) IsKnown ¶
func (r TokenStatus) IsKnown() bool
type TokenUpdateParams ¶
type TokenUpdateParams struct {
Token TokenParam `json:"token,required"`
}
func (TokenUpdateParams) MarshalJSON ¶
func (r TokenUpdateParams) MarshalJSON() (data []byte, err error)
type TokenUpdateResponse ¶
type TokenUpdateResponse struct {
// Token identifier tag.
ID string `json:"id"`
Condition TokenUpdateResponseCondition `json:"condition"`
// The expiration time on or after which the JWT MUST NOT be accepted for
// processing.
ExpiresOn time.Time `json:"expires_on" format:"date-time"`
// The time on which the token was created.
IssuedOn time.Time `json:"issued_on" format:"date-time"`
// Last time the token was used.
LastUsedOn time.Time `json:"last_used_on" format:"date-time"`
// Last time the token was modified.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// Token name.
Name string `json:"name"`
// The time before which the token MUST NOT be accepted for processing.
NotBefore time.Time `json:"not_before" format:"date-time"`
// List of access policies assigned to the token.
Policies []Policy `json:"policies"`
// Status of the token.
Status TokenUpdateResponseStatus `json:"status"`
JSON tokenUpdateResponseJSON `json:"-"`
}
func (*TokenUpdateResponse) UnmarshalJSON ¶
func (r *TokenUpdateResponse) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseCondition ¶
type TokenUpdateResponseCondition struct {
// Client IP restrictions.
RequestIP TokenUpdateResponseConditionRequestIP `json:"request.ip"`
JSON tokenUpdateResponseConditionJSON `json:"-"`
}
func (*TokenUpdateResponseCondition) UnmarshalJSON ¶
func (r *TokenUpdateResponseCondition) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseConditionRequestIP ¶
type TokenUpdateResponseConditionRequestIP struct {
// List of IPv4/IPv6 CIDR addresses.
In []CIDRList `json:"in"`
// List of IPv4/IPv6 CIDR addresses.
NotIn []CIDRList `json:"not_in"`
JSON tokenUpdateResponseConditionRequestIPJSON `json:"-"`
}
Client IP restrictions.
func (*TokenUpdateResponseConditionRequestIP) UnmarshalJSON ¶
func (r *TokenUpdateResponseConditionRequestIP) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelope ¶
type TokenUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success TokenUpdateResponseEnvelopeSuccess `json:"success,required"`
Result TokenUpdateResponse `json:"result"`
JSON tokenUpdateResponseEnvelopeJSON `json:"-"`
}
func (*TokenUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelopeSuccess ¶
type TokenUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenUpdateResponseEnvelopeSuccessTrue TokenUpdateResponseEnvelopeSuccess = true
)
func (TokenUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r TokenUpdateResponseEnvelopeSuccess) IsKnown() bool
type TokenUpdateResponseStatus ¶
type TokenUpdateResponseStatus string
Status of the token.
const ( TokenUpdateResponseStatusActive TokenUpdateResponseStatus = "active" TokenUpdateResponseStatusDisabled TokenUpdateResponseStatus = "disabled" TokenUpdateResponseStatusExpired TokenUpdateResponseStatus = "expired" )
func (TokenUpdateResponseStatus) IsKnown ¶
func (r TokenUpdateResponseStatus) IsKnown() bool
type TokenValueService ¶
type TokenValueService struct {
Options []option.RequestOption
}
TokenValueService 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 NewTokenValueService method instead.
func NewTokenValueService ¶
func NewTokenValueService(opts ...option.RequestOption) (r *TokenValueService)
NewTokenValueService 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 (*TokenValueService) Update ¶
func (r *TokenValueService) Update(ctx context.Context, tokenID string, body TokenValueUpdateParams, opts ...option.RequestOption) (res *Value, err error)
Roll the token secret.
type TokenValueUpdateParams ¶
type TokenValueUpdateParams struct {
Body interface{} `json:"body,required"`
}
func (TokenValueUpdateParams) MarshalJSON ¶
func (r TokenValueUpdateParams) MarshalJSON() (data []byte, err error)
type TokenValueUpdateResponseEnvelope ¶
type TokenValueUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success TokenValueUpdateResponseEnvelopeSuccess `json:"success,required"`
// The token value.
Result Value `json:"result"`
JSON tokenValueUpdateResponseEnvelopeJSON `json:"-"`
}
func (*TokenValueUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenValueUpdateResponseEnvelopeSuccess ¶
type TokenValueUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenValueUpdateResponseEnvelopeSuccessTrue TokenValueUpdateResponseEnvelopeSuccess = true
)
func (TokenValueUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r TokenValueUpdateResponseEnvelopeSuccess) IsKnown() bool
type TokenVerifyResponse ¶
type TokenVerifyResponse struct {
// Token identifier tag.
ID string `json:"id,required"`
// Status of the token.
Status TokenVerifyResponseStatus `json:"status,required"`
// The expiration time on or after which the JWT MUST NOT be accepted for
// processing.
ExpiresOn time.Time `json:"expires_on" format:"date-time"`
// The time before which the token MUST NOT be accepted for processing.
NotBefore time.Time `json:"not_before" format:"date-time"`
JSON tokenVerifyResponseJSON `json:"-"`
}
func (*TokenVerifyResponse) UnmarshalJSON ¶
func (r *TokenVerifyResponse) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelope ¶
type TokenVerifyResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success TokenVerifyResponseEnvelopeSuccess `json:"success,required"`
Result TokenVerifyResponse `json:"result"`
JSON tokenVerifyResponseEnvelopeJSON `json:"-"`
}
func (*TokenVerifyResponseEnvelope) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelopeSuccess ¶
type TokenVerifyResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenVerifyResponseEnvelopeSuccessTrue TokenVerifyResponseEnvelopeSuccess = true
)
func (TokenVerifyResponseEnvelopeSuccess) IsKnown ¶
func (r TokenVerifyResponseEnvelopeSuccess) IsKnown() bool
type TokenVerifyResponseStatus ¶
type TokenVerifyResponseStatus string
Status of the token.
const ( TokenVerifyResponseStatusActive TokenVerifyResponseStatus = "active" TokenVerifyResponseStatusDisabled TokenVerifyResponseStatus = "disabled" TokenVerifyResponseStatusExpired TokenVerifyResponseStatus = "expired" )
func (TokenVerifyResponseStatus) IsKnown ¶
func (r TokenVerifyResponseStatus) IsKnown() bool
type UserEditParams ¶
type UserEditParams struct {
// The country in which the user lives.
Country param.Field[string] `json:"country"`
// User's first name
FirstName param.Field[string] `json:"first_name"`
// User's last name
LastName param.Field[string] `json:"last_name"`
// User's telephone number
Telephone param.Field[string] `json:"telephone"`
// The zipcode or postal code where the user lives.
Zipcode param.Field[string] `json:"zipcode"`
}
func (UserEditParams) MarshalJSON ¶
func (r UserEditParams) MarshalJSON() (data []byte, err error)
type UserEditResponse ¶
type UserEditResponse = interface{}
type UserEditResponseEnvelope ¶
type UserEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success UserEditResponseEnvelopeSuccess `json:"success,required"`
Result UserEditResponse `json:"result"`
JSON userEditResponseEnvelopeJSON `json:"-"`
}
func (*UserEditResponseEnvelope) UnmarshalJSON ¶
func (r *UserEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UserEditResponseEnvelopeSuccess ¶
type UserEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
UserEditResponseEnvelopeSuccessTrue UserEditResponseEnvelopeSuccess = true
)
func (UserEditResponseEnvelopeSuccess) IsKnown ¶
func (r UserEditResponseEnvelopeSuccess) IsKnown() bool
type UserGetResponse ¶
type UserGetResponse = interface{}
type UserGetResponseEnvelope ¶
type UserGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
// Whether the API call was successful
Success UserGetResponseEnvelopeSuccess `json:"success,required"`
Result UserGetResponse `json:"result"`
JSON userGetResponseEnvelopeJSON `json:"-"`
}
func (*UserGetResponseEnvelope) UnmarshalJSON ¶
func (r *UserGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UserGetResponseEnvelopeSuccess ¶
type UserGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
UserGetResponseEnvelopeSuccessTrue UserGetResponseEnvelopeSuccess = true
)
func (UserGetResponseEnvelopeSuccess) IsKnown ¶
func (r UserGetResponseEnvelopeSuccess) IsKnown() bool
type UserService ¶
type UserService struct {
Options []option.RequestOption
AuditLogs *AuditLogService
Billing *BillingService
Invites *InviteService
Organizations *OrganizationService
Subscriptions *SubscriptionService
Tokens *TokenService
}
UserService 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 NewUserService method instead.
func NewUserService ¶
func NewUserService(opts ...option.RequestOption) (r *UserService)
NewUserService 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 (*UserService) Edit ¶
func (r *UserService) Edit(ctx context.Context, body UserEditParams, opts ...option.RequestOption) (res *UserEditResponse, err error)
Edit part of your user details.
func (*UserService) Get ¶
func (r *UserService) Get(ctx context.Context, opts ...option.RequestOption) (res *UserGetResponse, err error)
User Details