Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type Member
- type MemberParam
- type MemberRole
- type MemberRoleParam
- type MemberRolesPermissions
- type MemberRolesPermissionsParam
- type MemberUser
- type MemberUserParam
- type Membership
- type MembershipDeleteParams
- type MembershipDeleteResponse
- type MembershipDeleteResponseEnvelope
- type MembershipDeleteResponseEnvelopeSuccess
- type MembershipGetResponseEnvelope
- type MembershipGetResponseEnvelopeSuccess
- type MembershipGetResponseUnion
- type MembershipListParams
- type MembershipListParamsAccount
- type MembershipListParamsDirection
- type MembershipListParamsOrder
- type MembershipListParamsStatus
- type MembershipPermissions
- type MembershipService
- func (r *MembershipService) Delete(ctx context.Context, membershipID string, body MembershipDeleteParams, ...) (res *MembershipDeleteResponse, err error)
- func (r *MembershipService) Get(ctx context.Context, membershipID string, opts ...option.RequestOption) (res *MembershipGetResponseUnion, err error)
- func (r *MembershipService) List(ctx context.Context, query MembershipListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Membership], err error)
- func (r *MembershipService) ListAutoPaging(ctx context.Context, query MembershipListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Membership]
- func (r *MembershipService) Update(ctx context.Context, membershipID string, body MembershipUpdateParams, ...) (res *MembershipUpdateResponseUnion, err error)
- type MembershipStatus
- type MembershipUpdateParams
- type MembershipUpdateParamsStatus
- type MembershipUpdateResponseEnvelope
- type MembershipUpdateResponseEnvelopeSuccess
- type MembershipUpdateResponseUnion
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ResponseInfo
- type Role
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 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.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type 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 CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRole ¶ added in v2.1.0
type MemberRole = shared.MemberRole
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 MemberRolesPermissions ¶ added in v2.1.0
type MemberRolesPermissions = shared.MemberRolesPermissions
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 MemberUser ¶ added in v2.1.0
type MemberUser = shared.MemberUser
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
This is an alias to an internal type.
type Membership ¶
type Membership struct { // Membership identifier tag. ID string `json:"id"` Account accounts.Account `json:"account"` // Enterprise only. Indicates whether or not API access is enabled specifically for // this user on a given account. APIAccessEnabled bool `json:"api_access_enabled,nullable"` // The unique activation code for the account membership. Code string `json:"code"` // All access permissions for the user at the account. Permissions MembershipPermissions `json:"permissions"` // List of role names for the user at the account. Roles []string `json:"roles"` // Status of this membership. Status MembershipStatus `json:"status"` JSON membershipJSON `json:"-"` }
func (*Membership) UnmarshalJSON ¶
func (r *Membership) UnmarshalJSON(data []byte) (err error)
type MembershipDeleteParams ¶
type MembershipDeleteParams struct {
Body interface{} `json:"body,required"`
}
func (MembershipDeleteParams) MarshalJSON ¶
func (r MembershipDeleteParams) MarshalJSON() (data []byte, err error)
type MembershipDeleteResponse ¶
type MembershipDeleteResponse struct { // Membership identifier tag. ID string `json:"id"` JSON membershipDeleteResponseJSON `json:"-"` }
func (*MembershipDeleteResponse) UnmarshalJSON ¶
func (r *MembershipDeleteResponse) UnmarshalJSON(data []byte) (err error)
type MembershipDeleteResponseEnvelope ¶
type MembershipDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MembershipDeleteResponse `json:"result,required"` // Whether the API call was successful Success MembershipDeleteResponseEnvelopeSuccess `json:"success,required"` JSON membershipDeleteResponseEnvelopeJSON `json:"-"` }
func (*MembershipDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *MembershipDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type MembershipDeleteResponseEnvelopeSuccess ¶
type MembershipDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MembershipDeleteResponseEnvelopeSuccessTrue MembershipDeleteResponseEnvelopeSuccess = true
)
func (MembershipDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r MembershipDeleteResponseEnvelopeSuccess) IsKnown() bool
type MembershipGetResponseEnvelope ¶
type MembershipGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MembershipGetResponseUnion `json:"result,required"` // Whether the API call was successful Success MembershipGetResponseEnvelopeSuccess `json:"success,required"` JSON membershipGetResponseEnvelopeJSON `json:"-"` }
func (*MembershipGetResponseEnvelope) UnmarshalJSON ¶
func (r *MembershipGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type MembershipGetResponseEnvelopeSuccess ¶
type MembershipGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MembershipGetResponseEnvelopeSuccessTrue MembershipGetResponseEnvelopeSuccess = true
)
func (MembershipGetResponseEnvelopeSuccess) IsKnown ¶
func (r MembershipGetResponseEnvelopeSuccess) IsKnown() bool
type MembershipGetResponseUnion ¶
type MembershipGetResponseUnion interface {
ImplementsMembershipsMembershipGetResponseUnion()
}
Union satisfied by memberships.MembershipGetResponseUnknown or shared.UnionString.
type MembershipListParams ¶
type MembershipListParams struct { Account param.Field[MembershipListParamsAccount] `query:"account"` // Direction to order memberships. Direction param.Field[MembershipListParamsDirection] `query:"direction"` // Account name Name param.Field[string] `query:"name"` // Field to order memberships by. Order param.Field[MembershipListParamsOrder] `query:"order"` // Page number of paginated results. Page param.Field[float64] `query:"page"` // Number of memberships per page. PerPage param.Field[float64] `query:"per_page"` // Status of this membership. Status param.Field[MembershipListParamsStatus] `query:"status"` }
func (MembershipListParams) URLQuery ¶
func (r MembershipListParams) URLQuery() (v url.Values)
URLQuery serializes MembershipListParams's query parameters as `url.Values`.
type MembershipListParamsAccount ¶
func (MembershipListParamsAccount) URLQuery ¶
func (r MembershipListParamsAccount) URLQuery() (v url.Values)
URLQuery serializes MembershipListParamsAccount's query parameters as `url.Values`.
type MembershipListParamsDirection ¶
type MembershipListParamsDirection string
Direction to order memberships.
const ( MembershipListParamsDirectionAsc MembershipListParamsDirection = "asc" MembershipListParamsDirectionDesc MembershipListParamsDirection = "desc" )
func (MembershipListParamsDirection) IsKnown ¶
func (r MembershipListParamsDirection) IsKnown() bool
type MembershipListParamsOrder ¶
type MembershipListParamsOrder string
Field to order memberships by.
const ( MembershipListParamsOrderID MembershipListParamsOrder = "id" MembershipListParamsOrderAccountName MembershipListParamsOrder = "account.name" MembershipListParamsOrderStatus MembershipListParamsOrder = "status" )
func (MembershipListParamsOrder) IsKnown ¶
func (r MembershipListParamsOrder) IsKnown() bool
type MembershipListParamsStatus ¶
type MembershipListParamsStatus string
Status of this membership.
const ( MembershipListParamsStatusAccepted MembershipListParamsStatus = "accepted" MembershipListParamsStatusPending MembershipListParamsStatus = "pending" MembershipListParamsStatusRejected MembershipListParamsStatus = "rejected" )
func (MembershipListParamsStatus) IsKnown ¶
func (r MembershipListParamsStatus) IsKnown() bool
type MembershipPermissions ¶
type MembershipPermissions struct { Analytics shared.PermissionGrant `json:"analytics"` Billing shared.PermissionGrant `json:"billing"` CachePurge shared.PermissionGrant `json:"cache_purge"` DNS shared.PermissionGrant `json:"dns"` DNSRecords shared.PermissionGrant `json:"dns_records"` LB shared.PermissionGrant `json:"lb"` Logs shared.PermissionGrant `json:"logs"` Organization shared.PermissionGrant `json:"organization"` SSL shared.PermissionGrant `json:"ssl"` WAF shared.PermissionGrant `json:"waf"` ZoneSettings shared.PermissionGrant `json:"zone_settings"` Zones shared.PermissionGrant `json:"zones"` JSON membershipPermissionsJSON `json:"-"` }
All access permissions for the user at the account.
func (*MembershipPermissions) UnmarshalJSON ¶
func (r *MembershipPermissions) UnmarshalJSON(data []byte) (err error)
type MembershipService ¶
type MembershipService struct {
Options []option.RequestOption
}
MembershipService 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 NewMembershipService method instead.
func NewMembershipService ¶
func NewMembershipService(opts ...option.RequestOption) (r *MembershipService)
NewMembershipService 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 (*MembershipService) Delete ¶
func (r *MembershipService) Delete(ctx context.Context, membershipID string, body MembershipDeleteParams, opts ...option.RequestOption) (res *MembershipDeleteResponse, err error)
Remove the associated member from an account.
func (*MembershipService) Get ¶
func (r *MembershipService) Get(ctx context.Context, membershipID string, opts ...option.RequestOption) (res *MembershipGetResponseUnion, err error)
Get a specific membership.
func (*MembershipService) List ¶
func (r *MembershipService) List(ctx context.Context, query MembershipListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Membership], err error)
List memberships of accounts the user can access.
func (*MembershipService) ListAutoPaging ¶
func (r *MembershipService) ListAutoPaging(ctx context.Context, query MembershipListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Membership]
List memberships of accounts the user can access.
func (*MembershipService) Update ¶
func (r *MembershipService) Update(ctx context.Context, membershipID string, body MembershipUpdateParams, opts ...option.RequestOption) (res *MembershipUpdateResponseUnion, err error)
Accept or reject this account invitation.
type MembershipStatus ¶
type MembershipStatus string
Status of this membership.
const ( MembershipStatusAccepted MembershipStatus = "accepted" MembershipStatusPending MembershipStatus = "pending" MembershipStatusRejected MembershipStatus = "rejected" )
func (MembershipStatus) IsKnown ¶
func (r MembershipStatus) IsKnown() bool
type MembershipUpdateParams ¶
type MembershipUpdateParams struct { // Whether to accept or reject this account invitation. Status param.Field[MembershipUpdateParamsStatus] `json:"status,required"` }
func (MembershipUpdateParams) MarshalJSON ¶
func (r MembershipUpdateParams) MarshalJSON() (data []byte, err error)
type MembershipUpdateParamsStatus ¶
type MembershipUpdateParamsStatus string
Whether to accept or reject this account invitation.
const ( MembershipUpdateParamsStatusAccepted MembershipUpdateParamsStatus = "accepted" MembershipUpdateParamsStatusRejected MembershipUpdateParamsStatus = "rejected" )
func (MembershipUpdateParamsStatus) IsKnown ¶
func (r MembershipUpdateParamsStatus) IsKnown() bool
type MembershipUpdateResponseEnvelope ¶
type MembershipUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MembershipUpdateResponseUnion `json:"result,required"` // Whether the API call was successful Success MembershipUpdateResponseEnvelopeSuccess `json:"success,required"` JSON membershipUpdateResponseEnvelopeJSON `json:"-"` }
func (*MembershipUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *MembershipUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type MembershipUpdateResponseEnvelopeSuccess ¶
type MembershipUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MembershipUpdateResponseEnvelopeSuccessTrue MembershipUpdateResponseEnvelopeSuccess = true
)
func (MembershipUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r MembershipUpdateResponseEnvelopeSuccess) IsKnown() bool
type MembershipUpdateResponseUnion ¶
type MembershipUpdateResponseUnion interface {
ImplementsMembershipsMembershipUpdateResponseUnion()
}
Union satisfied by memberships.MembershipUpdateResponseUnknown or shared.UnionString.
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.