user

package
v4.4.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type 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

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

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

Accesses your billing history object.

func (*BillingHistoryService) ListAutoPaging

Accesses your billing history object.

type BillingHistoryZone

type BillingHistoryZone struct {
	Name string                 `json:"name"`
	JSON billingHistoryZoneJSON `json:"-"`
}

func (*BillingHistoryZone) UnmarshalJSON

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

type BillingProfileGetResponse

type BillingProfileGetResponse struct {
	// Billing item identifier tag.
	ID                     string                        `json:"id"`
	AccountType            string                        `json:"account_type"`
	Address                string                        `json:"address"`
	Address2               string                        `json:"address2"`
	Balance                string                        `json:"balance"`
	CardExpiryMonth        int64                         `json:"card_expiry_month"`
	CardExpiryYear         int64                         `json:"card_expiry_year"`
	CardNumber             string                        `json:"card_number"`
	City                   string                        `json:"city"`
	Company                string                        `json:"company"`
	Country                string                        `json:"country"`
	CreatedOn              time.Time                     `json:"created_on" format:"date-time"`
	DeviceData             string                        `json:"device_data"`
	EditedOn               time.Time                     `json:"edited_on" format:"date-time"`
	EnterpriseBillingEmail string                        `json:"enterprise_billing_email"`
	EnterprisePrimaryEmail string                        `json:"enterprise_primary_email"`
	FirstName              string                        `json:"first_name"`
	IsPartner              bool                          `json:"is_partner"`
	LastName               string                        `json:"last_name"`
	NextBillDate           time.Time                     `json:"next_bill_date" format:"date-time"`
	PaymentAddress         string                        `json:"payment_address"`
	PaymentAddress2        string                        `json:"payment_address2"`
	PaymentCity            string                        `json:"payment_city"`
	PaymentCountry         string                        `json:"payment_country"`
	PaymentEmail           string                        `json:"payment_email"`
	PaymentFirstName       string                        `json:"payment_first_name"`
	PaymentGateway         string                        `json:"payment_gateway"`
	PaymentLastName        string                        `json:"payment_last_name"`
	PaymentNonce           string                        `json:"payment_nonce"`
	PaymentState           string                        `json:"payment_state"`
	PaymentZipcode         string                        `json:"payment_zipcode"`
	PrimaryEmail           string                        `json:"primary_email"`
	State                  string                        `json:"state"`
	TaxIDType              string                        `json:"tax_id_type"`
	Telephone              string                        `json:"telephone"`
	UseLegacy              bool                          `json:"use_legacy"`
	ValidationCode         string                        `json:"validation_code"`
	Vat                    string                        `json:"vat"`
	Zipcode                string                        `json:"zipcode"`
	JSON                   billingProfileGetResponseJSON `json:"-"`
}

func (*BillingProfileGetResponse) UnmarshalJSON

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

type BillingProfileGetResponseEnvelope

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

func (*BillingProfileGetResponseEnvelope) UnmarshalJSON

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

type BillingProfileGetResponseEnvelopeSuccess

type BillingProfileGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BillingProfileGetResponseEnvelopeSuccessTrue BillingProfileGetResponseEnvelopeSuccess = true
)

func (BillingProfileGetResponseEnvelopeSuccess) IsKnown

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

Accesses your billing profile object.

type BillingService

type BillingService struct {
	Options []option.RequestOption
	History *BillingHistoryService
	Profile *BillingProfileService
}

BillingService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBillingService method instead.

func NewBillingService

func NewBillingService(opts ...option.RequestOption) (r *BillingService)

NewBillingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

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

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource added in v4.2.0

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type 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

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

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 added in v4.3.0

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 added in v4.3.0

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

type InviteEditResponseEnvelopeErrorsSource added in v4.3.0

