memberships

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type 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 Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type Member added in v2.1.0

type Member = shared.Member

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

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

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

type MembershipListParamsAccount struct {
	// Account name
	Name param.Field[string] `query:"name"`
}

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

List memberships of accounts the user can access.

func (*MembershipService) ListAutoPaging

List memberships of accounts the user can access.

func (*MembershipService) Update

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

type MembershipUpdateResponseUnion

type MembershipUpdateResponseUnion interface {
	ImplementsMembershipsMembershipUpdateResponseUnion()
}

Union satisfied by memberships.MembershipUpdateResponseUnknown or shared.UnionString.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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