Documentation ¶
Index ¶
- type Error
- type Membership
- type MembershipDeleteResponse
- type MembershipDeleteResponseEnvelope
- type MembershipDeleteResponseEnvelopeErrors
- type MembershipDeleteResponseEnvelopeMessages
- type MembershipDeleteResponseEnvelopeSuccess
- type MembershipGetResponse
- type MembershipGetResponseEnvelope
- type MembershipGetResponseEnvelopeErrors
- type MembershipGetResponseEnvelopeMessages
- type MembershipGetResponseEnvelopeSuccess
- type MembershipListParams
- type MembershipListParamsAccount
- type MembershipListParamsDirection
- type MembershipListParamsOrder
- type MembershipListParamsStatus
- type MembershipPermissions
- type MembershipPermissionsAnalytics
- type MembershipPermissionsBilling
- type MembershipPermissionsCachePurge
- type MembershipPermissionsDNS
- type MembershipPermissionsDNSRecords
- type MembershipPermissionsLb
- type MembershipPermissionsLogs
- type MembershipPermissionsOrganization
- type MembershipPermissionsSSL
- type MembershipPermissionsWAF
- type MembershipPermissionsZoneSettings
- type MembershipPermissionsZones
- type MembershipService
- func (r *MembershipService) Delete(ctx context.Context, membershipID string, opts ...option.RequestOption) (res *MembershipDeleteResponse, err error)
- func (r *MembershipService) Get(ctx context.Context, membershipID string, opts ...option.RequestOption) (res *MembershipGetResponse, err error)
- func (r *MembershipService) List(ctx context.Context, query MembershipListParams, opts ...option.RequestOption) (res *shared.V4PagePaginationArray[Membership], err error)
- func (r *MembershipService) ListAutoPaging(ctx context.Context, query MembershipListParams, opts ...option.RequestOption) *shared.V4PagePaginationArrayAutoPager[Membership]
- func (r *MembershipService) Update(ctx context.Context, membershipID string, body MembershipUpdateParams, ...) (res *MembershipUpdateResponse, err error)
- type MembershipStatus
- type MembershipUpdateParams
- type MembershipUpdateParamsStatus
- type MembershipUpdateResponse
- type MembershipUpdateResponseEnvelope
- type MembershipUpdateResponseEnvelopeErrors
- type MembershipUpdateResponseEnvelopeMessages
- type MembershipUpdateResponseEnvelopeSuccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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 []MembershipDeleteResponseEnvelopeErrors `json:"errors,required"` Messages []MembershipDeleteResponseEnvelopeMessages `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 MembershipDeleteResponseEnvelopeErrors ¶
type MembershipDeleteResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON membershipDeleteResponseEnvelopeErrorsJSON `json:"-"` }
func (*MembershipDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *MembershipDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type MembershipDeleteResponseEnvelopeMessages ¶
type MembershipDeleteResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON membershipDeleteResponseEnvelopeMessagesJSON `json:"-"` }
func (*MembershipDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *MembershipDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type MembershipDeleteResponseEnvelopeSuccess ¶
type MembershipDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MembershipDeleteResponseEnvelopeSuccessTrue MembershipDeleteResponseEnvelopeSuccess = true
)
type MembershipGetResponse ¶ added in v2.3.0
type MembershipGetResponse interface {
ImplementsMembershipsMembershipGetResponse()
}
Union satisfied by memberships.MembershipGetResponseUnknown or shared.UnionString.
type MembershipGetResponseEnvelope ¶
type MembershipGetResponseEnvelope struct { Errors []MembershipGetResponseEnvelopeErrors `json:"errors,required"` Messages []MembershipGetResponseEnvelopeMessages `json:"messages,required"` Result MembershipGetResponse `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 MembershipGetResponseEnvelopeErrors ¶
type MembershipGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON membershipGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*MembershipGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *MembershipGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type MembershipGetResponseEnvelopeMessages ¶
type MembershipGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON membershipGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*MembershipGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *MembershipGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type MembershipGetResponseEnvelopeSuccess ¶
type MembershipGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MembershipGetResponseEnvelopeSuccessTrue MembershipGetResponseEnvelopeSuccess = true
)
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" )
type MembershipListParamsOrder ¶
type MembershipListParamsOrder string
Field to order memberships by.
const ( MembershipListParamsOrderID MembershipListParamsOrder = "id" MembershipListParamsOrderAccountName MembershipListParamsOrder = "account.name" MembershipListParamsOrderStatus MembershipListParamsOrder = "status" )
type MembershipListParamsStatus ¶
type MembershipListParamsStatus string
Status of this membership.
const ( MembershipListParamsStatusAccepted MembershipListParamsStatus = "accepted" MembershipListParamsStatusPending MembershipListParamsStatus = "pending" MembershipListParamsStatusRejected MembershipListParamsStatus = "rejected" )
type MembershipPermissions ¶
type MembershipPermissions struct { Analytics MembershipPermissionsAnalytics `json:"analytics"` Billing MembershipPermissionsBilling `json:"billing"` CachePurge MembershipPermissionsCachePurge `json:"cache_purge"` DNS MembershipPermissionsDNS `json:"dns"` DNSRecords MembershipPermissionsDNSRecords `json:"dns_records"` Lb MembershipPermissionsLb `json:"lb"` Logs MembershipPermissionsLogs `json:"logs"` Organization MembershipPermissionsOrganization `json:"organization"` SSL MembershipPermissionsSSL `json:"ssl"` WAF MembershipPermissionsWAF `json:"waf"` ZoneSettings MembershipPermissionsZoneSettings `json:"zone_settings"` Zones MembershipPermissionsZones `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 MembershipPermissionsAnalytics ¶
type MembershipPermissionsAnalytics struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsAnalyticsJSON `json:"-"` }
func (*MembershipPermissionsAnalytics) UnmarshalJSON ¶
func (r *MembershipPermissionsAnalytics) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsBilling ¶
type MembershipPermissionsBilling struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsBillingJSON `json:"-"` }
func (*MembershipPermissionsBilling) UnmarshalJSON ¶
func (r *MembershipPermissionsBilling) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsCachePurge ¶
type MembershipPermissionsCachePurge struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsCachePurgeJSON `json:"-"` }
func (*MembershipPermissionsCachePurge) UnmarshalJSON ¶
func (r *MembershipPermissionsCachePurge) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsDNS ¶
type MembershipPermissionsDNS struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsDNSJSON `json:"-"` }
func (*MembershipPermissionsDNS) UnmarshalJSON ¶
func (r *MembershipPermissionsDNS) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsDNSRecords ¶
type MembershipPermissionsDNSRecords struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsDNSRecordsJSON `json:"-"` }
func (*MembershipPermissionsDNSRecords) UnmarshalJSON ¶
func (r *MembershipPermissionsDNSRecords) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsLb ¶
type MembershipPermissionsLb struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsLbJSON `json:"-"` }
func (*MembershipPermissionsLb) UnmarshalJSON ¶
func (r *MembershipPermissionsLb) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsLogs ¶
type MembershipPermissionsLogs struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsLogsJSON `json:"-"` }
func (*MembershipPermissionsLogs) UnmarshalJSON ¶
func (r *MembershipPermissionsLogs) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsOrganization ¶
type MembershipPermissionsOrganization struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsOrganizationJSON `json:"-"` }
func (*MembershipPermissionsOrganization) UnmarshalJSON ¶
func (r *MembershipPermissionsOrganization) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsSSL ¶
type MembershipPermissionsSSL struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsSSLJSON `json:"-"` }
func (*MembershipPermissionsSSL) UnmarshalJSON ¶
func (r *MembershipPermissionsSSL) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsWAF ¶
type MembershipPermissionsWAF struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsWAFJSON `json:"-"` }
func (*MembershipPermissionsWAF) UnmarshalJSON ¶
func (r *MembershipPermissionsWAF) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsZoneSettings ¶
type MembershipPermissionsZoneSettings struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsZoneSettingsJSON `json:"-"` }
func (*MembershipPermissionsZoneSettings) UnmarshalJSON ¶
func (r *MembershipPermissionsZoneSettings) UnmarshalJSON(data []byte) (err error)
type MembershipPermissionsZones ¶
type MembershipPermissionsZones struct { Read bool `json:"read"` Write bool `json:"write"` JSON membershipPermissionsZonesJSON `json:"-"` }
func (*MembershipPermissionsZones) UnmarshalJSON ¶
func (r *MembershipPermissionsZones) 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, 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 *MembershipGetResponse, err error)
Get a specific membership.
func (*MembershipService) List ¶
func (r *MembershipService) List(ctx context.Context, query MembershipListParams, opts ...option.RequestOption) (res *shared.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) *shared.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 *MembershipUpdateResponse, 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" )
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" )
type MembershipUpdateResponse ¶ added in v2.3.0
type MembershipUpdateResponse interface {
ImplementsMembershipsMembershipUpdateResponse()
}
Union satisfied by memberships.MembershipUpdateResponseUnknown or shared.UnionString.
type MembershipUpdateResponseEnvelope ¶
type MembershipUpdateResponseEnvelope struct { Errors []MembershipUpdateResponseEnvelopeErrors `json:"errors,required"` Messages []MembershipUpdateResponseEnvelopeMessages `json:"messages,required"` Result MembershipUpdateResponse `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 MembershipUpdateResponseEnvelopeErrors ¶
type MembershipUpdateResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON membershipUpdateResponseEnvelopeErrorsJSON `json:"-"` }
func (*MembershipUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *MembershipUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type MembershipUpdateResponseEnvelopeMessages ¶
type MembershipUpdateResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON membershipUpdateResponseEnvelopeMessagesJSON `json:"-"` }
func (*MembershipUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *MembershipUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type MembershipUpdateResponseEnvelopeSuccess ¶
type MembershipUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
MembershipUpdateResponseEnvelopeSuccessTrue MembershipUpdateResponseEnvelopeSuccess = true
)