type InviteEditResponseEnvelopeErrorsSource struct {
	Pointer string                                     `json:"pointer"`
	JSON    inviteEditResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*InviteEditResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type InviteEditResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type InviteEditResponseEnvelopeMessagesSource added in v4.3.0

type InviteEditResponseEnvelopeMessagesSource struct {
	Pointer string                                       `json:"pointer"`
	JSON    inviteEditResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*InviteEditResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

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 added in v4.3.0

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 added in v4.3.0

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

type InviteGetResponseEnvelopeErrorsSource added in v4.3.0

type InviteGetResponseEnvelopeErrorsSource struct {
	Pointer string                                    `json:"pointer"`
	JSON    inviteGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*InviteGetResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type InviteGetResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type InviteGetResponseEnvelopeMessagesSource added in v4.3.0

type InviteGetResponseEnvelopeMessagesSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    inviteGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*InviteGetResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

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

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 Member

type Member = shared.Member

This is an alias to an internal type.

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 MemberPolicy

type MemberPolicy = shared.MemberPolicy

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 added in v4.3.0

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 added in v4.3.0

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

type OrganizationGetResponseEnvelopeErrorsSource added in v4.3.0

type OrganizationGetResponseEnvelopeErrorsSource struct {
	Pointer string                                          `json:"pointer"`
	JSON    organizationGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*OrganizationGetResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type OrganizationGetResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type OrganizationGetResponseEnvelopeMessagesSource added in v4.3.0

type OrganizationGetResponseEnvelopeMessagesSource struct {
	Pointer string                                            `json:"pointer"`
	JSON    organizationGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*OrganizationGetResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

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

type OrganizationListParamsMatch

type OrganizationListParamsMatch string

Whether to match all search requirements or at least one (any).

const (
	OrganizationListParamsMatchAny OrganizationListParamsMatch = "any"
	OrganizationListParamsMatchAll OrganizationListParamsMatch = "all"
)

func (OrganizationListParamsMatch) IsKnown

func (r OrganizationListParamsMatch) IsKnown() bool

type OrganizationListParamsOrder

type OrganizationListParamsOrder string

Field to order organizations by.

const (
	OrganizationListParamsOrderID     OrganizationListParamsOrder = "id"
	OrganizationListParamsOrderName   OrganizationListParamsOrder = "name"
	OrganizationListParamsOrderStatus OrganizationListParamsOrder = "status"
)

func (OrganizationListParamsOrder) IsKnown

func (r OrganizationListParamsOrder) IsKnown() bool

type OrganizationListParamsStatus

type OrganizationListParamsStatus string

Whether the user is a member of the organization or has an inivitation pending.

const (
	OrganizationListParamsStatusMember  OrganizationListParamsStatus = "member"
	OrganizationListParamsStatusInvited OrganizationListParamsStatus = "invited"
)

func (OrganizationListParamsStatus) IsKnown

func (r OrganizationListParamsStatus) IsKnown() bool

type OrganizationService

type OrganizationService struct {
	Options []option.RequestOption
}

OrganizationService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.

func NewOrganizationService

func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)

NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationService) Delete

func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)

Removes association to an organization.

func (*OrganizationService) Get

func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)

Gets a specific organization the user is associated with.

func (*OrganizationService) List

Lists organizations the user is associated with.

func (*OrganizationService) ListAutoPaging

Lists organizations the user is associated with.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanID added in v4.1.0

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource added in v4.3.0

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

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 Subscription

type Subscription = shared.Subscription

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

Lists all of a user's subscriptions.

func (*SubscriptionService) GetAutoPaging added in v4.1.0

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

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type 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 added in v4.3.0

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 added in v4.3.0

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

type TokenDeleteResponseEnvelopeErrorsSource added in v4.3.0

type TokenDeleteResponseEnvelopeErrorsSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    tokenDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenDeleteResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type TokenDeleteResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type TokenDeleteResponseEnvelopeMessagesSource added in v4.3.0

type TokenDeleteResponseEnvelopeMessagesSource struct {
	Pointer string                                        `json:"pointer"`
	JSON    tokenDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenDeleteResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

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 added in v4.3.0

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 added in v4.3.0

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

type TokenGetResponseEnvelopeErrorsSource added in v4.3.0

type TokenGetResponseEnvelopeErrorsSource struct {
	Pointer string                                   `json:"pointer"`
	JSON    tokenGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenGetResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type TokenGetResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type TokenGetResponseEnvelopeMessagesSource added in v4.3.0

type TokenGetResponseEnvelopeMessagesSource struct {
	Pointer string                                     `json:"pointer"`
	JSON    tokenGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenGetResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

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 added in v4.3.0

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 added in v4.3.0

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

type TokenNewResponseEnvelopeErrorsSource added in v4.3.0

type TokenNewResponseEnvelopeErrorsSource struct {
	Pointer string                                   `json:"pointer"`
	JSON    tokenNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenNewResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type TokenNewResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type TokenNewResponseEnvelopeMessagesSource added in v4.3.0

type TokenNewResponseEnvelopeMessagesSource struct {
	Pointer string                                     `json:"pointer"`
	JSON    tokenNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenNewResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

type TokenNewResponseStatus

type TokenNewResponseStatus string

Status of the token.

const (
	TokenNewResponseStatusActive   TokenNewResponseStatus = "active"
	TokenNewResponseStatusDisabled TokenNewResponseStatus = "disabled"
	TokenNewResponseStatusExpired  TokenNewResponseStatus = "expired"
)

func (TokenNewResponseStatus) IsKnown

func (r TokenNewResponseStatus) IsKnown() bool

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

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 added in v4.2.0

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

type TokenPermissionGroupListResponseScope added in v4.2.0

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 added in v4.2.0

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

Find all available permission groups for API Tokens

func (*TokenPermissionGroupService) ListAutoPaging

Find all available permission groups for API Tokens

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type 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

List all access tokens you created.

func (*TokenService) ListAutoPaging

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 added in v4.3.0

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 added in v4.3.0

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

type TokenUpdateResponseEnvelopeErrorsSource added in v4.3.0

type TokenUpdateResponseEnvelopeErrorsSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    tokenUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenUpdateResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type TokenUpdateResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type TokenUpdateResponseEnvelopeMessagesSource added in v4.3.0

type TokenUpdateResponseEnvelopeMessagesSource struct {
	Pointer string                                        `json:"pointer"`
	JSON    tokenUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenUpdateResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

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 added in v4.3.0

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 added in v4.3.0

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

type TokenValueUpdateResponseEnvelopeErrorsSource added in v4.3.0

type TokenValueUpdateResponseEnvelopeErrorsSource struct {
	Pointer string                                           `json:"pointer"`
	JSON    tokenValueUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenValueUpdateResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type TokenValueUpdateResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type TokenValueUpdateResponseEnvelopeMessagesSource added in v4.3.0

type TokenValueUpdateResponseEnvelopeMessagesSource struct {
	Pointer string                                             `json:"pointer"`
	JSON    tokenValueUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenValueUpdateResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

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 added in v4.3.0

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 added in v4.3.0

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

type TokenVerifyResponseEnvelopeErrorsSource added in v4.3.0

type TokenVerifyResponseEnvelopeErrorsSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    tokenVerifyResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenVerifyResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type TokenVerifyResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type TokenVerifyResponseEnvelopeMessagesSource added in v4.3.0

type TokenVerifyResponseEnvelopeMessagesSource struct {
	Pointer string                                        `json:"pointer"`
	JSON    tokenVerifyResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenVerifyResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

type TokenVerifyResponseStatus

type TokenVerifyResponseStatus string

Status of the token.

const (
	TokenVerifyResponseStatusActive   TokenVerifyResponseStatus = "active"
	TokenVerifyResponseStatusDisabled TokenVerifyResponseStatus = "disabled"
	TokenVerifyResponseStatusExpired  TokenVerifyResponseStatus = "expired"
)

func (TokenVerifyResponseStatus) IsKnown

func (r TokenVerifyResponseStatus) IsKnown() bool

type UserEditParams

type UserEditParams struct {
	// The country in which the user lives.
	Country param.Field[string] `json:"country"`
	// User's first name
	FirstName param.Field[string] `json:"first_name"`
	// User's last name
	LastName param.Field[string] `json:"last_name"`
	// User's telephone number
	Telephone param.Field[string] `json:"telephone"`
	// The zipcode or postal code where the user lives.
	Zipcode param.Field[string] `json:"zipcode"`
}

func (UserEditParams) MarshalJSON

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

type UserEditResponse

type UserEditResponse = interface{}

type UserEditResponseEnvelope

type UserEditResponseEnvelope struct {
	Errors   []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 added in v4.3.0

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 added in v4.3.0

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

type UserEditResponseEnvelopeErrorsSource added in v4.3.0

type UserEditResponseEnvelopeErrorsSource struct {
	Pointer string                                   `json:"pointer"`
	JSON    userEditResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*UserEditResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type UserEditResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type UserEditResponseEnvelopeMessagesSource added in v4.3.0

type UserEditResponseEnvelopeMessagesSource struct {
	Pointer string                                     `json:"pointer"`
	JSON    userEditResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*UserEditResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

type UserGetResponse

type UserGetResponse = interface{}

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 added in v4.3.0

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 added in v4.3.0

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

type UserGetResponseEnvelopeErrorsSource added in v4.3.0

type UserGetResponseEnvelopeErrorsSource struct {
	Pointer string                                  `json:"pointer"`
	JSON    userGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*UserGetResponseEnvelopeErrorsSource) UnmarshalJSON added in v4.3.0

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

type UserGetResponseEnvelopeMessages added in v4.3.0

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 added in v4.3.0

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

type UserGetResponseEnvelopeMessagesSource added in v4.3.0

type UserGetResponseEnvelopeMessagesSource struct {
	Pointer string                                    `json:"pointer"`
	JSON    userGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*UserGetResponseEnvelopeMessagesSource) UnmarshalJSON added in v4.3.0

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

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

Jump to

Keyboard shortcuts

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