Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogListParams
- type AuditLogListParamsAction
- type AuditLogListParamsActor
- type AuditLogListParamsDirection
- type AuditLogListParamsZone
- type AuditLogOwner
- type AuditLogResource
- type AuditLogService
- func (r *AuditLogService) List(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[shared.AuditLog], err error)
- func (r *AuditLogService) ListAutoPaging(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[shared.AuditLog]
- type BillingHistory
- type BillingHistoryListParams
- type BillingHistoryListParamsOrder
- type BillingHistoryService
- func (r *BillingHistoryService) List(ctx context.Context, query BillingHistoryListParams, ...) (res *pagination.V4PagePaginationArray[BillingHistory], err error)
- func (r *BillingHistoryService) ListAutoPaging(ctx context.Context, query BillingHistoryListParams, ...) *pagination.V4PagePaginationArrayAutoPager[BillingHistory]
- type BillingHistoryZone
- type BillingProfileGetResponseEnvelope
- type BillingProfileGetResponseEnvelopeSuccess
- type BillingProfileGetResponseUnion
- type BillingProfileService
- type BillingService
- type CIDRListParam
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type Invite
- type InviteEditParams
- type InviteEditParamsStatus
- type InviteEditResponse
- type InviteEditResponseEnvelope
- type InviteGetResponse
- type InviteGetResponseEnvelope
- type InviteService
- func (r *InviteService) Edit(ctx context.Context, inviteID string, body InviteEditParams, ...) (res *InviteEditResponse, err error)
- func (r *InviteService) Get(ctx context.Context, inviteID string, opts ...option.RequestOption) (res *InviteGetResponse, err error)
- func (r *InviteService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[Invite], err error)
- func (r *InviteService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Invite]
- type InviteStatus
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Organization
- type OrganizationDeleteResponse
- type OrganizationGetResponse
- type OrganizationGetResponseEnvelope
- type OrganizationListParams
- type OrganizationListParamsDirection
- type OrganizationListParamsMatch
- type OrganizationListParamsOrder
- type OrganizationListParamsStatus
- type OrganizationService
- func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)
- func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
- func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, ...) (res *pagination.V4PagePaginationArray[Organization], err error)
- func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, ...) *pagination.V4PagePaginationArrayAutoPager[Organization]
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type PolicyEffect
- type PolicyParam
- type PolicyPermissionGroupParam
- type RatePlan
- type RatePlanParam
- type ResponseInfo
- type Role
- type SortDirection
- type Subscription
- type SubscriptionApp
- type SubscriptionAppParam
- type SubscriptionComponent
- type SubscriptionComponentParam
- type SubscriptionDeleteResponse
- type SubscriptionEditParams
- type SubscriptionEditResponseEnvelope
- type SubscriptionEditResponseEnvelopeSuccess
- type SubscriptionEditResponseUnion
- type SubscriptionFrequency
- type SubscriptionGetResponseEnvelope
- type SubscriptionGetResponseEnvelopeResultInfo
- type SubscriptionGetResponseEnvelopeSuccess
- type SubscriptionParam
- type SubscriptionService
- func (r *SubscriptionService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error)
- func (r *SubscriptionService) Edit(ctx context.Context, identifier string, body SubscriptionEditParams, ...) (res *SubscriptionEditResponseUnion, err error)
- func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOption) (res *[]Subscription, err error)
- func (r *SubscriptionService) Update(ctx context.Context, identifier string, body SubscriptionUpdateParams, ...) (res *SubscriptionUpdateResponseUnion, err error)
- type SubscriptionState
- type SubscriptionUpdateParams
- type SubscriptionUpdateResponseEnvelope
- type SubscriptionUpdateResponseEnvelopeSuccess
- type SubscriptionUpdateResponseUnion
- type SubscriptionZone
- type SubscriptionZoneParam
- type TokenConditionParam
- type TokenConditionRequestIPParam
- type TokenDeleteResponse
- type TokenDeleteResponseEnvelope
- type TokenDeleteResponseEnvelopeSuccess
- type TokenGetResponse
- type TokenGetResponseEnvelope
- type TokenListParams
- type TokenListParamsDirection
- type TokenListResponse
- type TokenNewParams
- type TokenNewParamsCondition
- type TokenNewParamsConditionRequestIP
- type TokenNewResponse
- type TokenNewResponseEnvelope
- type TokenParam
- type TokenPermissionGroupListResponse
- type TokenPermissionGroupService
- func (r *TokenPermissionGroupService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[TokenPermissionGroupListResponse], err error)
- func (r *TokenPermissionGroupService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TokenPermissionGroupListResponse]
- type TokenService
- func (r *TokenService) Delete(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenDeleteResponse, err error)
- func (r *TokenService) Get(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenGetResponse, err error)
- func (r *TokenService) List(ctx context.Context, query TokenListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[TokenListResponse], err error)
- func (r *TokenService) ListAutoPaging(ctx context.Context, query TokenListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[TokenListResponse]
- func (r *TokenService) New(ctx context.Context, body TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error)
- func (r *TokenService) Update(ctx context.Context, tokenID interface{}, body TokenUpdateParams, ...) (res *TokenUpdateResponse, err error)
- func (r *TokenService) Verify(ctx context.Context, opts ...option.RequestOption) (res *TokenVerifyResponse, err error)
- type TokenStatus
- type TokenUpdateParams
- type TokenUpdateResponse
- type TokenUpdateResponseEnvelope
- type TokenValueService
- type TokenValueUpdateParams
- type TokenValueUpdateResponseEnvelope
- type TokenVerifyResponse
- type TokenVerifyResponseEnvelope
- type TokenVerifyResponseStatus
- type UserEditParams
- type UserEditResponse
- type UserEditResponseEnvelope
- type UserGetResponse
- type UserGetResponseEnvelope
- type UserService
- type Value
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type 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. This can be a // date string `2019-04-30` or an absolute timestamp that conforms to RFC3339. Before param.Field[time.Time] `query:"before" format:"date-time"` // 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. This can be a // date string `2019-04-30` or an absolute timestamp that conforms to RFC3339. Since param.Field[time.Time] `query:"since" format:"date-time"` 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 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 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. OccuredAt param.Field[time.Time] `query:"occured_at" format:"date-time"` // 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" BillingHistoryListParamsOrderOccuredAt BillingHistoryListParamsOrder = "occured_at" BillingHistoryListParamsOrderAction BillingHistoryListParamsOrder = "action" )
func (BillingHistoryListParamsOrder) IsKnown ¶
func (r BillingHistoryListParamsOrder) IsKnown() bool
type BillingHistoryService ¶
type BillingHistoryService struct {
Options []option.RequestOption
}
BillingHistoryService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBillingHistoryService method instead.
func NewBillingHistoryService ¶
func NewBillingHistoryService(opts ...option.RequestOption) (r *BillingHistoryService)
NewBillingHistoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BillingHistoryService) List ¶
func (r *BillingHistoryService) List(ctx context.Context, query BillingHistoryListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[BillingHistory], err error)
Accesses your billing history object.
func (*BillingHistoryService) ListAutoPaging ¶
func (r *BillingHistoryService) ListAutoPaging(ctx context.Context, query BillingHistoryListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[BillingHistory]
Accesses your billing history object.
type BillingHistoryZone ¶
type BillingHistoryZone struct { Name interface{} `json:"name"` JSON billingHistoryZoneJSON `json:"-"` }
func (*BillingHistoryZone) UnmarshalJSON ¶
func (r *BillingHistoryZone) UnmarshalJSON(data []byte) (err error)
type BillingProfileGetResponseEnvelope ¶
type BillingProfileGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result BillingProfileGetResponseUnion `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 BillingProfileGetResponseUnion ¶
type BillingProfileGetResponseUnion interface {
ImplementsUserBillingProfileGetResponseUnion()
}
Union satisfied by user.BillingProfileGetResponseUnknown or shared.UnionString.
type BillingProfileService ¶
type BillingProfileService struct {
Options []option.RequestOption
}
BillingProfileService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBillingProfileService method instead.
func NewBillingProfileService ¶
func NewBillingProfileService(opts ...option.RequestOption) (r *BillingProfileService)
NewBillingProfileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BillingProfileService) Get ¶
func (r *BillingProfileService) Get(ctx context.Context, opts ...option.RequestOption) (res *BillingProfileGetResponseUnion, err error)
Accesses your billing profile object.
type BillingService ¶
type BillingService struct { Options []option.RequestOption History *BillingHistoryService Profile *BillingProfileService }
BillingService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBillingService method instead.
func NewBillingService ¶
func NewBillingService(opts ...option.RequestOption) (r *BillingService)
NewBillingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type CIDRListParam ¶
type CIDRListParam = string
type CertificateCA ¶ added in v2.2.0
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶ added in v2.2.0
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 ¶ added in v2.3.0
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type Invite ¶
type Invite struct { // ID of the user to add to the organization. InvitedMemberID string `json:"invited_member_id,required,nullable"` // ID of the organization the user will be added to. OrganizationID string `json:"organization_id,required"` // Invite identifier tag. ID string `json:"id"` // When the invite is no longer active. ExpiresOn time.Time `json:"expires_on" format:"date-time"` // The email address of the user who created the invite. InvitedBy string `json:"invited_by"` // Email address of the user to add to the organization. InvitedMemberEmail string `json:"invited_member_email"` // When the invite was sent. InvitedOn time.Time `json:"invited_on" format:"date-time"` // Organization name. OrganizationName string `json:"organization_name"` // Roles to be assigned to this user. Roles []shared.Role `json:"roles"` // Current status of the invitation. Status InviteStatus `json:"status"` JSON inviteJSON `json:"-"` }
func (*Invite) UnmarshalJSON ¶
type InviteEditParams ¶
type InviteEditParams struct { // Status of your response to the invitation (rejected or accepted). Status param.Field[InviteEditParamsStatus] `json:"status,required"` }
func (InviteEditParams) MarshalJSON ¶
func (r InviteEditParams) MarshalJSON() (data []byte, err error)
type InviteEditParamsStatus ¶
type InviteEditParamsStatus string
Status of your response to the invitation (rejected or accepted).
const ( InviteEditParamsStatusAccepted InviteEditParamsStatus = "accepted" InviteEditParamsStatusRejected InviteEditParamsStatus = "rejected" )
func (InviteEditParamsStatus) IsKnown ¶
func (r InviteEditParamsStatus) IsKnown() bool
type InviteEditResponse ¶ added in v2.3.0
type InviteEditResponse = interface{}
type InviteEditResponseEnvelope ¶
type InviteEditResponseEnvelope struct { Result InviteEditResponse `json:"result"` JSON inviteEditResponseEnvelopeJSON `json:"-"` }
func (*InviteEditResponseEnvelope) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type InviteGetResponse ¶ added in v2.3.0
type InviteGetResponse = interface{}
type InviteGetResponseEnvelope ¶
type InviteGetResponseEnvelope struct { Result InviteGetResponse `json:"result"` JSON inviteGetResponseEnvelopeJSON `json:"-"` }
func (*InviteGetResponseEnvelope) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type InviteService ¶
type InviteService struct {
Options []option.RequestOption
}
InviteService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInviteService method instead.
func NewInviteService ¶
func NewInviteService(opts ...option.RequestOption) (r *InviteService)
NewInviteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InviteService) Edit ¶
func (r *InviteService) Edit(ctx context.Context, inviteID string, body InviteEditParams, opts ...option.RequestOption) (res *InviteEditResponse, err error)
Responds to an invitation.
func (*InviteService) Get ¶
func (r *InviteService) Get(ctx context.Context, inviteID string, opts ...option.RequestOption) (res *InviteGetResponse, err error)
Gets the details of an invitation.
func (*InviteService) List ¶
func (r *InviteService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[Invite], err error)
Lists all invitations associated with my user.
func (*InviteService) ListAutoPaging ¶
func (r *InviteService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Invite]
Lists all invitations associated with my user.
type InviteStatus ¶
type InviteStatus string
Current status of the invitation.
const ( InviteStatusPending InviteStatus = "pending" InviteStatusAccepted InviteStatus = "accepted" InviteStatusRejected InviteStatus = "rejected" InviteStatusExpired InviteStatus = "expired" )
func (InviteStatus) IsKnown ¶
func (r InviteStatus) IsKnown() bool
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶ added in v2.3.0
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
This is an alias to an internal type.
type Organization ¶
type Organization struct { // Identifier ID string `json:"id"` // Organization name. Name string `json:"name"` // Access permissions for this User. Permissions []shared.Permission `json:"permissions"` // List of roles that a user has within an organization. Roles []string `json:"roles"` // Whether the user is a member of the organization or has an invitation pending. Status accounts.Status `json:"status"` JSON organizationJSON `json:"-"` }
func (*Organization) UnmarshalJSON ¶
func (r *Organization) UnmarshalJSON(data []byte) (err error)
type OrganizationDeleteResponse ¶
type OrganizationDeleteResponse struct { // Identifier ID string `json:"id"` JSON organizationDeleteResponseJSON `json:"-"` }
func (*OrganizationDeleteResponse) UnmarshalJSON ¶
func (r *OrganizationDeleteResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponse ¶ added in v2.3.0
type OrganizationGetResponse = interface{}
type OrganizationGetResponseEnvelope ¶
type OrganizationGetResponseEnvelope struct { Result OrganizationGetResponse `json:"result"` JSON organizationGetResponseEnvelopeJSON `json:"-"` }
func (*OrganizationGetResponseEnvelope) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OrganizationListParams ¶
type OrganizationListParams struct { // Direction to order organizations. Direction param.Field[OrganizationListParamsDirection] `query:"direction"` // Whether to match all search requirements or at least one (any). Match param.Field[OrganizationListParamsMatch] `query:"match"` // Organization name. Name param.Field[string] `query:"name"` // Field to order organizations by. Order param.Field[OrganizationListParamsOrder] `query:"order"` // Page number of paginated results. Page param.Field[float64] `query:"page"` // Number of organizations per page. PerPage param.Field[float64] `query:"per_page"` // Whether the user is a member of the organization or has an inivitation pending. Status param.Field[OrganizationListParamsStatus] `query:"status"` }
func (OrganizationListParams) URLQuery ¶
func (r OrganizationListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationListParams's query parameters as `url.Values`.
type OrganizationListParamsDirection ¶
type OrganizationListParamsDirection string
Direction to order organizations.
const ( OrganizationListParamsDirectionAsc OrganizationListParamsDirection = "asc" OrganizationListParamsDirectionDesc OrganizationListParamsDirection = "desc" )
func (OrganizationListParamsDirection) IsKnown ¶
func (r OrganizationListParamsDirection) IsKnown() bool
type OrganizationListParamsMatch ¶
type OrganizationListParamsMatch string
Whether to match all search requirements or at least one (any).
const ( OrganizationListParamsMatchAny OrganizationListParamsMatch = "any" OrganizationListParamsMatchAll OrganizationListParamsMatch = "all" )
func (OrganizationListParamsMatch) IsKnown ¶
func (r OrganizationListParamsMatch) IsKnown() bool
type OrganizationListParamsOrder ¶
type OrganizationListParamsOrder string
Field to order organizations by.
const ( OrganizationListParamsOrderID OrganizationListParamsOrder = "id" OrganizationListParamsOrderName OrganizationListParamsOrder = "name" OrganizationListParamsOrderStatus OrganizationListParamsOrder = "status" )
func (OrganizationListParamsOrder) IsKnown ¶
func (r OrganizationListParamsOrder) IsKnown() bool
type OrganizationListParamsStatus ¶
type OrganizationListParamsStatus string
Whether the user is a member of the organization or has an inivitation pending.
const ( OrganizationListParamsStatusMember OrganizationListParamsStatus = "member" OrganizationListParamsStatusInvited OrganizationListParamsStatus = "invited" )
func (OrganizationListParamsStatus) IsKnown ¶
func (r OrganizationListParamsStatus) IsKnown() bool
type OrganizationService ¶
type OrganizationService struct {
Options []option.RequestOption
}
OrganizationService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.
func NewOrganizationService ¶
func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)
NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationService) Delete ¶
func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)
Removes association to an organization.
func (*OrganizationService) Get ¶
func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
Gets a specific organization the user is associated with.
func (*OrganizationService) List ¶
func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Organization], err error)
Lists organizations the user is associated with.
func (*OrganizationService) ListAutoPaging ¶
func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Organization]
Lists organizations the user is associated with.
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type PolicyEffect ¶
type PolicyEffect string
Allow or deny operations against the resources.
const ( PolicyEffectAllow PolicyEffect = "allow" PolicyEffectDeny PolicyEffect = "deny" )
func (PolicyEffect) IsKnown ¶
func (r PolicyEffect) IsKnown() bool
type PolicyParam ¶
type PolicyParam struct { // Allow or deny operations against the resources. Effect param.Field[PolicyEffect] `json:"effect,required"` // A set of permission groups that are specified to the policy. PermissionGroups param.Field[[]PolicyPermissionGroupParam] `json:"permission_groups,required"` // A list of resource names that the policy applies to. Resources param.Field[interface{}] `json:"resources,required"` }
func (PolicyParam) MarshalJSON ¶
func (r PolicyParam) MarshalJSON() (data []byte, err error)
type PolicyPermissionGroupParam ¶
type PolicyPermissionGroupParam struct { // Attributes associated to the permission group. Meta param.Field[interface{}] `json:"meta"` }
A named group of permissions that map to a group of operations against resources.
func (PolicyPermissionGroupParam) MarshalJSON ¶
func (r PolicyPermissionGroupParam) MarshalJSON() (data []byte, err error)
type RatePlan ¶
type RatePlan struct { // The ID of the rate plan. ID string `json:"id"` // The currency applied to the rate plan subscription. Currency string `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. ExternallyManaged bool `json:"externally_managed"` // Whether a rate plan is enterprise-based (or newly adopted term contract). IsContract bool `json:"is_contract"` // The full name of the rate plan. PublicName string `json:"public_name"` // The scope that this rate plan applies to. Scope string `json:"scope"` // The list of sets this rate plan applies to. Sets []string `json:"sets"` JSON ratePlanJSON `json:"-"` }
The rate plan applied to the subscription.
func (*RatePlan) UnmarshalJSON ¶
type RatePlanParam ¶
type RatePlanParam struct { // The ID of the rate plan. ID param.Field[string] `json:"id"` // The currency applied to the rate plan subscription. Currency param.Field[string] `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. ExternallyManaged param.Field[bool] `json:"externally_managed"` // Whether a rate plan is enterprise-based (or newly adopted term contract). IsContract param.Field[bool] `json:"is_contract"` // The full name of the rate plan. PublicName param.Field[string] `json:"public_name"` // The scope that this rate plan applies to. Scope param.Field[string] `json:"scope"` // The list of sets this rate plan applies to. Sets param.Field[[]string] `json:"sets"` }
The rate plan applied to the subscription.
func (RatePlanParam) MarshalJSON ¶
func (r RatePlanParam) MarshalJSON() (data []byte, err error)
type SortDirection ¶ added in v2.2.0
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type Subscription ¶
type Subscription struct { // Subscription identifier tag. ID string `json:"id"` App SubscriptionApp `json:"app"` // The list of add-ons subscribed to. ComponentValues []SubscriptionComponent `json:"component_values"` // The monetary unit in which pricing information is displayed. Currency string `json:"currency"` // The end of the current period and also when the next billing is due. CurrentPeriodEnd time.Time `json:"current_period_end" format:"date-time"` // When the current billing period started. May match initial_period_start if this // is the first period. CurrentPeriodStart time.Time `json:"current_period_start" format:"date-time"` // How often the subscription is renewed automatically. Frequency SubscriptionFrequency `json:"frequency"` // The price of the subscription that will be billed, in US dollars. Price float64 `json:"price"` // The rate plan applied to the subscription. RatePlan RatePlan `json:"rate_plan"` // The state that the subscription is in. State SubscriptionState `json:"state"` // A simple zone object. May have null properties if not a zone subscription. Zone SubscriptionZone `json:"zone"` JSON subscriptionJSON `json:"-"` }
func (*Subscription) UnmarshalJSON ¶
func (r *Subscription) UnmarshalJSON(data []byte) (err error)
type SubscriptionApp ¶
type SubscriptionApp struct { // app install id. InstallID string `json:"install_id"` JSON subscriptionAppJSON `json:"-"` }
func (*SubscriptionApp) UnmarshalJSON ¶
func (r *SubscriptionApp) UnmarshalJSON(data []byte) (err error)
type SubscriptionAppParam ¶
type SubscriptionAppParam struct { // app install id. InstallID param.Field[string] `json:"install_id"` }
func (SubscriptionAppParam) MarshalJSON ¶
func (r SubscriptionAppParam) MarshalJSON() (data []byte, err error)
type SubscriptionComponent ¶
type SubscriptionComponent struct { // The default amount assigned. Default float64 `json:"default"` // The name of the component value. Name string `json:"name"` // The unit price for the component value. Price float64 `json:"price"` // The amount of the component value assigned. Value float64 `json:"value"` JSON subscriptionComponentJSON `json:"-"` }
A component value for a subscription.
func (*SubscriptionComponent) UnmarshalJSON ¶
func (r *SubscriptionComponent) UnmarshalJSON(data []byte) (err error)
type SubscriptionComponentParam ¶
type SubscriptionComponentParam struct { // The default amount assigned. Default param.Field[float64] `json:"default"` // The name of the component value. Name param.Field[string] `json:"name"` // The unit price for the component value. Price param.Field[float64] `json:"price"` // The amount of the component value assigned. Value param.Field[float64] `json:"value"` }
A component value for a subscription.
func (SubscriptionComponentParam) MarshalJSON ¶
func (r SubscriptionComponentParam) MarshalJSON() (data []byte, err error)
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 SubscriptionEditParams ¶
type SubscriptionEditParams struct {
Subscription SubscriptionParam `json:"subscription,required"`
}
func (SubscriptionEditParams) MarshalJSON ¶
func (r SubscriptionEditParams) MarshalJSON() (data []byte, err error)
type SubscriptionEditResponseEnvelope ¶
type SubscriptionEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result SubscriptionEditResponseUnion `json:"result,required"` // Whether the API call was successful Success SubscriptionEditResponseEnvelopeSuccess `json:"success,required"` JSON subscriptionEditResponseEnvelopeJSON `json:"-"` }
func (*SubscriptionEditResponseEnvelope) UnmarshalJSON ¶
func (r *SubscriptionEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SubscriptionEditResponseEnvelopeSuccess ¶
type SubscriptionEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SubscriptionEditResponseEnvelopeSuccessTrue SubscriptionEditResponseEnvelopeSuccess = true
)
func (SubscriptionEditResponseEnvelopeSuccess) IsKnown ¶
func (r SubscriptionEditResponseEnvelopeSuccess) IsKnown() bool
type SubscriptionEditResponseUnion ¶
type SubscriptionEditResponseUnion interface {
ImplementsUserSubscriptionEditResponseUnion()
}
Union satisfied by user.SubscriptionEditResponseUnknown or shared.UnionString.
type SubscriptionFrequency ¶
type SubscriptionFrequency string
How often the subscription is renewed automatically.
const ( SubscriptionFrequencyWeekly SubscriptionFrequency = "weekly" SubscriptionFrequencyMonthly SubscriptionFrequency = "monthly" SubscriptionFrequencyQuarterly SubscriptionFrequency = "quarterly" SubscriptionFrequencyYearly SubscriptionFrequency = "yearly" )
func (SubscriptionFrequency) IsKnown ¶
func (r SubscriptionFrequency) IsKnown() bool
type SubscriptionGetResponseEnvelope ¶
type SubscriptionGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result []Subscription `json:"result,required,nullable"` // Whether the API call was successful Success SubscriptionGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo SubscriptionGetResponseEnvelopeResultInfo `json:"result_info"` JSON subscriptionGetResponseEnvelopeJSON `json:"-"` }
func (*SubscriptionGetResponseEnvelope) UnmarshalJSON ¶
func (r *SubscriptionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelopeResultInfo ¶
type SubscriptionGetResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON subscriptionGetResponseEnvelopeResultInfoJSON `json:"-"` }
func (*SubscriptionGetResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *SubscriptionGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelopeSuccess ¶
type SubscriptionGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SubscriptionGetResponseEnvelopeSuccessTrue SubscriptionGetResponseEnvelopeSuccess = true
)
func (SubscriptionGetResponseEnvelopeSuccess) IsKnown ¶
func (r SubscriptionGetResponseEnvelopeSuccess) IsKnown() bool
type SubscriptionParam ¶
type SubscriptionParam struct { App param.Field[SubscriptionAppParam] `json:"app"` // The list of add-ons subscribed to. ComponentValues param.Field[[]SubscriptionComponentParam] `json:"component_values"` // How often the subscription is renewed automatically. Frequency param.Field[SubscriptionFrequency] `json:"frequency"` // The rate plan applied to the subscription. RatePlan param.Field[RatePlanParam] `json:"rate_plan"` // A simple zone object. May have null properties if not a zone subscription. Zone param.Field[SubscriptionZoneParam] `json:"zone"` }
func (SubscriptionParam) MarshalJSON ¶
func (r SubscriptionParam) MarshalJSON() (data []byte, err error)
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) Edit ¶
func (r *SubscriptionService) Edit(ctx context.Context, identifier string, body SubscriptionEditParams, opts ...option.RequestOption) (res *SubscriptionEditResponseUnion, err error)
Updates zone subscriptions, either plan or add-ons.
func (*SubscriptionService) Get ¶
func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOption) (res *[]Subscription, err error)
Lists all of a user's subscriptions.
func (*SubscriptionService) Update ¶
func (r *SubscriptionService) Update(ctx context.Context, identifier string, body SubscriptionUpdateParams, opts ...option.RequestOption) (res *SubscriptionUpdateResponseUnion, err error)
Updates a user's subscriptions.
type SubscriptionState ¶
type SubscriptionState string
The state that the subscription is in.
const ( SubscriptionStateTrial SubscriptionState = "Trial" SubscriptionStateProvisioned SubscriptionState = "Provisioned" SubscriptionStatePaid SubscriptionState = "Paid" SubscriptionStateAwaitingPayment SubscriptionState = "AwaitingPayment" SubscriptionStateCancelled SubscriptionState = "Cancelled" SubscriptionStateFailed SubscriptionState = "Failed" SubscriptionStateExpired SubscriptionState = "Expired" )
func (SubscriptionState) IsKnown ¶
func (r SubscriptionState) IsKnown() bool
type SubscriptionUpdateParams ¶
type SubscriptionUpdateParams struct {
Subscription 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 SubscriptionUpdateResponseUnion `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 SubscriptionUpdateResponseUnion ¶
type SubscriptionUpdateResponseUnion interface {
ImplementsUserSubscriptionUpdateResponseUnion()
}
Union satisfied by user.SubscriptionUpdateResponseUnknown or shared.UnionString.
type SubscriptionZone ¶
type SubscriptionZone struct { // Identifier ID string `json:"id"` // The domain name Name string `json:"name"` JSON subscriptionZoneJSON `json:"-"` }
A simple zone object. May have null properties if not a zone subscription.
func (*SubscriptionZone) UnmarshalJSON ¶
func (r *SubscriptionZone) UnmarshalJSON(data []byte) (err error)
type SubscriptionZoneParam ¶
type SubscriptionZoneParam struct { }
A simple zone object. May have null properties if not a zone subscription.
func (SubscriptionZoneParam) MarshalJSON ¶
func (r SubscriptionZoneParam) MarshalJSON() (data []byte, err error)
type TokenConditionParam ¶
type TokenConditionParam struct { // Client IP restrictions. RequestIP param.Field[TokenConditionRequestIPParam] `json:"request_ip"` }
func (TokenConditionParam) MarshalJSON ¶
func (r TokenConditionParam) MarshalJSON() (data []byte, err error)
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam struct { // List of IPv4/IPv6 CIDR addresses. In param.Field[[]CIDRListParam] `json:"in"` // List of IPv4/IPv6 CIDR addresses. NotIn param.Field[[]CIDRListParam] `json:"not_in"` }
Client IP restrictions.
func (TokenConditionRequestIPParam) MarshalJSON ¶
func (r TokenConditionRequestIPParam) MarshalJSON() (data []byte, err error)
type TokenDeleteResponse ¶
type TokenDeleteResponse struct { // Identifier ID string `json:"id,required"` JSON tokenDeleteResponseJSON `json:"-"` }
func (*TokenDeleteResponse) UnmarshalJSON ¶
func (r *TokenDeleteResponse) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelope ¶
type TokenDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success TokenDeleteResponseEnvelopeSuccess `json:"success,required"` Result TokenDeleteResponse `json:"result,nullable"` JSON tokenDeleteResponseEnvelopeJSON `json:"-"` }
func (*TokenDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelopeSuccess ¶
type TokenDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenDeleteResponseEnvelopeSuccessTrue TokenDeleteResponseEnvelopeSuccess = true
)
func (TokenDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r TokenDeleteResponseEnvelopeSuccess) IsKnown() bool
type TokenGetResponse ¶ added in v2.3.0
type TokenGetResponse = interface{}
type TokenGetResponseEnvelope ¶
type TokenGetResponseEnvelope struct { Result TokenGetResponse `json:"result"` JSON tokenGetResponseEnvelopeJSON `json:"-"` }
func (*TokenGetResponseEnvelope) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenListParams ¶
type TokenListParams struct { // Direction to order results. Direction param.Field[TokenListParamsDirection] `query:"direction"` // Page number of paginated results. Page param.Field[float64] `query:"page"` // Maximum number of results per page. PerPage param.Field[float64] `query:"per_page"` }
func (TokenListParams) URLQuery ¶
func (r TokenListParams) URLQuery() (v url.Values)
URLQuery serializes TokenListParams's query parameters as `url.Values`.
type TokenListParamsDirection ¶
type TokenListParamsDirection string
Direction to order results.
const ( TokenListParamsDirectionAsc TokenListParamsDirection = "asc" TokenListParamsDirectionDesc TokenListParamsDirection = "desc" )
func (TokenListParamsDirection) IsKnown ¶
func (r TokenListParamsDirection) IsKnown() bool
type TokenListResponse ¶
type TokenListResponse = interface{}
type TokenNewParams ¶
type TokenNewParams struct { // Token name. Name param.Field[string] `json:"name,required"` // List of access policies assigned to the token. Policies param.Field[[]PolicyParam] `json:"policies,required"` Condition param.Field[TokenNewParamsCondition] `json:"condition"` // The expiration time on or after which the JWT MUST NOT be accepted for // processing. ExpiresOn param.Field[time.Time] `json:"expires_on" format:"date-time"` // The time before which the token MUST NOT be accepted for processing. NotBefore param.Field[time.Time] `json:"not_before" format:"date-time"` }
func (TokenNewParams) MarshalJSON ¶
func (r TokenNewParams) MarshalJSON() (data []byte, err error)
type TokenNewParamsCondition ¶
type TokenNewParamsCondition struct { // Client IP restrictions. RequestIP param.Field[TokenNewParamsConditionRequestIP] `json:"request_ip"` }
func (TokenNewParamsCondition) MarshalJSON ¶
func (r TokenNewParamsCondition) MarshalJSON() (data []byte, err error)
type TokenNewParamsConditionRequestIP ¶
type TokenNewParamsConditionRequestIP struct { // List of IPv4/IPv6 CIDR addresses. In param.Field[[]CIDRListParam] `json:"in"` // List of IPv4/IPv6 CIDR addresses. NotIn param.Field[[]CIDRListParam] `json:"not_in"` }
Client IP restrictions.
func (TokenNewParamsConditionRequestIP) MarshalJSON ¶
func (r TokenNewParamsConditionRequestIP) MarshalJSON() (data []byte, err error)
type TokenNewResponse ¶
type TokenNewResponse struct { // The token value. Value Value `json:"value"` JSON tokenNewResponseJSON `json:"-"` }
func (*TokenNewResponse) UnmarshalJSON ¶
func (r *TokenNewResponse) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelope ¶
type TokenNewResponseEnvelope struct { Result TokenNewResponse `json:"result"` JSON tokenNewResponseEnvelopeJSON `json:"-"` }
func (*TokenNewResponseEnvelope) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenParam ¶
type TokenParam struct { // Token name. Name param.Field[string] `json:"name,required"` // List of access policies assigned to the token. Policies param.Field[[]PolicyParam] `json:"policies,required"` // Status of the token. Status param.Field[TokenStatus] `json:"status,required"` Condition param.Field[TokenConditionParam] `json:"condition"` // The expiration time on or after which the JWT MUST NOT be accepted for // processing. ExpiresOn param.Field[time.Time] `json:"expires_on" format:"date-time"` // The time before which the token MUST NOT be accepted for processing. NotBefore param.Field[time.Time] `json:"not_before" format:"date-time"` }
func (TokenParam) MarshalJSON ¶
func (r TokenParam) MarshalJSON() (data []byte, err error)
type TokenPermissionGroupListResponse ¶
type TokenPermissionGroupListResponse = interface{}
type TokenPermissionGroupService ¶
type TokenPermissionGroupService struct {
Options []option.RequestOption
}
TokenPermissionGroupService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTokenPermissionGroupService method instead.
func NewTokenPermissionGroupService ¶
func NewTokenPermissionGroupService(opts ...option.RequestOption) (r *TokenPermissionGroupService)
NewTokenPermissionGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TokenPermissionGroupService) List ¶
func (r *TokenPermissionGroupService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[TokenPermissionGroupListResponse], err error)
Find all available permission groups for API Tokens
func (*TokenPermissionGroupService) ListAutoPaging ¶
func (r *TokenPermissionGroupService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TokenPermissionGroupListResponse]
Find all available permission groups for API Tokens
type TokenService ¶
type TokenService struct { Options []option.RequestOption PermissionGroups *TokenPermissionGroupService Value *TokenValueService }
TokenService contains methods and other services that help with interacting with the cloudflare API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTokenService method instead.
func NewTokenService ¶
func NewTokenService(opts ...option.RequestOption) (r *TokenService)
NewTokenService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TokenService) Delete ¶
func (r *TokenService) Delete(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenDeleteResponse, err error)
Destroy a token.
func (*TokenService) Get ¶
func (r *TokenService) Get(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenGetResponse, err error)
Get information about a specific token.
func (*TokenService) List ¶
func (r *TokenService) List(ctx context.Context, query TokenListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[TokenListResponse], err error)
List all access tokens you created.
func (*TokenService) ListAutoPaging ¶
func (r *TokenService) ListAutoPaging(ctx context.Context, query TokenListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[TokenListResponse]
List all access tokens you created.
func (*TokenService) New ¶
func (r *TokenService) New(ctx context.Context, body TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error)
Create a new access token.
func (*TokenService) Update ¶
func (r *TokenService) Update(ctx context.Context, tokenID interface{}, body TokenUpdateParams, opts ...option.RequestOption) (res *TokenUpdateResponse, err error)
Update an existing token.
func (*TokenService) Verify ¶
func (r *TokenService) Verify(ctx context.Context, opts ...option.RequestOption) (res *TokenVerifyResponse, err error)
Test whether a token works.
type TokenStatus ¶
type TokenStatus string
Status of the token.
const ( TokenStatusActive TokenStatus = "active" TokenStatusDisabled TokenStatus = "disabled" TokenStatusExpired TokenStatus = "expired" )
func (TokenStatus) IsKnown ¶
func (r TokenStatus) IsKnown() bool
type TokenUpdateParams ¶
type TokenUpdateParams struct {
Token TokenParam `json:"token,required"`
}
func (TokenUpdateParams) MarshalJSON ¶
func (r TokenUpdateParams) MarshalJSON() (data []byte, err error)
type TokenUpdateResponse ¶ added in v2.3.0
type TokenUpdateResponse = interface{}
type TokenUpdateResponseEnvelope ¶
type TokenUpdateResponseEnvelope struct { Result TokenUpdateResponse `json:"result"` JSON tokenUpdateResponseEnvelopeJSON `json:"-"` }
func (*TokenUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
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 interface{}, body TokenValueUpdateParams, opts ...option.RequestOption) (res *Value, err error)
Roll the token secret.
type TokenValueUpdateParams ¶
type TokenValueUpdateParams struct {
Body interface{} `json:"body,required"`
}
func (TokenValueUpdateParams) MarshalJSON ¶
func (r TokenValueUpdateParams) MarshalJSON() (data []byte, err error)
type TokenValueUpdateResponseEnvelope ¶
type TokenValueUpdateResponseEnvelope struct { // The token value. Result Value `json:"result"` JSON tokenValueUpdateResponseEnvelopeJSON `json:"-"` }
func (*TokenValueUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
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 { Result TokenVerifyResponse `json:"result"` JSON tokenVerifyResponseEnvelopeJSON `json:"-"` }
func (*TokenVerifyResponseEnvelope) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelope) UnmarshalJSON(data []byte) (err error)
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 ¶ added in v2.3.0
type UserEditResponse = interface{}
type UserEditResponseEnvelope ¶
type UserEditResponseEnvelope struct { Result UserEditResponse `json:"result"` JSON userEditResponseEnvelopeJSON `json:"-"` }
func (*UserEditResponseEnvelope) UnmarshalJSON ¶
func (r *UserEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UserGetResponse ¶ added in v2.3.0
type UserGetResponse = interface{}
type UserGetResponseEnvelope ¶
type UserGetResponseEnvelope struct { Result UserGetResponse `json:"result"` JSON userGetResponseEnvelopeJSON `json:"-"` }
func (*UserGetResponseEnvelope) UnmarshalJSON ¶
func (r *UserGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
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