Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AppDeleteParams
- type AppDeleteResponse
- type AppDeleteResponseEnvelope
- type AppDeleteResponseEnvelopeErrors
- type AppDeleteResponseEnvelopeMessages
- type AppEvaluateGetParams
- type AppEvaluateGetResponse
- type AppEvaluateGetResponseReason
- type AppEvaluateGetResponseValueArray
- type AppEvaluateGetResponseValueMap
- type AppEvaluateGetResponseValueUnion
- type AppEvaluateService
- type AppFlagChangelogListParams
- type AppFlagChangelogListResponse
- type AppFlagChangelogListResponseEvent
- type AppFlagChangelogListResponseObject
- type AppFlagChangelogListResponseObjectAfter
- type AppFlagChangelogListResponseObjectAfterRule
- type AppFlagChangelogListResponseObjectAfterRulesCondition
- type AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperator
- type AppFlagChangelogListResponseObjectAfterRulesConditionsObject
- type AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator
- type AppFlagChangelogListResponseObjectAfterRulesConditionsOperator
- type AppFlagChangelogListResponseObjectAfterRulesConditionsUnion
- type AppFlagChangelogListResponseObjectAfterRulesRollout
- type AppFlagChangelogListResponseObjectAfterType
- type AppFlagChangelogListResponseObjectAfterVariationsArray
- type AppFlagChangelogListResponseObjectAfterVariationsMap
- type AppFlagChangelogListResponseObjectAfterVariationsUnion
- type AppFlagChangelogListResponseObjectEvent
- type AppFlagChangelogListResponseUnion
- type AppFlagChangelogService
- func (r *AppFlagChangelogService) List(ctx context.Context, appID string, flagKey string, ...) (res *pagination.CursorPaginationAfter[AppFlagChangelogListResponse], err error)
- func (r *AppFlagChangelogService) ListAutoPaging(ctx context.Context, appID string, flagKey string, ...) *pagination.CursorPaginationAfterAutoPager[AppFlagChangelogListResponse]
- type AppFlagDeleteParams
- type AppFlagDeleteResponse
- type AppFlagDeleteResponseEnvelope
- type AppFlagDeleteResponseEnvelopeErrors
- type AppFlagDeleteResponseEnvelopeMessages
- type AppFlagGetParams
- type AppFlagGetResponse
- type AppFlagGetResponseEnvelope
- type AppFlagGetResponseEnvelopeErrors
- type AppFlagGetResponseEnvelopeMessages
- type AppFlagGetResponseRule
- type AppFlagGetResponseRulesCondition
- type AppFlagGetResponseRulesConditionsLogicalOperator
- type AppFlagGetResponseRulesConditionsObject
- type AppFlagGetResponseRulesConditionsObjectOperator
- type AppFlagGetResponseRulesConditionsOperator
- type AppFlagGetResponseRulesConditionsUnion
- type AppFlagGetResponseRulesRollout
- type AppFlagGetResponseType
- type AppFlagGetResponseVariationsArray
- type AppFlagGetResponseVariationsMap
- type AppFlagGetResponseVariationsUnion
- type AppFlagListParams
- type AppFlagListResponse
- type AppFlagListResponseRule
- type AppFlagListResponseRulesCondition
- type AppFlagListResponseRulesConditionsLogicalOperator
- type AppFlagListResponseRulesConditionsObject
- type AppFlagListResponseRulesConditionsObjectOperator
- type AppFlagListResponseRulesConditionsOperator
- type AppFlagListResponseRulesConditionsUnion
- type AppFlagListResponseRulesRollout
- type AppFlagListResponseType
- type AppFlagListResponseVariationsArray
- type AppFlagListResponseVariationsMap
- type AppFlagListResponseVariationsUnion
- type AppFlagNewParams
- type AppFlagNewParamsRule
- type AppFlagNewParamsRulesCondition
- type AppFlagNewParamsRulesConditionUnion
- type AppFlagNewParamsRulesConditionsLogicalOperator
- type AppFlagNewParamsRulesConditionsObject
- type AppFlagNewParamsRulesConditionsObjectOperator
- type AppFlagNewParamsRulesConditionsOperator
- type AppFlagNewParamsRulesRollout
- type AppFlagNewParamsType
- type AppFlagNewParamsVariationsArray
- type AppFlagNewParamsVariationsMap
- type AppFlagNewParamsVariationsUnion
- type AppFlagNewResponse
- type AppFlagNewResponseEnvelope
- type AppFlagNewResponseEnvelopeErrors
- type AppFlagNewResponseEnvelopeMessages
- type AppFlagNewResponseRule
- type AppFlagNewResponseRulesCondition
- type AppFlagNewResponseRulesConditionsLogicalOperator
- type AppFlagNewResponseRulesConditionsObject
- type AppFlagNewResponseRulesConditionsObjectOperator
- type AppFlagNewResponseRulesConditionsOperator
- type AppFlagNewResponseRulesConditionsUnion
- type AppFlagNewResponseRulesRollout
- type AppFlagNewResponseType
- type AppFlagNewResponseVariationsArray
- type AppFlagNewResponseVariationsMap
- type AppFlagNewResponseVariationsUnion
- type AppFlagService
- func (r *AppFlagService) Delete(ctx context.Context, appID string, flagKey string, body AppFlagDeleteParams, ...) (res *AppFlagDeleteResponse, err error)
- func (r *AppFlagService) Get(ctx context.Context, appID string, flagKey string, query AppFlagGetParams, ...) (res *AppFlagGetResponse, err error)
- func (r *AppFlagService) List(ctx context.Context, appID string, params AppFlagListParams, ...) (res *pagination.CursorPaginationAfter[AppFlagListResponse], err error)
- func (r *AppFlagService) ListAutoPaging(ctx context.Context, appID string, params AppFlagListParams, ...) *pagination.CursorPaginationAfterAutoPager[AppFlagListResponse]
- func (r *AppFlagService) New(ctx context.Context, appID string, params AppFlagNewParams, ...) (res *AppFlagNewResponse, err error)
- func (r *AppFlagService) Update(ctx context.Context, appID string, flagKey string, params AppFlagUpdateParams, ...) (res *AppFlagUpdateResponse, err error)
- type AppFlagUpdateParams
- type AppFlagUpdateParamsRule
- type AppFlagUpdateParamsRulesCondition
- type AppFlagUpdateParamsRulesConditionUnion
- type AppFlagUpdateParamsRulesConditionsLogicalOperator
- type AppFlagUpdateParamsRulesConditionsObject
- type AppFlagUpdateParamsRulesConditionsObjectOperator
- type AppFlagUpdateParamsRulesConditionsOperator
- type AppFlagUpdateParamsRulesRollout
- type AppFlagUpdateParamsType
- type AppFlagUpdateParamsVariationsArray
- type AppFlagUpdateParamsVariationsMap
- type AppFlagUpdateParamsVariationsUnion
- type AppFlagUpdateResponse
- type AppFlagUpdateResponseEnvelope
- type AppFlagUpdateResponseEnvelopeErrors
- type AppFlagUpdateResponseEnvelopeMessages
- type AppFlagUpdateResponseRule
- type AppFlagUpdateResponseRulesCondition
- type AppFlagUpdateResponseRulesConditionsLogicalOperator
- type AppFlagUpdateResponseRulesConditionsObject
- type AppFlagUpdateResponseRulesConditionsObjectOperator
- type AppFlagUpdateResponseRulesConditionsOperator
- type AppFlagUpdateResponseRulesConditionsUnion
- type AppFlagUpdateResponseRulesRollout
- type AppFlagUpdateResponseType
- type AppFlagUpdateResponseVariationsArray
- type AppFlagUpdateResponseVariationsMap
- type AppFlagUpdateResponseVariationsUnion
- type AppGetParams
- type AppGetResponse
- type AppGetResponseEnvelope
- type AppGetResponseEnvelopeErrors
- type AppGetResponseEnvelopeMessages
- type AppListParams
- type AppListResponse
- type AppNewParams
- type AppNewResponse
- type AppNewResponseEnvelope
- type AppNewResponseEnvelopeErrors
- type AppNewResponseEnvelopeMessages
- type AppService
- func (r *AppService) Delete(ctx context.Context, appID string, body AppDeleteParams, ...) (res *AppDeleteResponse, err error)
- func (r *AppService) Get(ctx context.Context, appID string, query AppGetParams, ...) (res *AppGetResponse, err error)
- func (r *AppService) List(ctx context.Context, query AppListParams, opts ...option.RequestOption) (res *pagination.SinglePage[AppListResponse], err error)
- func (r *AppService) ListAutoPaging(ctx context.Context, query AppListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[AppListResponse]
- func (r *AppService) New(ctx context.Context, params AppNewParams, opts ...option.RequestOption) (res *AppNewResponse, err error)
- func (r *AppService) Update(ctx context.Context, appID string, params AppUpdateParams, ...) (res *AppUpdateResponse, err error)
- type AppUpdateParams
- type AppUpdateResponse
- type AppUpdateResponseEnvelope
- type AppUpdateResponseEnvelopeErrors
- type AppUpdateResponseEnvelopeMessages
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConfigSrc
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type ErrorDataSource
- type FlagshipService
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesIAMResourcesTypeObjectNested
- type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
- type TokenPolicyResourcesIAMResourcesTypeObjectString
- type TokenPolicyResourcesIAMResourcesTypeObjectStringParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- type TokenStatus
- type TokenValue
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 CertificateCASSLCom = shared.CertificateCASSLCom
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 CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare
This is an alias to an internal value.
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal
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 CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
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 RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
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.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppDeleteParams ¶
type AppDeleteResponse ¶
type AppDeleteResponse struct {
ID string `json:"id" api:"required"`
JSON appDeleteResponseJSON `json:"-"`
}
func (*AppDeleteResponse) UnmarshalJSON ¶
func (r *AppDeleteResponse) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelope ¶
type AppDeleteResponseEnvelope struct {
Errors []AppDeleteResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppDeleteResponseEnvelopeMessages `json:"messages" api:"required"`
Result AppDeleteResponse `json:"result" api:"required"`
Success bool `json:"success" api:"required"`
JSON appDeleteResponseEnvelopeJSON `json:"-"`
}
func (*AppDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeErrors ¶
type AppDeleteResponseEnvelopeErrors struct {
Message string `json:"message" api:"required"`
JSON appDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeMessages ¶
type AppDeleteResponseEnvelopeMessages struct {
Message string `json:"message" api:"required"`
JSON appDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppEvaluateGetParams ¶
type AppEvaluateGetParams struct {
// Cloudflare account ID.
AccountID param.Field[string] `path:"account_id" api:"required"`
// The flag key to evaluate.
FlagKey param.Field[string] `query:"flagKey" api:"required"`
// Context targeting key (per OpenFeature spec); used for percentage rollout
// bucketing.
TargetingKey param.Field[string] `query:"targetingKey"`
}
func (AppEvaluateGetParams) URLQuery ¶
func (r AppEvaluateGetParams) URLQuery() (v url.Values)
URLQuery serializes AppEvaluateGetParams's query parameters as `url.Values`.
type AppEvaluateGetResponse ¶
type AppEvaluateGetResponse struct {
FlagKey string `json:"flagKey" api:"required"`
Reason AppEvaluateGetResponseReason `json:"reason" api:"required"`
Variant string `json:"variant" api:"required"`
Value AppEvaluateGetResponseValueUnion `json:"value"`
JSON appEvaluateGetResponseJSON `json:"-"`
}
func (*AppEvaluateGetResponse) UnmarshalJSON ¶
func (r *AppEvaluateGetResponse) UnmarshalJSON(data []byte) (err error)
type AppEvaluateGetResponseReason ¶
type AppEvaluateGetResponseReason string
const ( AppEvaluateGetResponseReasonTargetingMatch AppEvaluateGetResponseReason = "TARGETING_MATCH" AppEvaluateGetResponseReasonDefault AppEvaluateGetResponseReason = "DEFAULT" AppEvaluateGetResponseReasonDisabled AppEvaluateGetResponseReason = "DISABLED" AppEvaluateGetResponseReasonSplit AppEvaluateGetResponseReason = "SPLIT" )
func (AppEvaluateGetResponseReason) IsKnown ¶
func (r AppEvaluateGetResponseReason) IsKnown() bool
type AppEvaluateGetResponseValueArray ¶
type AppEvaluateGetResponseValueArray []interface{}
func (AppEvaluateGetResponseValueArray) ImplementsAppEvaluateGetResponseValueUnion ¶
func (r AppEvaluateGetResponseValueArray) ImplementsAppEvaluateGetResponseValueUnion()
type AppEvaluateGetResponseValueMap ¶
type AppEvaluateGetResponseValueMap map[string]interface{}
func (AppEvaluateGetResponseValueMap) ImplementsAppEvaluateGetResponseValueUnion ¶
func (r AppEvaluateGetResponseValueMap) ImplementsAppEvaluateGetResponseValueUnion()
type AppEvaluateGetResponseValueUnion ¶
type AppEvaluateGetResponseValueUnion interface {
ImplementsAppEvaluateGetResponseValueUnion()
}
Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, AppEvaluateGetResponseValueMap or AppEvaluateGetResponseValueArray.
type AppEvaluateService ¶
type AppEvaluateService struct {
Options []option.RequestOption
}
AppEvaluateService 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 NewAppEvaluateService method instead.
func NewAppEvaluateService ¶
func NewAppEvaluateService(opts ...option.RequestOption) (r *AppEvaluateService)
NewAppEvaluateService 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 (*AppEvaluateService) Get ¶
func (r *AppEvaluateService) Get(ctx context.Context, appID string, params AppEvaluateGetParams, opts ...option.RequestOption) (res *AppEvaluateGetResponse, err error)
Evaluates a flag against the provided context. Pass context attributes as query parameters; boolean and numeric strings are coerced automatically. For low-latency in-Worker evaluation, prefer the Flagship binding over this endpoint.
type AppFlagChangelogListParams ¶
type AppFlagChangelogListParams struct {
// Cloudflare account ID.
AccountID param.Field[string] `path:"account_id" api:"required"`
// Pagination cursor from a previous response.
Cursor param.Field[string] `query:"cursor"`
// Max items to return (1–200).
Limit param.Field[string] `query:"limit"`
}
func (AppFlagChangelogListParams) URLQuery ¶
func (r AppFlagChangelogListParams) URLQuery() (v url.Values)
URLQuery serializes AppFlagChangelogListParams's query parameters as `url.Values`.
type AppFlagChangelogListResponse ¶
type AppFlagChangelogListResponse struct {
// This field can have the runtime type of
// [AppFlagChangelogListResponseObjectAfter].
After interface{} `json:"after" api:"required"`
Event AppFlagChangelogListResponseEvent `json:"event" api:"required"`
FlagKey string `json:"flag_key" api:"required"`
// This field can have the runtime type of
// [map[string]AppFlagChangelogListResponseObjectDiff].
Diff interface{} `json:"diff"`
JSON appFlagChangelogListResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppFlagChangelogListResponse) AsUnion ¶
func (r AppFlagChangelogListResponse) AsUnion() AppFlagChangelogListResponseUnion
AsUnion returns a AppFlagChangelogListResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppFlagChangelogListResponseObject, AppFlagChangelogListResponseObject, AppFlagChangelogListResponseObject.
func (*AppFlagChangelogListResponse) UnmarshalJSON ¶
func (r *AppFlagChangelogListResponse) UnmarshalJSON(data []byte) (err error)
type AppFlagChangelogListResponseEvent ¶
type AppFlagChangelogListResponseEvent string
const ( AppFlagChangelogListResponseEventCreate AppFlagChangelogListResponseEvent = "create" AppFlagChangelogListResponseEventDelete AppFlagChangelogListResponseEvent = "delete" AppFlagChangelogListResponseEventUpdate AppFlagChangelogListResponseEvent = "update" )
func (AppFlagChangelogListResponseEvent) IsKnown ¶
func (r AppFlagChangelogListResponseEvent) IsKnown() bool
type AppFlagChangelogListResponseObject ¶
type AppFlagChangelogListResponseObject struct {
After AppFlagChangelogListResponseObjectAfter `json:"after" api:"required"`
Event AppFlagChangelogListResponseObjectEvent `json:"event" api:"required"`
FlagKey string `json:"flag_key" api:"required"`
JSON appFlagChangelogListResponseObjectJSON `json:"-"`
}
func (*AppFlagChangelogListResponseObject) UnmarshalJSON ¶
func (r *AppFlagChangelogListResponseObject) UnmarshalJSON(data []byte) (err error)
type AppFlagChangelogListResponseObjectAfter ¶
type AppFlagChangelogListResponseObjectAfter struct {
// Variation served when no rule matches or the flag is disabled. Must be a key in
// `variations`.
DefaultVariation string `json:"default_variation" api:"required"`
// When false, the flag bypasses all rules and always serves `default_variation`.
Enabled bool `json:"enabled" api:"required"`
// Unique identifier for the flag within an app. Used in all evaluation and SDK
// calls.
Key string `json:"key" api:"required"`
// Targeting rules evaluated in ascending `priority`; the first matching rule wins.
// An empty array means the flag always serves `default_variation`.
Rules []AppFlagChangelogListResponseObjectAfterRule `json:"rules" api:"required"`
// Map of variation name to value. All values must be the same type (boolean,
// string, number, or JSON object/array). Each serialized value must be 10KB or
// smaller.
Variations map[string]AppFlagChangelogListResponseObjectAfterVariationsUnion `json:"variations" api:"required"`
Description string `json:"description" api:"nullable"`
// Value type of the flag's variations. Inferred from the variation values on
// write, so it may be omitted in requests.
Type AppFlagChangelogListResponseObjectAfterType `json:"type"`
UpdatedAt string `json:"updated_at"`
UpdatedBy string `json:"updated_by"`
JSON appFlagChangelogListResponseObjectAfterJSON `json:"-"`
}
func (*AppFlagChangelogListResponseObjectAfter) UnmarshalJSON ¶
func (r *AppFlagChangelogListResponseObjectAfter) UnmarshalJSON(data []byte) (err error)
type AppFlagChangelogListResponseObjectAfterRule ¶
type AppFlagChangelogListResponseObjectAfterRule struct {
// Conditions the context must satisfy for this rule to match. An empty array
// matches all contexts.
Conditions []AppFlagChangelogListResponseObjectAfterRulesCondition `json:"conditions" api:"required"`
// Evaluation order; lower numbers are evaluated first. Must be unique across the
// flag's rules.
Priority int64 `json:"priority" api:"required"`
// Variation served when this rule matches. Must be a key in `variations`.
ServeVariation string `json:"serve_variation" api:"required"`
Rollout AppFlagChangelogListResponseObjectAfterRulesRollout `json:"rollout"`
JSON appFlagChangelogListResponseObjectAfterRuleJSON `json:"-"`
}
func (*AppFlagChangelogListResponseObjectAfterRule) UnmarshalJSON ¶
func (r *AppFlagChangelogListResponseObjectAfterRule) UnmarshalJSON(data []byte) (err error)
type AppFlagChangelogListResponseObjectAfterRulesCondition ¶
type AppFlagChangelogListResponseObjectAfterRulesCondition struct {
Attribute string `json:"attribute"`
// This field can have the runtime type of
// [[]AppFlagChangelogListResponseObjectAfterRulesConditionsObjectClause].
Clauses interface{} `json:"clauses"`
LogicalOperator AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperator `json:"logical_operator"`
Operator AppFlagChangelogListResponseObjectAfterRulesConditionsOperator `json:"operator"`
// This field can have the runtime type of [interface{}].
Value interface{} `json:"value"`
JSON appFlagChangelogListResponseObjectAfterRulesConditionJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppFlagChangelogListResponseObjectAfterRulesCondition) AsUnion ¶
func (r AppFlagChangelogListResponseObjectAfterRulesCondition) AsUnion() AppFlagChangelogListResponseObjectAfterRulesConditionsUnion
AsUnion returns a AppFlagChangelogListResponseObjectAfterRulesConditionsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppFlagChangelogListResponseObjectAfterRulesConditionsObject, AppFlagChangelogListResponseObjectAfterRulesConditionsObject.
func (*AppFlagChangelogListResponseObjectAfterRulesCondition) UnmarshalJSON ¶
func (r *AppFlagChangelogListResponseObjectAfterRulesCondition) UnmarshalJSON(data []byte) (err error)
type AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperator ¶
type AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperator string
const ( AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperatorAnd AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperator = "AND" AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperatorOr AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperator = "OR" )
func (AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperator) IsKnown ¶
func (r AppFlagChangelogListResponseObjectAfterRulesConditionsLogicalOperator) IsKnown() bool
type AppFlagChangelogListResponseObjectAfterRulesConditionsObject ¶
type AppFlagChangelogListResponseObjectAfterRulesConditionsObject struct {
Attribute string `json:"attribute" api:"required"`
Operator AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator `json:"operator" api:"required"`
// Value to compare against the context attribute. Must be an array for `in` and
// `not_in`; numeric and ISO-8601 datetime strings are accepted by the ordering
// operators.
Value interface{} `json:"value" api:"required"`
JSON appFlagChangelogListResponseObjectAfterRulesConditionsObjectJSON `json:"-"`
}
func (*AppFlagChangelogListResponseObjectAfterRulesConditionsObject) UnmarshalJSON ¶
func (r *AppFlagChangelogListResponseObjectAfterRulesConditionsObject) UnmarshalJSON(data []byte) (err error)
type AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator ¶
type AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator string
const ( AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorEquals AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "equals" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorNotEquals AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "not_equals" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorGreaterThan AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "greater_than" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorLessThan AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "less_than" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorGreaterThanOrEquals AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "greater_than_or_equals" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorLessThanOrEquals AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "less_than_or_equals" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorContains AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "contains" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorStartsWith AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "starts_with" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorEndsWith AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "ends_with" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorIn AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "in" AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperatorNotIn AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator = "not_in" )
func (AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator) IsKnown ¶
func (r AppFlagChangelogListResponseObjectAfterRulesConditionsObjectOperator) IsKnown() bool
type AppFlagChangelogListResponseObjectAfterRulesConditionsOperator ¶
type AppFlagChangelogListResponseObjectAfterRulesConditionsOperator string
const ( AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorEquals AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "equals" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorNotEquals AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "not_equals" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorGreaterThan AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "greater_than" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorLessThan AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "less_than" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorGreaterThanOrEquals AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "greater_than_or_equals" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorLessThanOrEquals AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "less_than_or_equals" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorContains AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "contains" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorStartsWith AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "starts_with" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorEndsWith AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "ends_with" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorIn AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "in" AppFlagChangelogListResponseObjectAfterRulesConditionsOperatorNotIn AppFlagChangelogListResponseObjectAfterRulesConditionsOperator = "not_in" )
func (AppFlagChangelogListResponseObjectAfterRulesConditionsOperator) IsKnown ¶
func (r AppFlagChangelogListResponseObjectAfterRulesConditionsOperator) IsKnown() bool
type AppFlagChangelogListResponseObjectAfterRulesConditionsUnion ¶
type AppFlagChangelogListResponseObjectAfterRulesConditionsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppFlagChangelogListResponseObjectAfterRulesConditionsObject or AppFlagChangelogListResponseObjectAfterRulesConditionsObject.
type AppFlagChangelogListResponseObjectAfterRulesRollout ¶
type AppFlagChangelogListResponseObjectAfterRulesRollout struct {
// Percentage of matching traffic (0–100) served this variation. For multi-way
// splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).
Percentage float64 `json:"percentage" api:"required"`
// Context attribute used for sticky bucketing. Defaults to `targetingKey`. If
// absent at evaluation time, bucketing is random per request.
Attribute string `json:"attribute"`
JSON appFlagChangelogListResponseObjectAfterRulesRolloutJSON `json:"-"`
}
func (*AppFlagChangelogListResponseObjectAfterRulesRollout) UnmarshalJSON ¶
func (r *AppFlagChangelogListResponseObjectAfterRulesRollout) UnmarshalJSON(data []byte) (err error)
type AppFlagChangelogListResponseObjectAfterType ¶
type AppFlagChangelogListResponseObjectAfterType string
Value type of the flag's variations. Inferred from the variation values on write, so it may be omitted in requests.
const ( AppFlagChangelogListResponseObjectAfterTypeBoolean AppFlagChangelogListResponseObjectAfterType = "boolean" AppFlagChangelogListResponseObjectAfterTypeString AppFlagChangelogListResponseObjectAfterType = "string" AppFlagChangelogListResponseObjectAfterTypeNumber AppFlagChangelogListResponseObjectAfterType = "number" AppFlagChangelogListResponseObjectAfterTypeJson AppFlagChangelogListResponseObjectAfterType = "json" )
func (AppFlagChangelogListResponseObjectAfterType) IsKnown ¶
func (r AppFlagChangelogListResponseObjectAfterType) IsKnown() bool
type AppFlagChangelogListResponseObjectAfterVariationsArray ¶
type AppFlagChangelogListResponseObjectAfterVariationsArray []interface{}
func (AppFlagChangelogListResponseObjectAfterVariationsArray) ImplementsAppFlagChangelogListResponseObjectAfterVariationsUnion ¶
func (r AppFlagChangelogListResponseObjectAfterVariationsArray) ImplementsAppFlagChangelogListResponseObjectAfterVariationsUnion()
type AppFlagChangelogListResponseObjectAfterVariationsMap ¶
type AppFlagChangelogListResponseObjectAfterVariationsMap map[string]interface{}
func (AppFlagChangelogListResponseObjectAfterVariationsMap) ImplementsAppFlagChangelogListResponseObjectAfterVariationsUnion ¶
func (r AppFlagChangelogListResponseObjectAfterVariationsMap) ImplementsAppFlagChangelogListResponseObjectAfterVariationsUnion()
type AppFlagChangelogListResponseObjectAfterVariationsUnion ¶
type AppFlagChangelogListResponseObjectAfterVariationsUnion interface {
ImplementsAppFlagChangelogListResponseObjectAfterVariationsUnion()
}
Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, AppFlagChangelogListResponseObjectAfterVariationsMap or AppFlagChangelogListResponseObjectAfterVariationsArray.
type AppFlagChangelogListResponseObjectEvent ¶
type AppFlagChangelogListResponseObjectEvent string
const (
AppFlagChangelogListResponseObjectEventCreate AppFlagChangelogListResponseObjectEvent = "create"
)
func (AppFlagChangelogListResponseObjectEvent) IsKnown ¶
func (r AppFlagChangelogListResponseObjectEvent) IsKnown() bool
type AppFlagChangelogListResponseUnion ¶
type AppFlagChangelogListResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppFlagChangelogListResponseObject, AppFlagChangelogListResponseObject or AppFlagChangelogListResponseObject.
type AppFlagChangelogService ¶
type AppFlagChangelogService struct {
Options []option.RequestOption
}
AppFlagChangelogService 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 NewAppFlagChangelogService method instead.
func NewAppFlagChangelogService ¶
func NewAppFlagChangelogService(opts ...option.RequestOption) (r *AppFlagChangelogService)
NewAppFlagChangelogService 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 (*AppFlagChangelogService) List ¶
func (r *AppFlagChangelogService) List(ctx context.Context, appID string, flagKey string, params AppFlagChangelogListParams, opts ...option.RequestOption) (res *pagination.CursorPaginationAfter[AppFlagChangelogListResponse], err error)
Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; `update` entries include a field-level diff. Capped at 200 entries per flag.
func (*AppFlagChangelogService) ListAutoPaging ¶
func (r *AppFlagChangelogService) ListAutoPaging(ctx context.Context, appID string, flagKey string, params AppFlagChangelogListParams, opts ...option.RequestOption) *pagination.CursorPaginationAfterAutoPager[AppFlagChangelogListResponse]
Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; `update` entries include a field-level diff. Capped at 200 entries per flag.
type AppFlagDeleteParams ¶
type AppFlagDeleteResponse ¶
type AppFlagDeleteResponse struct {
Key string `json:"key" api:"required"`
JSON appFlagDeleteResponseJSON `json:"-"`
}
func (*AppFlagDeleteResponse) UnmarshalJSON ¶
func (r *AppFlagDeleteResponse) UnmarshalJSON(data []byte) (err error)
type AppFlagDeleteResponseEnvelope ¶
type AppFlagDeleteResponseEnvelope struct {
Errors []AppFlagDeleteResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppFlagDeleteResponseEnvelopeMessages `json:"messages" api:"required"`
Result AppFlagDeleteResponse `json:"result" api:"required"`
Success bool `json:"success" api:"required"`
JSON appFlagDeleteResponseEnvelopeJSON `json:"-"`
}
func (*AppFlagDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *AppFlagDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppFlagDeleteResponseEnvelopeErrors ¶
type AppFlagDeleteResponseEnvelopeErrors struct {
Message string `json:"message" api:"required"`
JSON appFlagDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppFlagDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppFlagDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppFlagDeleteResponseEnvelopeMessages ¶
type AppFlagDeleteResponseEnvelopeMessages struct {
Message string `json:"message" api:"required"`
JSON appFlagDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppFlagDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppFlagDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppFlagGetParams ¶
type AppFlagGetResponse ¶
type AppFlagGetResponse struct {
// Variation served when no rule matches or the flag is disabled. Must be a key in
// `variations`.
DefaultVariation string `json:"default_variation" api:"required"`
// When false, the flag bypasses all rules and always serves `default_variation`.
Enabled bool `json:"enabled" api:"required"`
// Unique identifier for the flag within an app. Used in all evaluation and SDK
// calls.
Key string `json:"key" api:"required"`
// Targeting rules evaluated in ascending `priority`; the first matching rule wins.
// An empty array means the flag always serves `default_variation`.
Rules []AppFlagGetResponseRule `json:"rules" api:"required"`
// Map of variation name to value. All values must be the same type (boolean,
// string, number, or JSON object/array). Each serialized value must be 10KB or
// smaller.
Variations map[string]AppFlagGetResponseVariationsUnion `json:"variations" api:"required"`
Description string `json:"description" api:"nullable"`
// Value type of the flag's variations. Inferred from the variation values on
// write, so it may be omitted in requests.
Type AppFlagGetResponseType `json:"type"`
UpdatedAt string `json:"updated_at"`
UpdatedBy string `json:"updated_by"`
JSON appFlagGetResponseJSON `json:"-"`
}
func (*AppFlagGetResponse) UnmarshalJSON ¶
func (r *AppFlagGetResponse) UnmarshalJSON(data []byte) (err error)
type AppFlagGetResponseEnvelope ¶
type AppFlagGetResponseEnvelope struct {
Errors []AppFlagGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppFlagGetResponseEnvelopeMessages `json:"messages" api:"required"`
Result AppFlagGetResponse `json:"result" api:"required"`
Success bool `json:"success" api:"required"`
JSON appFlagGetResponseEnvelopeJSON `json:"-"`
}
func (*AppFlagGetResponseEnvelope) UnmarshalJSON ¶
func (r *AppFlagGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppFlagGetResponseEnvelopeErrors ¶
type AppFlagGetResponseEnvelopeErrors struct {
Message string `json:"message" api:"required"`
JSON appFlagGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppFlagGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppFlagGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppFlagGetResponseEnvelopeMessages ¶
type AppFlagGetResponseEnvelopeMessages struct {
Message string `json:"message" api:"required"`
JSON appFlagGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppFlagGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppFlagGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppFlagGetResponseRule ¶
type AppFlagGetResponseRule struct {
// Conditions the context must satisfy for this rule to match. An empty array
// matches all contexts.
Conditions []AppFlagGetResponseRulesCondition `json:"conditions" api:"required"`
// Evaluation order; lower numbers are evaluated first. Must be unique across the
// flag's rules.
Priority int64 `json:"priority" api:"required"`
// Variation served when this rule matches. Must be a key in `variations`.
ServeVariation string `json:"serve_variation" api:"required"`
Rollout AppFlagGetResponseRulesRollout `json:"rollout"`
JSON appFlagGetResponseRuleJSON `json:"-"`
}
func (*AppFlagGetResponseRule) UnmarshalJSON ¶
func (r *AppFlagGetResponseRule) UnmarshalJSON(data []byte) (err error)
type AppFlagGetResponseRulesCondition ¶
type AppFlagGetResponseRulesCondition struct {
Attribute string `json:"attribute"`
// This field can have the runtime type of
// [[]AppFlagGetResponseRulesConditionsObjectClause].
Clauses interface{} `json:"clauses"`
LogicalOperator AppFlagGetResponseRulesConditionsLogicalOperator `json:"logical_operator"`
Operator AppFlagGetResponseRulesConditionsOperator `json:"operator"`
// This field can have the runtime type of [interface{}].
Value interface{} `json:"value"`
JSON appFlagGetResponseRulesConditionJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppFlagGetResponseRulesCondition) AsUnion ¶
func (r AppFlagGetResponseRulesCondition) AsUnion() AppFlagGetResponseRulesConditionsUnion
AsUnion returns a AppFlagGetResponseRulesConditionsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppFlagGetResponseRulesConditionsObject, AppFlagGetResponseRulesConditionsObject.
func (*AppFlagGetResponseRulesCondition) UnmarshalJSON ¶
func (r *AppFlagGetResponseRulesCondition) UnmarshalJSON(data []byte) (err error)
type AppFlagGetResponseRulesConditionsLogicalOperator ¶
type AppFlagGetResponseRulesConditionsLogicalOperator string
const ( AppFlagGetResponseRulesConditionsLogicalOperatorAnd AppFlagGetResponseRulesConditionsLogicalOperator = "AND" AppFlagGetResponseRulesConditionsLogicalOperatorOr AppFlagGetResponseRulesConditionsLogicalOperator = "OR" )
func (AppFlagGetResponseRulesConditionsLogicalOperator) IsKnown ¶
func (r AppFlagGetResponseRulesConditionsLogicalOperator) IsKnown() bool
type AppFlagGetResponseRulesConditionsObject ¶
type AppFlagGetResponseRulesConditionsObject struct {
Attribute string `json:"attribute" api:"required"`
Operator AppFlagGetResponseRulesConditionsObjectOperator `json:"operator" api:"required"`
// Value to compare against the context attribute. Must be an array for `in` and
// `not_in`; numeric and ISO-8601 datetime strings are accepted by the ordering
// operators.
Value interface{} `json:"value" api:"required"`
JSON appFlagGetResponseRulesConditionsObjectJSON `json:"-"`
}
func (*AppFlagGetResponseRulesConditionsObject) UnmarshalJSON ¶
func (r *AppFlagGetResponseRulesConditionsObject) UnmarshalJSON(data []byte) (err error)
type AppFlagGetResponseRulesConditionsObjectOperator ¶
type AppFlagGetResponseRulesConditionsObjectOperator string
const ( AppFlagGetResponseRulesConditionsObjectOperatorEquals AppFlagGetResponseRulesConditionsObjectOperator = "equals" AppFlagGetResponseRulesConditionsObjectOperatorNotEquals AppFlagGetResponseRulesConditionsObjectOperator = "not_equals" AppFlagGetResponseRulesConditionsObjectOperatorGreaterThan AppFlagGetResponseRulesConditionsObjectOperator = "greater_than" AppFlagGetResponseRulesConditionsObjectOperatorLessThan AppFlagGetResponseRulesConditionsObjectOperator = "less_than" AppFlagGetResponseRulesConditionsObjectOperatorGreaterThanOrEquals AppFlagGetResponseRulesConditionsObjectOperator = "greater_than_or_equals" AppFlagGetResponseRulesConditionsObjectOperatorLessThanOrEquals AppFlagGetResponseRulesConditionsObjectOperator = "less_than_or_equals" AppFlagGetResponseRulesConditionsObjectOperatorContains AppFlagGetResponseRulesConditionsObjectOperator = "contains" AppFlagGetResponseRulesConditionsObjectOperatorStartsWith AppFlagGetResponseRulesConditionsObjectOperator = "starts_with" AppFlagGetResponseRulesConditionsObjectOperatorEndsWith AppFlagGetResponseRulesConditionsObjectOperator = "ends_with" AppFlagGetResponseRulesConditionsObjectOperatorIn AppFlagGetResponseRulesConditionsObjectOperator = "in" AppFlagGetResponseRulesConditionsObjectOperatorNotIn AppFlagGetResponseRulesConditionsObjectOperator = "not_in" )
func (AppFlagGetResponseRulesConditionsObjectOperator) IsKnown ¶
func (r AppFlagGetResponseRulesConditionsObjectOperator) IsKnown() bool
type AppFlagGetResponseRulesConditionsOperator ¶
type AppFlagGetResponseRulesConditionsOperator string
const ( AppFlagGetResponseRulesConditionsOperatorEquals AppFlagGetResponseRulesConditionsOperator = "equals" AppFlagGetResponseRulesConditionsOperatorNotEquals AppFlagGetResponseRulesConditionsOperator = "not_equals" AppFlagGetResponseRulesConditionsOperatorGreaterThan AppFlagGetResponseRulesConditionsOperator = "greater_than" AppFlagGetResponseRulesConditionsOperatorLessThan AppFlagGetResponseRulesConditionsOperator = "less_than" AppFlagGetResponseRulesConditionsOperatorGreaterThanOrEquals AppFlagGetResponseRulesConditionsOperator = "greater_than_or_equals" AppFlagGetResponseRulesConditionsOperatorLessThanOrEquals AppFlagGetResponseRulesConditionsOperator = "less_than_or_equals" AppFlagGetResponseRulesConditionsOperatorContains AppFlagGetResponseRulesConditionsOperator = "contains" AppFlagGetResponseRulesConditionsOperatorStartsWith AppFlagGetResponseRulesConditionsOperator = "starts_with" AppFlagGetResponseRulesConditionsOperatorEndsWith AppFlagGetResponseRulesConditionsOperator = "ends_with" AppFlagGetResponseRulesConditionsOperatorIn AppFlagGetResponseRulesConditionsOperator = "in" AppFlagGetResponseRulesConditionsOperatorNotIn AppFlagGetResponseRulesConditionsOperator = "not_in" )
func (AppFlagGetResponseRulesConditionsOperator) IsKnown ¶
func (r AppFlagGetResponseRulesConditionsOperator) IsKnown() bool
type AppFlagGetResponseRulesConditionsUnion ¶
type AppFlagGetResponseRulesConditionsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppFlagGetResponseRulesConditionsObject or AppFlagGetResponseRulesConditionsObject.
type AppFlagGetResponseRulesRollout ¶
type AppFlagGetResponseRulesRollout struct {
// Percentage of matching traffic (0–100) served this variation. For multi-way
// splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).
Percentage float64 `json:"percentage" api:"required"`
// Context attribute used for sticky bucketing. Defaults to `targetingKey`. If
// absent at evaluation time, bucketing is random per request.
Attribute string `json:"attribute"`
JSON appFlagGetResponseRulesRolloutJSON `json:"-"`
}
func (*AppFlagGetResponseRulesRollout) UnmarshalJSON ¶
func (r *AppFlagGetResponseRulesRollout) UnmarshalJSON(data []byte) (err error)
type AppFlagGetResponseType ¶
type AppFlagGetResponseType string
Value type of the flag's variations. Inferred from the variation values on write, so it may be omitted in requests.
const ( AppFlagGetResponseTypeBoolean AppFlagGetResponseType = "boolean" AppFlagGetResponseTypeString AppFlagGetResponseType = "string" AppFlagGetResponseTypeNumber AppFlagGetResponseType = "number" AppFlagGetResponseTypeJson AppFlagGetResponseType = "json" )
func (AppFlagGetResponseType) IsKnown ¶
func (r AppFlagGetResponseType) IsKnown() bool
type AppFlagGetResponseVariationsArray ¶
type AppFlagGetResponseVariationsArray []interface{}
func (AppFlagGetResponseVariationsArray) ImplementsAppFlagGetResponseVariationsUnion ¶
func (r AppFlagGetResponseVariationsArray) ImplementsAppFlagGetResponseVariationsUnion()
type AppFlagGetResponseVariationsMap ¶
type AppFlagGetResponseVariationsMap map[string]interface{}
func (AppFlagGetResponseVariationsMap) ImplementsAppFlagGetResponseVariationsUnion ¶
func (r AppFlagGetResponseVariationsMap) ImplementsAppFlagGetResponseVariationsUnion()
type AppFlagGetResponseVariationsUnion ¶
type AppFlagGetResponseVariationsUnion interface {
ImplementsAppFlagGetResponseVariationsUnion()
}
Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, AppFlagGetResponseVariationsMap or AppFlagGetResponseVariationsArray.
type AppFlagListParams ¶
type AppFlagListParams struct {
// Cloudflare account ID.
AccountID param.Field[string] `path:"account_id" api:"required"`
// Pagination cursor from a previous response.
Cursor param.Field[string] `query:"cursor"`
// Max items to return (1–200).
Limit param.Field[string] `query:"limit"`
}
func (AppFlagListParams) URLQuery ¶
func (r AppFlagListParams) URLQuery() (v url.Values)
URLQuery serializes AppFlagListParams's query parameters as `url.Values`.
type AppFlagListResponse ¶
type AppFlagListResponse struct {
// Variation served when no rule matches or the flag is disabled. Must be a key in
// `variations`.
DefaultVariation string `json:"default_variation" api:"required"`
// When false, the flag bypasses all rules and always serves `default_variation`.
Enabled bool `json:"enabled" api:"required"`
// Unique identifier for the flag within an app. Used in all evaluation and SDK
// calls.
Key string `json:"key" api:"required"`
// Targeting rules evaluated in ascending `priority`; the first matching rule wins.
// An empty array means the flag always serves `default_variation`.
Rules []AppFlagListResponseRule `json:"rules" api:"required"`
// Map of variation name to value. All values must be the same type (boolean,
// string, number, or JSON object/array). Each serialized value must be 10KB or
// smaller.
Variations map[string]AppFlagListResponseVariationsUnion `json:"variations" api:"required"`
Description string `json:"description" api:"nullable"`
// Value type of the flag's variations. Inferred from the variation values on
// write, so it may be omitted in requests.
Type AppFlagListResponseType `json:"type"`
UpdatedAt string `json:"updated_at"`
UpdatedBy string `json:"updated_by"`
JSON appFlagListResponseJSON `json:"-"`
}
func (*AppFlagListResponse) UnmarshalJSON ¶
func (r *AppFlagListResponse) UnmarshalJSON(data []byte) (err error)
type AppFlagListResponseRule ¶
type AppFlagListResponseRule struct {
// Conditions the context must satisfy for this rule to match. An empty array
// matches all contexts.
Conditions []AppFlagListResponseRulesCondition `json:"conditions" api:"required"`
// Evaluation order; lower numbers are evaluated first. Must be unique across the
// flag's rules.
Priority int64 `json:"priority" api:"required"`
// Variation served when this rule matches. Must be a key in `variations`.
ServeVariation string `json:"serve_variation" api:"required"`
Rollout AppFlagListResponseRulesRollout `json:"rollout"`
JSON appFlagListResponseRuleJSON `json:"-"`
}
func (*AppFlagListResponseRule) UnmarshalJSON ¶
func (r *AppFlagListResponseRule) UnmarshalJSON(data []byte) (err error)
type AppFlagListResponseRulesCondition ¶
type AppFlagListResponseRulesCondition struct {
Attribute string `json:"attribute"`
// This field can have the runtime type of
// [[]AppFlagListResponseRulesConditionsObjectClause].
Clauses interface{} `json:"clauses"`
LogicalOperator AppFlagListResponseRulesConditionsLogicalOperator `json:"logical_operator"`
Operator AppFlagListResponseRulesConditionsOperator `json:"operator"`
// This field can have the runtime type of [interface{}].
Value interface{} `json:"value"`
JSON appFlagListResponseRulesConditionJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppFlagListResponseRulesCondition) AsUnion ¶
func (r AppFlagListResponseRulesCondition) AsUnion() AppFlagListResponseRulesConditionsUnion
AsUnion returns a AppFlagListResponseRulesConditionsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppFlagListResponseRulesConditionsObject, AppFlagListResponseRulesConditionsObject.
func (*AppFlagListResponseRulesCondition) UnmarshalJSON ¶
func (r *AppFlagListResponseRulesCondition) UnmarshalJSON(data []byte) (err error)
type AppFlagListResponseRulesConditionsLogicalOperator ¶
type AppFlagListResponseRulesConditionsLogicalOperator string
const ( AppFlagListResponseRulesConditionsLogicalOperatorAnd AppFlagListResponseRulesConditionsLogicalOperator = "AND" AppFlagListResponseRulesConditionsLogicalOperatorOr AppFlagListResponseRulesConditionsLogicalOperator = "OR" )
func (AppFlagListResponseRulesConditionsLogicalOperator) IsKnown ¶
func (r AppFlagListResponseRulesConditionsLogicalOperator) IsKnown() bool
type AppFlagListResponseRulesConditionsObject ¶
type AppFlagListResponseRulesConditionsObject struct {
Attribute string `json:"attribute" api:"required"`
Operator AppFlagListResponseRulesConditionsObjectOperator `json:"operator" api:"required"`
// Value to compare against the context attribute. Must be an array for `in` and
// `not_in`; numeric and ISO-8601 datetime strings are accepted by the ordering
// operators.
Value interface{} `json:"value" api:"required"`
JSON appFlagListResponseRulesConditionsObjectJSON `json:"-"`
}
func (*AppFlagListResponseRulesConditionsObject) UnmarshalJSON ¶
func (r *AppFlagListResponseRulesConditionsObject) UnmarshalJSON(data []byte) (err error)
type AppFlagListResponseRulesConditionsObjectOperator ¶
type AppFlagListResponseRulesConditionsObjectOperator string
const ( AppFlagListResponseRulesConditionsObjectOperatorEquals AppFlagListResponseRulesConditionsObjectOperator = "equals" AppFlagListResponseRulesConditionsObjectOperatorNotEquals AppFlagListResponseRulesConditionsObjectOperator = "not_equals" AppFlagListResponseRulesConditionsObjectOperatorGreaterThan AppFlagListResponseRulesConditionsObjectOperator = "greater_than" AppFlagListResponseRulesConditionsObjectOperatorLessThan AppFlagListResponseRulesConditionsObjectOperator = "less_than" AppFlagListResponseRulesConditionsObjectOperatorGreaterThanOrEquals AppFlagListResponseRulesConditionsObjectOperator = "greater_than_or_equals" AppFlagListResponseRulesConditionsObjectOperatorLessThanOrEquals AppFlagListResponseRulesConditionsObjectOperator = "less_than_or_equals" AppFlagListResponseRulesConditionsObjectOperatorContains AppFlagListResponseRulesConditionsObjectOperator = "contains" AppFlagListResponseRulesConditionsObjectOperatorStartsWith AppFlagListResponseRulesConditionsObjectOperator = "starts_with" AppFlagListResponseRulesConditionsObjectOperatorEndsWith AppFlagListResponseRulesConditionsObjectOperator = "ends_with" AppFlagListResponseRulesConditionsObjectOperatorIn AppFlagListResponseRulesConditionsObjectOperator = "in" AppFlagListResponseRulesConditionsObjectOperatorNotIn AppFlagListResponseRulesConditionsObjectOperator = "not_in" )
func (AppFlagListResponseRulesConditionsObjectOperator) IsKnown ¶
func (r AppFlagListResponseRulesConditionsObjectOperator) IsKnown() bool
type AppFlagListResponseRulesConditionsOperator ¶
type AppFlagListResponseRulesConditionsOperator string
const ( AppFlagListResponseRulesConditionsOperatorEquals AppFlagListResponseRulesConditionsOperator = "equals" AppFlagListResponseRulesConditionsOperatorNotEquals AppFlagListResponseRulesConditionsOperator = "not_equals" AppFlagListResponseRulesConditionsOperatorGreaterThan AppFlagListResponseRulesConditionsOperator = "greater_than" AppFlagListResponseRulesConditionsOperatorLessThan AppFlagListResponseRulesConditionsOperator = "less_than" AppFlagListResponseRulesConditionsOperatorGreaterThanOrEquals AppFlagListResponseRulesConditionsOperator = "greater_than_or_equals" AppFlagListResponseRulesConditionsOperatorLessThanOrEquals AppFlagListResponseRulesConditionsOperator = "less_than_or_equals" AppFlagListResponseRulesConditionsOperatorContains AppFlagListResponseRulesConditionsOperator = "contains" AppFlagListResponseRulesConditionsOperatorStartsWith AppFlagListResponseRulesConditionsOperator = "starts_with" AppFlagListResponseRulesConditionsOperatorEndsWith AppFlagListResponseRulesConditionsOperator = "ends_with" AppFlagListResponseRulesConditionsOperatorIn AppFlagListResponseRulesConditionsOperator = "in" AppFlagListResponseRulesConditionsOperatorNotIn AppFlagListResponseRulesConditionsOperator = "not_in" )
func (AppFlagListResponseRulesConditionsOperator) IsKnown ¶
func (r AppFlagListResponseRulesConditionsOperator) IsKnown() bool
type AppFlagListResponseRulesConditionsUnion ¶
type AppFlagListResponseRulesConditionsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppFlagListResponseRulesConditionsObject or AppFlagListResponseRulesConditionsObject.
type AppFlagListResponseRulesRollout ¶
type AppFlagListResponseRulesRollout struct {
// Percentage of matching traffic (0–100) served this variation. For multi-way
// splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).
Percentage float64 `json:"percentage" api:"required"`
// Context attribute used for sticky bucketing. Defaults to `targetingKey`. If
// absent at evaluation time, bucketing is random per request.
Attribute string `json:"attribute"`
JSON appFlagListResponseRulesRolloutJSON `json:"-"`
}
func (*AppFlagListResponseRulesRollout) UnmarshalJSON ¶
func (r *AppFlagListResponseRulesRollout) UnmarshalJSON(data []byte) (err error)
type AppFlagListResponseType ¶
type AppFlagListResponseType string
Value type of the flag's variations. Inferred from the variation values on write, so it may be omitted in requests.
const ( AppFlagListResponseTypeBoolean AppFlagListResponseType = "boolean" AppFlagListResponseTypeString AppFlagListResponseType = "string" AppFlagListResponseTypeNumber AppFlagListResponseType = "number" AppFlagListResponseTypeJson AppFlagListResponseType = "json" )
func (AppFlagListResponseType) IsKnown ¶
func (r AppFlagListResponseType) IsKnown() bool
type AppFlagListResponseVariationsArray ¶
type AppFlagListResponseVariationsArray []interface{}
func (AppFlagListResponseVariationsArray) ImplementsAppFlagListResponseVariationsUnion ¶
func (r AppFlagListResponseVariationsArray) ImplementsAppFlagListResponseVariationsUnion()
type AppFlagListResponseVariationsMap ¶
type AppFlagListResponseVariationsMap map[string]interface{}
func (AppFlagListResponseVariationsMap) ImplementsAppFlagListResponseVariationsUnion ¶
func (r AppFlagListResponseVariationsMap) ImplementsAppFlagListResponseVariationsUnion()
type AppFlagListResponseVariationsUnion ¶
type AppFlagListResponseVariationsUnion interface {
ImplementsAppFlagListResponseVariationsUnion()
}
Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, AppFlagListResponseVariationsMap or AppFlagListResponseVariationsArray.
type AppFlagNewParams ¶
type AppFlagNewParams struct {
// Cloudflare account ID.
AccountID param.Field[string] `path:"account_id" api:"required"`
// Variation served when no rule matches or the flag is disabled. Must be a key in
// `variations`.
DefaultVariation param.Field[string] `json:"default_variation" api:"required"`
// When false, the flag bypasses all rules and always serves `default_variation`.
Enabled param.Field[bool] `json:"enabled" api:"required"`
// Unique identifier for the flag within an app. Used in all evaluation and SDK
// calls.
Key param.Field[string] `json:"key" api:"required"`
// Targeting rules evaluated in ascending `priority`; the first matching rule wins.
// An empty array means the flag always serves `default_variation`.
Rules param.Field[[]AppFlagNewParamsRule] `json:"rules" api:"required"`
// Map of variation name to value. All values must be the same type (boolean,
// string, number, or JSON object/array). Each serialized value must be 10KB or
// smaller.
Variations param.Field[map[string]AppFlagNewParamsVariationsUnion] `json:"variations" api:"required"`
Description param.Field[string] `json:"description"`
// Value type of the flag's variations. Inferred from the variation values on
// write, so it may be omitted in requests.
Type param.Field[AppFlagNewParamsType] `json:"type"`
}
func (AppFlagNewParams) MarshalJSON ¶
func (r AppFlagNewParams) MarshalJSON() (data []byte, err error)
type AppFlagNewParamsRule ¶
type AppFlagNewParamsRule struct {
// Conditions the context must satisfy for this rule to match. An empty array
// matches all contexts.
Conditions param.Field[[]AppFlagNewParamsRulesConditionUnion] `json:"conditions" api:"required"`
// Evaluation order; lower numbers are evaluated first. Must be unique across the
// flag's rules.
Priority param.Field[int64] `json:"priority" api:"required"`
// Variation served when this rule matches. Must be a key in `variations`.
ServeVariation param.Field[string] `json:"serve_variation" api:"required"`
Rollout param.Field[AppFlagNewParamsRulesRollout] `json:"rollout"`
}
func (AppFlagNewParamsRule) MarshalJSON ¶
func (r AppFlagNewParamsRule) MarshalJSON() (data []byte, err error)
type AppFlagNewParamsRulesCondition ¶
type AppFlagNewParamsRulesCondition struct {
Attribute param.Field[string] `json:"attribute"`
Clauses param.Field[interface{}] `json:"clauses"`
LogicalOperator param.Field[AppFlagNewParamsRulesConditionsLogicalOperator] `json:"logical_operator"`
Operator param.Field[AppFlagNewParamsRulesConditionsOperator] `json:"operator"`
Value param.Field[interface{}] `json:"value"`
}
func (AppFlagNewParamsRulesCondition) MarshalJSON ¶
func (r AppFlagNewParamsRulesCondition) MarshalJSON() (data []byte, err error)
type AppFlagNewParamsRulesConditionUnion ¶
type AppFlagNewParamsRulesConditionUnion interface {
// contains filtered or unexported methods
}
Satisfied by flagship.AppFlagNewParamsRulesConditionsObject, flagship.AppFlagNewParamsRulesConditionsObject, AppFlagNewParamsRulesCondition.
type AppFlagNewParamsRulesConditionsLogicalOperator ¶
type AppFlagNewParamsRulesConditionsLogicalOperator string
const ( AppFlagNewParamsRulesConditionsLogicalOperatorAnd AppFlagNewParamsRulesConditionsLogicalOperator = "AND" AppFlagNewParamsRulesConditionsLogicalOperatorOr AppFlagNewParamsRulesConditionsLogicalOperator = "OR" )
func (AppFlagNewParamsRulesConditionsLogicalOperator) IsKnown ¶
func (r AppFlagNewParamsRulesConditionsLogicalOperator) IsKnown() bool
type AppFlagNewParamsRulesConditionsObject ¶
type AppFlagNewParamsRulesConditionsObject struct {
Attribute param.Field[string] `json:"attribute" api:"required"`
Operator param.Field[AppFlagNewParamsRulesConditionsObjectOperator] `json:"operator" api:"required"`
// Value to compare against the context attribute. Must be an array for `in` and
// `not_in`; numeric and ISO-8601 datetime strings are accepted by the ordering
// operators.
Value param.Field[interface{}] `json:"value" api:"required"`
}
func (AppFlagNewParamsRulesConditionsObject) MarshalJSON ¶
func (r AppFlagNewParamsRulesConditionsObject) MarshalJSON() (data []byte, err error)
type AppFlagNewParamsRulesConditionsObjectOperator ¶
type AppFlagNewParamsRulesConditionsObjectOperator string
const ( AppFlagNewParamsRulesConditionsObjectOperatorEquals AppFlagNewParamsRulesConditionsObjectOperator = "equals" AppFlagNewParamsRulesConditionsObjectOperatorNotEquals AppFlagNewParamsRulesConditionsObjectOperator = "not_equals" AppFlagNewParamsRulesConditionsObjectOperatorGreaterThan AppFlagNewParamsRulesConditionsObjectOperator = "greater_than" AppFlagNewParamsRulesConditionsObjectOperatorLessThan AppFlagNewParamsRulesConditionsObjectOperator = "less_than" AppFlagNewParamsRulesConditionsObjectOperatorGreaterThanOrEquals AppFlagNewParamsRulesConditionsObjectOperator = "greater_than_or_equals" AppFlagNewParamsRulesConditionsObjectOperatorLessThanOrEquals AppFlagNewParamsRulesConditionsObjectOperator = "less_than_or_equals" AppFlagNewParamsRulesConditionsObjectOperatorContains AppFlagNewParamsRulesConditionsObjectOperator = "contains" AppFlagNewParamsRulesConditionsObjectOperatorStartsWith AppFlagNewParamsRulesConditionsObjectOperator = "starts_with" AppFlagNewParamsRulesConditionsObjectOperatorEndsWith AppFlagNewParamsRulesConditionsObjectOperator = "ends_with" AppFlagNewParamsRulesConditionsObjectOperatorIn AppFlagNewParamsRulesConditionsObjectOperator = "in" AppFlagNewParamsRulesConditionsObjectOperatorNotIn AppFlagNewParamsRulesConditionsObjectOperator = "not_in" )
func (AppFlagNewParamsRulesConditionsObjectOperator) IsKnown ¶
func (r AppFlagNewParamsRulesConditionsObjectOperator) IsKnown() bool
type AppFlagNewParamsRulesConditionsOperator ¶
type AppFlagNewParamsRulesConditionsOperator string
const ( AppFlagNewParamsRulesConditionsOperatorEquals AppFlagNewParamsRulesConditionsOperator = "equals" AppFlagNewParamsRulesConditionsOperatorNotEquals AppFlagNewParamsRulesConditionsOperator = "not_equals" AppFlagNewParamsRulesConditionsOperatorGreaterThan AppFlagNewParamsRulesConditionsOperator = "greater_than" AppFlagNewParamsRulesConditionsOperatorLessThan AppFlagNewParamsRulesConditionsOperator = "less_than" AppFlagNewParamsRulesConditionsOperatorGreaterThanOrEquals AppFlagNewParamsRulesConditionsOperator = "greater_than_or_equals" AppFlagNewParamsRulesConditionsOperatorLessThanOrEquals AppFlagNewParamsRulesConditionsOperator = "less_than_or_equals" AppFlagNewParamsRulesConditionsOperatorContains AppFlagNewParamsRulesConditionsOperator = "contains" AppFlagNewParamsRulesConditionsOperatorStartsWith AppFlagNewParamsRulesConditionsOperator = "starts_with" AppFlagNewParamsRulesConditionsOperatorEndsWith AppFlagNewParamsRulesConditionsOperator = "ends_with" AppFlagNewParamsRulesConditionsOperatorIn AppFlagNewParamsRulesConditionsOperator = "in" AppFlagNewParamsRulesConditionsOperatorNotIn AppFlagNewParamsRulesConditionsOperator = "not_in" )
func (AppFlagNewParamsRulesConditionsOperator) IsKnown ¶
func (r AppFlagNewParamsRulesConditionsOperator) IsKnown() bool
type AppFlagNewParamsRulesRollout ¶
type AppFlagNewParamsRulesRollout struct {
// Percentage of matching traffic (0–100) served this variation. For multi-way
// splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).
Percentage param.Field[float64] `json:"percentage" api:"required"`
// Context attribute used for sticky bucketing. Defaults to `targetingKey`. If
// absent at evaluation time, bucketing is random per request.
Attribute param.Field[string] `json:"attribute"`
}
func (AppFlagNewParamsRulesRollout) MarshalJSON ¶
func (r AppFlagNewParamsRulesRollout) MarshalJSON() (data []byte, err error)
type AppFlagNewParamsType ¶
type AppFlagNewParamsType string
Value type of the flag's variations. Inferred from the variation values on write, so it may be omitted in requests.
const ( AppFlagNewParamsTypeBoolean AppFlagNewParamsType = "boolean" AppFlagNewParamsTypeString AppFlagNewParamsType = "string" AppFlagNewParamsTypeNumber AppFlagNewParamsType = "number" AppFlagNewParamsTypeJson AppFlagNewParamsType = "json" )
func (AppFlagNewParamsType) IsKnown ¶
func (r AppFlagNewParamsType) IsKnown() bool
type AppFlagNewParamsVariationsArray ¶
type AppFlagNewParamsVariationsArray []interface{}
func (AppFlagNewParamsVariationsArray) ImplementsAppFlagNewParamsVariationsUnion ¶
func (r AppFlagNewParamsVariationsArray) ImplementsAppFlagNewParamsVariationsUnion()
type AppFlagNewParamsVariationsMap ¶
type AppFlagNewParamsVariationsMap map[string]interface{}
func (AppFlagNewParamsVariationsMap) ImplementsAppFlagNewParamsVariationsUnion ¶
func (r AppFlagNewParamsVariationsMap) ImplementsAppFlagNewParamsVariationsUnion()
type AppFlagNewParamsVariationsUnion ¶
type AppFlagNewParamsVariationsUnion interface {
ImplementsAppFlagNewParamsVariationsUnion()
}
Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, flagship.AppFlagNewParamsVariationsMap, flagship.AppFlagNewParamsVariationsArray.
type AppFlagNewResponse ¶
type AppFlagNewResponse struct {
// Variation served when no rule matches or the flag is disabled. Must be a key in
// `variations`.
DefaultVariation string `json:"default_variation" api:"required"`
// When false, the flag bypasses all rules and always serves `default_variation`.
Enabled bool `json:"enabled" api:"required"`
// Unique identifier for the flag within an app. Used in all evaluation and SDK
// calls.
Key string `json:"key" api:"required"`
// Targeting rules evaluated in ascending `priority`; the first matching rule wins.
// An empty array means the flag always serves `default_variation`.
Rules []AppFlagNewResponseRule `json:"rules" api:"required"`
// Map of variation name to value. All values must be the same type (boolean,
// string, number, or JSON object/array). Each serialized value must be 10KB or
// smaller.
Variations map[string]AppFlagNewResponseVariationsUnion `json:"variations" api:"required"`
Description string `json:"description" api:"nullable"`
// Value type of the flag's variations. Inferred from the variation values on
// write, so it may be omitted in requests.
Type AppFlagNewResponseType `json:"type"`
UpdatedAt string `json:"updated_at"`
UpdatedBy string `json:"updated_by"`
JSON appFlagNewResponseJSON `json:"-"`
}
func (*AppFlagNewResponse) UnmarshalJSON ¶
func (r *AppFlagNewResponse) UnmarshalJSON(data []byte) (err error)
type AppFlagNewResponseEnvelope ¶
type AppFlagNewResponseEnvelope struct {
Errors []AppFlagNewResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppFlagNewResponseEnvelopeMessages `json:"messages" api:"required"`
Result AppFlagNewResponse `json:"result" api:"required"`
Success bool `json:"success" api:"required"`
JSON appFlagNewResponseEnvelopeJSON `json:"-"`
}
func (*AppFlagNewResponseEnvelope) UnmarshalJSON ¶
func (r *AppFlagNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppFlagNewResponseEnvelopeErrors ¶
type AppFlagNewResponseEnvelopeErrors struct {
Message string `json:"message" api:"required"`
JSON appFlagNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppFlagNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppFlagNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppFlagNewResponseEnvelopeMessages ¶
type AppFlagNewResponseEnvelopeMessages struct {
Message string `json:"message" api:"required"`
JSON appFlagNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppFlagNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppFlagNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppFlagNewResponseRule ¶
type AppFlagNewResponseRule struct {
// Conditions the context must satisfy for this rule to match. An empty array
// matches all contexts.
Conditions []AppFlagNewResponseRulesCondition `json:"conditions" api:"required"`
// Evaluation order; lower numbers are evaluated first. Must be unique across the
// flag's rules.
Priority int64 `json:"priority" api:"required"`
// Variation served when this rule matches. Must be a key in `variations`.
ServeVariation string `json:"serve_variation" api:"required"`
Rollout AppFlagNewResponseRulesRollout `json:"rollout"`
JSON appFlagNewResponseRuleJSON `json:"-"`
}
func (*AppFlagNewResponseRule) UnmarshalJSON ¶
func (r *AppFlagNewResponseRule) UnmarshalJSON(data []byte) (err error)
type AppFlagNewResponseRulesCondition ¶
type AppFlagNewResponseRulesCondition struct {
Attribute string `json:"attribute"`
// This field can have the runtime type of
// [[]AppFlagNewResponseRulesConditionsObjectClause].
Clauses interface{} `json:"clauses"`
LogicalOperator AppFlagNewResponseRulesConditionsLogicalOperator `json:"logical_operator"`
Operator AppFlagNewResponseRulesConditionsOperator `json:"operator"`
// This field can have the runtime type of [interface{}].
Value interface{} `json:"value"`
JSON appFlagNewResponseRulesConditionJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppFlagNewResponseRulesCondition) AsUnion ¶
func (r AppFlagNewResponseRulesCondition) AsUnion() AppFlagNewResponseRulesConditionsUnion
AsUnion returns a AppFlagNewResponseRulesConditionsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppFlagNewResponseRulesConditionsObject, AppFlagNewResponseRulesConditionsObject.
func (*AppFlagNewResponseRulesCondition) UnmarshalJSON ¶
func (r *AppFlagNewResponseRulesCondition) UnmarshalJSON(data []byte) (err error)
type AppFlagNewResponseRulesConditionsLogicalOperator ¶
type AppFlagNewResponseRulesConditionsLogicalOperator string
const ( AppFlagNewResponseRulesConditionsLogicalOperatorAnd AppFlagNewResponseRulesConditionsLogicalOperator = "AND" AppFlagNewResponseRulesConditionsLogicalOperatorOr AppFlagNewResponseRulesConditionsLogicalOperator = "OR" )
func (AppFlagNewResponseRulesConditionsLogicalOperator) IsKnown ¶
func (r AppFlagNewResponseRulesConditionsLogicalOperator) IsKnown() bool
type AppFlagNewResponseRulesConditionsObject ¶
type AppFlagNewResponseRulesConditionsObject struct {
Attribute string `json:"attribute" api:"required"`
Operator AppFlagNewResponseRulesConditionsObjectOperator `json:"operator" api:"required"`
// Value to compare against the context attribute. Must be an array for `in` and
// `not_in`; numeric and ISO-8601 datetime strings are accepted by the ordering
// operators.
Value interface{} `json:"value" api:"required"`
JSON appFlagNewResponseRulesConditionsObjectJSON `json:"-"`
}
func (*AppFlagNewResponseRulesConditionsObject) UnmarshalJSON ¶
func (r *AppFlagNewResponseRulesConditionsObject) UnmarshalJSON(data []byte) (err error)
type AppFlagNewResponseRulesConditionsObjectOperator ¶
type AppFlagNewResponseRulesConditionsObjectOperator string
const ( AppFlagNewResponseRulesConditionsObjectOperatorEquals AppFlagNewResponseRulesConditionsObjectOperator = "equals" AppFlagNewResponseRulesConditionsObjectOperatorNotEquals AppFlagNewResponseRulesConditionsObjectOperator = "not_equals" AppFlagNewResponseRulesConditionsObjectOperatorGreaterThan AppFlagNewResponseRulesConditionsObjectOperator = "greater_than" AppFlagNewResponseRulesConditionsObjectOperatorLessThan AppFlagNewResponseRulesConditionsObjectOperator = "less_than" AppFlagNewResponseRulesConditionsObjectOperatorGreaterThanOrEquals AppFlagNewResponseRulesConditionsObjectOperator = "greater_than_or_equals" AppFlagNewResponseRulesConditionsObjectOperatorLessThanOrEquals AppFlagNewResponseRulesConditionsObjectOperator = "less_than_or_equals" AppFlagNewResponseRulesConditionsObjectOperatorContains AppFlagNewResponseRulesConditionsObjectOperator = "contains" AppFlagNewResponseRulesConditionsObjectOperatorStartsWith AppFlagNewResponseRulesConditionsObjectOperator = "starts_with" AppFlagNewResponseRulesConditionsObjectOperatorEndsWith AppFlagNewResponseRulesConditionsObjectOperator = "ends_with" AppFlagNewResponseRulesConditionsObjectOperatorIn AppFlagNewResponseRulesConditionsObjectOperator = "in" AppFlagNewResponseRulesConditionsObjectOperatorNotIn AppFlagNewResponseRulesConditionsObjectOperator = "not_in" )
func (AppFlagNewResponseRulesConditionsObjectOperator) IsKnown ¶
func (r AppFlagNewResponseRulesConditionsObjectOperator) IsKnown() bool
type AppFlagNewResponseRulesConditionsOperator ¶
type AppFlagNewResponseRulesConditionsOperator string
const ( AppFlagNewResponseRulesConditionsOperatorEquals AppFlagNewResponseRulesConditionsOperator = "equals" AppFlagNewResponseRulesConditionsOperatorNotEquals AppFlagNewResponseRulesConditionsOperator = "not_equals" AppFlagNewResponseRulesConditionsOperatorGreaterThan AppFlagNewResponseRulesConditionsOperator = "greater_than" AppFlagNewResponseRulesConditionsOperatorLessThan AppFlagNewResponseRulesConditionsOperator = "less_than" AppFlagNewResponseRulesConditionsOperatorGreaterThanOrEquals AppFlagNewResponseRulesConditionsOperator = "greater_than_or_equals" AppFlagNewResponseRulesConditionsOperatorLessThanOrEquals AppFlagNewResponseRulesConditionsOperator = "less_than_or_equals" AppFlagNewResponseRulesConditionsOperatorContains AppFlagNewResponseRulesConditionsOperator = "contains" AppFlagNewResponseRulesConditionsOperatorStartsWith AppFlagNewResponseRulesConditionsOperator = "starts_with" AppFlagNewResponseRulesConditionsOperatorEndsWith AppFlagNewResponseRulesConditionsOperator = "ends_with" AppFlagNewResponseRulesConditionsOperatorIn AppFlagNewResponseRulesConditionsOperator = "in" AppFlagNewResponseRulesConditionsOperatorNotIn AppFlagNewResponseRulesConditionsOperator = "not_in" )
func (AppFlagNewResponseRulesConditionsOperator) IsKnown ¶
func (r AppFlagNewResponseRulesConditionsOperator) IsKnown() bool
type AppFlagNewResponseRulesConditionsUnion ¶
type AppFlagNewResponseRulesConditionsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppFlagNewResponseRulesConditionsObject or AppFlagNewResponseRulesConditionsObject.
type AppFlagNewResponseRulesRollout ¶
type AppFlagNewResponseRulesRollout struct {
// Percentage of matching traffic (0–100) served this variation. For multi-way
// splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).
Percentage float64 `json:"percentage" api:"required"`
// Context attribute used for sticky bucketing. Defaults to `targetingKey`. If
// absent at evaluation time, bucketing is random per request.
Attribute string `json:"attribute"`
JSON appFlagNewResponseRulesRolloutJSON `json:"-"`
}
func (*AppFlagNewResponseRulesRollout) UnmarshalJSON ¶
func (r *AppFlagNewResponseRulesRollout) UnmarshalJSON(data []byte) (err error)
type AppFlagNewResponseType ¶
type AppFlagNewResponseType string
Value type of the flag's variations. Inferred from the variation values on write, so it may be omitted in requests.
const ( AppFlagNewResponseTypeBoolean AppFlagNewResponseType = "boolean" AppFlagNewResponseTypeString AppFlagNewResponseType = "string" AppFlagNewResponseTypeNumber AppFlagNewResponseType = "number" AppFlagNewResponseTypeJson AppFlagNewResponseType = "json" )
func (AppFlagNewResponseType) IsKnown ¶
func (r AppFlagNewResponseType) IsKnown() bool
type AppFlagNewResponseVariationsArray ¶
type AppFlagNewResponseVariationsArray []interface{}
func (AppFlagNewResponseVariationsArray) ImplementsAppFlagNewResponseVariationsUnion ¶
func (r AppFlagNewResponseVariationsArray) ImplementsAppFlagNewResponseVariationsUnion()
type AppFlagNewResponseVariationsMap ¶
type AppFlagNewResponseVariationsMap map[string]interface{}
func (AppFlagNewResponseVariationsMap) ImplementsAppFlagNewResponseVariationsUnion ¶
func (r AppFlagNewResponseVariationsMap) ImplementsAppFlagNewResponseVariationsUnion()
type AppFlagNewResponseVariationsUnion ¶
type AppFlagNewResponseVariationsUnion interface {
ImplementsAppFlagNewResponseVariationsUnion()
}
Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, AppFlagNewResponseVariationsMap or AppFlagNewResponseVariationsArray.
type AppFlagService ¶
type AppFlagService struct {
Options []option.RequestOption
Changelog *AppFlagChangelogService
}
AppFlagService 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 NewAppFlagService method instead.
func NewAppFlagService ¶
func NewAppFlagService(opts ...option.RequestOption) (r *AppFlagService)
NewAppFlagService 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 (*AppFlagService) Delete ¶
func (r *AppFlagService) Delete(ctx context.Context, appID string, flagKey string, body AppFlagDeleteParams, opts ...option.RequestOption) (res *AppFlagDeleteResponse, err error)
Permanently deletes a flag. Subsequent evaluations fall back to the caller-supplied default. Cannot be undone.
func (*AppFlagService) Get ¶
func (r *AppFlagService) Get(ctx context.Context, appID string, flagKey string, query AppFlagGetParams, opts ...option.RequestOption) (res *AppFlagGetResponse, err error)
Returns the full flag definition including rules, variations, and audit fields.
func (*AppFlagService) List ¶
func (r *AppFlagService) List(ctx context.Context, appID string, params AppFlagListParams, opts ...option.RequestOption) (res *pagination.CursorPaginationAfter[AppFlagListResponse], err error)
Lists an app's flags ordered by key. Pass `cursor` from `result_info` to page forward; a null cursor indicates the last page.
func (*AppFlagService) ListAutoPaging ¶
func (r *AppFlagService) ListAutoPaging(ctx context.Context, appID string, params AppFlagListParams, opts ...option.RequestOption) *pagination.CursorPaginationAfterAutoPager[AppFlagListResponse]
Lists an app's flags ordered by key. Pass `cursor` from `result_info` to page forward; a null cursor indicates the last page.
func (*AppFlagService) New ¶
func (r *AppFlagService) New(ctx context.Context, appID string, params AppFlagNewParams, opts ...option.RequestOption) (res *AppFlagNewResponse, err error)
Creates a flag. Returns 409 if the key already exists. `type` is inferred from variation values and may be omitted.
func (*AppFlagService) Update ¶
func (r *AppFlagService) Update(ctx context.Context, appID string, flagKey string, params AppFlagUpdateParams, opts ...option.RequestOption) (res *AppFlagUpdateResponse, err error)
Replaces the entire flag definition. Omitted fields are dropped, not preserved — read before writing. Each update appends a changelog entry.
type AppFlagUpdateParams ¶
type AppFlagUpdateParams struct {
// Cloudflare account ID.
AccountID param.Field[string] `path:"account_id" api:"required"`
// Variation served when no rule matches or the flag is disabled. Must be a key in
// `variations`.
DefaultVariation param.Field[string] `json:"default_variation" api:"required"`
// When false, the flag bypasses all rules and always serves `default_variation`.
Enabled param.Field[bool] `json:"enabled" api:"required"`
// Unique identifier for the flag within an app. Used in all evaluation and SDK
// calls.
Key param.Field[string] `json:"key" api:"required"`
// Targeting rules evaluated in ascending `priority`; the first matching rule wins.
// An empty array means the flag always serves `default_variation`.
Rules param.Field[[]AppFlagUpdateParamsRule] `json:"rules" api:"required"`
// Map of variation name to value. All values must be the same type (boolean,
// string, number, or JSON object/array). Each serialized value must be 10KB or
// smaller.
Variations param.Field[map[string]AppFlagUpdateParamsVariationsUnion] `json:"variations" api:"required"`
Description param.Field[string] `json:"description"`
// Value type of the flag's variations. Inferred from the variation values on
// write, so it may be omitted in requests.
Type param.Field[AppFlagUpdateParamsType] `json:"type"`
}
func (AppFlagUpdateParams) MarshalJSON ¶
func (r AppFlagUpdateParams) MarshalJSON() (data []byte, err error)
type AppFlagUpdateParamsRule ¶
type AppFlagUpdateParamsRule struct {
// Conditions the context must satisfy for this rule to match. An empty array
// matches all contexts.
Conditions param.Field[[]AppFlagUpdateParamsRulesConditionUnion] `json:"conditions" api:"required"`
// Evaluation order; lower numbers are evaluated first. Must be unique across the
// flag's rules.
Priority param.Field[int64] `json:"priority" api:"required"`
// Variation served when this rule matches. Must be a key in `variations`.
ServeVariation param.Field[string] `json:"serve_variation" api:"required"`
Rollout param.Field[AppFlagUpdateParamsRulesRollout] `json:"rollout"`
}
func (AppFlagUpdateParamsRule) MarshalJSON ¶
func (r AppFlagUpdateParamsRule) MarshalJSON() (data []byte, err error)
type AppFlagUpdateParamsRulesCondition ¶
type AppFlagUpdateParamsRulesCondition struct {
Attribute param.Field[string] `json:"attribute"`
Clauses param.Field[interface{}] `json:"clauses"`
LogicalOperator param.Field[AppFlagUpdateParamsRulesConditionsLogicalOperator] `json:"logical_operator"`
Operator param.Field[AppFlagUpdateParamsRulesConditionsOperator] `json:"operator"`
Value param.Field[interface{}] `json:"value"`
}
func (AppFlagUpdateParamsRulesCondition) MarshalJSON ¶
func (r AppFlagUpdateParamsRulesCondition) MarshalJSON() (data []byte, err error)
type AppFlagUpdateParamsRulesConditionUnion ¶
type AppFlagUpdateParamsRulesConditionUnion interface {
// contains filtered or unexported methods
}
Satisfied by flagship.AppFlagUpdateParamsRulesConditionsObject, flagship.AppFlagUpdateParamsRulesConditionsObject, AppFlagUpdateParamsRulesCondition.
type AppFlagUpdateParamsRulesConditionsLogicalOperator ¶
type AppFlagUpdateParamsRulesConditionsLogicalOperator string
const ( AppFlagUpdateParamsRulesConditionsLogicalOperatorAnd AppFlagUpdateParamsRulesConditionsLogicalOperator = "AND" AppFlagUpdateParamsRulesConditionsLogicalOperatorOr AppFlagUpdateParamsRulesConditionsLogicalOperator = "OR" )
func (AppFlagUpdateParamsRulesConditionsLogicalOperator) IsKnown ¶
func (r AppFlagUpdateParamsRulesConditionsLogicalOperator) IsKnown() bool
type AppFlagUpdateParamsRulesConditionsObject ¶
type AppFlagUpdateParamsRulesConditionsObject struct {
Attribute param.Field[string] `json:"attribute" api:"required"`
Operator param.Field[AppFlagUpdateParamsRulesConditionsObjectOperator] `json:"operator" api:"required"`
// Value to compare against the context attribute. Must be an array for `in` and
// `not_in`; numeric and ISO-8601 datetime strings are accepted by the ordering
// operators.
Value param.Field[interface{}] `json:"value" api:"required"`
}
func (AppFlagUpdateParamsRulesConditionsObject) MarshalJSON ¶
func (r AppFlagUpdateParamsRulesConditionsObject) MarshalJSON() (data []byte, err error)
type AppFlagUpdateParamsRulesConditionsObjectOperator ¶
type AppFlagUpdateParamsRulesConditionsObjectOperator string
const ( AppFlagUpdateParamsRulesConditionsObjectOperatorEquals AppFlagUpdateParamsRulesConditionsObjectOperator = "equals" AppFlagUpdateParamsRulesConditionsObjectOperatorNotEquals AppFlagUpdateParamsRulesConditionsObjectOperator = "not_equals" AppFlagUpdateParamsRulesConditionsObjectOperatorGreaterThan AppFlagUpdateParamsRulesConditionsObjectOperator = "greater_than" AppFlagUpdateParamsRulesConditionsObjectOperatorLessThan AppFlagUpdateParamsRulesConditionsObjectOperator = "less_than" AppFlagUpdateParamsRulesConditionsObjectOperatorGreaterThanOrEquals AppFlagUpdateParamsRulesConditionsObjectOperator = "greater_than_or_equals" AppFlagUpdateParamsRulesConditionsObjectOperatorLessThanOrEquals AppFlagUpdateParamsRulesConditionsObjectOperator = "less_than_or_equals" AppFlagUpdateParamsRulesConditionsObjectOperatorContains AppFlagUpdateParamsRulesConditionsObjectOperator = "contains" AppFlagUpdateParamsRulesConditionsObjectOperatorStartsWith AppFlagUpdateParamsRulesConditionsObjectOperator = "starts_with" AppFlagUpdateParamsRulesConditionsObjectOperatorEndsWith AppFlagUpdateParamsRulesConditionsObjectOperator = "ends_with" AppFlagUpdateParamsRulesConditionsObjectOperatorIn AppFlagUpdateParamsRulesConditionsObjectOperator = "in" AppFlagUpdateParamsRulesConditionsObjectOperatorNotIn AppFlagUpdateParamsRulesConditionsObjectOperator = "not_in" )
func (AppFlagUpdateParamsRulesConditionsObjectOperator) IsKnown ¶
func (r AppFlagUpdateParamsRulesConditionsObjectOperator) IsKnown() bool
type AppFlagUpdateParamsRulesConditionsOperator ¶
type AppFlagUpdateParamsRulesConditionsOperator string
const ( AppFlagUpdateParamsRulesConditionsOperatorEquals AppFlagUpdateParamsRulesConditionsOperator = "equals" AppFlagUpdateParamsRulesConditionsOperatorNotEquals AppFlagUpdateParamsRulesConditionsOperator = "not_equals" AppFlagUpdateParamsRulesConditionsOperatorGreaterThan AppFlagUpdateParamsRulesConditionsOperator = "greater_than" AppFlagUpdateParamsRulesConditionsOperatorLessThan AppFlagUpdateParamsRulesConditionsOperator = "less_than" AppFlagUpdateParamsRulesConditionsOperatorGreaterThanOrEquals AppFlagUpdateParamsRulesConditionsOperator = "greater_than_or_equals" AppFlagUpdateParamsRulesConditionsOperatorLessThanOrEquals AppFlagUpdateParamsRulesConditionsOperator = "less_than_or_equals" AppFlagUpdateParamsRulesConditionsOperatorContains AppFlagUpdateParamsRulesConditionsOperator = "contains" AppFlagUpdateParamsRulesConditionsOperatorStartsWith AppFlagUpdateParamsRulesConditionsOperator = "starts_with" AppFlagUpdateParamsRulesConditionsOperatorEndsWith AppFlagUpdateParamsRulesConditionsOperator = "ends_with" AppFlagUpdateParamsRulesConditionsOperatorIn AppFlagUpdateParamsRulesConditionsOperator = "in" AppFlagUpdateParamsRulesConditionsOperatorNotIn AppFlagUpdateParamsRulesConditionsOperator = "not_in" )
func (AppFlagUpdateParamsRulesConditionsOperator) IsKnown ¶
func (r AppFlagUpdateParamsRulesConditionsOperator) IsKnown() bool
type AppFlagUpdateParamsRulesRollout ¶
type AppFlagUpdateParamsRulesRollout struct {
// Percentage of matching traffic (0–100) served this variation. For multi-way
// splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).
Percentage param.Field[float64] `json:"percentage" api:"required"`
// Context attribute used for sticky bucketing. Defaults to `targetingKey`. If
// absent at evaluation time, bucketing is random per request.
Attribute param.Field[string] `json:"attribute"`
}
func (AppFlagUpdateParamsRulesRollout) MarshalJSON ¶
func (r AppFlagUpdateParamsRulesRollout) MarshalJSON() (data []byte, err error)
type AppFlagUpdateParamsType ¶
type AppFlagUpdateParamsType string
Value type of the flag's variations. Inferred from the variation values on write, so it may be omitted in requests.
const ( AppFlagUpdateParamsTypeBoolean AppFlagUpdateParamsType = "boolean" AppFlagUpdateParamsTypeString AppFlagUpdateParamsType = "string" AppFlagUpdateParamsTypeNumber AppFlagUpdateParamsType = "number" AppFlagUpdateParamsTypeJson AppFlagUpdateParamsType = "json" )
func (AppFlagUpdateParamsType) IsKnown ¶
func (r AppFlagUpdateParamsType) IsKnown() bool
type AppFlagUpdateParamsVariationsArray ¶
type AppFlagUpdateParamsVariationsArray []interface{}
func (AppFlagUpdateParamsVariationsArray) ImplementsAppFlagUpdateParamsVariationsUnion ¶
func (r AppFlagUpdateParamsVariationsArray) ImplementsAppFlagUpdateParamsVariationsUnion()
type AppFlagUpdateParamsVariationsMap ¶
type AppFlagUpdateParamsVariationsMap map[string]interface{}
func (AppFlagUpdateParamsVariationsMap) ImplementsAppFlagUpdateParamsVariationsUnion ¶
func (r AppFlagUpdateParamsVariationsMap) ImplementsAppFlagUpdateParamsVariationsUnion()
type AppFlagUpdateParamsVariationsUnion ¶
type AppFlagUpdateParamsVariationsUnion interface {
ImplementsAppFlagUpdateParamsVariationsUnion()
}
Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, flagship.AppFlagUpdateParamsVariationsMap, flagship.AppFlagUpdateParamsVariationsArray.
type AppFlagUpdateResponse ¶
type AppFlagUpdateResponse struct {
// Variation served when no rule matches or the flag is disabled. Must be a key in
// `variations`.
DefaultVariation string `json:"default_variation" api:"required"`
// When false, the flag bypasses all rules and always serves `default_variation`.
Enabled bool `json:"enabled" api:"required"`
// Unique identifier for the flag within an app. Used in all evaluation and SDK
// calls.
Key string `json:"key" api:"required"`
// Targeting rules evaluated in ascending `priority`; the first matching rule wins.
// An empty array means the flag always serves `default_variation`.
Rules []AppFlagUpdateResponseRule `json:"rules" api:"required"`
// Map of variation name to value. All values must be the same type (boolean,
// string, number, or JSON object/array). Each serialized value must be 10KB or
// smaller.
Variations map[string]AppFlagUpdateResponseVariationsUnion `json:"variations" api:"required"`
Description string `json:"description" api:"nullable"`
// Value type of the flag's variations. Inferred from the variation values on
// write, so it may be omitted in requests.
Type AppFlagUpdateResponseType `json:"type"`
UpdatedAt string `json:"updated_at"`
UpdatedBy string `json:"updated_by"`
JSON appFlagUpdateResponseJSON `json:"-"`
}
func (*AppFlagUpdateResponse) UnmarshalJSON ¶
func (r *AppFlagUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AppFlagUpdateResponseEnvelope ¶
type AppFlagUpdateResponseEnvelope struct {
Errors []AppFlagUpdateResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppFlagUpdateResponseEnvelopeMessages `json:"messages" api:"required"`
Result AppFlagUpdateResponse `json:"result" api:"required"`
Success bool `json:"success" api:"required"`
JSON appFlagUpdateResponseEnvelopeJSON `json:"-"`
}
func (*AppFlagUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *AppFlagUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppFlagUpdateResponseEnvelopeErrors ¶
type AppFlagUpdateResponseEnvelopeErrors struct {
Message string `json:"message" api:"required"`
JSON appFlagUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppFlagUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppFlagUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppFlagUpdateResponseEnvelopeMessages ¶
type AppFlagUpdateResponseEnvelopeMessages struct {
Message string `json:"message" api:"required"`
JSON appFlagUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppFlagUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppFlagUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppFlagUpdateResponseRule ¶
type AppFlagUpdateResponseRule struct {
// Conditions the context must satisfy for this rule to match. An empty array
// matches all contexts.
Conditions []AppFlagUpdateResponseRulesCondition `json:"conditions" api:"required"`
// Evaluation order; lower numbers are evaluated first. Must be unique across the
// flag's rules.
Priority int64 `json:"priority" api:"required"`
// Variation served when this rule matches. Must be a key in `variations`.
ServeVariation string `json:"serve_variation" api:"required"`
Rollout AppFlagUpdateResponseRulesRollout `json:"rollout"`
JSON appFlagUpdateResponseRuleJSON `json:"-"`
}
func (*AppFlagUpdateResponseRule) UnmarshalJSON ¶
func (r *AppFlagUpdateResponseRule) UnmarshalJSON(data []byte) (err error)
type AppFlagUpdateResponseRulesCondition ¶
type AppFlagUpdateResponseRulesCondition struct {
Attribute string `json:"attribute"`
// This field can have the runtime type of
// [[]AppFlagUpdateResponseRulesConditionsObjectClause].
Clauses interface{} `json:"clauses"`
LogicalOperator AppFlagUpdateResponseRulesConditionsLogicalOperator `json:"logical_operator"`
Operator AppFlagUpdateResponseRulesConditionsOperator `json:"operator"`
// This field can have the runtime type of [interface{}].
Value interface{} `json:"value"`
JSON appFlagUpdateResponseRulesConditionJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppFlagUpdateResponseRulesCondition) AsUnion ¶
func (r AppFlagUpdateResponseRulesCondition) AsUnion() AppFlagUpdateResponseRulesConditionsUnion
AsUnion returns a AppFlagUpdateResponseRulesConditionsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppFlagUpdateResponseRulesConditionsObject, AppFlagUpdateResponseRulesConditionsObject.
func (*AppFlagUpdateResponseRulesCondition) UnmarshalJSON ¶
func (r *AppFlagUpdateResponseRulesCondition) UnmarshalJSON(data []byte) (err error)
type AppFlagUpdateResponseRulesConditionsLogicalOperator ¶
type AppFlagUpdateResponseRulesConditionsLogicalOperator string
const ( AppFlagUpdateResponseRulesConditionsLogicalOperatorAnd AppFlagUpdateResponseRulesConditionsLogicalOperator = "AND" AppFlagUpdateResponseRulesConditionsLogicalOperatorOr AppFlagUpdateResponseRulesConditionsLogicalOperator = "OR" )
func (AppFlagUpdateResponseRulesConditionsLogicalOperator) IsKnown ¶
func (r AppFlagUpdateResponseRulesConditionsLogicalOperator) IsKnown() bool
type AppFlagUpdateResponseRulesConditionsObject ¶
type AppFlagUpdateResponseRulesConditionsObject struct {
Attribute string `json:"attribute" api:"required"`
Operator AppFlagUpdateResponseRulesConditionsObjectOperator `json:"operator" api:"required"`
// Value to compare against the context attribute. Must be an array for `in` and
// `not_in`; numeric and ISO-8601 datetime strings are accepted by the ordering
// operators.
Value interface{} `json:"value" api:"required"`
JSON appFlagUpdateResponseRulesConditionsObjectJSON `json:"-"`
}
func (*AppFlagUpdateResponseRulesConditionsObject) UnmarshalJSON ¶
func (r *AppFlagUpdateResponseRulesConditionsObject) UnmarshalJSON(data []byte) (err error)
type AppFlagUpdateResponseRulesConditionsObjectOperator ¶
type AppFlagUpdateResponseRulesConditionsObjectOperator string
const ( AppFlagUpdateResponseRulesConditionsObjectOperatorEquals AppFlagUpdateResponseRulesConditionsObjectOperator = "equals" AppFlagUpdateResponseRulesConditionsObjectOperatorNotEquals AppFlagUpdateResponseRulesConditionsObjectOperator = "not_equals" AppFlagUpdateResponseRulesConditionsObjectOperatorGreaterThan AppFlagUpdateResponseRulesConditionsObjectOperator = "greater_than" AppFlagUpdateResponseRulesConditionsObjectOperatorLessThan AppFlagUpdateResponseRulesConditionsObjectOperator = "less_than" AppFlagUpdateResponseRulesConditionsObjectOperatorGreaterThanOrEquals AppFlagUpdateResponseRulesConditionsObjectOperator = "greater_than_or_equals" AppFlagUpdateResponseRulesConditionsObjectOperatorLessThanOrEquals AppFlagUpdateResponseRulesConditionsObjectOperator = "less_than_or_equals" AppFlagUpdateResponseRulesConditionsObjectOperatorContains AppFlagUpdateResponseRulesConditionsObjectOperator = "contains" AppFlagUpdateResponseRulesConditionsObjectOperatorStartsWith AppFlagUpdateResponseRulesConditionsObjectOperator = "starts_with" AppFlagUpdateResponseRulesConditionsObjectOperatorEndsWith AppFlagUpdateResponseRulesConditionsObjectOperator = "ends_with" AppFlagUpdateResponseRulesConditionsObjectOperatorIn AppFlagUpdateResponseRulesConditionsObjectOperator = "in" AppFlagUpdateResponseRulesConditionsObjectOperatorNotIn AppFlagUpdateResponseRulesConditionsObjectOperator = "not_in" )
func (AppFlagUpdateResponseRulesConditionsObjectOperator) IsKnown ¶
func (r AppFlagUpdateResponseRulesConditionsObjectOperator) IsKnown() bool
type AppFlagUpdateResponseRulesConditionsOperator ¶
type AppFlagUpdateResponseRulesConditionsOperator string
const ( AppFlagUpdateResponseRulesConditionsOperatorEquals AppFlagUpdateResponseRulesConditionsOperator = "equals" AppFlagUpdateResponseRulesConditionsOperatorNotEquals AppFlagUpdateResponseRulesConditionsOperator = "not_equals" AppFlagUpdateResponseRulesConditionsOperatorGreaterThan AppFlagUpdateResponseRulesConditionsOperator = "greater_than" AppFlagUpdateResponseRulesConditionsOperatorLessThan AppFlagUpdateResponseRulesConditionsOperator = "less_than" AppFlagUpdateResponseRulesConditionsOperatorGreaterThanOrEquals AppFlagUpdateResponseRulesConditionsOperator = "greater_than_or_equals" AppFlagUpdateResponseRulesConditionsOperatorLessThanOrEquals AppFlagUpdateResponseRulesConditionsOperator = "less_than_or_equals" AppFlagUpdateResponseRulesConditionsOperatorContains AppFlagUpdateResponseRulesConditionsOperator = "contains" AppFlagUpdateResponseRulesConditionsOperatorStartsWith AppFlagUpdateResponseRulesConditionsOperator = "starts_with" AppFlagUpdateResponseRulesConditionsOperatorEndsWith AppFlagUpdateResponseRulesConditionsOperator = "ends_with" AppFlagUpdateResponseRulesConditionsOperatorIn AppFlagUpdateResponseRulesConditionsOperator = "in" AppFlagUpdateResponseRulesConditionsOperatorNotIn AppFlagUpdateResponseRulesConditionsOperator = "not_in" )
func (AppFlagUpdateResponseRulesConditionsOperator) IsKnown ¶
func (r AppFlagUpdateResponseRulesConditionsOperator) IsKnown() bool
type AppFlagUpdateResponseRulesConditionsUnion ¶
type AppFlagUpdateResponseRulesConditionsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppFlagUpdateResponseRulesConditionsObject or AppFlagUpdateResponseRulesConditionsObject.
type AppFlagUpdateResponseRulesRollout ¶
type AppFlagUpdateResponseRulesRollout struct {
// Percentage of matching traffic (0–100) served this variation. For multi-way
// splits, use cumulative upper bounds across rules (e.g. 30, 70, 100).
Percentage float64 `json:"percentage" api:"required"`
// Context attribute used for sticky bucketing. Defaults to `targetingKey`. If
// absent at evaluation time, bucketing is random per request.
Attribute string `json:"attribute"`
JSON appFlagUpdateResponseRulesRolloutJSON `json:"-"`
}
func (*AppFlagUpdateResponseRulesRollout) UnmarshalJSON ¶
func (r *AppFlagUpdateResponseRulesRollout) UnmarshalJSON(data []byte) (err error)
type AppFlagUpdateResponseType ¶
type AppFlagUpdateResponseType string
Value type of the flag's variations. Inferred from the variation values on write, so it may be omitted in requests.
const ( AppFlagUpdateResponseTypeBoolean AppFlagUpdateResponseType = "boolean" AppFlagUpdateResponseTypeString AppFlagUpdateResponseType = "string" AppFlagUpdateResponseTypeNumber AppFlagUpdateResponseType = "number" AppFlagUpdateResponseTypeJson AppFlagUpdateResponseType = "json" )
func (AppFlagUpdateResponseType) IsKnown ¶
func (r AppFlagUpdateResponseType) IsKnown() bool
type AppFlagUpdateResponseVariationsArray ¶
type AppFlagUpdateResponseVariationsArray []interface{}
func (AppFlagUpdateResponseVariationsArray) ImplementsAppFlagUpdateResponseVariationsUnion ¶
func (r AppFlagUpdateResponseVariationsArray) ImplementsAppFlagUpdateResponseVariationsUnion()
type AppFlagUpdateResponseVariationsMap ¶
type AppFlagUpdateResponseVariationsMap map[string]interface{}
func (AppFlagUpdateResponseVariationsMap) ImplementsAppFlagUpdateResponseVariationsUnion ¶
func (r AppFlagUpdateResponseVariationsMap) ImplementsAppFlagUpdateResponseVariationsUnion()
type AppFlagUpdateResponseVariationsUnion ¶
type AppFlagUpdateResponseVariationsUnion interface {
ImplementsAppFlagUpdateResponseVariationsUnion()
}
Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, AppFlagUpdateResponseVariationsMap or AppFlagUpdateResponseVariationsArray.
type AppGetParams ¶
type AppGetResponse ¶
type AppGetResponse struct {
ID string `json:"id" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
Name string `json:"name" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
// Email of the actor who last modified the app, or `edge-gateway` for
// gateway-authenticated changes.
UpdatedBy string `json:"updated_by" api:"required"`
JSON appGetResponseJSON `json:"-"`
}
func (*AppGetResponse) UnmarshalJSON ¶
func (r *AppGetResponse) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelope ¶
type AppGetResponseEnvelope struct {
Errors []AppGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppGetResponseEnvelopeMessages `json:"messages" api:"required"`
Result AppGetResponse `json:"result" api:"required"`
Success bool `json:"success" api:"required"`
JSON appGetResponseEnvelopeJSON `json:"-"`
}
func (*AppGetResponseEnvelope) UnmarshalJSON ¶
func (r *AppGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeErrors ¶
type AppGetResponseEnvelopeErrors struct {
Message string `json:"message" api:"required"`
JSON appGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeMessages ¶
type AppGetResponseEnvelopeMessages struct {
Message string `json:"message" api:"required"`
JSON appGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppListParams ¶
type AppListResponse ¶
type AppListResponse struct {
ID string `json:"id" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
Name string `json:"name" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
// Email of the actor who last modified the app, or `edge-gateway` for
// gateway-authenticated changes.
UpdatedBy string `json:"updated_by" api:"required"`
JSON appListResponseJSON `json:"-"`
}
func (*AppListResponse) UnmarshalJSON ¶
func (r *AppListResponse) UnmarshalJSON(data []byte) (err error)
type AppNewParams ¶
type AppNewParams struct {
// Cloudflare account ID.
AccountID param.Field[string] `path:"account_id" api:"required"`
Name param.Field[string] `json:"name" api:"required"`
}
func (AppNewParams) MarshalJSON ¶
func (r AppNewParams) MarshalJSON() (data []byte, err error)
type AppNewResponse ¶
type AppNewResponse struct {
ID string `json:"id" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
Name string `json:"name" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
// Email of the actor who last modified the app, or `edge-gateway` for
// gateway-authenticated changes.
UpdatedBy string `json:"updated_by" api:"required"`
JSON appNewResponseJSON `json:"-"`
}
func (*AppNewResponse) UnmarshalJSON ¶
func (r *AppNewResponse) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelope ¶
type AppNewResponseEnvelope struct {
Errors []AppNewResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppNewResponseEnvelopeMessages `json:"messages" api:"required"`
Result AppNewResponse `json:"result" api:"required"`
Success bool `json:"success" api:"required"`
JSON appNewResponseEnvelopeJSON `json:"-"`
}
func (*AppNewResponseEnvelope) UnmarshalJSON ¶
func (r *AppNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeErrors ¶
type AppNewResponseEnvelopeErrors struct {
Message string `json:"message" api:"required"`
JSON appNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeMessages ¶
type AppNewResponseEnvelopeMessages struct {
Message string `json:"message" api:"required"`
JSON appNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppService ¶
type AppService struct {
Options []option.RequestOption
Flags *AppFlagService
Evaluate *AppEvaluateService
}
AppService 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 NewAppService method instead.
func NewAppService ¶
func NewAppService(opts ...option.RequestOption) (r *AppService)
NewAppService 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 (*AppService) Delete ¶
func (r *AppService) Delete(ctx context.Context, appID string, body AppDeleteParams, opts ...option.RequestOption) (res *AppDeleteResponse, err error)
Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.
func (*AppService) Get ¶
func (r *AppService) Get(ctx context.Context, appID string, query AppGetParams, opts ...option.RequestOption) (res *AppGetResponse, err error)
Returns an app's name and audit fields. Flag definitions are not included.
func (*AppService) List ¶
func (r *AppService) List(ctx context.Context, query AppListParams, opts ...option.RequestOption) (res *pagination.SinglePage[AppListResponse], err error)
Lists all apps in the account. Returns identity and audit fields only — flag definitions are not included.
func (*AppService) ListAutoPaging ¶
func (r *AppService) ListAutoPaging(ctx context.Context, query AppListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[AppListResponse]
Lists all apps in the account. Returns identity and audit fields only — flag definitions are not included.
func (*AppService) New ¶
func (r *AppService) New(ctx context.Context, params AppNewParams, opts ...option.RequestOption) (res *AppNewResponse, err error)
Creates an app. The returned `id` is used in all subsequent flag, changelog, and evaluation requests.
func (*AppService) Update ¶
func (r *AppService) Update(ctx context.Context, appID string, params AppUpdateParams, opts ...option.RequestOption) (res *AppUpdateResponse, err error)
Updates an app. Only `name` is mutable.
type AppUpdateParams ¶
type AppUpdateParams struct {
// Cloudflare account ID.
AccountID param.Field[string] `path:"account_id" api:"required"`
Name param.Field[string] `json:"name"`
}
func (AppUpdateParams) MarshalJSON ¶
func (r AppUpdateParams) MarshalJSON() (data []byte, err error)
type AppUpdateResponse ¶
type AppUpdateResponse struct {
ID string `json:"id" api:"required"`
CreatedAt string `json:"created_at" api:"required"`
Name string `json:"name" api:"required"`
UpdatedAt string `json:"updated_at" api:"required"`
// Email of the actor who last modified the app, or `edge-gateway` for
// gateway-authenticated changes.
UpdatedBy string `json:"updated_by" api:"required"`
JSON appUpdateResponseJSON `json:"-"`
}
func (*AppUpdateResponse) UnmarshalJSON ¶
func (r *AppUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelope ¶
type AppUpdateResponseEnvelope struct {
Errors []AppUpdateResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppUpdateResponseEnvelopeMessages `json:"messages" api:"required"`
Result AppUpdateResponse `json:"result" api:"required"`
Success bool `json:"success" api:"required"`
JSON appUpdateResponseEnvelopeJSON `json:"-"`
}
func (*AppUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeErrors ¶
type AppUpdateResponseEnvelopeErrors struct {
Message string `json:"message" api:"required"`
JSON appUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeMessages ¶
type AppUpdateResponseEnvelopeMessages struct {
Message string `json:"message" api:"required"`
JSON appUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
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 ¶
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate.
This is an alias to an internal type.
type CertificateRequestType ¶
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 CloudflareTunnelConfigSrc ¶
type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc
Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelStatus ¶
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 ErrorDataSource ¶
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type FlagshipService ¶
type FlagshipService struct {
Options []option.RequestOption
Apps *AppService
}
FlagshipService 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 NewFlagshipService method instead.
func NewFlagshipService ¶
func NewFlagshipService(opts ...option.RequestOption) (r *FlagshipService)
NewFlagshipService 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 MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
A scope is a combination of scope objects which provides additional context.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
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 RatePlanID ¶
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
This is an alias to an internal type.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type ResponseInfoSource ¶
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SubscriptionFrequency ¶
type SubscriptionFrequency = shared.SubscriptionFrequency
How often the subscription is renewed automatically.
This is an alias to an internal type.
type SubscriptionParam ¶
type SubscriptionParam = shared.SubscriptionParam
This is an alias to an internal type.
type SubscriptionState ¶
type SubscriptionState = shared.SubscriptionState
The state that the subscription is in.
This is an alias to an internal type.
type TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNested ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectString ¶
type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.