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)deprecated
- func (r *BillingHistoryService) ListAutoPaging(ctx context.Context, query BillingHistoryListParams, ...) *pagination.V4PagePaginationArrayAutoPager[BillingHistory]deprecated
- type BillingHistoryZone
- type BillingProfileGetResponse
- type BillingProfileGetResponseEnvelope
- type BillingProfileGetResponseEnvelopeSuccess
- type BillingProfileService
- type BillingService
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConfigSrc
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type ErrorDataSource
- type Invite
- type InviteEditParams
- type InviteEditParamsStatus
- type InviteEditResponseEnvelope
- type InviteEditResponseEnvelopeErrors
- type InviteEditResponseEnvelopeErrorsSource
- type InviteEditResponseEnvelopeMessages
- type InviteEditResponseEnvelopeMessagesSource
- type InviteEditResponseEnvelopeSuccess
- type InviteGetResponseEnvelope
- type InviteGetResponseEnvelopeErrors
- type InviteGetResponseEnvelopeErrorsSource
- type InviteGetResponseEnvelopeMessages
- type InviteGetResponseEnvelopeMessagesSource
- type InviteGetResponseEnvelopeSuccess
- type InviteService
- func (r *InviteService) Edit(ctx context.Context, inviteID string, body InviteEditParams, ...) (res *Invite, err error)
- func (r *InviteService) Get(ctx context.Context, inviteID string, opts ...option.RequestOption) (res *Invite, 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 Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Organization
- type OrganizationDeleteResponse
- type OrganizationGetResponse
- type OrganizationGetResponseEnvelope
- type OrganizationGetResponseEnvelopeErrors
- type OrganizationGetResponseEnvelopeErrorsSource
- type OrganizationGetResponseEnvelopeMessages
- type OrganizationGetResponseEnvelopeMessagesSource
- 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)deprecated
- func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)deprecated
- func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, ...) (res *pagination.V4PagePaginationArray[Organization], err error)deprecated
- func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, ...) *pagination.V4PagePaginationArrayAutoPager[Organization]deprecated
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SortDirection
- type Subscription
- type SubscriptionDeleteResponse
- type SubscriptionFrequency
- 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 *pagination.SinglePage[shared.Subscription], err error)
- func (r *SubscriptionService) GetAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[shared.Subscription]
- func (r *SubscriptionService) Update(ctx context.Context, identifier string, body SubscriptionUpdateParams, ...) (res *interface{}, err error)
- type SubscriptionState
- type SubscriptionUpdateParams
- type SubscriptionUpdateResponseEnvelope
- type SubscriptionUpdateResponseEnvelopeSuccess
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenDeleteResponse
- type TokenDeleteResponseEnvelope
- type TokenDeleteResponseEnvelopeErrors
- type TokenDeleteResponseEnvelopeErrorsSource
- type TokenDeleteResponseEnvelopeMessages
- type TokenDeleteResponseEnvelopeMessagesSource
- type TokenDeleteResponseEnvelopeSuccess
- type TokenGetResponseEnvelope
- type TokenGetResponseEnvelopeErrors
- type TokenGetResponseEnvelopeErrorsSource
- type TokenGetResponseEnvelopeMessages
- type TokenGetResponseEnvelopeMessagesSource
- type TokenGetResponseEnvelopeSuccess
- type TokenListParams
- type TokenListParamsDirection
- type TokenNewParams
- type TokenNewParamsCondition
- type TokenNewParamsConditionRequestIP
- type TokenNewResponse
- type TokenNewResponseCondition
- type TokenNewResponseConditionRequestIP
- type TokenNewResponseEnvelope
- type TokenNewResponseEnvelopeErrors
- type TokenNewResponseEnvelopeErrorsSource
- type TokenNewResponseEnvelopeMessages
- type TokenNewResponseEnvelopeMessagesSource
- type TokenNewResponseEnvelopeSuccess
- type TokenNewResponseStatus
- type TokenParam
- type TokenPermissionGroupListParams
- type TokenPermissionGroupListResponse
- type TokenPermissionGroupListResponseScope
- type TokenPermissionGroupService
- func (r *TokenPermissionGroupService) List(ctx context.Context, query TokenPermissionGroupListParams, ...) (res *pagination.SinglePage[TokenPermissionGroupListResponse], err error)
- func (r *TokenPermissionGroupService) ListAutoPaging(ctx context.Context, query TokenPermissionGroupListParams, ...) *pagination.SinglePageAutoPager[TokenPermissionGroupListResponse]
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesIAMResourcesTypeObjectNested
- type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
- type TokenPolicyResourcesIAMResourcesTypeObjectString
- type TokenPolicyResourcesIAMResourcesTypeObjectStringParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- 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 *shared.Token, err error)
- func (r *TokenService) List(ctx context.Context, query TokenListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[shared.Token], err error)
- func (r *TokenService) ListAutoPaging(ctx context.Context, query TokenListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[shared.Token]
- 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 *shared.Token, err error)
- func (r *TokenService) Verify(ctx context.Context, opts ...option.RequestOption) (res *TokenVerifyResponse, err error)
- type TokenStatus
- type TokenUpdateParams
- type TokenUpdateResponseEnvelope
- type TokenUpdateResponseEnvelopeErrors
- type TokenUpdateResponseEnvelopeErrorsSource
- type TokenUpdateResponseEnvelopeMessages
- type TokenUpdateResponseEnvelopeMessagesSource
- type TokenUpdateResponseEnvelopeSuccess
- type TokenValue
- type TokenValueService
- type TokenValueUpdateParams
- type TokenValueUpdateResponseEnvelope
- type TokenValueUpdateResponseEnvelopeErrors
- type TokenValueUpdateResponseEnvelopeErrorsSource
- type TokenValueUpdateResponseEnvelopeMessages
- type TokenValueUpdateResponseEnvelopeMessagesSource
- type TokenValueUpdateResponseEnvelopeSuccess
- type TokenVerifyResponse
- type TokenVerifyResponseEnvelope
- type TokenVerifyResponseEnvelopeErrors
- type TokenVerifyResponseEnvelopeErrorsSource
- type TokenVerifyResponseEnvelopeMessages
- type TokenVerifyResponseEnvelopeMessagesSource
- type TokenVerifyResponseEnvelopeSuccess
- type TokenVerifyResponseStatus
- type UserEditParams
- type UserEditResponse
- type UserEditResponseEnvelope
- type UserEditResponseEnvelopeErrors
- type UserEditResponseEnvelopeErrorsSource
- type UserEditResponseEnvelopeMessages
- type UserEditResponseEnvelopeMessagesSource
- type UserEditResponseEnvelopeSuccess
- type UserGetResponse
- type UserGetResponseEnvelope
- type UserGetResponseEnvelopeErrors
- type UserGetResponseEnvelopeErrorsSource
- type UserGetResponseEnvelopeMessages
- type UserGetResponseEnvelopeMessagesSource
- type UserGetResponseEnvelopeSuccess
- type UserService
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 CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare
This is an alias to an internal value.
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type 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 {
ImplementsAuditLogListParamsBeforeUnion()
}
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 {
ImplementsAuditLogListParamsSinceUnion()
}
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
deprecated
func (r *BillingHistoryService) List(ctx context.Context, query BillingHistoryListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[BillingHistory], err error)
Accesses your billing history object.
Deprecated: deprecated
func (*BillingHistoryService) ListAutoPaging
deprecated
func (r *BillingHistoryService) ListAutoPaging(ctx context.Context, query BillingHistoryListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[BillingHistory]
Accesses your billing history object.
Deprecated: deprecated
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
deprecated
func (r *BillingProfileService) Get(ctx context.Context, opts ...option.RequestOption) (res *BillingProfileGetResponse, err error)
Accesses your billing profile object.
Deprecated: deprecated
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 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 CloudflareTunnelConfigSrc ¶
type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc
Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type ErrorDataSource ¶
type ErrorDataSource = shared.ErrorDataSource
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"`
OrganizationIsEnforcingTwofactor bool `json:"organization_is_enforcing_twofactor"`
// Organization name.
OrganizationName string `json:"organization_name"`
// List of role names the membership has for this account.
Roles []string `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 InviteEditResponseEnvelope ¶
type InviteEditResponseEnvelope struct {
Errors []InviteEditResponseEnvelopeErrors `json:"errors,required"`
Messages []InviteEditResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success InviteEditResponseEnvelopeSuccess `json:"success,required"`
Result Invite `json:"result"`
JSON inviteEditResponseEnvelopeJSON `json:"-"`
}
func (*InviteEditResponseEnvelope) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type InviteEditResponseEnvelopeErrors ¶
type InviteEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source InviteEditResponseEnvelopeErrorsSource `json:"source"`
JSON inviteEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*InviteEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type InviteEditResponseEnvelopeErrorsSource ¶
type InviteEditResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON inviteEditResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*InviteEditResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type InviteEditResponseEnvelopeMessages ¶
type InviteEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source InviteEditResponseEnvelopeMessagesSource `json:"source"`
JSON inviteEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*InviteEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type InviteEditResponseEnvelopeMessagesSource ¶
type InviteEditResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON inviteEditResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*InviteEditResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelopeMessagesSource) 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 InviteGetResponseEnvelope ¶
type InviteGetResponseEnvelope struct {
Errors []InviteGetResponseEnvelopeErrors `json:"errors,required"`
Messages []InviteGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success InviteGetResponseEnvelopeSuccess `json:"success,required"`
Result Invite `json:"result"`
JSON inviteGetResponseEnvelopeJSON `json:"-"`
}
func (*InviteGetResponseEnvelope) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type InviteGetResponseEnvelopeErrors ¶
type InviteGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source InviteGetResponseEnvelopeErrorsSource `json:"source"`
JSON inviteGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*InviteGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type InviteGetResponseEnvelopeErrorsSource ¶
type InviteGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON inviteGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*InviteGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type InviteGetResponseEnvelopeMessages ¶
type InviteGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source InviteGetResponseEnvelopeMessagesSource `json:"source"`
JSON inviteGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*InviteGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type InviteGetResponseEnvelopeMessagesSource ¶
type InviteGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON inviteGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*InviteGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelopeMessagesSource) 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 *Invite, err error)
Responds to an invitation.
func (*InviteService) Get ¶
func (r *InviteService) Get(ctx context.Context, inviteID string, opts ...option.RequestOption) (res *Invite, 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 MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
A scope is a combination of scope objects which provides additional context.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
This is an alias to an internal type.
type 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 []OrganizationGetResponseEnvelopeErrors `json:"errors,required"`
Messages []OrganizationGetResponseEnvelopeMessages `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 OrganizationGetResponseEnvelopeErrors ¶
type OrganizationGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source OrganizationGetResponseEnvelopeErrorsSource `json:"source"`
JSON organizationGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*OrganizationGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseEnvelopeErrorsSource ¶
type OrganizationGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON organizationGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*OrganizationGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseEnvelopeMessages ¶
type OrganizationGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source OrganizationGetResponseEnvelopeMessagesSource `json:"source"`
JSON organizationGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*OrganizationGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseEnvelopeMessagesSource ¶
type OrganizationGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON organizationGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*OrganizationGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelopeMessagesSource) 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
deprecated
func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)
Removes association to an organization.
Deprecated: deprecated
func (*OrganizationService) Get
deprecated
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.
Deprecated: deprecated
func (*OrganizationService) List
deprecated
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.
Deprecated: deprecated
func (*OrganizationService) ListAutoPaging
deprecated
func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Organization]
Lists organizations the user is associated with.
Deprecated: deprecated
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type RatePlanID ¶
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
This is an alias to an internal type.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type ResponseInfoSource ¶
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
type 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 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 *pagination.SinglePage[shared.Subscription], err error)
Lists all of a user's subscriptions.
func (*SubscriptionService) GetAutoPaging ¶
func (r *SubscriptionService) GetAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[shared.Subscription]
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 TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type 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 []TokenDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []TokenDeleteResponseEnvelopeMessages `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 TokenDeleteResponseEnvelopeErrors ¶
type TokenDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON tokenDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TokenDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelopeErrorsSource ¶
type TokenDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON tokenDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TokenDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelopeMessages ¶
type TokenDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON tokenDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TokenDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelopeMessagesSource ¶
type TokenDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON tokenDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TokenDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelopeMessagesSource) 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 TokenGetResponseEnvelope ¶
type TokenGetResponseEnvelope struct {
Errors []TokenGetResponseEnvelopeErrors `json:"errors,required"`
Messages []TokenGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success TokenGetResponseEnvelopeSuccess `json:"success,required"`
Result shared.Token `json:"result"`
JSON tokenGetResponseEnvelopeJSON `json:"-"`
}
func (*TokenGetResponseEnvelope) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelopeErrors ¶
type TokenGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenGetResponseEnvelopeErrorsSource `json:"source"`
JSON tokenGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TokenGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelopeErrorsSource ¶
type TokenGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON tokenGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TokenGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelopeMessages ¶
type TokenGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenGetResponseEnvelopeMessagesSource `json:"source"`
JSON tokenGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TokenGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelopeMessagesSource ¶
type TokenGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON tokenGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TokenGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelopeMessagesSource) 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 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 TokenNewParams ¶
type TokenNewParams struct {
// Token name.
Name param.Field[string] `json:"name,required"`
// List of access policies assigned to the token.
Policies param.Field[[]shared.TokenPolicyParam] `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[[]shared.TokenConditionCIDRListParam] `json:"in"`
// List of IPv4/IPv6 CIDR addresses.
NotIn param.Field[[]shared.TokenConditionCIDRListParam] `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 []shared.TokenPolicy `json:"policies"`
// Status of the token.
Status TokenNewResponseStatus `json:"status"`
// The token value.
Value shared.TokenValue `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 []shared.TokenConditionCIDRList `json:"in"`
// List of IPv4/IPv6 CIDR addresses.
NotIn []shared.TokenConditionCIDRList `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 []TokenNewResponseEnvelopeErrors `json:"errors,required"`
Messages []TokenNewResponseEnvelopeMessages `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 TokenNewResponseEnvelopeErrors ¶
type TokenNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenNewResponseEnvelopeErrorsSource `json:"source"`
JSON tokenNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TokenNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeErrorsSource ¶
type TokenNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON tokenNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TokenNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeMessages ¶
type TokenNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenNewResponseEnvelopeMessagesSource `json:"source"`
JSON tokenNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TokenNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeMessagesSource ¶
type TokenNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON tokenNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TokenNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeMessagesSource) 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 TokenPermissionGroupListParams ¶
type TokenPermissionGroupListParams struct {
// Filter by the name of the permission group. The value must be URL-encoded.
Name param.Field[string] `query:"name"`
// Filter by the scope of the permission group. The value must be URL-encoded.
Scope param.Field[string] `query:"scope"`
}
func (TokenPermissionGroupListParams) URLQuery ¶
func (r TokenPermissionGroupListParams) URLQuery() (v url.Values)
URLQuery serializes TokenPermissionGroupListParams's query parameters as `url.Values`.
type TokenPermissionGroupListResponse ¶
type TokenPermissionGroupListResponse struct {
// Public ID.
ID string `json:"id"`
// Permission Group Name
Name string `json:"name"`
// Resources to which the Permission Group is scoped
Scopes []TokenPermissionGroupListResponseScope `json:"scopes"`
JSON tokenPermissionGroupListResponseJSON `json:"-"`
}
func (*TokenPermissionGroupListResponse) UnmarshalJSON ¶
func (r *TokenPermissionGroupListResponse) UnmarshalJSON(data []byte) (err error)
type TokenPermissionGroupListResponseScope ¶
type TokenPermissionGroupListResponseScope string
const ( TokenPermissionGroupListResponseScopeComCloudflareAPIAccount TokenPermissionGroupListResponseScope = "com.cloudflare.api.account" TokenPermissionGroupListResponseScopeComCloudflareAPIAccountZone TokenPermissionGroupListResponseScope = "com.cloudflare.api.account.zone" TokenPermissionGroupListResponseScopeComCloudflareAPIUser TokenPermissionGroupListResponseScope = "com.cloudflare.api.user" TokenPermissionGroupListResponseScopeComCloudflareEdgeR2Bucket TokenPermissionGroupListResponseScope = "com.cloudflare.edge.r2.bucket" )
func (TokenPermissionGroupListResponseScope) IsKnown ¶
func (r TokenPermissionGroupListResponseScope) IsKnown() bool
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, query TokenPermissionGroupListParams, 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, query TokenPermissionGroupListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TokenPermissionGroupListResponse]
Find all available permission groups for API Tokens
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNested ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectString ¶
type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A list of resource names that the policy applies to.
This is an alias to an internal type.
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 *shared.Token, 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[shared.Token], 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[shared.Token]
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 *shared.Token, 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 = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenUpdateParams ¶
type TokenUpdateParams struct {
Token shared.TokenParam `json:"token,required"`
}
func (TokenUpdateParams) MarshalJSON ¶
func (r TokenUpdateParams) MarshalJSON() (data []byte, err error)
type TokenUpdateResponseEnvelope ¶
type TokenUpdateResponseEnvelope struct {
Errors []TokenUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []TokenUpdateResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success TokenUpdateResponseEnvelopeSuccess `json:"success,required"`
Result shared.Token `json:"result"`
JSON tokenUpdateResponseEnvelopeJSON `json:"-"`
}
func (*TokenUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelopeErrors ¶
type TokenUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON tokenUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TokenUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelopeErrorsSource ¶
type TokenUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON tokenUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TokenUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelopeMessages ¶
type TokenUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON tokenUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TokenUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelopeMessagesSource ¶
type TokenUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON tokenUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TokenUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelopeMessagesSource) 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 TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.
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 *shared.TokenValue, 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 []TokenValueUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []TokenValueUpdateResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success TokenValueUpdateResponseEnvelopeSuccess `json:"success,required"`
// The token value.
Result shared.TokenValue `json:"result"`
JSON tokenValueUpdateResponseEnvelopeJSON `json:"-"`
}
func (*TokenValueUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenValueUpdateResponseEnvelopeErrors ¶
type TokenValueUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenValueUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON tokenValueUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TokenValueUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenValueUpdateResponseEnvelopeErrorsSource ¶
type TokenValueUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON tokenValueUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TokenValueUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TokenValueUpdateResponseEnvelopeMessages ¶
type TokenValueUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenValueUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON tokenValueUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TokenValueUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenValueUpdateResponseEnvelopeMessagesSource ¶
type TokenValueUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON tokenValueUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TokenValueUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelopeMessagesSource) 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 []TokenVerifyResponseEnvelopeErrors `json:"errors,required"`
Messages []TokenVerifyResponseEnvelopeMessages `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 TokenVerifyResponseEnvelopeErrors ¶
type TokenVerifyResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenVerifyResponseEnvelopeErrorsSource `json:"source"`
JSON tokenVerifyResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TokenVerifyResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelopeErrorsSource ¶
type TokenVerifyResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON tokenVerifyResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TokenVerifyResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelopeMessages ¶
type TokenVerifyResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenVerifyResponseEnvelopeMessagesSource `json:"source"`
JSON tokenVerifyResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TokenVerifyResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelopeMessagesSource ¶
type TokenVerifyResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON tokenVerifyResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TokenVerifyResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelopeMessagesSource) 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 struct {
// Identifier of the user.
ID string `json:"id"`
// Lists the betas that the user is participating in.
Betas []string `json:"betas"`
// The country in which the user lives.
Country string `json:"country,nullable"`
// User's first name
FirstName string `json:"first_name,nullable"`
// Indicates whether user has any business zones
HasBusinessZones bool `json:"has_business_zones"`
// Indicates whether user has any enterprise zones
HasEnterpriseZones bool `json:"has_enterprise_zones"`
// Indicates whether user has any pro zones
HasProZones bool `json:"has_pro_zones"`
// User's last name
LastName string `json:"last_name,nullable"`
Organizations []Organization `json:"organizations"`
// Indicates whether user has been suspended
Suspended bool `json:"suspended"`
// User's telephone number
Telephone string `json:"telephone,nullable"`
// Indicates whether two-factor authentication is enabled for the user account.
// Does not apply to API authentication.
TwoFactorAuthenticationEnabled bool `json:"two_factor_authentication_enabled"`
// Indicates whether two-factor authentication is required by one of the accounts
// that the user is a member of.
TwoFactorAuthenticationLocked bool `json:"two_factor_authentication_locked"`
// The zipcode or postal code where the user lives.
Zipcode string `json:"zipcode,nullable"`
JSON userEditResponseJSON `json:"-"`
}
func (*UserEditResponse) UnmarshalJSON ¶
func (r *UserEditResponse) UnmarshalJSON(data []byte) (err error)
type UserEditResponseEnvelope ¶
type UserEditResponseEnvelope struct {
Errors []UserEditResponseEnvelopeErrors `json:"errors,required"`
Messages []UserEditResponseEnvelopeMessages `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 UserEditResponseEnvelopeErrors ¶
type UserEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source UserEditResponseEnvelopeErrorsSource `json:"source"`
JSON userEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*UserEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *UserEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type UserEditResponseEnvelopeErrorsSource ¶
type UserEditResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON userEditResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*UserEditResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *UserEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type UserEditResponseEnvelopeMessages ¶
type UserEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source UserEditResponseEnvelopeMessagesSource `json:"source"`
JSON userEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*UserEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *UserEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type UserEditResponseEnvelopeMessagesSource ¶
type UserEditResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON userEditResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*UserEditResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *UserEditResponseEnvelopeMessagesSource) 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 struct {
// Identifier of the user.
ID string `json:"id"`
// Lists the betas that the user is participating in.
Betas []string `json:"betas"`
// The country in which the user lives.
Country string `json:"country,nullable"`
// User's first name
FirstName string `json:"first_name,nullable"`
// Indicates whether user has any business zones
HasBusinessZones bool `json:"has_business_zones"`
// Indicates whether user has any enterprise zones
HasEnterpriseZones bool `json:"has_enterprise_zones"`
// Indicates whether user has any pro zones
HasProZones bool `json:"has_pro_zones"`
// User's last name
LastName string `json:"last_name,nullable"`
Organizations []Organization `json:"organizations"`
// Indicates whether user has been suspended
Suspended bool `json:"suspended"`
// User's telephone number
Telephone string `json:"telephone,nullable"`
// Indicates whether two-factor authentication is enabled for the user account.
// Does not apply to API authentication.
TwoFactorAuthenticationEnabled bool `json:"two_factor_authentication_enabled"`
// Indicates whether two-factor authentication is required by one of the accounts
// that the user is a member of.
TwoFactorAuthenticationLocked bool `json:"two_factor_authentication_locked"`
// The zipcode or postal code where the user lives.
Zipcode string `json:"zipcode,nullable"`
JSON userGetResponseJSON `json:"-"`
}
func (*UserGetResponse) UnmarshalJSON ¶
func (r *UserGetResponse) UnmarshalJSON(data []byte) (err error)
type UserGetResponseEnvelope ¶
type UserGetResponseEnvelope struct {
Errors []UserGetResponseEnvelopeErrors `json:"errors,required"`
Messages []UserGetResponseEnvelopeMessages `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 UserGetResponseEnvelopeErrors ¶
type UserGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source UserGetResponseEnvelopeErrorsSource `json:"source"`
JSON userGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*UserGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *UserGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type UserGetResponseEnvelopeErrorsSource ¶
type UserGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON userGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*UserGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *UserGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type UserGetResponseEnvelopeMessages ¶
type UserGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source UserGetResponseEnvelopeMessagesSource `json:"source"`
JSON userGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*UserGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *UserGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type UserGetResponseEnvelopeMessagesSource ¶
type UserGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON userGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*UserGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *UserGetResponseEnvelopeMessagesSource) 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