Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AllowedOrigins
- type AllowedOriginsParam
- type Audio
- type AudioStatus
- type AudioTrackCopyParams
- type AudioTrackCopyResponseEnvelope
- type AudioTrackCopyResponseEnvelopeErrors
- type AudioTrackCopyResponseEnvelopeErrorsSource
- type AudioTrackCopyResponseEnvelopeMessages
- type AudioTrackCopyResponseEnvelopeMessagesSource
- type AudioTrackCopyResponseEnvelopeSuccess
- type AudioTrackDeleteParams
- type AudioTrackDeleteResponseEnvelope
- type AudioTrackDeleteResponseEnvelopeErrors
- type AudioTrackDeleteResponseEnvelopeErrorsSource
- type AudioTrackDeleteResponseEnvelopeMessages
- type AudioTrackDeleteResponseEnvelopeMessagesSource
- type AudioTrackDeleteResponseEnvelopeSuccess
- type AudioTrackEditParams
- type AudioTrackEditResponseEnvelope
- type AudioTrackEditResponseEnvelopeErrors
- type AudioTrackEditResponseEnvelopeErrorsSource
- type AudioTrackEditResponseEnvelopeMessages
- type AudioTrackEditResponseEnvelopeMessagesSource
- type AudioTrackEditResponseEnvelopeSuccess
- type AudioTrackGetParams
- type AudioTrackService
- func (r *AudioTrackService) Copy(ctx context.Context, identifier string, params AudioTrackCopyParams, ...) (res *Audio, err error)
- func (r *AudioTrackService) Delete(ctx context.Context, identifier string, audioIdentifier string, ...) (res *string, err error)
- func (r *AudioTrackService) Edit(ctx context.Context, identifier string, audioIdentifier string, ...) (res *Audio, err error)
- func (r *AudioTrackService) Get(ctx context.Context, identifier string, query AudioTrackGetParams, ...) (res *pagination.SinglePage[Audio], err error)
- func (r *AudioTrackService) GetAutoPaging(ctx context.Context, identifier string, query AudioTrackGetParams, ...) *pagination.SinglePageAutoPager[Audio]
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type Caption
- type CaptionGetParams
- type CaptionLanguageDeleteParams
- type CaptionLanguageDeleteResponseEnvelope
- type CaptionLanguageDeleteResponseEnvelopeErrors
- type CaptionLanguageDeleteResponseEnvelopeErrorsSource
- type CaptionLanguageDeleteResponseEnvelopeMessages
- type CaptionLanguageDeleteResponseEnvelopeMessagesSource
- type CaptionLanguageDeleteResponseEnvelopeSuccess
- type CaptionLanguageGetParams
- type CaptionLanguageGetResponseEnvelope
- type CaptionLanguageGetResponseEnvelopeErrors
- type CaptionLanguageGetResponseEnvelopeErrorsSource
- type CaptionLanguageGetResponseEnvelopeMessages
- type CaptionLanguageGetResponseEnvelopeMessagesSource
- type CaptionLanguageGetResponseEnvelopeSuccess
- type CaptionLanguageNewParams
- type CaptionLanguageNewResponseEnvelope
- type CaptionLanguageNewResponseEnvelopeErrors
- type CaptionLanguageNewResponseEnvelopeErrorsSource
- type CaptionLanguageNewResponseEnvelopeMessages
- type CaptionLanguageNewResponseEnvelopeMessagesSource
- type CaptionLanguageNewResponseEnvelopeSuccess
- type CaptionLanguageService
- func (r *CaptionLanguageService) Delete(ctx context.Context, identifier string, language string, ...) (res *string, err error)
- func (r *CaptionLanguageService) Get(ctx context.Context, identifier string, language string, ...) (res *Caption, err error)
- func (r *CaptionLanguageService) New(ctx context.Context, identifier string, language string, ...) (res *Caption, err error)
- func (r *CaptionLanguageService) Update(ctx context.Context, identifier string, language string, ...) (res *Caption, err error)
- type CaptionLanguageUpdateParams
- type CaptionLanguageUpdateResponseEnvelope
- type CaptionLanguageUpdateResponseEnvelopeErrors
- type CaptionLanguageUpdateResponseEnvelopeErrorsSource
- type CaptionLanguageUpdateResponseEnvelopeMessages
- type CaptionLanguageUpdateResponseEnvelopeMessagesSource
- type CaptionLanguageUpdateResponseEnvelopeSuccess
- type CaptionLanguageVttGetParams
- type CaptionLanguageVttService
- type CaptionService
- type CaptionStatus
- type CertificateCA
- type CertificateRequestType
- type Clip
- type ClipNewParams
- type ClipNewParamsWatermark
- type ClipNewResponseEnvelope
- type ClipNewResponseEnvelopeErrors
- type ClipNewResponseEnvelopeErrorsSource
- type ClipNewResponseEnvelopeMessages
- type ClipNewResponseEnvelopeMessagesSource
- type ClipNewResponseEnvelopeSuccess
- type ClipPlayback
- type ClipService
- type ClipStatus
- type ClipWatermark
- type CloudflareTunnel
- type CloudflareTunnelConfigSrc
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type CopyNewParams
- type CopyNewParamsWatermark
- type CopyNewResponseEnvelope
- type CopyNewResponseEnvelopeErrors
- type CopyNewResponseEnvelopeErrorsSource
- type CopyNewResponseEnvelopeMessages
- type CopyNewResponseEnvelopeMessagesSource
- type CopyNewResponseEnvelopeSuccess
- type CopyService
- type DirectUploadNewParams
- type DirectUploadNewParamsWatermark
- type DirectUploadNewResponse
- type DirectUploadNewResponseEnvelope
- type DirectUploadNewResponseEnvelopeErrors
- type DirectUploadNewResponseEnvelopeErrorsSource
- type DirectUploadNewResponseEnvelopeMessages
- type DirectUploadNewResponseEnvelopeMessagesSource
- type DirectUploadNewResponseEnvelopeSuccess
- type DirectUploadService
- type DownloadDeleteParams
- type DownloadDeleteResponseEnvelope
- type DownloadDeleteResponseEnvelopeErrors
- type DownloadDeleteResponseEnvelopeErrorsSource
- type DownloadDeleteResponseEnvelopeMessages
- type DownloadDeleteResponseEnvelopeMessagesSource
- type DownloadDeleteResponseEnvelopeSuccess
- type DownloadGetParams
- type DownloadGetResponse
- type DownloadGetResponseAudio
- type DownloadGetResponseAudioStatus
- type DownloadGetResponseDefault
- type DownloadGetResponseDefaultStatus
- type DownloadGetResponseEnvelope
- type DownloadGetResponseEnvelopeErrors
- type DownloadGetResponseEnvelopeErrorsSource
- type DownloadGetResponseEnvelopeMessages
- type DownloadGetResponseEnvelopeMessagesSource
- type DownloadGetResponseEnvelopeSuccess
- type DownloadNewParams
- type DownloadNewResponse
- type DownloadNewResponseEnvelope
- type DownloadNewResponseEnvelopeErrors
- type DownloadNewResponseEnvelopeErrorsSource
- type DownloadNewResponseEnvelopeMessages
- type DownloadNewResponseEnvelopeMessagesSource
- type DownloadNewResponseEnvelopeSuccess
- type DownloadNewResponseStatus
- type DownloadService
- func (r *DownloadService) Delete(ctx context.Context, identifier string, body DownloadDeleteParams, ...) (res *string, err error)
- func (r *DownloadService) Get(ctx context.Context, identifier string, query DownloadGetParams, ...) (res *DownloadGetResponse, err error)
- func (r *DownloadService) New(ctx context.Context, identifier string, params DownloadNewParams, ...) (res *DownloadNewResponse, err error)
- type EmbedGetParams
- type EmbedService
- type Error
- type ErrorData
- type ErrorDataSource
- type KeyDeleteParams
- type KeyDeleteResponseEnvelope
- type KeyDeleteResponseEnvelopeErrors
- type KeyDeleteResponseEnvelopeErrorsSource
- type KeyDeleteResponseEnvelopeMessages
- type KeyDeleteResponseEnvelopeMessagesSource
- type KeyDeleteResponseEnvelopeSuccess
- type KeyGetParams
- type KeyGetResponse
- type KeyNewParams
- type KeyNewResponseEnvelope
- type KeyNewResponseEnvelopeErrors
- type KeyNewResponseEnvelopeErrorsSource
- type KeyNewResponseEnvelopeMessages
- type KeyNewResponseEnvelopeMessagesSource
- type KeyNewResponseEnvelopeSuccess
- type KeyService
- func (r *KeyService) Delete(ctx context.Context, identifier string, body KeyDeleteParams, ...) (res *string, err error)
- func (r *KeyService) Get(ctx context.Context, query KeyGetParams, opts ...option.RequestOption) (res *pagination.SinglePage[KeyGetResponse], err error)
- func (r *KeyService) GetAutoPaging(ctx context.Context, query KeyGetParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[KeyGetResponse]
- func (r *KeyService) New(ctx context.Context, params KeyNewParams, opts ...option.RequestOption) (res *Keys, err error)
- type Keys
- type LiveInput
- type LiveInputDeleteParams
- type LiveInputGetParams
- type LiveInputGetResponseEnvelope
- type LiveInputGetResponseEnvelopeErrors
- type LiveInputGetResponseEnvelopeErrorsSource
- type LiveInputGetResponseEnvelopeMessages
- type LiveInputGetResponseEnvelopeMessagesSource
- type LiveInputGetResponseEnvelopeSuccess
- type LiveInputListParams
- type LiveInputListResponse
- type LiveInputListResponseEnvelope
- type LiveInputListResponseEnvelopeErrors
- type LiveInputListResponseEnvelopeErrorsSource
- type LiveInputListResponseEnvelopeMessages
- type LiveInputListResponseEnvelopeMessagesSource
- type LiveInputListResponseEnvelopeSuccess
- type LiveInputListResponseLiveInput
- type LiveInputNewParams
- type LiveInputNewParamsRecording
- type LiveInputNewParamsRecordingMode
- type LiveInputNewResponseEnvelope
- type LiveInputNewResponseEnvelopeErrors
- type LiveInputNewResponseEnvelopeErrorsSource
- type LiveInputNewResponseEnvelopeMessages
- type LiveInputNewResponseEnvelopeMessagesSource
- type LiveInputNewResponseEnvelopeSuccess
- type LiveInputOutputDeleteParams
- type LiveInputOutputListParams
- type LiveInputOutputNewParams
- type LiveInputOutputNewResponseEnvelope
- type LiveInputOutputNewResponseEnvelopeErrors
- type LiveInputOutputNewResponseEnvelopeErrorsSource
- type LiveInputOutputNewResponseEnvelopeMessages
- type LiveInputOutputNewResponseEnvelopeMessagesSource
- type LiveInputOutputNewResponseEnvelopeSuccess
- type LiveInputOutputService
- func (r *LiveInputOutputService) Delete(ctx context.Context, liveInputIdentifier string, outputIdentifier string, ...) (err error)
- func (r *LiveInputOutputService) List(ctx context.Context, liveInputIdentifier string, ...) (res *pagination.SinglePage[Output], err error)
- func (r *LiveInputOutputService) ListAutoPaging(ctx context.Context, liveInputIdentifier string, ...) *pagination.SinglePageAutoPager[Output]
- func (r *LiveInputOutputService) New(ctx context.Context, liveInputIdentifier string, ...) (res *Output, err error)
- func (r *LiveInputOutputService) Update(ctx context.Context, liveInputIdentifier string, outputIdentifier string, ...) (res *Output, err error)
- type LiveInputOutputUpdateParams
- type LiveInputOutputUpdateResponseEnvelope
- type LiveInputOutputUpdateResponseEnvelopeErrors
- type LiveInputOutputUpdateResponseEnvelopeErrorsSource
- type LiveInputOutputUpdateResponseEnvelopeMessages
- type LiveInputOutputUpdateResponseEnvelopeMessagesSource
- type LiveInputOutputUpdateResponseEnvelopeSuccess
- type LiveInputRecording
- type LiveInputRecordingMode
- type LiveInputRtmps
- type LiveInputRtmpsPlayback
- type LiveInputService
- func (r *LiveInputService) Delete(ctx context.Context, liveInputIdentifier string, body LiveInputDeleteParams, ...) (err error)
- func (r *LiveInputService) Get(ctx context.Context, liveInputIdentifier string, query LiveInputGetParams, ...) (res *LiveInput, err error)
- func (r *LiveInputService) List(ctx context.Context, params LiveInputListParams, opts ...option.RequestOption) (res *LiveInputListResponse, err error)
- func (r *LiveInputService) New(ctx context.Context, params LiveInputNewParams, opts ...option.RequestOption) (res *LiveInput, err error)
- func (r *LiveInputService) Update(ctx context.Context, liveInputIdentifier string, params LiveInputUpdateParams, ...) (res *LiveInput, err error)
- type LiveInputSrt
- type LiveInputSrtPlayback
- type LiveInputStatus
- type LiveInputUpdateParams
- type LiveInputUpdateParamsRecording
- type LiveInputUpdateParamsRecordingMode
- type LiveInputUpdateResponseEnvelope
- type LiveInputUpdateResponseEnvelopeErrors
- type LiveInputUpdateResponseEnvelopeErrorsSource
- type LiveInputUpdateResponseEnvelopeMessages
- type LiveInputUpdateResponseEnvelopeMessagesSource
- type LiveInputUpdateResponseEnvelopeSuccess
- type LiveInputWebRtc
- type LiveInputWebRtcPlayback
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Output
- 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 StreamDeleteParams
- type StreamEditParams
- type StreamEditResponseEnvelope
- type StreamEditResponseEnvelopeErrors
- type StreamEditResponseEnvelopeErrorsSource
- type StreamEditResponseEnvelopeMessages
- type StreamEditResponseEnvelopeMessagesSource
- type StreamEditResponseEnvelopeSuccess
- type StreamGetParams
- type StreamGetResponseEnvelope
- type StreamGetResponseEnvelopeErrors
- type StreamGetResponseEnvelopeErrorsSource
- type StreamGetResponseEnvelopeMessages
- type StreamGetResponseEnvelopeMessagesSource
- type StreamGetResponseEnvelopeSuccess
- type StreamListParams
- type StreamListParamsStatus
- type StreamNewParams
- type StreamNewParamsTusResumable
- type StreamService
- func (r *StreamService) Delete(ctx context.Context, identifier string, body StreamDeleteParams, ...) (err error)
- func (r *StreamService) Edit(ctx context.Context, identifier string, params StreamEditParams, ...) (res *Video, err error)
- func (r *StreamService) Get(ctx context.Context, identifier string, query StreamGetParams, ...) (res *Video, err error)
- func (r *StreamService) List(ctx context.Context, params StreamListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Video], err error)
- func (r *StreamService) ListAutoPaging(ctx context.Context, params StreamListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Video]
- func (r *StreamService) New(ctx context.Context, params StreamNewParams, opts ...option.RequestOption) (err error)
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenNewParams
- type TokenNewParamsAccessRule
- type TokenNewParamsAccessRulesAction
- type TokenNewParamsAccessRulesType
- type TokenNewResponse
- type TokenNewResponseEnvelope
- type TokenNewResponseEnvelopeErrors
- type TokenNewResponseEnvelopeErrorsSource
- type TokenNewResponseEnvelopeMessages
- type TokenNewResponseEnvelopeMessagesSource
- type TokenNewResponseEnvelopeSuccess
- 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 TokenService
- type TokenStatus
- type TokenValue
- type Video
- type VideoInput
- type VideoPlayback
- type VideoService
- type VideoStatus
- type VideoStatusState
- type VideoStorageUsageParams
- type VideoStorageUsageResponse
- type VideoStorageUsageResponseEnvelope
- type VideoStorageUsageResponseEnvelopeErrors
- type VideoStorageUsageResponseEnvelopeErrorsSource
- type VideoStorageUsageResponseEnvelopeMessages
- type VideoStorageUsageResponseEnvelopeMessagesSource
- type VideoStorageUsageResponseEnvelopeSuccess
- type Watermark
- type WatermarkDeleteParams
- type WatermarkDeleteResponseEnvelope
- type WatermarkDeleteResponseEnvelopeErrors
- type WatermarkDeleteResponseEnvelopeErrorsSource
- type WatermarkDeleteResponseEnvelopeMessages
- type WatermarkDeleteResponseEnvelopeMessagesSource
- type WatermarkDeleteResponseEnvelopeSuccess
- type WatermarkGetParams
- type WatermarkGetResponseEnvelope
- type WatermarkGetResponseEnvelopeErrors
- type WatermarkGetResponseEnvelopeErrorsSource
- type WatermarkGetResponseEnvelopeMessages
- type WatermarkGetResponseEnvelopeMessagesSource
- type WatermarkGetResponseEnvelopeSuccess
- type WatermarkListParams
- type WatermarkNewParams
- type WatermarkNewResponseEnvelope
- type WatermarkNewResponseEnvelopeErrors
- type WatermarkNewResponseEnvelopeErrorsSource
- type WatermarkNewResponseEnvelopeMessages
- type WatermarkNewResponseEnvelopeMessagesSource
- type WatermarkNewResponseEnvelopeSuccess
- type WatermarkService
- func (r *WatermarkService) Delete(ctx context.Context, identifier string, body WatermarkDeleteParams, ...) (res *string, err error)
- func (r *WatermarkService) Get(ctx context.Context, identifier string, query WatermarkGetParams, ...) (res *Watermark, err error)
- func (r *WatermarkService) List(ctx context.Context, query WatermarkListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Watermark], err error)
- func (r *WatermarkService) ListAutoPaging(ctx context.Context, query WatermarkListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Watermark]
- func (r *WatermarkService) New(ctx context.Context, params WatermarkNewParams, opts ...option.RequestOption) (res *Watermark, err error)
- type WebhookDeleteParams
- type WebhookDeleteResponseEnvelope
- type WebhookDeleteResponseEnvelopeErrors
- type WebhookDeleteResponseEnvelopeErrorsSource
- type WebhookDeleteResponseEnvelopeMessages
- type WebhookDeleteResponseEnvelopeMessagesSource
- type WebhookDeleteResponseEnvelopeSuccess
- type WebhookGetParams
- type WebhookGetResponse
- type WebhookGetResponseEnvelope
- type WebhookGetResponseEnvelopeErrors
- type WebhookGetResponseEnvelopeErrorsSource
- type WebhookGetResponseEnvelopeMessages
- type WebhookGetResponseEnvelopeMessagesSource
- type WebhookGetResponseEnvelopeSuccess
- type WebhookService
- func (r *WebhookService) Delete(ctx context.Context, body WebhookDeleteParams, opts ...option.RequestOption) (res *string, err error)
- func (r *WebhookService) Get(ctx context.Context, query WebhookGetParams, opts ...option.RequestOption) (res *WebhookGetResponse, err error)
- func (r *WebhookService) Update(ctx context.Context, params WebhookUpdateParams, opts ...option.RequestOption) (res *WebhookUpdateResponse, err error)
- type WebhookUpdateParams
- type WebhookUpdateResponse
- type WebhookUpdateResponseEnvelope
- type WebhookUpdateResponseEnvelopeErrors
- type WebhookUpdateResponseEnvelopeErrorsSource
- type WebhookUpdateResponseEnvelopeMessages
- type WebhookUpdateResponseEnvelopeMessagesSource
- type WebhookUpdateResponseEnvelopeSuccess
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 AllowedOrigins ¶
type AllowedOrigins = string
type AllowedOriginsParam ¶
type AllowedOriginsParam = string
type Audio ¶
type Audio struct {
// Denotes whether the audio track will be played by default in a player.
Default bool `json:"default"`
// A string to uniquely identify the track amongst other audio track labels for the
// specified video.
Label string `json:"label"`
// Specifies the processing status of the video.
Status AudioStatus `json:"status"`
// A Cloudflare-generated unique identifier for a media item.
UID string `json:"uid"`
JSON audioJSON `json:"-"`
}
func (*Audio) UnmarshalJSON ¶
type AudioStatus ¶
type AudioStatus string
Specifies the processing status of the video.
const ( AudioStatusQueued AudioStatus = "queued" AudioStatusReady AudioStatus = "ready" AudioStatusError AudioStatus = "error" )
func (AudioStatus) IsKnown ¶
func (r AudioStatus) IsKnown() bool
type AudioTrackCopyParams ¶
type AudioTrackCopyParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// A string to uniquely identify the track amongst other audio track labels for the
// specified video.
Label param.Field[string] `json:"label,required"`
// An audio track URL. The server must be publicly routable and support `HTTP HEAD`
// requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD`
// requests with a `content-range` header that includes the size of the file.
URL param.Field[string] `json:"url" format:"uri"`
}
func (AudioTrackCopyParams) MarshalJSON ¶
func (r AudioTrackCopyParams) MarshalJSON() (data []byte, err error)
type AudioTrackCopyResponseEnvelope ¶
type AudioTrackCopyResponseEnvelope struct {
Errors []AudioTrackCopyResponseEnvelopeErrors `json:"errors,required"`
Messages []AudioTrackCopyResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success AudioTrackCopyResponseEnvelopeSuccess `json:"success,required"`
Result Audio `json:"result"`
JSON audioTrackCopyResponseEnvelopeJSON `json:"-"`
}
func (*AudioTrackCopyResponseEnvelope) UnmarshalJSON ¶
func (r *AudioTrackCopyResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AudioTrackCopyResponseEnvelopeErrors ¶
type AudioTrackCopyResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source AudioTrackCopyResponseEnvelopeErrorsSource `json:"source"`
JSON audioTrackCopyResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AudioTrackCopyResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AudioTrackCopyResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AudioTrackCopyResponseEnvelopeErrorsSource ¶
type AudioTrackCopyResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON audioTrackCopyResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AudioTrackCopyResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AudioTrackCopyResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AudioTrackCopyResponseEnvelopeMessages ¶
type AudioTrackCopyResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source AudioTrackCopyResponseEnvelopeMessagesSource `json:"source"`
JSON audioTrackCopyResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AudioTrackCopyResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AudioTrackCopyResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AudioTrackCopyResponseEnvelopeMessagesSource ¶
type AudioTrackCopyResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON audioTrackCopyResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AudioTrackCopyResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AudioTrackCopyResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AudioTrackCopyResponseEnvelopeSuccess ¶
type AudioTrackCopyResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AudioTrackCopyResponseEnvelopeSuccessTrue AudioTrackCopyResponseEnvelopeSuccess = true
)
func (AudioTrackCopyResponseEnvelopeSuccess) IsKnown ¶
func (r AudioTrackCopyResponseEnvelopeSuccess) IsKnown() bool
type AudioTrackDeleteParams ¶
type AudioTrackDeleteResponseEnvelope ¶
type AudioTrackDeleteResponseEnvelope struct {
Errors []AudioTrackDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []AudioTrackDeleteResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success AudioTrackDeleteResponseEnvelopeSuccess `json:"success,required"`
Result string `json:"result"`
JSON audioTrackDeleteResponseEnvelopeJSON `json:"-"`
}
func (*AudioTrackDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *AudioTrackDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AudioTrackDeleteResponseEnvelopeErrors ¶
type AudioTrackDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source AudioTrackDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON audioTrackDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AudioTrackDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AudioTrackDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AudioTrackDeleteResponseEnvelopeErrorsSource ¶
type AudioTrackDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON audioTrackDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AudioTrackDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AudioTrackDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AudioTrackDeleteResponseEnvelopeMessages ¶
type AudioTrackDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source AudioTrackDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON audioTrackDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AudioTrackDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AudioTrackDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AudioTrackDeleteResponseEnvelopeMessagesSource ¶
type AudioTrackDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON audioTrackDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AudioTrackDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AudioTrackDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AudioTrackDeleteResponseEnvelopeSuccess ¶
type AudioTrackDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AudioTrackDeleteResponseEnvelopeSuccessTrue AudioTrackDeleteResponseEnvelopeSuccess = true
)
func (AudioTrackDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r AudioTrackDeleteResponseEnvelopeSuccess) IsKnown() bool
type AudioTrackEditParams ¶
type AudioTrackEditParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// Denotes whether the audio track will be played by default in a player.
Default param.Field[bool] `json:"default"`
// A string to uniquely identify the track amongst other audio track labels for the
// specified video.
Label param.Field[string] `json:"label"`
}
func (AudioTrackEditParams) MarshalJSON ¶
func (r AudioTrackEditParams) MarshalJSON() (data []byte, err error)
type AudioTrackEditResponseEnvelope ¶
type AudioTrackEditResponseEnvelope struct {
Errors []AudioTrackEditResponseEnvelopeErrors `json:"errors,required"`
Messages []AudioTrackEditResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success AudioTrackEditResponseEnvelopeSuccess `json:"success,required"`
Result Audio `json:"result"`
JSON audioTrackEditResponseEnvelopeJSON `json:"-"`
}
func (*AudioTrackEditResponseEnvelope) UnmarshalJSON ¶
func (r *AudioTrackEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AudioTrackEditResponseEnvelopeErrors ¶
type AudioTrackEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source AudioTrackEditResponseEnvelopeErrorsSource `json:"source"`
JSON audioTrackEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AudioTrackEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AudioTrackEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AudioTrackEditResponseEnvelopeErrorsSource ¶
type AudioTrackEditResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON audioTrackEditResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AudioTrackEditResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AudioTrackEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AudioTrackEditResponseEnvelopeMessages ¶
type AudioTrackEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source AudioTrackEditResponseEnvelopeMessagesSource `json:"source"`
JSON audioTrackEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AudioTrackEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AudioTrackEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AudioTrackEditResponseEnvelopeMessagesSource ¶
type AudioTrackEditResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON audioTrackEditResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AudioTrackEditResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AudioTrackEditResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AudioTrackEditResponseEnvelopeSuccess ¶
type AudioTrackEditResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AudioTrackEditResponseEnvelopeSuccessTrue AudioTrackEditResponseEnvelopeSuccess = true
)
func (AudioTrackEditResponseEnvelopeSuccess) IsKnown ¶
func (r AudioTrackEditResponseEnvelopeSuccess) IsKnown() bool
type AudioTrackGetParams ¶
type AudioTrackService ¶
type AudioTrackService struct {
Options []option.RequestOption
}
AudioTrackService 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 NewAudioTrackService method instead.
func NewAudioTrackService ¶
func NewAudioTrackService(opts ...option.RequestOption) (r *AudioTrackService)
NewAudioTrackService 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 (*AudioTrackService) Copy ¶
func (r *AudioTrackService) Copy(ctx context.Context, identifier string, params AudioTrackCopyParams, opts ...option.RequestOption) (res *Audio, err error)
Adds an additional audio track to a video using the provided audio track URL.
func (*AudioTrackService) Delete ¶
func (r *AudioTrackService) Delete(ctx context.Context, identifier string, audioIdentifier string, body AudioTrackDeleteParams, opts ...option.RequestOption) (res *string, err error)
Deletes additional audio tracks on a video. Deleting a default audio track is not allowed. You must assign another audio track as default prior to deletion.
func (*AudioTrackService) Edit ¶
func (r *AudioTrackService) Edit(ctx context.Context, identifier string, audioIdentifier string, params AudioTrackEditParams, opts ...option.RequestOption) (res *Audio, err error)
Edits additional audio tracks on a video. Editing the default status of an audio track to `true` will mark all other audio tracks on the video default status to `false`.
func (*AudioTrackService) Get ¶
func (r *AudioTrackService) Get(ctx context.Context, identifier string, query AudioTrackGetParams, opts ...option.RequestOption) (res *pagination.SinglePage[Audio], err error)
Lists additional audio tracks on a video. Note this API will not return information for audio attached to the video upload.
func (*AudioTrackService) GetAutoPaging ¶
func (r *AudioTrackService) GetAutoPaging(ctx context.Context, identifier string, query AudioTrackGetParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Audio]
Lists additional audio tracks on a video. Note this API will not return information for audio attached to the video upload.
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 Caption ¶
type Caption struct {
// Whether the caption was generated via AI.
Generated bool `json:"generated"`
// The language label displayed in the native language to users.
Label string `json:"label"`
// The language tag in BCP 47 format.
Language string `json:"language"`
// The status of a generated caption.
Status CaptionStatus `json:"status"`
JSON captionJSON `json:"-"`
}
func (*Caption) UnmarshalJSON ¶
type CaptionGetParams ¶
type CaptionLanguageDeleteResponseEnvelope ¶
type CaptionLanguageDeleteResponseEnvelope struct {
Errors []CaptionLanguageDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []CaptionLanguageDeleteResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success CaptionLanguageDeleteResponseEnvelopeSuccess `json:"success,required"`
Result string `json:"result"`
JSON captionLanguageDeleteResponseEnvelopeJSON `json:"-"`
}
func (*CaptionLanguageDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *CaptionLanguageDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageDeleteResponseEnvelopeErrors ¶
type CaptionLanguageDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CaptionLanguageDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON captionLanguageDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CaptionLanguageDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CaptionLanguageDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageDeleteResponseEnvelopeErrorsSource ¶
type CaptionLanguageDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON captionLanguageDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*CaptionLanguageDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *CaptionLanguageDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageDeleteResponseEnvelopeMessages ¶
type CaptionLanguageDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CaptionLanguageDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON captionLanguageDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CaptionLanguageDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CaptionLanguageDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageDeleteResponseEnvelopeMessagesSource ¶
type CaptionLanguageDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON captionLanguageDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*CaptionLanguageDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *CaptionLanguageDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageDeleteResponseEnvelopeSuccess ¶
type CaptionLanguageDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
CaptionLanguageDeleteResponseEnvelopeSuccessTrue CaptionLanguageDeleteResponseEnvelopeSuccess = true
)
func (CaptionLanguageDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r CaptionLanguageDeleteResponseEnvelopeSuccess) IsKnown() bool
type CaptionLanguageGetResponseEnvelope ¶
type CaptionLanguageGetResponseEnvelope struct {
Errors []CaptionLanguageGetResponseEnvelopeErrors `json:"errors,required"`
Messages []CaptionLanguageGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success CaptionLanguageGetResponseEnvelopeSuccess `json:"success,required"`
Result Caption `json:"result"`
JSON captionLanguageGetResponseEnvelopeJSON `json:"-"`
}
func (*CaptionLanguageGetResponseEnvelope) UnmarshalJSON ¶
func (r *CaptionLanguageGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageGetResponseEnvelopeErrors ¶
type CaptionLanguageGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CaptionLanguageGetResponseEnvelopeErrorsSource `json:"source"`
JSON captionLanguageGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CaptionLanguageGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CaptionLanguageGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageGetResponseEnvelopeErrorsSource ¶
type CaptionLanguageGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON captionLanguageGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*CaptionLanguageGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *CaptionLanguageGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageGetResponseEnvelopeMessages ¶
type CaptionLanguageGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CaptionLanguageGetResponseEnvelopeMessagesSource `json:"source"`
JSON captionLanguageGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CaptionLanguageGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CaptionLanguageGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageGetResponseEnvelopeMessagesSource ¶
type CaptionLanguageGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON captionLanguageGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*CaptionLanguageGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *CaptionLanguageGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageGetResponseEnvelopeSuccess ¶
type CaptionLanguageGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
CaptionLanguageGetResponseEnvelopeSuccessTrue CaptionLanguageGetResponseEnvelopeSuccess = true
)
func (CaptionLanguageGetResponseEnvelopeSuccess) IsKnown ¶
func (r CaptionLanguageGetResponseEnvelopeSuccess) IsKnown() bool
type CaptionLanguageNewResponseEnvelope ¶
type CaptionLanguageNewResponseEnvelope struct {
Errors []CaptionLanguageNewResponseEnvelopeErrors `json:"errors,required"`
Messages []CaptionLanguageNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success CaptionLanguageNewResponseEnvelopeSuccess `json:"success,required"`
Result Caption `json:"result"`
JSON captionLanguageNewResponseEnvelopeJSON `json:"-"`
}
func (*CaptionLanguageNewResponseEnvelope) UnmarshalJSON ¶
func (r *CaptionLanguageNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageNewResponseEnvelopeErrors ¶
type CaptionLanguageNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CaptionLanguageNewResponseEnvelopeErrorsSource `json:"source"`
JSON captionLanguageNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CaptionLanguageNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CaptionLanguageNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageNewResponseEnvelopeErrorsSource ¶
type CaptionLanguageNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON captionLanguageNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*CaptionLanguageNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *CaptionLanguageNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageNewResponseEnvelopeMessages ¶
type CaptionLanguageNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CaptionLanguageNewResponseEnvelopeMessagesSource `json:"source"`
JSON captionLanguageNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CaptionLanguageNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CaptionLanguageNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageNewResponseEnvelopeMessagesSource ¶
type CaptionLanguageNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON captionLanguageNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*CaptionLanguageNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *CaptionLanguageNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageNewResponseEnvelopeSuccess ¶
type CaptionLanguageNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
CaptionLanguageNewResponseEnvelopeSuccessTrue CaptionLanguageNewResponseEnvelopeSuccess = true
)
func (CaptionLanguageNewResponseEnvelopeSuccess) IsKnown ¶
func (r CaptionLanguageNewResponseEnvelopeSuccess) IsKnown() bool
type CaptionLanguageService ¶
type CaptionLanguageService struct {
Options []option.RequestOption
Vtt *CaptionLanguageVttService
}
CaptionLanguageService 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 NewCaptionLanguageService method instead.
func NewCaptionLanguageService ¶
func NewCaptionLanguageService(opts ...option.RequestOption) (r *CaptionLanguageService)
NewCaptionLanguageService 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 (*CaptionLanguageService) Delete ¶
func (r *CaptionLanguageService) Delete(ctx context.Context, identifier string, language string, body CaptionLanguageDeleteParams, opts ...option.RequestOption) (res *string, err error)
Removes the captions or subtitles from a video.
func (*CaptionLanguageService) Get ¶
func (r *CaptionLanguageService) Get(ctx context.Context, identifier string, language string, query CaptionLanguageGetParams, opts ...option.RequestOption) (res *Caption, err error)
Lists the captions or subtitles for provided language.
func (*CaptionLanguageService) New ¶
func (r *CaptionLanguageService) New(ctx context.Context, identifier string, language string, body CaptionLanguageNewParams, opts ...option.RequestOption) (res *Caption, err error)
Generate captions or subtitles for provided language via AI.
func (*CaptionLanguageService) Update ¶
func (r *CaptionLanguageService) Update(ctx context.Context, identifier string, language string, params CaptionLanguageUpdateParams, opts ...option.RequestOption) (res *Caption, err error)
Uploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed.
type CaptionLanguageUpdateParams ¶
type CaptionLanguageUpdateParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id,required"`
// The WebVTT file containing the caption or subtitle content.
File param.Field[string] `json:"file,required"`
}
func (CaptionLanguageUpdateParams) MarshalMultipart ¶
func (r CaptionLanguageUpdateParams) MarshalMultipart() (data []byte, contentType string, err error)
type CaptionLanguageUpdateResponseEnvelope ¶
type CaptionLanguageUpdateResponseEnvelope struct {
Errors []CaptionLanguageUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []CaptionLanguageUpdateResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success CaptionLanguageUpdateResponseEnvelopeSuccess `json:"success,required"`
Result Caption `json:"result"`
JSON captionLanguageUpdateResponseEnvelopeJSON `json:"-"`
}
func (*CaptionLanguageUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *CaptionLanguageUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageUpdateResponseEnvelopeErrors ¶
type CaptionLanguageUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CaptionLanguageUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON captionLanguageUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CaptionLanguageUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CaptionLanguageUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageUpdateResponseEnvelopeErrorsSource ¶
type CaptionLanguageUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON captionLanguageUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*CaptionLanguageUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *CaptionLanguageUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageUpdateResponseEnvelopeMessages ¶
type CaptionLanguageUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CaptionLanguageUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON captionLanguageUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CaptionLanguageUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CaptionLanguageUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageUpdateResponseEnvelopeMessagesSource ¶
type CaptionLanguageUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON captionLanguageUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*CaptionLanguageUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *CaptionLanguageUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type CaptionLanguageUpdateResponseEnvelopeSuccess ¶
type CaptionLanguageUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
CaptionLanguageUpdateResponseEnvelopeSuccessTrue CaptionLanguageUpdateResponseEnvelopeSuccess = true
)
func (CaptionLanguageUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r CaptionLanguageUpdateResponseEnvelopeSuccess) IsKnown() bool
type CaptionLanguageVttService ¶
type CaptionLanguageVttService struct {
Options []option.RequestOption
}
CaptionLanguageVttService 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 NewCaptionLanguageVttService method instead.
func NewCaptionLanguageVttService ¶
func NewCaptionLanguageVttService(opts ...option.RequestOption) (r *CaptionLanguageVttService)
NewCaptionLanguageVttService 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 (*CaptionLanguageVttService) Get ¶
func (r *CaptionLanguageVttService) Get(ctx context.Context, identifier string, language string, query CaptionLanguageVttGetParams, opts ...option.RequestOption) (res *string, err error)
Return WebVTT captions for a provided language.
type CaptionService ¶
type CaptionService struct {
Options []option.RequestOption
Language *CaptionLanguageService
}
CaptionService 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 NewCaptionService method instead.
func NewCaptionService ¶
func NewCaptionService(opts ...option.RequestOption) (r *CaptionService)
NewCaptionService 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 (*CaptionService) Get ¶
func (r *CaptionService) Get(ctx context.Context, identifier string, query CaptionGetParams, opts ...option.RequestOption) (res *pagination.SinglePage[Caption], err error)
Lists the available captions or subtitles for a specific video.
func (*CaptionService) GetAutoPaging ¶
func (r *CaptionService) GetAutoPaging(ctx context.Context, identifier string, query CaptionGetParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Caption]
Lists the available captions or subtitles for a specific video.
type CaptionStatus ¶
type CaptionStatus string
The status of a generated caption.
const ( CaptionStatusReady CaptionStatus = "ready" CaptionStatusInprogress CaptionStatus = "inprogress" CaptionStatusError CaptionStatus = "error" )
func (CaptionStatus) IsKnown ¶
func (r CaptionStatus) IsKnown() bool
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 Clip ¶
type Clip struct {
// Lists the origins allowed to display the video. Enter allowed origin domains in
// an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
// viewed on any origin.
AllowedOrigins []AllowedOrigins `json:"allowedOrigins"`
// The unique video identifier (UID).
ClippedFromVideoUID string `json:"clippedFromVideoUID"`
// The date and time the clip was created.
Created time.Time `json:"created" format:"date-time"`
// A user-defined identifier for the media creator.
Creator string `json:"creator"`
// Specifies the end time for the video clip in seconds.
EndTimeSeconds int64 `json:"endTimeSeconds"`
// The maximum duration in seconds for a video upload. Can be set for a video that
// is not yet uploaded to limit its duration. Uploads that exceed the specified
// duration will fail during processing. A value of `-1` means the value is
// unknown.
MaxDurationSeconds int64 `json:"maxDurationSeconds"`
// A user modifiable key-value store used to reference other systems of record for
// managing videos.
Meta interface{} `json:"meta"`
// The date and time the live input was last modified.
Modified time.Time `json:"modified" format:"date-time"`
Playback ClipPlayback `json:"playback"`
// The video's preview page URI. This field is omitted until encoding is complete.
Preview string `json:"preview" format:"uri"`
// Indicates whether the video can be a accessed using the UID. When set to `true`,
// a signed token must be generated with a signing key to view the video.
RequireSignedURLs bool `json:"requireSignedURLs"`
// Specifies the start time for the video clip in seconds.
StartTimeSeconds int64 `json:"startTimeSeconds"`
// Specifies the processing status for all quality levels for a video.
Status ClipStatus `json:"status"`
// The timestamp for a thumbnail image calculated as a percentage value of the
// video's duration. To convert from a second-wise timestamp to a percentage,
// divide the desired timestamp by the total duration of the video. If this value
// is not set, the default thumbnail image is taken from 0s of the video.
ThumbnailTimestampPct float64 `json:"thumbnailTimestampPct"`
Watermark ClipWatermark `json:"watermark"`
JSON clipJSON `json:"-"`
}
func (*Clip) UnmarshalJSON ¶
type ClipNewParams ¶
type ClipNewParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// The unique video identifier (UID).
ClippedFromVideoUID param.Field[string] `json:"clippedFromVideoUID,required"`
// Specifies the end time for the video clip in seconds.
EndTimeSeconds param.Field[int64] `json:"endTimeSeconds,required"`
// Specifies the start time for the video clip in seconds.
StartTimeSeconds param.Field[int64] `json:"startTimeSeconds,required"`
// Lists the origins allowed to display the video. Enter allowed origin domains in
// an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
// viewed on any origin.
AllowedOrigins param.Field[[]AllowedOriginsParam] `json:"allowedOrigins"`
// A user-defined identifier for the media creator.
Creator param.Field[string] `json:"creator"`
// The maximum duration in seconds for a video upload. Can be set for a video that
// is not yet uploaded to limit its duration. Uploads that exceed the specified
// duration will fail during processing. A value of `-1` means the value is
// unknown.
MaxDurationSeconds param.Field[int64] `json:"maxDurationSeconds"`
// Indicates whether the video can be a accessed using the UID. When set to `true`,
// a signed token must be generated with a signing key to view the video.
RequireSignedURLs param.Field[bool] `json:"requireSignedURLs"`
// The timestamp for a thumbnail image calculated as a percentage value of the
// video's duration. To convert from a second-wise timestamp to a percentage,
// divide the desired timestamp by the total duration of the video. If this value
// is not set, the default thumbnail image is taken from 0s of the video.
ThumbnailTimestampPct param.Field[float64] `json:"thumbnailTimestampPct"`
Watermark param.Field[ClipNewParamsWatermark] `json:"watermark"`
}
func (ClipNewParams) MarshalJSON ¶
func (r ClipNewParams) MarshalJSON() (data []byte, err error)
type ClipNewParamsWatermark ¶
type ClipNewParamsWatermark struct {
// The unique identifier for the watermark profile.
UID param.Field[string] `json:"uid"`
}
func (ClipNewParamsWatermark) MarshalJSON ¶
func (r ClipNewParamsWatermark) MarshalJSON() (data []byte, err error)
type ClipNewResponseEnvelope ¶
type ClipNewResponseEnvelope struct {
Errors []ClipNewResponseEnvelopeErrors `json:"errors,required"`
Messages []ClipNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success ClipNewResponseEnvelopeSuccess `json:"success,required"`
Result Clip `json:"result"`
JSON clipNewResponseEnvelopeJSON `json:"-"`
}
func (*ClipNewResponseEnvelope) UnmarshalJSON ¶
func (r *ClipNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ClipNewResponseEnvelopeErrors ¶
type ClipNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source ClipNewResponseEnvelopeErrorsSource `json:"source"`
JSON clipNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ClipNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ClipNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ClipNewResponseEnvelopeErrorsSource ¶
type ClipNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON clipNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*ClipNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *ClipNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type ClipNewResponseEnvelopeMessages ¶
type ClipNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source ClipNewResponseEnvelopeMessagesSource `json:"source"`
JSON clipNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ClipNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ClipNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type ClipNewResponseEnvelopeMessagesSource ¶
type ClipNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON clipNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*ClipNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *ClipNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type ClipNewResponseEnvelopeSuccess ¶
type ClipNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
ClipNewResponseEnvelopeSuccessTrue ClipNewResponseEnvelopeSuccess = true
)
func (ClipNewResponseEnvelopeSuccess) IsKnown ¶
func (r ClipNewResponseEnvelopeSuccess) IsKnown() bool
type ClipPlayback ¶
type ClipPlayback struct {
// DASH Media Presentation Description for the video.
Dash string `json:"dash"`
// The HLS manifest for the video.
Hls string `json:"hls"`
JSON clipPlaybackJSON `json:"-"`
}
func (*ClipPlayback) UnmarshalJSON ¶
func (r *ClipPlayback) UnmarshalJSON(data []byte) (err error)
type ClipService ¶
type ClipService struct {
Options []option.RequestOption
}
ClipService 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 NewClipService method instead.
func NewClipService ¶
func NewClipService(opts ...option.RequestOption) (r *ClipService)
NewClipService 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 (*ClipService) New ¶
func (r *ClipService) New(ctx context.Context, params ClipNewParams, opts ...option.RequestOption) (res *Clip, err error)
Clips a video based on the specified start and end times provided in seconds.
type ClipStatus ¶
type ClipStatus string
Specifies the processing status for all quality levels for a video.
const ( ClipStatusPendingupload ClipStatus = "pendingupload" ClipStatusDownloading ClipStatus = "downloading" ClipStatusQueued ClipStatus = "queued" ClipStatusInprogress ClipStatus = "inprogress" ClipStatusReady ClipStatus = "ready" ClipStatusError ClipStatus = "error" ClipStatusLiveInprogress ClipStatus = "live-inprogress" )
func (ClipStatus) IsKnown ¶
func (r ClipStatus) IsKnown() bool
type ClipWatermark ¶
type ClipWatermark struct {
// The unique identifier for the watermark profile.
UID string `json:"uid"`
JSON clipWatermarkJSON `json:"-"`
}
func (*ClipWatermark) UnmarshalJSON ¶
func (r *ClipWatermark) UnmarshalJSON(data []byte) (err error)
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 CopyNewParams ¶
type CopyNewParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// A video's URL. The server must be publicly routable and support `HTTP HEAD`
// requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD`
// requests with a `content-range` header that includes the size of the file.
URL param.Field[string] `json:"url,required" format:"uri"`
// Lists the origins allowed to display the video. Enter allowed origin domains in
// an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
// viewed on any origin.
AllowedOrigins param.Field[[]AllowedOriginsParam] `json:"allowedOrigins"`
// A user-defined identifier for the media creator.
Creator param.Field[string] `json:"creator"`
// A user modifiable key-value store used to reference other systems of record for
// managing videos.
Meta param.Field[interface{}] `json:"meta"`
// Indicates whether the video can be a accessed using the UID. When set to `true`,
// a signed token must be generated with a signing key to view the video.
RequireSignedURLs param.Field[bool] `json:"requireSignedURLs"`
// Indicates the date and time at which the video will be deleted. Omit the field
// to indicate no change, or include with a `null` value to remove an existing
// scheduled deletion. If specified, must be at least 30 days from upload time.
ScheduledDeletion param.Field[time.Time] `json:"scheduledDeletion" format:"date-time"`
// The timestamp for a thumbnail image calculated as a percentage value of the
// video's duration. To convert from a second-wise timestamp to a percentage,
// divide the desired timestamp by the total duration of the video. If this value
// is not set, the default thumbnail image is taken from 0s of the video.
ThumbnailTimestampPct param.Field[float64] `json:"thumbnailTimestampPct"`
Watermark param.Field[CopyNewParamsWatermark] `json:"watermark"`
// A user-defined identifier for the media creator.
UploadCreator param.Field[string] `header:"Upload-Creator"`
}
func (CopyNewParams) MarshalJSON ¶
func (r CopyNewParams) MarshalJSON() (data []byte, err error)
type CopyNewParamsWatermark ¶
type CopyNewParamsWatermark struct {
// The unique identifier for the watermark profile.
UID param.Field[string] `json:"uid"`
}
func (CopyNewParamsWatermark) MarshalJSON ¶
func (r CopyNewParamsWatermark) MarshalJSON() (data []byte, err error)
type CopyNewResponseEnvelope ¶
type CopyNewResponseEnvelope struct {
Errors []CopyNewResponseEnvelopeErrors `json:"errors,required"`
Messages []CopyNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success CopyNewResponseEnvelopeSuccess `json:"success,required"`
Result Video `json:"result"`
JSON copyNewResponseEnvelopeJSON `json:"-"`
}
func (*CopyNewResponseEnvelope) UnmarshalJSON ¶
func (r *CopyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type CopyNewResponseEnvelopeErrors ¶
type CopyNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CopyNewResponseEnvelopeErrorsSource `json:"source"`
JSON copyNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*CopyNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *CopyNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type CopyNewResponseEnvelopeErrorsSource ¶
type CopyNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON copyNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*CopyNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *CopyNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type CopyNewResponseEnvelopeMessages ¶
type CopyNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source CopyNewResponseEnvelopeMessagesSource `json:"source"`
JSON copyNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*CopyNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *CopyNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type CopyNewResponseEnvelopeMessagesSource ¶
type CopyNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON copyNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*CopyNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *CopyNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type CopyNewResponseEnvelopeSuccess ¶
type CopyNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
CopyNewResponseEnvelopeSuccessTrue CopyNewResponseEnvelopeSuccess = true
)
func (CopyNewResponseEnvelopeSuccess) IsKnown ¶
func (r CopyNewResponseEnvelopeSuccess) IsKnown() bool
type CopyService ¶
type CopyService struct {
Options []option.RequestOption
}
CopyService 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 NewCopyService method instead.
func NewCopyService ¶
func NewCopyService(opts ...option.RequestOption) (r *CopyService)
NewCopyService 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 (*CopyService) New ¶
func (r *CopyService) New(ctx context.Context, params CopyNewParams, opts ...option.RequestOption) (res *Video, err error)
Uploads a video to Stream from a provided URL.
type DirectUploadNewParams ¶
type DirectUploadNewParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// The maximum duration in seconds for a video upload. Can be set for a video that
// is not yet uploaded to limit its duration. Uploads that exceed the specified
// duration will fail during processing. A value of `-1` means the value is
// unknown.
MaxDurationSeconds param.Field[int64] `json:"maxDurationSeconds,required"`
// Lists the origins allowed to display the video. Enter allowed origin domains in
// an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
// viewed on any origin.
AllowedOrigins param.Field[[]AllowedOriginsParam] `json:"allowedOrigins"`
// A user-defined identifier for the media creator.
Creator param.Field[string] `json:"creator"`
// The date and time after upload when videos will not be accepted.
Expiry param.Field[time.Time] `json:"expiry" format:"date-time"`
// A user modifiable key-value store used to reference other systems of record for
// managing videos.
Meta param.Field[interface{}] `json:"meta"`
// Indicates whether the video can be a accessed using the UID. When set to `true`,
// a signed token must be generated with a signing key to view the video.
RequireSignedURLs param.Field[bool] `json:"requireSignedURLs"`
// Indicates the date and time at which the video will be deleted. Omit the field
// to indicate no change, or include with a `null` value to remove an existing
// scheduled deletion. If specified, must be at least 30 days from upload time.
ScheduledDeletion param.Field[time.Time] `json:"scheduledDeletion" format:"date-time"`
// The timestamp for a thumbnail image calculated as a percentage value of the
// video's duration. To convert from a second-wise timestamp to a percentage,
// divide the desired timestamp by the total duration of the video. If this value
// is not set, the default thumbnail image is taken from 0s of the video.
ThumbnailTimestampPct param.Field[float64] `json:"thumbnailTimestampPct"`
Watermark param.Field[DirectUploadNewParamsWatermark] `json:"watermark"`
// A user-defined identifier for the media creator.
UploadCreator param.Field[string] `header:"Upload-Creator"`
}
func (DirectUploadNewParams) MarshalJSON ¶
func (r DirectUploadNewParams) MarshalJSON() (data []byte, err error)
type DirectUploadNewParamsWatermark ¶
type DirectUploadNewParamsWatermark struct {
// The unique identifier for the watermark profile.
UID param.Field[string] `json:"uid"`
}
func (DirectUploadNewParamsWatermark) MarshalJSON ¶
func (r DirectUploadNewParamsWatermark) MarshalJSON() (data []byte, err error)
type DirectUploadNewResponse ¶
type DirectUploadNewResponse struct {
// Indicates the date and time at which the video will be deleted. Omit the field
// to indicate no change, or include with a `null` value to remove an existing
// scheduled deletion. If specified, must be at least 30 days from upload time.
ScheduledDeletion time.Time `json:"scheduledDeletion" format:"date-time"`
// A Cloudflare-generated unique identifier for a media item.
UID string `json:"uid"`
// The URL an unauthenticated upload can use for a single
// `HTTP POST multipart/form-data` request.
UploadURL string `json:"uploadURL"`
Watermark Watermark `json:"watermark"`
JSON directUploadNewResponseJSON `json:"-"`
}
func (*DirectUploadNewResponse) UnmarshalJSON ¶
func (r *DirectUploadNewResponse) UnmarshalJSON(data []byte) (err error)
type DirectUploadNewResponseEnvelope ¶
type DirectUploadNewResponseEnvelope struct {
Errors []DirectUploadNewResponseEnvelopeErrors `json:"errors,required"`
Messages []DirectUploadNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success DirectUploadNewResponseEnvelopeSuccess `json:"success,required"`
Result DirectUploadNewResponse `json:"result"`
JSON directUploadNewResponseEnvelopeJSON `json:"-"`
}
func (*DirectUploadNewResponseEnvelope) UnmarshalJSON ¶
func (r *DirectUploadNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DirectUploadNewResponseEnvelopeErrors ¶
type DirectUploadNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source DirectUploadNewResponseEnvelopeErrorsSource `json:"source"`
JSON directUploadNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*DirectUploadNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *DirectUploadNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type DirectUploadNewResponseEnvelopeErrorsSource ¶
type DirectUploadNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON directUploadNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*DirectUploadNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *DirectUploadNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type DirectUploadNewResponseEnvelopeMessages ¶
type DirectUploadNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source DirectUploadNewResponseEnvelopeMessagesSource `json:"source"`
JSON directUploadNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*DirectUploadNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *DirectUploadNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type DirectUploadNewResponseEnvelopeMessagesSource ¶
type DirectUploadNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON directUploadNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*DirectUploadNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *DirectUploadNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type DirectUploadNewResponseEnvelopeSuccess ¶
type DirectUploadNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
DirectUploadNewResponseEnvelopeSuccessTrue DirectUploadNewResponseEnvelopeSuccess = true
)
func (DirectUploadNewResponseEnvelopeSuccess) IsKnown ¶
func (r DirectUploadNewResponseEnvelopeSuccess) IsKnown() bool
type DirectUploadService ¶
type DirectUploadService struct {
Options []option.RequestOption
}
DirectUploadService 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 NewDirectUploadService method instead.
func NewDirectUploadService ¶
func NewDirectUploadService(opts ...option.RequestOption) (r *DirectUploadService)
NewDirectUploadService 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 (*DirectUploadService) New ¶
func (r *DirectUploadService) New(ctx context.Context, params DirectUploadNewParams, opts ...option.RequestOption) (res *DirectUploadNewResponse, err error)
Creates a direct upload that allows video uploads without an API key.
type DownloadDeleteParams ¶
type DownloadDeleteResponseEnvelope ¶
type DownloadDeleteResponseEnvelope struct {
Errors []DownloadDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []DownloadDeleteResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success DownloadDeleteResponseEnvelopeSuccess `json:"success,required"`
Result string `json:"result"`
JSON downloadDeleteResponseEnvelopeJSON `json:"-"`
}
func (*DownloadDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *DownloadDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DownloadDeleteResponseEnvelopeErrors ¶
type DownloadDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source DownloadDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON downloadDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*DownloadDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *DownloadDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type DownloadDeleteResponseEnvelopeErrorsSource ¶
type DownloadDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON downloadDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*DownloadDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *DownloadDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type DownloadDeleteResponseEnvelopeMessages ¶
type DownloadDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source DownloadDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON downloadDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*DownloadDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *DownloadDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type DownloadDeleteResponseEnvelopeMessagesSource ¶
type DownloadDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON downloadDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*DownloadDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *DownloadDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type DownloadDeleteResponseEnvelopeSuccess ¶
type DownloadDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
DownloadDeleteResponseEnvelopeSuccessTrue DownloadDeleteResponseEnvelopeSuccess = true
)
func (DownloadDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r DownloadDeleteResponseEnvelopeSuccess) IsKnown() bool
type DownloadGetParams ¶
type DownloadGetResponse ¶
type DownloadGetResponse struct {
// The audio-only download. Only present if this download type has been created.
Audio DownloadGetResponseAudio `json:"audio"`
// The default video download. Only present if this download type has been created.
Default DownloadGetResponseDefault `json:"default"`
JSON downloadGetResponseJSON `json:"-"`
}
An object with download type keys. Each key is optional and only present if that download type has been created.
func (*DownloadGetResponse) UnmarshalJSON ¶ added in v6.6.0
func (r *DownloadGetResponse) UnmarshalJSON(data []byte) (err error)
type DownloadGetResponseAudio ¶ added in v6.6.0
type DownloadGetResponseAudio struct {
// Indicates the progress as a percentage between 0 and 100.
PercentComplete float64 `json:"percentComplete"`
// The status of a generated download.
Status DownloadGetResponseAudioStatus `json:"status"`
// The URL to access the generated download.
URL string `json:"url" format:"uri"`
JSON downloadGetResponseAudioJSON `json:"-"`
}
The audio-only download. Only present if this download type has been created.
func (*DownloadGetResponseAudio) UnmarshalJSON ¶ added in v6.6.0
func (r *DownloadGetResponseAudio) UnmarshalJSON(data []byte) (err error)
type DownloadGetResponseAudioStatus ¶ added in v6.6.0
type DownloadGetResponseAudioStatus string
The status of a generated download.
const ( DownloadGetResponseAudioStatusReady DownloadGetResponseAudioStatus = "ready" DownloadGetResponseAudioStatusInprogress DownloadGetResponseAudioStatus = "inprogress" DownloadGetResponseAudioStatusError DownloadGetResponseAudioStatus = "error" )
func (DownloadGetResponseAudioStatus) IsKnown ¶ added in v6.6.0
func (r DownloadGetResponseAudioStatus) IsKnown() bool
type DownloadGetResponseDefault ¶ added in v6.6.0
type DownloadGetResponseDefault struct {
// Indicates the progress as a percentage between 0 and 100.
PercentComplete float64 `json:"percentComplete"`
// The status of a generated download.
Status DownloadGetResponseDefaultStatus `json:"status"`
// The URL to access the generated download.
URL string `json:"url" format:"uri"`
JSON downloadGetResponseDefaultJSON `json:"-"`
}
The default video download. Only present if this download type has been created.
func (*DownloadGetResponseDefault) UnmarshalJSON ¶ added in v6.6.0
func (r *DownloadGetResponseDefault) UnmarshalJSON(data []byte) (err error)
type DownloadGetResponseDefaultStatus ¶ added in v6.6.0
type DownloadGetResponseDefaultStatus string
The status of a generated download.
const ( DownloadGetResponseDefaultStatusReady DownloadGetResponseDefaultStatus = "ready" DownloadGetResponseDefaultStatusInprogress DownloadGetResponseDefaultStatus = "inprogress" DownloadGetResponseDefaultStatusError DownloadGetResponseDefaultStatus = "error" )
func (DownloadGetResponseDefaultStatus) IsKnown ¶ added in v6.6.0
func (r DownloadGetResponseDefaultStatus) IsKnown() bool
type DownloadGetResponseEnvelope ¶
type DownloadGetResponseEnvelope struct {
Errors []DownloadGetResponseEnvelopeErrors `json:"errors,required"`
Messages []DownloadGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success DownloadGetResponseEnvelopeSuccess `json:"success,required"`
// An object with download type keys. Each key is optional and only present if that
// download type has been created.
Result DownloadGetResponse `json:"result"`
JSON downloadGetResponseEnvelopeJSON `json:"-"`
}
func (*DownloadGetResponseEnvelope) UnmarshalJSON ¶
func (r *DownloadGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DownloadGetResponseEnvelopeErrors ¶
type DownloadGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source DownloadGetResponseEnvelopeErrorsSource `json:"source"`
JSON downloadGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*DownloadGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *DownloadGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type DownloadGetResponseEnvelopeErrorsSource ¶
type DownloadGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON downloadGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*DownloadGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *DownloadGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type DownloadGetResponseEnvelopeMessages ¶
type DownloadGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source DownloadGetResponseEnvelopeMessagesSource `json:"source"`
JSON downloadGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*DownloadGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *DownloadGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type DownloadGetResponseEnvelopeMessagesSource ¶
type DownloadGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON downloadGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*DownloadGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *DownloadGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type DownloadGetResponseEnvelopeSuccess ¶
type DownloadGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
DownloadGetResponseEnvelopeSuccessTrue DownloadGetResponseEnvelopeSuccess = true
)
func (DownloadGetResponseEnvelopeSuccess) IsKnown ¶
func (r DownloadGetResponseEnvelopeSuccess) IsKnown() bool
type DownloadNewParams ¶
type DownloadNewParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id,required"`
Body interface{} `json:"body,required"`
}
func (DownloadNewParams) MarshalJSON ¶
func (r DownloadNewParams) MarshalJSON() (data []byte, err error)
type DownloadNewResponse ¶
type DownloadNewResponse struct {
// Indicates the progress as a percentage between 0 and 100.
PercentComplete float64 `json:"percentComplete"`
// The status of a generated download.
Status DownloadNewResponseStatus `json:"status"`
// The URL to access the generated download.
URL string `json:"url" format:"uri"`
JSON downloadNewResponseJSON `json:"-"`
}
func (*DownloadNewResponse) UnmarshalJSON ¶ added in v6.6.0
func (r *DownloadNewResponse) UnmarshalJSON(data []byte) (err error)
type DownloadNewResponseEnvelope ¶
type DownloadNewResponseEnvelope struct {
Errors []DownloadNewResponseEnvelopeErrors `json:"errors,required"`
Messages []DownloadNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success DownloadNewResponseEnvelopeSuccess `json:"success,required"`
Result DownloadNewResponse `json:"result"`
JSON downloadNewResponseEnvelopeJSON `json:"-"`
}
func (*DownloadNewResponseEnvelope) UnmarshalJSON ¶
func (r *DownloadNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DownloadNewResponseEnvelopeErrors ¶
type DownloadNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source DownloadNewResponseEnvelopeErrorsSource `json:"source"`
JSON downloadNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*DownloadNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *DownloadNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type DownloadNewResponseEnvelopeErrorsSource ¶
type DownloadNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON downloadNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*DownloadNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *DownloadNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type DownloadNewResponseEnvelopeMessages ¶
type DownloadNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source DownloadNewResponseEnvelopeMessagesSource `json:"source"`
JSON downloadNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*DownloadNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *DownloadNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type DownloadNewResponseEnvelopeMessagesSource ¶
type DownloadNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON downloadNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*DownloadNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *DownloadNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type DownloadNewResponseEnvelopeSuccess ¶
type DownloadNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
DownloadNewResponseEnvelopeSuccessTrue DownloadNewResponseEnvelopeSuccess = true
)
func (DownloadNewResponseEnvelopeSuccess) IsKnown ¶
func (r DownloadNewResponseEnvelopeSuccess) IsKnown() bool
type DownloadNewResponseStatus ¶ added in v6.6.0
type DownloadNewResponseStatus string
The status of a generated download.
const ( DownloadNewResponseStatusReady DownloadNewResponseStatus = "ready" DownloadNewResponseStatusInprogress DownloadNewResponseStatus = "inprogress" DownloadNewResponseStatusError DownloadNewResponseStatus = "error" )
func (DownloadNewResponseStatus) IsKnown ¶ added in v6.6.0
func (r DownloadNewResponseStatus) IsKnown() bool
type DownloadService ¶
type DownloadService struct {
Options []option.RequestOption
}
DownloadService 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 NewDownloadService method instead.
func NewDownloadService ¶
func NewDownloadService(opts ...option.RequestOption) (r *DownloadService)
NewDownloadService 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 (*DownloadService) Delete ¶
func (r *DownloadService) Delete(ctx context.Context, identifier string, body DownloadDeleteParams, opts ...option.RequestOption) (res *string, err error)
Delete the downloads for a video. Use `/downloads/{download_type}` instead for type-specific downloads. Available types are `default` and `audio`.
func (*DownloadService) Get ¶
func (r *DownloadService) Get(ctx context.Context, identifier string, query DownloadGetParams, opts ...option.RequestOption) (res *DownloadGetResponse, err error)
Lists the downloads created for a video.
func (*DownloadService) New ¶
func (r *DownloadService) New(ctx context.Context, identifier string, params DownloadNewParams, opts ...option.RequestOption) (res *DownloadNewResponse, err error)
Creates a download for a video when a video is ready to view. Use `/downloads/{download_type}` instead for type-specific downloads. Available types are `default` and `audio`.
type EmbedGetParams ¶
type EmbedService ¶
type EmbedService struct {
Options []option.RequestOption
}
EmbedService 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 NewEmbedService method instead.
func NewEmbedService ¶
func NewEmbedService(opts ...option.RequestOption) (r *EmbedService)
NewEmbedService 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 (*EmbedService) Get ¶
func (r *EmbedService) Get(ctx context.Context, identifier string, query EmbedGetParams, opts ...option.RequestOption) (res *string, err error)
Fetches an HTML code snippet to embed a video in a web page delivered through Cloudflare. On success, returns an HTML fragment for use on web pages to display a video. On failure, returns a JSON response body.
type ErrorDataSource ¶
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type KeyDeleteParams ¶
type KeyDeleteResponseEnvelope ¶
type KeyDeleteResponseEnvelope struct {
Errors []KeyDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []KeyDeleteResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success KeyDeleteResponseEnvelopeSuccess `json:"success,required"`
Result string `json:"result"`
JSON keyDeleteResponseEnvelopeJSON `json:"-"`
}
func (*KeyDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *KeyDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type KeyDeleteResponseEnvelopeErrors ¶
type KeyDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source KeyDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON keyDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*KeyDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *KeyDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type KeyDeleteResponseEnvelopeErrorsSource ¶
type KeyDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON keyDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*KeyDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *KeyDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type KeyDeleteResponseEnvelopeMessages ¶
type KeyDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source KeyDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON keyDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*KeyDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *KeyDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type KeyDeleteResponseEnvelopeMessagesSource ¶
type KeyDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON keyDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*KeyDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *KeyDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type KeyDeleteResponseEnvelopeSuccess ¶
type KeyDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
KeyDeleteResponseEnvelopeSuccessTrue KeyDeleteResponseEnvelopeSuccess = true
)
func (KeyDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r KeyDeleteResponseEnvelopeSuccess) IsKnown() bool
type KeyGetParams ¶
type KeyGetResponse ¶
type KeyGetResponse struct {
// Identifier.
ID string `json:"id"`
// The date and time a signing key was created.
Created time.Time `json:"created" format:"date-time"`
JSON keyGetResponseJSON `json:"-"`
}
func (*KeyGetResponse) UnmarshalJSON ¶
func (r *KeyGetResponse) UnmarshalJSON(data []byte) (err error)
type KeyNewParams ¶
type KeyNewParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id,required"`
Body interface{} `json:"body,required"`
}
func (KeyNewParams) MarshalJSON ¶
func (r KeyNewParams) MarshalJSON() (data []byte, err error)
type KeyNewResponseEnvelope ¶
type KeyNewResponseEnvelope struct {
Errors []KeyNewResponseEnvelopeErrors `json:"errors,required"`
Messages []KeyNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success KeyNewResponseEnvelopeSuccess `json:"success,required"`
Result Keys `json:"result"`
JSON keyNewResponseEnvelopeJSON `json:"-"`
}
func (*KeyNewResponseEnvelope) UnmarshalJSON ¶
func (r *KeyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type KeyNewResponseEnvelopeErrors ¶
type KeyNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source KeyNewResponseEnvelopeErrorsSource `json:"source"`
JSON keyNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*KeyNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *KeyNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type KeyNewResponseEnvelopeErrorsSource ¶
type KeyNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON keyNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*KeyNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *KeyNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type KeyNewResponseEnvelopeMessages ¶
type KeyNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source KeyNewResponseEnvelopeMessagesSource `json:"source"`
JSON keyNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*KeyNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *KeyNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type KeyNewResponseEnvelopeMessagesSource ¶
type KeyNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON keyNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*KeyNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *KeyNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type KeyNewResponseEnvelopeSuccess ¶
type KeyNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
KeyNewResponseEnvelopeSuccessTrue KeyNewResponseEnvelopeSuccess = true
)
func (KeyNewResponseEnvelopeSuccess) IsKnown ¶
func (r KeyNewResponseEnvelopeSuccess) IsKnown() bool
type KeyService ¶
type KeyService struct {
Options []option.RequestOption
}
KeyService 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 NewKeyService method instead.
func NewKeyService ¶
func NewKeyService(opts ...option.RequestOption) (r *KeyService)
NewKeyService 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 (*KeyService) Delete ¶
func (r *KeyService) Delete(ctx context.Context, identifier string, body KeyDeleteParams, opts ...option.RequestOption) (res *string, err error)
Deletes signing keys and revokes all signed URLs generated with the key.
func (*KeyService) Get ¶
func (r *KeyService) Get(ctx context.Context, query KeyGetParams, opts ...option.RequestOption) (res *pagination.SinglePage[KeyGetResponse], err error)
Lists the video ID and creation date and time when a signing key was created.
func (*KeyService) GetAutoPaging ¶
func (r *KeyService) GetAutoPaging(ctx context.Context, query KeyGetParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[KeyGetResponse]
Lists the video ID and creation date and time when a signing key was created.
func (*KeyService) New ¶
func (r *KeyService) New(ctx context.Context, params KeyNewParams, opts ...option.RequestOption) (res *Keys, err error)
Creates an RSA private key in PEM and JWK formats. Key files are only displayed once after creation. Keys are created, used, and deleted independently of videos, and every key can sign any video.
type Keys ¶
type Keys struct {
// Identifier.
ID string `json:"id"`
// The date and time a signing key was created.
Created time.Time `json:"created" format:"date-time"`
// The signing key in JWK format.
Jwk string `json:"jwk"`
// The signing key in PEM format.
Pem string `json:"pem"`
JSON keysJSON `json:"-"`
}
func (*Keys) UnmarshalJSON ¶
type LiveInput ¶
type LiveInput struct {
// The date and time the live input was created.
Created time.Time `json:"created" format:"date-time"`
// Indicates the number of days after which the live inputs recordings will be
// deleted. When a stream completes and the recording is ready, the value is used
// to calculate a scheduled deletion date for that recording. Omit the field to
// indicate no change, or include with a `null` value to remove an existing
// scheduled deletion.
DeleteRecordingAfterDays float64 `json:"deleteRecordingAfterDays"`
// A user modifiable key-value store used to reference other systems of record for
// managing live inputs.
Meta interface{} `json:"meta"`
// The date and time the live input was last modified.
Modified time.Time `json:"modified" format:"date-time"`
// Records the input to a Cloudflare Stream video. Behavior depends on the mode. In
// most cases, the video will initially be viewable as a live video and transition
// to on-demand after a condition is satisfied.
Recording LiveInputRecording `json:"recording"`
// Details for streaming to an live input using RTMPS.
Rtmps LiveInputRtmps `json:"rtmps"`
// Details for playback from an live input using RTMPS.
RtmpsPlayback LiveInputRtmpsPlayback `json:"rtmpsPlayback"`
// Details for streaming to a live input using SRT.
Srt LiveInputSrt `json:"srt"`
// Details for playback from an live input using SRT.
SrtPlayback LiveInputSrtPlayback `json:"srtPlayback"`
// The connection status of a live input.
Status LiveInputStatus `json:"status,nullable"`
// A unique identifier for a live input.
UID string `json:"uid"`
// Details for streaming to a live input using WebRTC.
WebRtc LiveInputWebRtc `json:"webRTC"`
// Details for playback from a live input using WebRTC.
WebRtcPlayback LiveInputWebRtcPlayback `json:"webRTCPlayback"`
JSON liveInputJSON `json:"-"`
}
Details about a live input.
func (*LiveInput) UnmarshalJSON ¶
type LiveInputDeleteParams ¶
type LiveInputGetParams ¶
type LiveInputGetResponseEnvelope ¶
type LiveInputGetResponseEnvelope struct {
Errors []LiveInputGetResponseEnvelopeErrors `json:"errors,required"`
Messages []LiveInputGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success LiveInputGetResponseEnvelopeSuccess `json:"success,required"`
// Details about a live input.
Result LiveInput `json:"result"`
JSON liveInputGetResponseEnvelopeJSON `json:"-"`
}
func (*LiveInputGetResponseEnvelope) UnmarshalJSON ¶
func (r *LiveInputGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LiveInputGetResponseEnvelopeErrors ¶
type LiveInputGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputGetResponseEnvelopeErrorsSource `json:"source"`
JSON liveInputGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LiveInputGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LiveInputGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LiveInputGetResponseEnvelopeErrorsSource ¶
type LiveInputGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON liveInputGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*LiveInputGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *LiveInputGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type LiveInputGetResponseEnvelopeMessages ¶
type LiveInputGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputGetResponseEnvelopeMessagesSource `json:"source"`
JSON liveInputGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LiveInputGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LiveInputGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LiveInputGetResponseEnvelopeMessagesSource ¶
type LiveInputGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON liveInputGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*LiveInputGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *LiveInputGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type LiveInputGetResponseEnvelopeSuccess ¶
type LiveInputGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
LiveInputGetResponseEnvelopeSuccessTrue LiveInputGetResponseEnvelopeSuccess = true
)
func (LiveInputGetResponseEnvelopeSuccess) IsKnown ¶
func (r LiveInputGetResponseEnvelopeSuccess) IsKnown() bool
type LiveInputListParams ¶
type LiveInputListParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id,required"`
// Includes the total number of videos associated with the submitted query
// parameters.
IncludeCounts param.Field[bool] `query:"include_counts"`
}
func (LiveInputListParams) URLQuery ¶
func (r LiveInputListParams) URLQuery() (v url.Values)
URLQuery serializes LiveInputListParams's query parameters as `url.Values`.
type LiveInputListResponse ¶
type LiveInputListResponse struct {
LiveInputs []LiveInputListResponseLiveInput `json:"liveInputs"`
// The total number of remaining live inputs based on cursor position.
Range int64 `json:"range"`
// The total number of live inputs that match the provided filters.
Total int64 `json:"total"`
JSON liveInputListResponseJSON `json:"-"`
}
func (*LiveInputListResponse) UnmarshalJSON ¶
func (r *LiveInputListResponse) UnmarshalJSON(data []byte) (err error)
type LiveInputListResponseEnvelope ¶
type LiveInputListResponseEnvelope struct {
Errors []LiveInputListResponseEnvelopeErrors `json:"errors,required"`
Messages []LiveInputListResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success LiveInputListResponseEnvelopeSuccess `json:"success,required"`
Result LiveInputListResponse `json:"result"`
JSON liveInputListResponseEnvelopeJSON `json:"-"`
}
func (*LiveInputListResponseEnvelope) UnmarshalJSON ¶
func (r *LiveInputListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LiveInputListResponseEnvelopeErrors ¶
type LiveInputListResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputListResponseEnvelopeErrorsSource `json:"source"`
JSON liveInputListResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LiveInputListResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LiveInputListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LiveInputListResponseEnvelopeErrorsSource ¶
type LiveInputListResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON liveInputListResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*LiveInputListResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *LiveInputListResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type LiveInputListResponseEnvelopeMessages ¶
type LiveInputListResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputListResponseEnvelopeMessagesSource `json:"source"`
JSON liveInputListResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LiveInputListResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LiveInputListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LiveInputListResponseEnvelopeMessagesSource ¶
type LiveInputListResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON liveInputListResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*LiveInputListResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *LiveInputListResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type LiveInputListResponseEnvelopeSuccess ¶
type LiveInputListResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
LiveInputListResponseEnvelopeSuccessTrue LiveInputListResponseEnvelopeSuccess = true
)
func (LiveInputListResponseEnvelopeSuccess) IsKnown ¶
func (r LiveInputListResponseEnvelopeSuccess) IsKnown() bool
type LiveInputListResponseLiveInput ¶
type LiveInputListResponseLiveInput struct {
// The date and time the live input was created.
Created time.Time `json:"created" format:"date-time"`
// Indicates the number of days after which the live inputs recordings will be
// deleted. When a stream completes and the recording is ready, the value is used
// to calculate a scheduled deletion date for that recording. Omit the field to
// indicate no change, or include with a `null` value to remove an existing
// scheduled deletion.
DeleteRecordingAfterDays float64 `json:"deleteRecordingAfterDays"`
// A user modifiable key-value store used to reference other systems of record for
// managing live inputs.
Meta interface{} `json:"meta"`
// The date and time the live input was last modified.
Modified time.Time `json:"modified" format:"date-time"`
// A unique identifier for a live input.
UID string `json:"uid"`
JSON liveInputListResponseLiveInputJSON `json:"-"`
}
func (*LiveInputListResponseLiveInput) UnmarshalJSON ¶
func (r *LiveInputListResponseLiveInput) UnmarshalJSON(data []byte) (err error)
type LiveInputNewParams ¶
type LiveInputNewParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id,required"`
// Sets the creator ID asssociated with this live input.
DefaultCreator param.Field[string] `json:"defaultCreator"`
// Indicates the number of days after which the live inputs recordings will be
// deleted. When a stream completes and the recording is ready, the value is used
// to calculate a scheduled deletion date for that recording. Omit the field to
// indicate no change, or include with a `null` value to remove an existing
// scheduled deletion.
DeleteRecordingAfterDays param.Field[float64] `json:"deleteRecordingAfterDays"`
// A user modifiable key-value store used to reference other systems of record for
// managing live inputs.
Meta param.Field[interface{}] `json:"meta"`
// Records the input to a Cloudflare Stream video. Behavior depends on the mode. In
// most cases, the video will initially be viewable as a live video and transition
// to on-demand after a condition is satisfied.
Recording param.Field[LiveInputNewParamsRecording] `json:"recording"`
}
func (LiveInputNewParams) MarshalJSON ¶
func (r LiveInputNewParams) MarshalJSON() (data []byte, err error)
type LiveInputNewParamsRecording ¶
type LiveInputNewParamsRecording struct {
// Lists the origins allowed to display videos created with this input. Enter
// allowed origin domains in an array and use `*` for wildcard subdomains. An empty
// array allows videos to be viewed on any origin.
AllowedOrigins param.Field[[]string] `json:"allowedOrigins"`
// Disables reporting the number of live viewers when this property is set to
// `true`.
HideLiveViewerCount param.Field[bool] `json:"hideLiveViewerCount"`
// Specifies the recording behavior for the live input. Set this value to `off` to
// prevent a recording. Set the value to `automatic` to begin a recording and
// transition to on-demand after Stream Live stops receiving input.
Mode param.Field[LiveInputNewParamsRecordingMode] `json:"mode"`
// Indicates if a video using the live input has the `requireSignedURLs` property
// set. Also enforces access controls on any video recording of the livestream with
// the live input.
RequireSignedURLs param.Field[bool] `json:"requireSignedURLs"`
// Determines the amount of time a live input configured in `automatic` mode should
// wait before a recording transitions from live to on-demand. `0` is recommended
// for most use cases and indicates the platform default should be used.
TimeoutSeconds param.Field[int64] `json:"timeoutSeconds"`
}
Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied.
func (LiveInputNewParamsRecording) MarshalJSON ¶
func (r LiveInputNewParamsRecording) MarshalJSON() (data []byte, err error)
type LiveInputNewParamsRecordingMode ¶
type LiveInputNewParamsRecordingMode string
Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.
const ( LiveInputNewParamsRecordingModeOff LiveInputNewParamsRecordingMode = "off" LiveInputNewParamsRecordingModeAutomatic LiveInputNewParamsRecordingMode = "automatic" )
func (LiveInputNewParamsRecordingMode) IsKnown ¶
func (r LiveInputNewParamsRecordingMode) IsKnown() bool
type LiveInputNewResponseEnvelope ¶
type LiveInputNewResponseEnvelope struct {
Errors []LiveInputNewResponseEnvelopeErrors `json:"errors,required"`
Messages []LiveInputNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success LiveInputNewResponseEnvelopeSuccess `json:"success,required"`
// Details about a live input.
Result LiveInput `json:"result"`
JSON liveInputNewResponseEnvelopeJSON `json:"-"`
}
func (*LiveInputNewResponseEnvelope) UnmarshalJSON ¶
func (r *LiveInputNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LiveInputNewResponseEnvelopeErrors ¶
type LiveInputNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputNewResponseEnvelopeErrorsSource `json:"source"`
JSON liveInputNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LiveInputNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LiveInputNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LiveInputNewResponseEnvelopeErrorsSource ¶
type LiveInputNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON liveInputNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*LiveInputNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *LiveInputNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type LiveInputNewResponseEnvelopeMessages ¶
type LiveInputNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputNewResponseEnvelopeMessagesSource `json:"source"`
JSON liveInputNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LiveInputNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LiveInputNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LiveInputNewResponseEnvelopeMessagesSource ¶
type LiveInputNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON liveInputNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*LiveInputNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *LiveInputNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type LiveInputNewResponseEnvelopeSuccess ¶
type LiveInputNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
LiveInputNewResponseEnvelopeSuccessTrue LiveInputNewResponseEnvelopeSuccess = true
)
func (LiveInputNewResponseEnvelopeSuccess) IsKnown ¶
func (r LiveInputNewResponseEnvelopeSuccess) IsKnown() bool
type LiveInputOutputNewParams ¶
type LiveInputOutputNewParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id,required"`
// The streamKey used to authenticate against an output's target.
StreamKey param.Field[string] `json:"streamKey,required"`
// The URL an output uses to restream.
URL param.Field[string] `json:"url,required"`
// When enabled, live video streamed to the associated live input will be sent to
// the output URL. When disabled, live video will not be sent to the output URL,
// even when streaming to the associated live input. Use this to control precisely
// when you start and stop simulcasting to specific destinations like YouTube and
// Twitch.
Enabled param.Field[bool] `json:"enabled"`
}
func (LiveInputOutputNewParams) MarshalJSON ¶
func (r LiveInputOutputNewParams) MarshalJSON() (data []byte, err error)
type LiveInputOutputNewResponseEnvelope ¶
type LiveInputOutputNewResponseEnvelope struct {
Errors []LiveInputOutputNewResponseEnvelopeErrors `json:"errors,required"`
Messages []LiveInputOutputNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success LiveInputOutputNewResponseEnvelopeSuccess `json:"success,required"`
Result Output `json:"result"`
JSON liveInputOutputNewResponseEnvelopeJSON `json:"-"`
}
func (*LiveInputOutputNewResponseEnvelope) UnmarshalJSON ¶
func (r *LiveInputOutputNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputNewResponseEnvelopeErrors ¶
type LiveInputOutputNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputOutputNewResponseEnvelopeErrorsSource `json:"source"`
JSON liveInputOutputNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LiveInputOutputNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LiveInputOutputNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputNewResponseEnvelopeErrorsSource ¶
type LiveInputOutputNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON liveInputOutputNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*LiveInputOutputNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *LiveInputOutputNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputNewResponseEnvelopeMessages ¶
type LiveInputOutputNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputOutputNewResponseEnvelopeMessagesSource `json:"source"`
JSON liveInputOutputNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LiveInputOutputNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LiveInputOutputNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputNewResponseEnvelopeMessagesSource ¶
type LiveInputOutputNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON liveInputOutputNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*LiveInputOutputNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *LiveInputOutputNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputNewResponseEnvelopeSuccess ¶
type LiveInputOutputNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
LiveInputOutputNewResponseEnvelopeSuccessTrue LiveInputOutputNewResponseEnvelopeSuccess = true
)
func (LiveInputOutputNewResponseEnvelopeSuccess) IsKnown ¶
func (r LiveInputOutputNewResponseEnvelopeSuccess) IsKnown() bool
type LiveInputOutputService ¶
type LiveInputOutputService struct {
Options []option.RequestOption
}
LiveInputOutputService 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 NewLiveInputOutputService method instead.
func NewLiveInputOutputService ¶
func NewLiveInputOutputService(opts ...option.RequestOption) (r *LiveInputOutputService)
NewLiveInputOutputService 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 (*LiveInputOutputService) Delete ¶
func (r *LiveInputOutputService) Delete(ctx context.Context, liveInputIdentifier string, outputIdentifier string, body LiveInputOutputDeleteParams, opts ...option.RequestOption) (err error)
Deletes an output and removes it from the associated live input.
func (*LiveInputOutputService) List ¶
func (r *LiveInputOutputService) List(ctx context.Context, liveInputIdentifier string, query LiveInputOutputListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Output], err error)
Retrieves all outputs associated with a specified live input.
func (*LiveInputOutputService) ListAutoPaging ¶
func (r *LiveInputOutputService) ListAutoPaging(ctx context.Context, liveInputIdentifier string, query LiveInputOutputListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Output]
Retrieves all outputs associated with a specified live input.
func (*LiveInputOutputService) New ¶
func (r *LiveInputOutputService) New(ctx context.Context, liveInputIdentifier string, params LiveInputOutputNewParams, opts ...option.RequestOption) (res *Output, err error)
Creates a new output that can be used to simulcast or restream live video to other RTMP or SRT destinations. Outputs are always linked to a specific live input — one live input can have many outputs.
func (*LiveInputOutputService) Update ¶
func (r *LiveInputOutputService) Update(ctx context.Context, liveInputIdentifier string, outputIdentifier string, params LiveInputOutputUpdateParams, opts ...option.RequestOption) (res *Output, err error)
Updates the state of an output.
type LiveInputOutputUpdateParams ¶
type LiveInputOutputUpdateParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id,required"`
// When enabled, live video streamed to the associated live input will be sent to
// the output URL. When disabled, live video will not be sent to the output URL,
// even when streaming to the associated live input. Use this to control precisely
// when you start and stop simulcasting to specific destinations like YouTube and
// Twitch.
Enabled param.Field[bool] `json:"enabled,required"`
}
func (LiveInputOutputUpdateParams) MarshalJSON ¶
func (r LiveInputOutputUpdateParams) MarshalJSON() (data []byte, err error)
type LiveInputOutputUpdateResponseEnvelope ¶
type LiveInputOutputUpdateResponseEnvelope struct {
Errors []LiveInputOutputUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []LiveInputOutputUpdateResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success LiveInputOutputUpdateResponseEnvelopeSuccess `json:"success,required"`
Result Output `json:"result"`
JSON liveInputOutputUpdateResponseEnvelopeJSON `json:"-"`
}
func (*LiveInputOutputUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *LiveInputOutputUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputUpdateResponseEnvelopeErrors ¶
type LiveInputOutputUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputOutputUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON liveInputOutputUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LiveInputOutputUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LiveInputOutputUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputUpdateResponseEnvelopeErrorsSource ¶
type LiveInputOutputUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON liveInputOutputUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*LiveInputOutputUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *LiveInputOutputUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputUpdateResponseEnvelopeMessages ¶
type LiveInputOutputUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputOutputUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON liveInputOutputUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LiveInputOutputUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LiveInputOutputUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputUpdateResponseEnvelopeMessagesSource ¶
type LiveInputOutputUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON liveInputOutputUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*LiveInputOutputUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *LiveInputOutputUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type LiveInputOutputUpdateResponseEnvelopeSuccess ¶
type LiveInputOutputUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
LiveInputOutputUpdateResponseEnvelopeSuccessTrue LiveInputOutputUpdateResponseEnvelopeSuccess = true
)
func (LiveInputOutputUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r LiveInputOutputUpdateResponseEnvelopeSuccess) IsKnown() bool
type LiveInputRecording ¶
type LiveInputRecording struct {
// Lists the origins allowed to display videos created with this input. Enter
// allowed origin domains in an array and use `*` for wildcard subdomains. An empty
// array allows videos to be viewed on any origin.
AllowedOrigins []string `json:"allowedOrigins"`
// Disables reporting the number of live viewers when this property is set to
// `true`.
HideLiveViewerCount bool `json:"hideLiveViewerCount"`
// Specifies the recording behavior for the live input. Set this value to `off` to
// prevent a recording. Set the value to `automatic` to begin a recording and
// transition to on-demand after Stream Live stops receiving input.
Mode LiveInputRecordingMode `json:"mode"`
// Indicates if a video using the live input has the `requireSignedURLs` property
// set. Also enforces access controls on any video recording of the livestream with
// the live input.
RequireSignedURLs bool `json:"requireSignedURLs"`
// Determines the amount of time a live input configured in `automatic` mode should
// wait before a recording transitions from live to on-demand. `0` is recommended
// for most use cases and indicates the platform default should be used.
TimeoutSeconds int64 `json:"timeoutSeconds"`
JSON liveInputRecordingJSON `json:"-"`
}
Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied.
func (*LiveInputRecording) UnmarshalJSON ¶
func (r *LiveInputRecording) UnmarshalJSON(data []byte) (err error)
type LiveInputRecordingMode ¶
type LiveInputRecordingMode string
Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.
const ( LiveInputRecordingModeOff LiveInputRecordingMode = "off" LiveInputRecordingModeAutomatic LiveInputRecordingMode = "automatic" )
func (LiveInputRecordingMode) IsKnown ¶
func (r LiveInputRecordingMode) IsKnown() bool
type LiveInputRtmps ¶
type LiveInputRtmps struct {
// The secret key to use when streaming via RTMPS to a live input.
StreamKey string `json:"streamKey"`
// The RTMPS URL you provide to the broadcaster, which they stream live video to.
URL string `json:"url"`
JSON liveInputRtmpsJSON `json:"-"`
}
Details for streaming to an live input using RTMPS.
func (*LiveInputRtmps) UnmarshalJSON ¶
func (r *LiveInputRtmps) UnmarshalJSON(data []byte) (err error)
type LiveInputRtmpsPlayback ¶
type LiveInputRtmpsPlayback struct {
// The secret key to use for playback via RTMPS.
StreamKey string `json:"streamKey"`
// The URL used to play live video over RTMPS.
URL string `json:"url"`
JSON liveInputRtmpsPlaybackJSON `json:"-"`
}
Details for playback from an live input using RTMPS.
func (*LiveInputRtmpsPlayback) UnmarshalJSON ¶
func (r *LiveInputRtmpsPlayback) UnmarshalJSON(data []byte) (err error)
type LiveInputService ¶
type LiveInputService struct {
Options []option.RequestOption
Outputs *LiveInputOutputService
}
LiveInputService 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 NewLiveInputService method instead.
func NewLiveInputService ¶
func NewLiveInputService(opts ...option.RequestOption) (r *LiveInputService)
NewLiveInputService 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 (*LiveInputService) Delete ¶
func (r *LiveInputService) Delete(ctx context.Context, liveInputIdentifier string, body LiveInputDeleteParams, opts ...option.RequestOption) (err error)
Prevents a live input from being streamed to and makes the live input inaccessible to any future API calls.
func (*LiveInputService) Get ¶
func (r *LiveInputService) Get(ctx context.Context, liveInputIdentifier string, query LiveInputGetParams, opts ...option.RequestOption) (res *LiveInput, err error)
Retrieves details of an existing live input.
func (*LiveInputService) List ¶
func (r *LiveInputService) List(ctx context.Context, params LiveInputListParams, opts ...option.RequestOption) (res *LiveInputListResponse, err error)
Lists the live inputs created for an account. To get the credentials needed to stream to a specific live input, request a single live input.
func (*LiveInputService) New ¶
func (r *LiveInputService) New(ctx context.Context, params LiveInputNewParams, opts ...option.RequestOption) (res *LiveInput, err error)
Creates a live input, and returns credentials that you or your users can use to stream live video to Cloudflare Stream.
func (*LiveInputService) Update ¶
func (r *LiveInputService) Update(ctx context.Context, liveInputIdentifier string, params LiveInputUpdateParams, opts ...option.RequestOption) (res *LiveInput, err error)
Updates a specified live input.
type LiveInputSrt ¶
type LiveInputSrt struct {
// The secret key to use when streaming via SRT to a live input.
Passphrase string `json:"passphrase"`
// The identifier of the live input to use when streaming via SRT.
StreamID string `json:"streamId"`
// The SRT URL you provide to the broadcaster, which they stream live video to.
URL string `json:"url"`
JSON liveInputSrtJSON `json:"-"`
}
Details for streaming to a live input using SRT.
func (*LiveInputSrt) UnmarshalJSON ¶
func (r *LiveInputSrt) UnmarshalJSON(data []byte) (err error)
type LiveInputSrtPlayback ¶
type LiveInputSrtPlayback struct {
// The secret key to use for playback via SRT.
Passphrase string `json:"passphrase"`
// The identifier of the live input to use for playback via SRT.
StreamID string `json:"streamId"`
// The URL used to play live video over SRT.
URL string `json:"url"`
JSON liveInputSrtPlaybackJSON `json:"-"`
}
Details for playback from an live input using SRT.
func (*LiveInputSrtPlayback) UnmarshalJSON ¶
func (r *LiveInputSrtPlayback) UnmarshalJSON(data []byte) (err error)
type LiveInputStatus ¶
type LiveInputStatus string
The connection status of a live input.
const ( LiveInputStatusConnected LiveInputStatus = "connected" LiveInputStatusReconnected LiveInputStatus = "reconnected" LiveInputStatusReconnecting LiveInputStatus = "reconnecting" LiveInputStatusClientDisconnect LiveInputStatus = "client_disconnect" LiveInputStatusTTLExceeded LiveInputStatus = "ttl_exceeded" LiveInputStatusFailedToConnect LiveInputStatus = "failed_to_connect" LiveInputStatusFailedToReconnect LiveInputStatus = "failed_to_reconnect" LiveInputStatusNewConfigurationAccepted LiveInputStatus = "new_configuration_accepted" )
func (LiveInputStatus) IsKnown ¶
func (r LiveInputStatus) IsKnown() bool
type LiveInputUpdateParams ¶
type LiveInputUpdateParams struct {
// Identifier.
AccountID param.Field[string] `path:"account_id,required"`
// Sets the creator ID asssociated with this live input.
DefaultCreator param.Field[string] `json:"defaultCreator"`
// Indicates the number of days after which the live inputs recordings will be
// deleted. When a stream completes and the recording is ready, the value is used
// to calculate a scheduled deletion date for that recording. Omit the field to
// indicate no change, or include with a `null` value to remove an existing
// scheduled deletion.
DeleteRecordingAfterDays param.Field[float64] `json:"deleteRecordingAfterDays"`
// A user modifiable key-value store used to reference other systems of record for
// managing live inputs.
Meta param.Field[interface{}] `json:"meta"`
// Records the input to a Cloudflare Stream video. Behavior depends on the mode. In
// most cases, the video will initially be viewable as a live video and transition
// to on-demand after a condition is satisfied.
Recording param.Field[LiveInputUpdateParamsRecording] `json:"recording"`
}
func (LiveInputUpdateParams) MarshalJSON ¶
func (r LiveInputUpdateParams) MarshalJSON() (data []byte, err error)
type LiveInputUpdateParamsRecording ¶
type LiveInputUpdateParamsRecording struct {
// Lists the origins allowed to display videos created with this input. Enter
// allowed origin domains in an array and use `*` for wildcard subdomains. An empty
// array allows videos to be viewed on any origin.
AllowedOrigins param.Field[[]string] `json:"allowedOrigins"`
// Disables reporting the number of live viewers when this property is set to
// `true`.
HideLiveViewerCount param.Field[bool] `json:"hideLiveViewerCount"`
// Specifies the recording behavior for the live input. Set this value to `off` to
// prevent a recording. Set the value to `automatic` to begin a recording and
// transition to on-demand after Stream Live stops receiving input.
Mode param.Field[LiveInputUpdateParamsRecordingMode] `json:"mode"`
// Indicates if a video using the live input has the `requireSignedURLs` property
// set. Also enforces access controls on any video recording of the livestream with
// the live input.
RequireSignedURLs param.Field[bool] `json:"requireSignedURLs"`
// Determines the amount of time a live input configured in `automatic` mode should
// wait before a recording transitions from live to on-demand. `0` is recommended
// for most use cases and indicates the platform default should be used.
TimeoutSeconds param.Field[int64] `json:"timeoutSeconds"`
}
Records the input to a Cloudflare Stream video. Behavior depends on the mode. In most cases, the video will initially be viewable as a live video and transition to on-demand after a condition is satisfied.
func (LiveInputUpdateParamsRecording) MarshalJSON ¶
func (r LiveInputUpdateParamsRecording) MarshalJSON() (data []byte, err error)
type LiveInputUpdateParamsRecordingMode ¶
type LiveInputUpdateParamsRecordingMode string
Specifies the recording behavior for the live input. Set this value to `off` to prevent a recording. Set the value to `automatic` to begin a recording and transition to on-demand after Stream Live stops receiving input.
const ( LiveInputUpdateParamsRecordingModeOff LiveInputUpdateParamsRecordingMode = "off" LiveInputUpdateParamsRecordingModeAutomatic LiveInputUpdateParamsRecordingMode = "automatic" )
func (LiveInputUpdateParamsRecordingMode) IsKnown ¶
func (r LiveInputUpdateParamsRecordingMode) IsKnown() bool
type LiveInputUpdateResponseEnvelope ¶
type LiveInputUpdateResponseEnvelope struct {
Errors []LiveInputUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []LiveInputUpdateResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success LiveInputUpdateResponseEnvelopeSuccess `json:"success,required"`
// Details about a live input.
Result LiveInput `json:"result"`
JSON liveInputUpdateResponseEnvelopeJSON `json:"-"`
}
func (*LiveInputUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *LiveInputUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LiveInputUpdateResponseEnvelopeErrors ¶
type LiveInputUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON liveInputUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*LiveInputUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LiveInputUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LiveInputUpdateResponseEnvelopeErrorsSource ¶
type LiveInputUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON liveInputUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*LiveInputUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *LiveInputUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type LiveInputUpdateResponseEnvelopeMessages ¶
type LiveInputUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source LiveInputUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON liveInputUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*LiveInputUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LiveInputUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LiveInputUpdateResponseEnvelopeMessagesSource ¶
type LiveInputUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON liveInputUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*LiveInputUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *LiveInputUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type LiveInputUpdateResponseEnvelopeSuccess ¶
type LiveInputUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
LiveInputUpdateResponseEnvelopeSuccessTrue LiveInputUpdateResponseEnvelopeSuccess = true
)
func (LiveInputUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r LiveInputUpdateResponseEnvelopeSuccess) IsKnown() bool
type LiveInputWebRtc ¶
type LiveInputWebRtc struct {
// The WebRTC URL you provide to the broadcaster, which they stream live video to.
URL string `json:"url"`
JSON liveInputWebRtcJSON `json:"-"`
}
Details for streaming to a live input using WebRTC.
func (*LiveInputWebRtc) UnmarshalJSON ¶
func (r *LiveInputWebRtc) UnmarshalJSON(data []byte) (err error)
type LiveInputWebRtcPlayback ¶
type LiveInputWebRtcPlayback struct {
// The URL used to play live video over WebRTC.
URL string `json:"url"`
JSON liveInputWebRtcPlaybackJSON `json:"-"`
}
Details for playback from a live input using WebRTC.
func (*LiveInputWebRtcPlayback) UnmarshalJSON ¶
func (r *LiveInputWebRtcPlayback) UnmarshalJSON(data []byte) (err error)
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 Output ¶
type Output struct {
// When enabled, live video streamed to the associated live input will be sent to
// the output URL. When disabled, live video will not be sent to the output URL,
// even when streaming to the associated live input. Use this to control precisely
// when you start and stop simulcasting to specific destinations like YouTube and
// Twitch.
Enabled bool `json:"enabled"`
// The streamKey used to authenticate against an output's target.
StreamKey string `json:"streamKey"`
// A unique identifier for the output.
UID string `json:"uid"`
// The URL an output uses to restream.
URL string `json:"url"`
JSON outputJSON `json:"-"`
}
func (*Output) UnmarshalJSON ¶
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 StreamDeleteParams ¶
type StreamEditParams ¶
type StreamEditParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// Lists the origins allowed to display the video. Enter allowed origin domains in
// an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
// viewed on any origin.
AllowedOrigins param.Field[[]AllowedOriginsParam] `json:"allowedOrigins"`
// A user-defined identifier for the media creator.
Creator param.Field[string] `json:"creator"`
// The maximum duration in seconds for a video upload. Can be set for a video that
// is not yet uploaded to limit its duration. Uploads that exceed the specified
// duration will fail during processing. A value of `-1` means the value is
// unknown.
MaxDurationSeconds param.Field[int64] `json:"maxDurationSeconds"`
// A user modifiable key-value store used to reference other systems of record for
// managing videos.
Meta param.Field[interface{}] `json:"meta"`
// Indicates whether the video can be a accessed using the UID. When set to `true`,
// a signed token must be generated with a signing key to view the video.
RequireSignedURLs param.Field[bool] `json:"requireSignedURLs"`
// Indicates the date and time at which the video will be deleted. Omit the field
// to indicate no change, or include with a `null` value to remove an existing
// scheduled deletion. If specified, must be at least 30 days from upload time.
ScheduledDeletion param.Field[time.Time] `json:"scheduledDeletion" format:"date-time"`
// The timestamp for a thumbnail image calculated as a percentage value of the
// video's duration. To convert from a second-wise timestamp to a percentage,
// divide the desired timestamp by the total duration of the video. If this value
// is not set, the default thumbnail image is taken from 0s of the video.
ThumbnailTimestampPct param.Field[float64] `json:"thumbnailTimestampPct"`
// The date and time when the video upload URL is no longer valid for direct user
// uploads.
UploadExpiry param.Field[time.Time] `json:"uploadExpiry" format:"date-time"`
}
func (StreamEditParams) MarshalJSON ¶
func (r StreamEditParams) MarshalJSON() (data []byte, err error)
type StreamEditResponseEnvelope ¶
type StreamEditResponseEnvelope struct {
Errors []StreamEditResponseEnvelopeErrors `json:"errors,required"`
Messages []StreamEditResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success StreamEditResponseEnvelopeSuccess `json:"success,required"`
Result Video `json:"result"`
JSON streamEditResponseEnvelopeJSON `json:"-"`
}
func (*StreamEditResponseEnvelope) UnmarshalJSON ¶
func (r *StreamEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type StreamEditResponseEnvelopeErrors ¶
type StreamEditResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source StreamEditResponseEnvelopeErrorsSource `json:"source"`
JSON streamEditResponseEnvelopeErrorsJSON `json:"-"`
}
func (*StreamEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *StreamEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type StreamEditResponseEnvelopeErrorsSource ¶
type StreamEditResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON streamEditResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*StreamEditResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *StreamEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type StreamEditResponseEnvelopeMessages ¶
type StreamEditResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source StreamEditResponseEnvelopeMessagesSource `json:"source"`
JSON streamEditResponseEnvelopeMessagesJSON `json:"-"`
}
func (*StreamEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *StreamEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type StreamEditResponseEnvelopeMessagesSource ¶
type StreamEditResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON streamEditResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*StreamEditResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *StreamEditResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type StreamEditResponseEnvelopeSuccess ¶
type StreamEditResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
StreamEditResponseEnvelopeSuccessTrue StreamEditResponseEnvelopeSuccess = true
)
func (StreamEditResponseEnvelopeSuccess) IsKnown ¶
func (r StreamEditResponseEnvelopeSuccess) IsKnown() bool
type StreamGetParams ¶
type StreamGetResponseEnvelope ¶
type StreamGetResponseEnvelope struct {
Errors []StreamGetResponseEnvelopeErrors `json:"errors,required"`
Messages []StreamGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success StreamGetResponseEnvelopeSuccess `json:"success,required"`
Result Video `json:"result"`
JSON streamGetResponseEnvelopeJSON `json:"-"`
}
func (*StreamGetResponseEnvelope) UnmarshalJSON ¶
func (r *StreamGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type StreamGetResponseEnvelopeErrors ¶
type StreamGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source StreamGetResponseEnvelopeErrorsSource `json:"source"`
JSON streamGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*StreamGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *StreamGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type StreamGetResponseEnvelopeErrorsSource ¶
type StreamGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON streamGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*StreamGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *StreamGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type StreamGetResponseEnvelopeMessages ¶
type StreamGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source StreamGetResponseEnvelopeMessagesSource `json:"source"`
JSON streamGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*StreamGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *StreamGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type StreamGetResponseEnvelopeMessagesSource ¶
type StreamGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON streamGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*StreamGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *StreamGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type StreamGetResponseEnvelopeSuccess ¶
type StreamGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
StreamGetResponseEnvelopeSuccessTrue StreamGetResponseEnvelopeSuccess = true
)
func (StreamGetResponseEnvelopeSuccess) IsKnown ¶
func (r StreamGetResponseEnvelopeSuccess) IsKnown() bool
type StreamListParams ¶
type StreamListParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// Lists videos in ascending order of creation.
Asc param.Field[bool] `query:"asc"`
// A user-defined identifier for the media creator.
Creator param.Field[string] `query:"creator"`
// Lists videos created before the specified date.
End param.Field[time.Time] `query:"end" format:"date-time"`
// Includes the total number of videos associated with the submitted query
// parameters.
IncludeCounts param.Field[bool] `query:"include_counts"`
// Provides a partial word match of the `name` key in the `meta` field. Slow for
// medium to large video libraries. May be unavailable for very large libraries.
Search param.Field[string] `query:"search"`
// Lists videos created after the specified date.
Start param.Field[time.Time] `query:"start" format:"date-time"`
// Specifies the processing status for all quality levels for a video.
Status param.Field[StreamListParamsStatus] `query:"status"`
// Specifies whether the video is `vod` or `live`.
Type param.Field[string] `query:"type"`
// Provides a fast, exact string match on the `name` key in the `meta` field.
VideoName param.Field[string] `query:"video_name"`
}
func (StreamListParams) URLQuery ¶
func (r StreamListParams) URLQuery() (v url.Values)
URLQuery serializes StreamListParams's query parameters as `url.Values`.
type StreamListParamsStatus ¶
type StreamListParamsStatus string
Specifies the processing status for all quality levels for a video.
const ( StreamListParamsStatusPendingupload StreamListParamsStatus = "pendingupload" StreamListParamsStatusDownloading StreamListParamsStatus = "downloading" StreamListParamsStatusQueued StreamListParamsStatus = "queued" StreamListParamsStatusInprogress StreamListParamsStatus = "inprogress" StreamListParamsStatusReady StreamListParamsStatus = "ready" StreamListParamsStatusError StreamListParamsStatus = "error" StreamListParamsStatusLiveInprogress StreamListParamsStatus = "live-inprogress" )
func (StreamListParamsStatus) IsKnown ¶
func (r StreamListParamsStatus) IsKnown() bool
type StreamNewParams ¶
type StreamNewParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
Body interface{} `json:"body,required"`
// Specifies the TUS protocol version. This value must be included in every upload
// request. Notes: The only supported version of TUS protocol is 1.0.0.
TusResumable param.Field[StreamNewParamsTusResumable] `header:"Tus-Resumable,required"`
// Indicates the size of the entire upload in bytes. The value must be a
// non-negative integer.
UploadLength param.Field[int64] `header:"Upload-Length,required"`
// Provisions a URL to let your end users upload videos directly to Cloudflare
// Stream without exposing your API token to clients.
DirectUser param.Field[bool] `query:"direct_user"`
// A user-defined identifier for the media creator.
UploadCreator param.Field[string] `header:"Upload-Creator"`
// Comma-separated key-value pairs following the TUS protocol specification. Values
// are Base-64 encoded. Supported keys: `name`, `requiresignedurls`,
// `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`,
// `maxdurationseconds`.
UploadMetadata param.Field[string] `header:"Upload-Metadata"`
}
func (StreamNewParams) MarshalJSON ¶
func (r StreamNewParams) MarshalJSON() (data []byte, err error)
func (StreamNewParams) URLQuery ¶
func (r StreamNewParams) URLQuery() (v url.Values)
URLQuery serializes StreamNewParams's query parameters as `url.Values`.
type StreamNewParamsTusResumable ¶
type StreamNewParamsTusResumable string
Specifies the TUS protocol version. This value must be included in every upload request. Notes: The only supported version of TUS protocol is 1.0.0.
const (
StreamNewParamsTusResumable1_0_0 StreamNewParamsTusResumable = "1.0.0"
)
func (StreamNewParamsTusResumable) IsKnown ¶
func (r StreamNewParamsTusResumable) IsKnown() bool
type StreamService ¶
type StreamService struct {
Options []option.RequestOption
AudioTracks *AudioTrackService
Videos *VideoService
Clip *ClipService
Copy *CopyService
DirectUpload *DirectUploadService
Keys *KeyService
LiveInputs *LiveInputService
Watermarks *WatermarkService
Webhooks *WebhookService
Captions *CaptionService
Downloads *DownloadService
Embed *EmbedService
Token *TokenService
}
StreamService 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 NewStreamService method instead.
func NewStreamService ¶
func NewStreamService(opts ...option.RequestOption) (r *StreamService)
NewStreamService 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 (*StreamService) Delete ¶
func (r *StreamService) Delete(ctx context.Context, identifier string, body StreamDeleteParams, opts ...option.RequestOption) (err error)
Deletes a video and its copies from Cloudflare Stream.
func (*StreamService) Edit ¶
func (r *StreamService) Edit(ctx context.Context, identifier string, params StreamEditParams, opts ...option.RequestOption) (res *Video, err error)
Edit details for a single video.
func (*StreamService) Get ¶
func (r *StreamService) Get(ctx context.Context, identifier string, query StreamGetParams, opts ...option.RequestOption) (res *Video, err error)
Fetches details for a single video.
func (*StreamService) List ¶
func (r *StreamService) List(ctx context.Context, params StreamListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Video], err error)
Lists up to 1000 videos from a single request. For a specific range, refer to the optional parameters.
func (*StreamService) ListAutoPaging ¶
func (r *StreamService) ListAutoPaging(ctx context.Context, params StreamListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Video]
Lists up to 1000 videos from a single request. For a specific range, refer to the optional parameters.
func (*StreamService) New ¶
func (r *StreamService) New(ctx context.Context, params StreamNewParams, opts ...option.RequestOption) (err error)
Initiates a video upload using the TUS protocol. On success, the server responds with a status code 201 (created) and includes a `location` header to indicate where the content should be uploaded. Refer to https://tus.io for protocol details.
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 TokenNewParams ¶
type TokenNewParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// The optional ID of a Stream signing key. If present, the `pem` field is also
// required.
ID param.Field[string] `json:"id"`
// The optional list of access rule constraints on the token. Access can be blocked
// or allowed based on an IP, IP range, or by country. Access rules are evaluated
// from first to last. If a rule matches, the associated action is applied and no
// further rules are evaluated.
AccessRules param.Field[[]TokenNewParamsAccessRule] `json:"accessRules"`
// The optional boolean value that enables using signed tokens to access MP4
// download links for a video.
Downloadable param.Field[bool] `json:"downloadable"`
// The optional unix epoch timestamp that specficies the time after a token is not
// accepted. The maximum time specification is 24 hours from issuing time. If this
// field is not set, the default is one hour after issuing.
Exp param.Field[int64] `json:"exp"`
// The optional unix epoch timestamp that specifies the time before a the token is
// not accepted. If this field is not set, the default is one hour before issuing.
Nbf param.Field[int64] `json:"nbf"`
// The optional base64 encoded private key in PEM format associated with a Stream
// signing key. If present, the `id` field is also required.
Pem param.Field[string] `json:"pem"`
}
func (TokenNewParams) MarshalJSON ¶
func (r TokenNewParams) MarshalJSON() (data []byte, err error)
type TokenNewParamsAccessRule ¶
type TokenNewParamsAccessRule struct {
// The action to take when a request matches a rule. If the action is `block`, the
// signed token blocks views for viewers matching the rule.
Action param.Field[TokenNewParamsAccessRulesAction] `json:"action"`
// An array of 2-letter country codes in ISO 3166-1 Alpha-2 format used to match
// requests.
Country param.Field[[]string] `json:"country"`
// An array of IPv4 or IPV6 addresses or CIDRs used to match requests.
IP param.Field[[]string] `json:"ip"`
// Lists available rule types to match for requests. An `any` type matches all
// requests and can be used as a wildcard to apply default actions after other
// rules.
Type param.Field[TokenNewParamsAccessRulesType] `json:"type"`
}
Defines rules for fine-grained control over content than signed URL tokens alone. Access rules primarily make tokens conditionally valid based on user information. Access Rules are specified on token payloads as the `accessRules` property containing an array of Rule objects.
func (TokenNewParamsAccessRule) MarshalJSON ¶
func (r TokenNewParamsAccessRule) MarshalJSON() (data []byte, err error)
type TokenNewParamsAccessRulesAction ¶
type TokenNewParamsAccessRulesAction string
The action to take when a request matches a rule. If the action is `block`, the signed token blocks views for viewers matching the rule.
const ( TokenNewParamsAccessRulesActionAllow TokenNewParamsAccessRulesAction = "allow" TokenNewParamsAccessRulesActionBlock TokenNewParamsAccessRulesAction = "block" )
func (TokenNewParamsAccessRulesAction) IsKnown ¶
func (r TokenNewParamsAccessRulesAction) IsKnown() bool
type TokenNewParamsAccessRulesType ¶
type TokenNewParamsAccessRulesType string
Lists available rule types to match for requests. An `any` type matches all requests and can be used as a wildcard to apply default actions after other rules.
const ( TokenNewParamsAccessRulesTypeAny TokenNewParamsAccessRulesType = "any" TokenNewParamsAccessRulesTypeIPSrc TokenNewParamsAccessRulesType = "ip.src" TokenNewParamsAccessRulesTypeIPGeoipCountry TokenNewParamsAccessRulesType = "ip.geoip.country" )
func (TokenNewParamsAccessRulesType) IsKnown ¶
func (r TokenNewParamsAccessRulesType) IsKnown() bool
type TokenNewResponse ¶
type TokenNewResponse struct {
// The signed token used with the signed URLs feature.
Token string `json:"token"`
JSON tokenNewResponseJSON `json:"-"`
}
func (*TokenNewResponse) UnmarshalJSON ¶
func (r *TokenNewResponse) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelope ¶
type TokenNewResponseEnvelope struct {
Errors []TokenNewResponseEnvelopeErrors `json:"errors,required"`
Messages []TokenNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success TokenNewResponseEnvelopeSuccess `json:"success,required"`
Result TokenNewResponse `json:"result"`
JSON tokenNewResponseEnvelopeJSON `json:"-"`
}
func (*TokenNewResponseEnvelope) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeErrors ¶
type TokenNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenNewResponseEnvelopeErrorsSource `json:"source"`
JSON tokenNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*TokenNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeErrorsSource ¶
type TokenNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON tokenNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*TokenNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeMessages ¶
type TokenNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source TokenNewResponseEnvelopeMessagesSource `json:"source"`
JSON tokenNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*TokenNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeMessagesSource ¶
type TokenNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON tokenNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*TokenNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeSuccess ¶
type TokenNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
TokenNewResponseEnvelopeSuccessTrue TokenNewResponseEnvelopeSuccess = true
)
func (TokenNewResponseEnvelopeSuccess) IsKnown ¶
func (r TokenNewResponseEnvelopeSuccess) IsKnown() bool
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 TokenService ¶
type TokenService struct {
Options []option.RequestOption
}
TokenService 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 NewTokenService method instead.
func NewTokenService ¶
func NewTokenService(opts ...option.RequestOption) (r *TokenService)
NewTokenService 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 (*TokenService) New ¶
func (r *TokenService) New(ctx context.Context, identifier string, params TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error)
Creates a signed URL token for a video. If a body is not provided in the request, a token is created with default values.
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.
type Video ¶
type Video struct {
// Lists the origins allowed to display the video. Enter allowed origin domains in
// an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
// viewed on any origin.
AllowedOrigins []AllowedOrigins `json:"allowedOrigins"`
// The date and time the media item was created.
Created time.Time `json:"created" format:"date-time"`
// A user-defined identifier for the media creator.
Creator string `json:"creator"`
// The duration of the video in seconds. A value of `-1` means the duration is
// unknown. The duration becomes available after the upload and before the video is
// ready.
Duration float64 `json:"duration"`
Input VideoInput `json:"input"`
// The live input ID used to upload a video with Stream Live.
LiveInput string `json:"liveInput"`
// The maximum duration in seconds for a video upload. Can be set for a video that
// is not yet uploaded to limit its duration. Uploads that exceed the specified
// duration will fail during processing. A value of `-1` means the value is
// unknown.
MaxDurationSeconds int64 `json:"maxDurationSeconds"`
// A user modifiable key-value store used to reference other systems of record for
// managing videos.
Meta interface{} `json:"meta"`
// The date and time the media item was last modified.
Modified time.Time `json:"modified" format:"date-time"`
Playback VideoPlayback `json:"playback"`
// The video's preview page URI. This field is omitted until encoding is complete.
Preview string `json:"preview" format:"uri"`
// Indicates whether the video is playable. The field is empty if the video is not
// ready for viewing or the live stream is still in progress.
ReadyToStream bool `json:"readyToStream"`
// Indicates the time at which the video became playable. The field is empty if the
// video is not ready for viewing or the live stream is still in progress.
ReadyToStreamAt time.Time `json:"readyToStreamAt" format:"date-time"`
// Indicates whether the video can be a accessed using the UID. When set to `true`,
// a signed token must be generated with a signing key to view the video.
RequireSignedURLs bool `json:"requireSignedURLs"`
// Indicates the date and time at which the video will be deleted. Omit the field
// to indicate no change, or include with a `null` value to remove an existing
// scheduled deletion. If specified, must be at least 30 days from upload time.
ScheduledDeletion time.Time `json:"scheduledDeletion" format:"date-time"`
// The size of the media item in bytes.
Size float64 `json:"size"`
// Specifies a detailed status for a video. If the `state` is `inprogress` or
// `error`, the `step` field returns `encoding` or `manifest`. If the `state` is
// `inprogress`, `pctComplete` returns a number between 0 and 100 to indicate the
// approximate percent of completion. If the `state` is `error`, `errorReasonCode`
// and `errorReasonText` provide additional details.
Status VideoStatus `json:"status"`
// The media item's thumbnail URI. This field is omitted until encoding is
// complete.
Thumbnail string `json:"thumbnail" format:"uri"`
// The timestamp for a thumbnail image calculated as a percentage value of the
// video's duration. To convert from a second-wise timestamp to a percentage,
// divide the desired timestamp by the total duration of the video. If this value
// is not set, the default thumbnail image is taken from 0s of the video.
ThumbnailTimestampPct float64 `json:"thumbnailTimestampPct"`
// A Cloudflare-generated unique identifier for a media item.
UID string `json:"uid"`
// The date and time the media item was uploaded.
Uploaded time.Time `json:"uploaded" format:"date-time"`
// The date and time when the video upload URL is no longer valid for direct user
// uploads.
UploadExpiry time.Time `json:"uploadExpiry" format:"date-time"`
Watermark Watermark `json:"watermark"`
JSON videoJSON `json:"-"`
}
func (*Video) UnmarshalJSON ¶
type VideoInput ¶
type VideoInput struct {
// The video height in pixels. A value of `-1` means the height is unknown. The
// value becomes available after the upload and before the video is ready.
Height int64 `json:"height"`
// The video width in pixels. A value of `-1` means the width is unknown. The value
// becomes available after the upload and before the video is ready.
Width int64 `json:"width"`
JSON videoInputJSON `json:"-"`
}
func (*VideoInput) UnmarshalJSON ¶
func (r *VideoInput) UnmarshalJSON(data []byte) (err error)
type VideoPlayback ¶
type VideoPlayback struct {
// DASH Media Presentation Description for the video.
Dash string `json:"dash"`
// The HLS manifest for the video.
Hls string `json:"hls"`
JSON videoPlaybackJSON `json:"-"`
}
func (*VideoPlayback) UnmarshalJSON ¶
func (r *VideoPlayback) UnmarshalJSON(data []byte) (err error)
type VideoService ¶
type VideoService struct {
Options []option.RequestOption
}
VideoService 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 NewVideoService method instead.
func NewVideoService ¶
func NewVideoService(opts ...option.RequestOption) (r *VideoService)
NewVideoService 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 (*VideoService) StorageUsage ¶
func (r *VideoService) StorageUsage(ctx context.Context, params VideoStorageUsageParams, opts ...option.RequestOption) (res *VideoStorageUsageResponse, err error)
Returns information about an account's storage use.
type VideoStatus ¶
type VideoStatus struct {
// Specifies why the video failed to encode. This field is empty if the video is
// not in an `error` state. Preferred for programmatic use.
ErrorReasonCode string `json:"errorReasonCode"`
// Specifies why the video failed to encode using a human readable error message in
// English. This field is empty if the video is not in an `error` state.
ErrorReasonText string `json:"errorReasonText"`
// Indicates the progress as a percentage between 0 and 100.
PctComplete string `json:"pctComplete"`
// Specifies the processing status for all quality levels for a video.
State VideoStatusState `json:"state"`
JSON videoStatusJSON `json:"-"`
}
Specifies a detailed status for a video. If the `state` is `inprogress` or `error`, the `step` field returns `encoding` or `manifest`. If the `state` is `inprogress`, `pctComplete` returns a number between 0 and 100 to indicate the approximate percent of completion. If the `state` is `error`, `errorReasonCode` and `errorReasonText` provide additional details.
func (*VideoStatus) UnmarshalJSON ¶
func (r *VideoStatus) UnmarshalJSON(data []byte) (err error)
type VideoStatusState ¶
type VideoStatusState string
Specifies the processing status for all quality levels for a video.
const ( VideoStatusStatePendingupload VideoStatusState = "pendingupload" VideoStatusStateDownloading VideoStatusState = "downloading" VideoStatusStateQueued VideoStatusState = "queued" VideoStatusStateInprogress VideoStatusState = "inprogress" VideoStatusStateReady VideoStatusState = "ready" VideoStatusStateError VideoStatusState = "error" VideoStatusStateLiveInprogress VideoStatusState = "live-inprogress" )
func (VideoStatusState) IsKnown ¶
func (r VideoStatusState) IsKnown() bool
type VideoStorageUsageParams ¶
type VideoStorageUsageParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// A user-defined identifier for the media creator.
Creator param.Field[string] `query:"creator"`
}
func (VideoStorageUsageParams) URLQuery ¶
func (r VideoStorageUsageParams) URLQuery() (v url.Values)
URLQuery serializes VideoStorageUsageParams's query parameters as `url.Values`.
type VideoStorageUsageResponse ¶
type VideoStorageUsageResponse struct {
// A user-defined identifier for the media creator.
Creator string `json:"creator"`
// The total minutes of video content stored in the account.
TotalStorageMinutes int64 `json:"totalStorageMinutes"`
// The storage capacity alloted for the account.
TotalStorageMinutesLimit int64 `json:"totalStorageMinutesLimit"`
// The total count of videos associated with the account.
VideoCount int64 `json:"videoCount"`
JSON videoStorageUsageResponseJSON `json:"-"`
}
func (*VideoStorageUsageResponse) UnmarshalJSON ¶
func (r *VideoStorageUsageResponse) UnmarshalJSON(data []byte) (err error)
type VideoStorageUsageResponseEnvelope ¶
type VideoStorageUsageResponseEnvelope struct {
Errors []VideoStorageUsageResponseEnvelopeErrors `json:"errors,required"`
Messages []VideoStorageUsageResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success VideoStorageUsageResponseEnvelopeSuccess `json:"success,required"`
Result VideoStorageUsageResponse `json:"result"`
JSON videoStorageUsageResponseEnvelopeJSON `json:"-"`
}
func (*VideoStorageUsageResponseEnvelope) UnmarshalJSON ¶
func (r *VideoStorageUsageResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type VideoStorageUsageResponseEnvelopeErrors ¶
type VideoStorageUsageResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source VideoStorageUsageResponseEnvelopeErrorsSource `json:"source"`
JSON videoStorageUsageResponseEnvelopeErrorsJSON `json:"-"`
}
func (*VideoStorageUsageResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *VideoStorageUsageResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type VideoStorageUsageResponseEnvelopeErrorsSource ¶
type VideoStorageUsageResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON videoStorageUsageResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*VideoStorageUsageResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *VideoStorageUsageResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type VideoStorageUsageResponseEnvelopeMessages ¶
type VideoStorageUsageResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source VideoStorageUsageResponseEnvelopeMessagesSource `json:"source"`
JSON videoStorageUsageResponseEnvelopeMessagesJSON `json:"-"`
}
func (*VideoStorageUsageResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *VideoStorageUsageResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type VideoStorageUsageResponseEnvelopeMessagesSource ¶
type VideoStorageUsageResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON videoStorageUsageResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*VideoStorageUsageResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *VideoStorageUsageResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type VideoStorageUsageResponseEnvelopeSuccess ¶
type VideoStorageUsageResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
VideoStorageUsageResponseEnvelopeSuccessTrue VideoStorageUsageResponseEnvelopeSuccess = true
)
func (VideoStorageUsageResponseEnvelopeSuccess) IsKnown ¶
func (r VideoStorageUsageResponseEnvelopeSuccess) IsKnown() bool
type Watermark ¶
type Watermark struct {
// The date and a time a watermark profile was created.
Created time.Time `json:"created" format:"date-time"`
// The source URL for a downloaded image. If the watermark profile was created via
// direct upload, this field is null.
DownloadedFrom string `json:"downloadedFrom"`
// The height of the image in pixels.
Height int64 `json:"height"`
// A short description of the watermark profile.
Name string `json:"name"`
// The translucency of the image. A value of `0.0` makes the image completely
// transparent, and `1.0` makes the image completely opaque. Note that if the image
// is already semi-transparent, setting this to `1.0` will not make the image
// completely opaque.
Opacity float64 `json:"opacity"`
// The whitespace between the adjacent edges (determined by position) of the video
// and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded
// video width or length, as determined by the algorithm.
Padding float64 `json:"padding"`
// The location of the image. Valid positions are: `upperRight`, `upperLeft`,
// `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the
// `padding` parameter.
Position string `json:"position"`
// The size of the image relative to the overall size of the video. This parameter
// will adapt to horizontal and vertical videos automatically. `0.0` indicates no
// scaling (use the size of the image as-is), and `1.0 `fills the entire video.
Scale float64 `json:"scale"`
// The size of the image in bytes.
Size float64 `json:"size"`
// The unique identifier for a watermark profile.
UID string `json:"uid"`
// The width of the image in pixels.
Width int64 `json:"width"`
JSON watermarkJSON `json:"-"`
}
func (*Watermark) UnmarshalJSON ¶
type WatermarkDeleteParams ¶
type WatermarkDeleteResponseEnvelope ¶
type WatermarkDeleteResponseEnvelope struct {
Errors []WatermarkDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []WatermarkDeleteResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success WatermarkDeleteResponseEnvelopeSuccess `json:"success,required"`
Result string `json:"result"`
JSON watermarkDeleteResponseEnvelopeJSON `json:"-"`
}
func (*WatermarkDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *WatermarkDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WatermarkDeleteResponseEnvelopeErrors ¶
type WatermarkDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WatermarkDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON watermarkDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WatermarkDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WatermarkDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WatermarkDeleteResponseEnvelopeErrorsSource ¶
type WatermarkDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON watermarkDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*WatermarkDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *WatermarkDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type WatermarkDeleteResponseEnvelopeMessages ¶
type WatermarkDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WatermarkDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON watermarkDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WatermarkDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WatermarkDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type WatermarkDeleteResponseEnvelopeMessagesSource ¶
type WatermarkDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON watermarkDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*WatermarkDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *WatermarkDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type WatermarkDeleteResponseEnvelopeSuccess ¶
type WatermarkDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
WatermarkDeleteResponseEnvelopeSuccessTrue WatermarkDeleteResponseEnvelopeSuccess = true
)
func (WatermarkDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r WatermarkDeleteResponseEnvelopeSuccess) IsKnown() bool
type WatermarkGetParams ¶
type WatermarkGetResponseEnvelope ¶
type WatermarkGetResponseEnvelope struct {
Errors []WatermarkGetResponseEnvelopeErrors `json:"errors,required"`
Messages []WatermarkGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success WatermarkGetResponseEnvelopeSuccess `json:"success,required"`
Result Watermark `json:"result"`
JSON watermarkGetResponseEnvelopeJSON `json:"-"`
}
func (*WatermarkGetResponseEnvelope) UnmarshalJSON ¶
func (r *WatermarkGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WatermarkGetResponseEnvelopeErrors ¶
type WatermarkGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WatermarkGetResponseEnvelopeErrorsSource `json:"source"`
JSON watermarkGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WatermarkGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WatermarkGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WatermarkGetResponseEnvelopeErrorsSource ¶
type WatermarkGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON watermarkGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*WatermarkGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *WatermarkGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type WatermarkGetResponseEnvelopeMessages ¶
type WatermarkGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WatermarkGetResponseEnvelopeMessagesSource `json:"source"`
JSON watermarkGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WatermarkGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WatermarkGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type WatermarkGetResponseEnvelopeMessagesSource ¶
type WatermarkGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON watermarkGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*WatermarkGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *WatermarkGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type WatermarkGetResponseEnvelopeSuccess ¶
type WatermarkGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
WatermarkGetResponseEnvelopeSuccessTrue WatermarkGetResponseEnvelopeSuccess = true
)
func (WatermarkGetResponseEnvelopeSuccess) IsKnown ¶
func (r WatermarkGetResponseEnvelopeSuccess) IsKnown() bool
type WatermarkListParams ¶
type WatermarkNewParams ¶
type WatermarkNewParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// The image file to upload.
File param.Field[string] `json:"file,required"`
// A short description of the watermark profile.
Name param.Field[string] `json:"name"`
// The translucency of the image. A value of `0.0` makes the image completely
// transparent, and `1.0` makes the image completely opaque. Note that if the image
// is already semi-transparent, setting this to `1.0` will not make the image
// completely opaque.
Opacity param.Field[float64] `json:"opacity"`
// The whitespace between the adjacent edges (determined by position) of the video
// and the image. `0.0` indicates no padding, and `1.0` indicates a fully padded
// video width or length, as determined by the algorithm.
Padding param.Field[float64] `json:"padding"`
// The location of the image. Valid positions are: `upperRight`, `upperLeft`,
// `lowerLeft`, `lowerRight`, and `center`. Note that `center` ignores the
// `padding` parameter.
Position param.Field[string] `json:"position"`
// The size of the image relative to the overall size of the video. This parameter
// will adapt to horizontal and vertical videos automatically. `0.0` indicates no
// scaling (use the size of the image as-is), and `1.0 `fills the entire video.
Scale param.Field[float64] `json:"scale"`
}
func (WatermarkNewParams) MarshalMultipart ¶
func (r WatermarkNewParams) MarshalMultipart() (data []byte, contentType string, err error)
type WatermarkNewResponseEnvelope ¶
type WatermarkNewResponseEnvelope struct {
Errors []WatermarkNewResponseEnvelopeErrors `json:"errors,required"`
Messages []WatermarkNewResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success WatermarkNewResponseEnvelopeSuccess `json:"success,required"`
Result Watermark `json:"result"`
JSON watermarkNewResponseEnvelopeJSON `json:"-"`
}
func (*WatermarkNewResponseEnvelope) UnmarshalJSON ¶
func (r *WatermarkNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WatermarkNewResponseEnvelopeErrors ¶
type WatermarkNewResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WatermarkNewResponseEnvelopeErrorsSource `json:"source"`
JSON watermarkNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WatermarkNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WatermarkNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WatermarkNewResponseEnvelopeErrorsSource ¶
type WatermarkNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON watermarkNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*WatermarkNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *WatermarkNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type WatermarkNewResponseEnvelopeMessages ¶
type WatermarkNewResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WatermarkNewResponseEnvelopeMessagesSource `json:"source"`
JSON watermarkNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WatermarkNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WatermarkNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type WatermarkNewResponseEnvelopeMessagesSource ¶
type WatermarkNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON watermarkNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*WatermarkNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *WatermarkNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type WatermarkNewResponseEnvelopeSuccess ¶
type WatermarkNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
WatermarkNewResponseEnvelopeSuccessTrue WatermarkNewResponseEnvelopeSuccess = true
)
func (WatermarkNewResponseEnvelopeSuccess) IsKnown ¶
func (r WatermarkNewResponseEnvelopeSuccess) IsKnown() bool
type WatermarkService ¶
type WatermarkService struct {
Options []option.RequestOption
}
WatermarkService 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 NewWatermarkService method instead.
func NewWatermarkService ¶
func NewWatermarkService(opts ...option.RequestOption) (r *WatermarkService)
NewWatermarkService 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 (*WatermarkService) Delete ¶
func (r *WatermarkService) Delete(ctx context.Context, identifier string, body WatermarkDeleteParams, opts ...option.RequestOption) (res *string, err error)
Deletes a watermark profile.
func (*WatermarkService) Get ¶
func (r *WatermarkService) Get(ctx context.Context, identifier string, query WatermarkGetParams, opts ...option.RequestOption) (res *Watermark, err error)
Retrieves details for a single watermark profile.
func (*WatermarkService) List ¶
func (r *WatermarkService) List(ctx context.Context, query WatermarkListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Watermark], err error)
Lists all watermark profiles for an account.
func (*WatermarkService) ListAutoPaging ¶
func (r *WatermarkService) ListAutoPaging(ctx context.Context, query WatermarkListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Watermark]
Lists all watermark profiles for an account.
func (*WatermarkService) New ¶
func (r *WatermarkService) New(ctx context.Context, params WatermarkNewParams, opts ...option.RequestOption) (res *Watermark, err error)
Creates watermark profiles using a single `HTTP POST multipart/form-data` request.
type WebhookDeleteParams ¶
type WebhookDeleteResponseEnvelope ¶
type WebhookDeleteResponseEnvelope struct {
Errors []WebhookDeleteResponseEnvelopeErrors `json:"errors,required"`
Messages []WebhookDeleteResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success WebhookDeleteResponseEnvelopeSuccess `json:"success,required"`
Result string `json:"result"`
JSON webhookDeleteResponseEnvelopeJSON `json:"-"`
}
func (*WebhookDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *WebhookDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WebhookDeleteResponseEnvelopeErrors ¶
type WebhookDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WebhookDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON webhookDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WebhookDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WebhookDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WebhookDeleteResponseEnvelopeErrorsSource ¶
type WebhookDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON webhookDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*WebhookDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *WebhookDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type WebhookDeleteResponseEnvelopeMessages ¶
type WebhookDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WebhookDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON webhookDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WebhookDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WebhookDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type WebhookDeleteResponseEnvelopeMessagesSource ¶
type WebhookDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON webhookDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*WebhookDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *WebhookDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type WebhookDeleteResponseEnvelopeSuccess ¶
type WebhookDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
WebhookDeleteResponseEnvelopeSuccessTrue WebhookDeleteResponseEnvelopeSuccess = true
)
func (WebhookDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r WebhookDeleteResponseEnvelopeSuccess) IsKnown() bool
type WebhookGetParams ¶
type WebhookGetResponse ¶
type WebhookGetResponse = interface{}
type WebhookGetResponseEnvelope ¶
type WebhookGetResponseEnvelope struct {
Errors []WebhookGetResponseEnvelopeErrors `json:"errors,required"`
Messages []WebhookGetResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success WebhookGetResponseEnvelopeSuccess `json:"success,required"`
Result WebhookGetResponse `json:"result"`
JSON webhookGetResponseEnvelopeJSON `json:"-"`
}
func (*WebhookGetResponseEnvelope) UnmarshalJSON ¶
func (r *WebhookGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WebhookGetResponseEnvelopeErrors ¶
type WebhookGetResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WebhookGetResponseEnvelopeErrorsSource `json:"source"`
JSON webhookGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WebhookGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WebhookGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WebhookGetResponseEnvelopeErrorsSource ¶
type WebhookGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON webhookGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*WebhookGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *WebhookGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type WebhookGetResponseEnvelopeMessages ¶
type WebhookGetResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WebhookGetResponseEnvelopeMessagesSource `json:"source"`
JSON webhookGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WebhookGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WebhookGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type WebhookGetResponseEnvelopeMessagesSource ¶
type WebhookGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON webhookGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*WebhookGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *WebhookGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type WebhookGetResponseEnvelopeSuccess ¶
type WebhookGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
WebhookGetResponseEnvelopeSuccessTrue WebhookGetResponseEnvelopeSuccess = true
)
func (WebhookGetResponseEnvelopeSuccess) IsKnown ¶
func (r WebhookGetResponseEnvelopeSuccess) IsKnown() bool
type WebhookService ¶
type WebhookService struct {
Options []option.RequestOption
}
WebhookService 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 NewWebhookService method instead.
func NewWebhookService ¶
func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)
NewWebhookService 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 (*WebhookService) Delete ¶
func (r *WebhookService) Delete(ctx context.Context, body WebhookDeleteParams, opts ...option.RequestOption) (res *string, err error)
Deletes a webhook.
func (*WebhookService) Get ¶
func (r *WebhookService) Get(ctx context.Context, query WebhookGetParams, opts ...option.RequestOption) (res *WebhookGetResponse, err error)
Retrieves a list of webhooks.
func (*WebhookService) Update ¶
func (r *WebhookService) Update(ctx context.Context, params WebhookUpdateParams, opts ...option.RequestOption) (res *WebhookUpdateResponse, err error)
Creates a webhook notification.
type WebhookUpdateParams ¶
type WebhookUpdateParams struct {
// The account identifier tag.
AccountID param.Field[string] `path:"account_id,required"`
// The URL where webhooks will be sent.
NotificationURL param.Field[string] `json:"notificationUrl,required" format:"uri"`
}
func (WebhookUpdateParams) MarshalJSON ¶
func (r WebhookUpdateParams) MarshalJSON() (data []byte, err error)
type WebhookUpdateResponse ¶
type WebhookUpdateResponse = interface{}
type WebhookUpdateResponseEnvelope ¶
type WebhookUpdateResponseEnvelope struct {
Errors []WebhookUpdateResponseEnvelopeErrors `json:"errors,required"`
Messages []WebhookUpdateResponseEnvelopeMessages `json:"messages,required"`
// Whether the API call was successful.
Success WebhookUpdateResponseEnvelopeSuccess `json:"success,required"`
Result WebhookUpdateResponse `json:"result"`
JSON webhookUpdateResponseEnvelopeJSON `json:"-"`
}
func (*WebhookUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *WebhookUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type WebhookUpdateResponseEnvelopeErrors ¶
type WebhookUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WebhookUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON webhookUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*WebhookUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *WebhookUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type WebhookUpdateResponseEnvelopeErrorsSource ¶
type WebhookUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON webhookUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*WebhookUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *WebhookUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type WebhookUpdateResponseEnvelopeMessages ¶
type WebhookUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
DocumentationURL string `json:"documentation_url"`
Source WebhookUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON webhookUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*WebhookUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *WebhookUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type WebhookUpdateResponseEnvelopeMessagesSource ¶
type WebhookUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON webhookUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*WebhookUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *WebhookUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type WebhookUpdateResponseEnvelopeSuccess ¶
type WebhookUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
WebhookUpdateResponseEnvelopeSuccessTrue WebhookUpdateResponseEnvelopeSuccess = true
)
func (WebhookUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r WebhookUpdateResponseEnvelopeSuccess) IsKnown() bool