Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type Account
- type AccountGetParams
- type AccountGetResponseEnvelope
- type AccountGetResponseEnvelopeSuccess
- type AccountGetResponseUnion
- type AccountListParams
- type AccountListParamsDirection
- type AccountListResponse
- type AccountParam
- type AccountService
- func (r *AccountService) Get(ctx context.Context, query AccountGetParams, opts ...option.RequestOption) (res *AccountGetResponseUnion, err error)
- func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AccountListResponse], err error)
- func (r *AccountService) ListAutoPaging(ctx context.Context, query AccountListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AccountListResponse]
- func (r *AccountService) Update(ctx context.Context, params AccountUpdateParams, opts ...option.RequestOption) (res *AccountUpdateResponseUnion, err error)
- type AccountSettings
- type AccountSettingsDefaultNameservers
- type AccountSettingsParam
- type AccountUpdateParams
- type AccountUpdateResponseEnvelope
- type AccountUpdateResponseEnvelopeSuccess
- type AccountUpdateResponseUnion
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type Member
- type MemberDeleteParams
- type MemberDeleteResponse
- type MemberDeleteResponseEnvelope
- type MemberDeleteResponseEnvelopeSuccess
- type MemberGetParams
- type MemberGetResponseEnvelope
- type MemberGetResponseEnvelopeSuccess
- type MemberListParams
- type MemberListParamsDirection
- type MemberListParamsOrder
- type MemberListParamsStatus
- type MemberListResponse
- type MemberListResponseStatus
- type MemberNewParams
- type MemberNewParamsStatus
- type MemberNewResponseEnvelope
- type MemberNewResponseEnvelopeSuccess
- type MemberParam
- type MemberRole
- type MemberRoleParam
- type MemberRolesPermissions
- type MemberRolesPermissionsParam
- type MemberService
- func (r *MemberService) Delete(ctx context.Context, memberID string, body MemberDeleteParams, ...) (res *MemberDeleteResponse, err error)
- func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGetParams, ...) (res *shared.Member, err error)
- func (r *MemberService) List(ctx context.Context, params MemberListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[MemberListResponse], err error)
- func (r *MemberService) ListAutoPaging(ctx context.Context, params MemberListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[MemberListResponse]
- func (r *MemberService) New(ctx context.Context, params MemberNewParams, opts ...option.RequestOption) (res *UserWithInviteCode, err error)
- func (r *MemberService) Update(ctx context.Context, memberID string, params MemberUpdateParams, ...) (res *shared.Member, err error)
- type MemberUpdateParams
- type MemberUpdateResponseEnvelope
- type MemberUpdateResponseEnvelopeSuccess
- type MemberUser
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ResponseInfo
- type Role
- type RoleGetParams
- type RoleGetResponseEnvelope
- type RoleGetResponseEnvelopeSuccess
- type RoleGetResponseUnion
- type RoleListParams
- type RoleService
- func (r *RoleService) Get(ctx context.Context, roleID interface{}, query RoleGetParams, ...) (res *RoleGetResponseUnion, err error)
- func (r *RoleService) List(ctx context.Context, query RoleListParams, opts ...option.RequestOption) (res *pagination.SinglePage[shared.Role], err error)
- func (r *RoleService) ListAutoPaging(ctx context.Context, query RoleListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[shared.Role]
- type SortDirection
- type Status
- type UserWithInviteCode
- type UserWithInviteCodeRole
- type UserWithInviteCodeRolesPermissions
- type UserWithInviteCodeUser
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 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 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 Account ¶
type Account struct { // Identifier ID string `json:"id,required"` // Account name Name string `json:"name,required"` // Timestamp for the creation of the account CreatedOn time.Time `json:"created_on" format:"date-time"` // Account settings Settings AccountSettings `json:"settings"` JSON accountJSON `json:"-"` }
func (*Account) UnmarshalJSON ¶
type AccountGetParams ¶
type AccountGetResponseEnvelope ¶
type AccountGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result AccountGetResponseUnion `json:"result,required"` // Whether the API call was successful Success AccountGetResponseEnvelopeSuccess `json:"success,required"` JSON accountGetResponseEnvelopeJSON `json:"-"` }
func (*AccountGetResponseEnvelope) UnmarshalJSON ¶
func (r *AccountGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AccountGetResponseEnvelopeSuccess ¶
type AccountGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AccountGetResponseEnvelopeSuccessTrue AccountGetResponseEnvelopeSuccess = true
)
func (AccountGetResponseEnvelopeSuccess) IsKnown ¶
func (r AccountGetResponseEnvelopeSuccess) IsKnown() bool
type AccountGetResponseUnion ¶
type AccountGetResponseUnion interface {
ImplementsAccountsAccountGetResponseUnion()
}
Union satisfied by accounts.AccountGetResponseUnknown or shared.UnionString.
type AccountListParams ¶
type AccountListParams struct { // Direction to order results. Direction param.Field[AccountListParamsDirection] `query:"direction"` // Name of the account. Name param.Field[string] `query:"name"` // 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 (AccountListParams) URLQuery ¶
func (r AccountListParams) URLQuery() (v url.Values)
URLQuery serializes AccountListParams's query parameters as `url.Values`.
type AccountListParamsDirection ¶
type AccountListParamsDirection string
Direction to order results.
const ( AccountListParamsDirectionAsc AccountListParamsDirection = "asc" AccountListParamsDirectionDesc AccountListParamsDirection = "desc" )
func (AccountListParamsDirection) IsKnown ¶
func (r AccountListParamsDirection) IsKnown() bool
type AccountListResponse ¶
type AccountListResponse = interface{}
type AccountParam ¶
type AccountParam struct { // Account name Name param.Field[string] `json:"name,required"` // Account settings Settings param.Field[AccountSettingsParam] `json:"settings"` }
func (AccountParam) MarshalJSON ¶
func (r AccountParam) MarshalJSON() (data []byte, err error)
type AccountService ¶
type AccountService struct { Options []option.RequestOption Members *MemberService Roles *RoleService }
AccountService 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 NewAccountService method instead.
func NewAccountService ¶
func NewAccountService(opts ...option.RequestOption) (r *AccountService)
NewAccountService 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 (*AccountService) Get ¶
func (r *AccountService) Get(ctx context.Context, query AccountGetParams, opts ...option.RequestOption) (res *AccountGetResponseUnion, err error)
Get information about a specific account that you are a member of.
func (*AccountService) List ¶
func (r *AccountService) List(ctx context.Context, query AccountListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AccountListResponse], err error)
List all accounts you have ownership or verified access to.
func (*AccountService) ListAutoPaging ¶
func (r *AccountService) ListAutoPaging(ctx context.Context, query AccountListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AccountListResponse]
List all accounts you have ownership or verified access to.
func (*AccountService) Update ¶
func (r *AccountService) Update(ctx context.Context, params AccountUpdateParams, opts ...option.RequestOption) (res *AccountUpdateResponseUnion, err error)
Update an existing account.
type AccountSettings ¶
type AccountSettings struct { // Specifies the default nameservers to be used for new zones added to this // account. // // - `cloudflare.standard` for Cloudflare-branded nameservers // - `custom.account` for account custom nameservers // - `custom.tenant` for tenant custom nameservers // // See // [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/) // for more information. DefaultNameservers AccountSettingsDefaultNameservers `json:"default_nameservers"` // Indicates whether membership in this account requires that Two-Factor // Authentication is enabled EnforceTwofactor bool `json:"enforce_twofactor"` // Indicates whether new zones should use the account-level custom nameservers by // default. // // Deprecated in favor of `default_nameservers`. UseAccountCustomNSByDefault bool `json:"use_account_custom_ns_by_default"` JSON accountSettingsJSON `json:"-"` }
Account settings
func (*AccountSettings) UnmarshalJSON ¶
func (r *AccountSettings) UnmarshalJSON(data []byte) (err error)
type AccountSettingsDefaultNameservers ¶
type AccountSettingsDefaultNameservers string
Specifies the default nameservers to be used for new zones added to this account.
- `cloudflare.standard` for Cloudflare-branded nameservers - `custom.account` for account custom nameservers - `custom.tenant` for tenant custom nameservers
See [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/) for more information.
const ( AccountSettingsDefaultNameserversCloudflareStandard AccountSettingsDefaultNameservers = "cloudflare.standard" AccountSettingsDefaultNameserversCustomAccount AccountSettingsDefaultNameservers = "custom.account" AccountSettingsDefaultNameserversCustomTenant AccountSettingsDefaultNameservers = "custom.tenant" )
func (AccountSettingsDefaultNameservers) IsKnown ¶
func (r AccountSettingsDefaultNameservers) IsKnown() bool
type AccountSettingsParam ¶
type AccountSettingsParam struct { // Specifies the default nameservers to be used for new zones added to this // account. // // - `cloudflare.standard` for Cloudflare-branded nameservers // - `custom.account` for account custom nameservers // - `custom.tenant` for tenant custom nameservers // // See // [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/) // for more information. DefaultNameservers param.Field[AccountSettingsDefaultNameservers] `json:"default_nameservers"` // Indicates whether membership in this account requires that Two-Factor // Authentication is enabled EnforceTwofactor param.Field[bool] `json:"enforce_twofactor"` // Indicates whether new zones should use the account-level custom nameservers by // default. // // Deprecated in favor of `default_nameservers`. UseAccountCustomNSByDefault param.Field[bool] `json:"use_account_custom_ns_by_default"` }
Account settings
func (AccountSettingsParam) MarshalJSON ¶
func (r AccountSettingsParam) MarshalJSON() (data []byte, err error)
type AccountUpdateParams ¶
type AccountUpdateParams struct { AccountID param.Field[interface{}] `path:"account_id,required"` Account AccountParam `json:"account,required"` }
func (AccountUpdateParams) MarshalJSON ¶
func (r AccountUpdateParams) MarshalJSON() (data []byte, err error)
type AccountUpdateResponseEnvelope ¶
type AccountUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result AccountUpdateResponseUnion `json:"result,required"` // Whether the API call was successful Success AccountUpdateResponseEnvelopeSuccess `json:"success,required"` JSON accountUpdateResponseEnvelopeJSON `json:"-"` }
func (*AccountUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *AccountUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AccountUpdateResponseEnvelopeSuccess ¶
type AccountUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AccountUpdateResponseEnvelopeSuccessTrue AccountUpdateResponseEnvelopeSuccess = true
)
func (AccountUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r AccountUpdateResponseEnvelopeSuccess) IsKnown() bool
type AccountUpdateResponseUnion ¶
type AccountUpdateResponseUnion interface {
ImplementsAccountsAccountUpdateResponseUnion()
}
Union satisfied by accounts.AccountUpdateResponseUnknown or shared.UnionString.
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 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 CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type MemberDeleteParams ¶
type MemberDeleteResponse ¶
type MemberDeleteResponse struct { // Identifier ID string `json:"id,required"` JSON memberDeleteResponseJSON `json:"-"` }
func (*MemberDeleteResponse) UnmarshalJSON ¶
func (r *MemberDeleteResponse) UnmarshalJSON(data []byte) (err error)
type MemberDeleteResponseEnvelope ¶
type MemberDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MemberDeleteResponse `json:"result,required,nullable"` // Whether the API call was successful Success MemberDeleteResponseEnvelopeSuccess `json:"success,required"` JSON memberDeleteResponseEnvelopeJSON `json:"-"` }
func (*MemberDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *MemberDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type MemberDeleteResponseEnvelopeSuccess ¶
type MemberDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MemberDeleteResponseEnvelopeSuccessTrue MemberDeleteResponseEnvelopeSuccess = true
)
func (MemberDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r MemberDeleteResponseEnvelopeSuccess) IsKnown() bool
type MemberGetParams ¶
type MemberGetResponseEnvelope ¶
type MemberGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result shared.Member `json:"result,required"` // Whether the API call was successful Success MemberGetResponseEnvelopeSuccess `json:"success,required"` JSON memberGetResponseEnvelopeJSON `json:"-"` }
func (*MemberGetResponseEnvelope) UnmarshalJSON ¶
func (r *MemberGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type MemberGetResponseEnvelopeSuccess ¶
type MemberGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MemberGetResponseEnvelopeSuccessTrue MemberGetResponseEnvelopeSuccess = true
)
func (MemberGetResponseEnvelopeSuccess) IsKnown ¶
func (r MemberGetResponseEnvelopeSuccess) IsKnown() bool
type MemberListParams ¶
type MemberListParams struct { AccountID param.Field[string] `path:"account_id,required"` // Direction to order results. Direction param.Field[MemberListParamsDirection] `query:"direction"` // Field to order results by. Order param.Field[MemberListParamsOrder] `query:"order"` // Page number of paginated results. Page param.Field[float64] `query:"page"` // Maximum number of results per page. PerPage param.Field[float64] `query:"per_page"` // A member's status in the account. Status param.Field[MemberListParamsStatus] `query:"status"` }
func (MemberListParams) URLQuery ¶
func (r MemberListParams) URLQuery() (v url.Values)
URLQuery serializes MemberListParams's query parameters as `url.Values`.
type MemberListParamsDirection ¶
type MemberListParamsDirection string
Direction to order results.
const ( MemberListParamsDirectionAsc MemberListParamsDirection = "asc" MemberListParamsDirectionDesc MemberListParamsDirection = "desc" )
func (MemberListParamsDirection) IsKnown ¶
func (r MemberListParamsDirection) IsKnown() bool
type MemberListParamsOrder ¶
type MemberListParamsOrder string
Field to order results by.
const ( MemberListParamsOrderUserFirstName MemberListParamsOrder = "user.first_name" MemberListParamsOrderUserLastName MemberListParamsOrder = "user.last_name" MemberListParamsOrderUserEmail MemberListParamsOrder = "user.email" MemberListParamsOrderStatus MemberListParamsOrder = "status" )
func (MemberListParamsOrder) IsKnown ¶
func (r MemberListParamsOrder) IsKnown() bool
type MemberListParamsStatus ¶
type MemberListParamsStatus string
A member's status in the account.
const ( MemberListParamsStatusAccepted MemberListParamsStatus = "accepted" MemberListParamsStatusPending MemberListParamsStatus = "pending" MemberListParamsStatusRejected MemberListParamsStatus = "rejected" )
func (MemberListParamsStatus) IsKnown ¶
func (r MemberListParamsStatus) IsKnown() bool
type MemberListResponse ¶
type MemberListResponse struct { // Identifier ID string `json:"id,required"` // The contact email address of the user. Email string `json:"email,required"` // Member Name. Name string `json:"name,required,nullable"` // Roles assigned to this Member. Roles []shared.Role `json:"roles,required"` // A member's status in the organization. Status MemberListResponseStatus `json:"status,required"` JSON memberListResponseJSON `json:"-"` }
func (*MemberListResponse) UnmarshalJSON ¶
func (r *MemberListResponse) UnmarshalJSON(data []byte) (err error)
type MemberListResponseStatus ¶
type MemberListResponseStatus string
A member's status in the organization.
const ( MemberListResponseStatusAccepted MemberListResponseStatus = "accepted" MemberListResponseStatusInvited MemberListResponseStatus = "invited" )
func (MemberListResponseStatus) IsKnown ¶
func (r MemberListResponseStatus) IsKnown() bool
type MemberNewParams ¶
type MemberNewParams struct { AccountID param.Field[string] `path:"account_id,required"` // The contact email address of the user. Email param.Field[string] `json:"email,required"` // Array of roles associated with this member. Roles param.Field[[]string] `json:"roles,required"` Status param.Field[MemberNewParamsStatus] `json:"status"` }
func (MemberNewParams) MarshalJSON ¶
func (r MemberNewParams) MarshalJSON() (data []byte, err error)
type MemberNewParamsStatus ¶
type MemberNewParamsStatus string
const ( MemberNewParamsStatusAccepted MemberNewParamsStatus = "accepted" MemberNewParamsStatusPending MemberNewParamsStatus = "pending" )
func (MemberNewParamsStatus) IsKnown ¶
func (r MemberNewParamsStatus) IsKnown() bool
type MemberNewResponseEnvelope ¶
type MemberNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result UserWithInviteCode `json:"result,required"` // Whether the API call was successful Success MemberNewResponseEnvelopeSuccess `json:"success,required"` JSON memberNewResponseEnvelopeJSON `json:"-"` }
func (*MemberNewResponseEnvelope) UnmarshalJSON ¶
func (r *MemberNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type MemberNewResponseEnvelopeSuccess ¶
type MemberNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MemberNewResponseEnvelopeSuccessTrue MemberNewResponseEnvelopeSuccess = true
)
func (MemberNewResponseEnvelopeSuccess) IsKnown ¶
func (r MemberNewResponseEnvelopeSuccess) IsKnown() bool
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 MemberService ¶
type MemberService struct {
Options []option.RequestOption
}
MemberService 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 NewMemberService method instead.
func NewMemberService ¶
func NewMemberService(opts ...option.RequestOption) (r *MemberService)
NewMemberService 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 (*MemberService) Delete ¶
func (r *MemberService) Delete(ctx context.Context, memberID string, body MemberDeleteParams, opts ...option.RequestOption) (res *MemberDeleteResponse, err error)
Remove a member from an account.
func (*MemberService) Get ¶
func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGetParams, opts ...option.RequestOption) (res *shared.Member, err error)
Get information about a specific member of an account.
func (*MemberService) List ¶
func (r *MemberService) List(ctx context.Context, params MemberListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[MemberListResponse], err error)
List all members of an account.
func (*MemberService) ListAutoPaging ¶
func (r *MemberService) ListAutoPaging(ctx context.Context, params MemberListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[MemberListResponse]
List all members of an account.
func (*MemberService) New ¶
func (r *MemberService) New(ctx context.Context, params MemberNewParams, opts ...option.RequestOption) (res *UserWithInviteCode, err error)
Add a user to the list of members for this account.
func (*MemberService) Update ¶
func (r *MemberService) Update(ctx context.Context, memberID string, params MemberUpdateParams, opts ...option.RequestOption) (res *shared.Member, err error)
Modify an account member.
type MemberUpdateParams ¶
type MemberUpdateParams struct { AccountID param.Field[string] `path:"account_id,required"` Member shared.MemberParam `json:"member,required"` }
func (MemberUpdateParams) MarshalJSON ¶
func (r MemberUpdateParams) MarshalJSON() (data []byte, err error)
type MemberUpdateResponseEnvelope ¶
type MemberUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result shared.Member `json:"result,required"` // Whether the API call was successful Success MemberUpdateResponseEnvelopeSuccess `json:"success,required"` JSON memberUpdateResponseEnvelopeJSON `json:"-"` }
func (*MemberUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *MemberUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type MemberUpdateResponseEnvelopeSuccess ¶
type MemberUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MemberUpdateResponseEnvelopeSuccessTrue MemberUpdateResponseEnvelopeSuccess = true
)
func (MemberUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r MemberUpdateResponseEnvelopeSuccess) IsKnown() bool
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 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 RoleGetParams ¶
type RoleGetResponseEnvelope ¶
type RoleGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result RoleGetResponseUnion `json:"result,required"` // Whether the API call was successful Success RoleGetResponseEnvelopeSuccess `json:"success,required"` JSON roleGetResponseEnvelopeJSON `json:"-"` }
func (*RoleGetResponseEnvelope) UnmarshalJSON ¶
func (r *RoleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RoleGetResponseEnvelopeSuccess ¶
type RoleGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
RoleGetResponseEnvelopeSuccessTrue RoleGetResponseEnvelopeSuccess = true
)
func (RoleGetResponseEnvelopeSuccess) IsKnown ¶
func (r RoleGetResponseEnvelopeSuccess) IsKnown() bool
type RoleGetResponseUnion ¶
type RoleGetResponseUnion interface {
ImplementsAccountsRoleGetResponseUnion()
}
Union satisfied by accounts.RoleGetResponseUnknown or shared.UnionString.
type RoleListParams ¶
type RoleService ¶
type RoleService struct {
Options []option.RequestOption
}
RoleService 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 NewRoleService method instead.
func NewRoleService ¶
func NewRoleService(opts ...option.RequestOption) (r *RoleService)
NewRoleService 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 (*RoleService) Get ¶
func (r *RoleService) Get(ctx context.Context, roleID interface{}, query RoleGetParams, opts ...option.RequestOption) (res *RoleGetResponseUnion, err error)
Get information about a specific role for an account.
func (*RoleService) List ¶
func (r *RoleService) List(ctx context.Context, query RoleListParams, opts ...option.RequestOption) (res *pagination.SinglePage[shared.Role], err error)
Get all available roles for an account.
func (*RoleService) ListAutoPaging ¶
func (r *RoleService) ListAutoPaging(ctx context.Context, query RoleListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[shared.Role]
Get all available roles for an account.
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 Status ¶ added in v2.2.0
type Status string
Whether the user is a member of the organization or has an inivitation pending.
type UserWithInviteCode ¶
type UserWithInviteCode struct { // Membership identifier tag. ID string `json:"id,required"` // Roles assigned to this member. Roles []UserWithInviteCodeRole `json:"roles,required"` Status interface{} `json:"status,required"` User UserWithInviteCodeUser `json:"user,required"` // The unique activation code for the account membership. Code string `json:"code"` JSON userWithInviteCodeJSON `json:"-"` }
func (*UserWithInviteCode) UnmarshalJSON ¶
func (r *UserWithInviteCode) UnmarshalJSON(data []byte) (err error)
type UserWithInviteCodeRole ¶
type UserWithInviteCodeRole struct { // Role identifier tag. ID string `json:"id,required"` // Description of role's permissions. Description string `json:"description,required"` // Role name. Name string `json:"name,required"` Permissions UserWithInviteCodeRolesPermissions `json:"permissions,required"` JSON userWithInviteCodeRoleJSON `json:"-"` }
func (*UserWithInviteCodeRole) UnmarshalJSON ¶
func (r *UserWithInviteCodeRole) UnmarshalJSON(data []byte) (err error)
type UserWithInviteCodeRolesPermissions ¶
type UserWithInviteCodeRolesPermissions 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 userWithInviteCodeRolesPermissionsJSON `json:"-"` }
func (*UserWithInviteCodeRolesPermissions) UnmarshalJSON ¶
func (r *UserWithInviteCodeRolesPermissions) UnmarshalJSON(data []byte) (err error)
type UserWithInviteCodeUser ¶
type UserWithInviteCodeUser struct { // The contact email address of the user. Email string `json:"email,required"` // Identifier ID string `json:"id"` // User's first name FirstName string `json:"first_name,nullable"` // User's last name LastName string `json:"last_name,nullable"` // Indicates whether two-factor authentication is enabled for the user account. // Does not apply to API authentication. TwoFactorAuthenticationEnabled bool `json:"two_factor_authentication_enabled"` JSON userWithInviteCodeUserJSON `json:"-"` }
func (*UserWithInviteCodeUser) UnmarshalJSON ¶
func (r *UserWithInviteCodeUser) UnmarshalJSON(data []byte) (err error)