moq

package
v7.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate.

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConfigSrc

type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc

Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type Member

type Member = shared.Member

This is an alias to an internal type.

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 MemberPolicy

type MemberPolicy = shared.MemberPolicy

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 MoQService

type MoQService struct {
	Options []option.RequestOption
	Relays  *RelayService
}

MoQService 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 NewMoQService method instead.

func NewMoQService

func NewMoQService(opts ...option.RequestOption) (r *MoQService)

NewMoQService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

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 RelayDeleteParams

type RelayDeleteParams struct {
	// Cloudflare account identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type RelayDeleteResponse

type RelayDeleteResponse = interface{}

type RelayDeleteResponseEnvelope

type RelayDeleteResponseEnvelope struct {
	Errors   []RelayDeleteResponseEnvelopeErrors   `json:"errors" api:"required"`
	Messages []RelayDeleteResponseEnvelopeMessages `json:"messages" api:"required"`
	Success  bool                                  `json:"success" api:"required"`
	Result   RelayDeleteResponse                   `json:"result" api:"nullable"`
	JSON     relayDeleteResponseEnvelopeJSON       `json:"-"`
}

func (*RelayDeleteResponseEnvelope) UnmarshalJSON

func (r *RelayDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RelayDeleteResponseEnvelopeErrors

type RelayDeleteResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code"`
	Message string                                `json:"message"`
	JSON    relayDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RelayDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *RelayDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RelayDeleteResponseEnvelopeMessages

type RelayDeleteResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code"`
	Message string                                  `json:"message"`
	JSON    relayDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RelayDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *RelayDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RelayGetParams

type RelayGetParams struct {
	// Cloudflare account identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

type RelayGetResponse

type RelayGetResponse struct {
	// upstreams and lingering_subscribe are mutually exclusive.
	Config   RelayGetResponseConfig `json:"config" api:"required"`
	Created  time.Time              `json:"created" api:"required" format:"date-time"`
	Modified time.Time              `json:"modified" api:"required" format:"date-time"`
	Name     string                 `json:"name" api:"required"`
	UID      string                 `json:"uid" api:"required"`
	// "connected" when active, omitted otherwise.
	Status RelayGetResponseStatus `json:"status"`
	JSON   relayGetResponseJSON   `json:"-"`
}

Full relay details (no tokens).

func (*RelayGetResponse) UnmarshalJSON

func (r *RelayGetResponse) UnmarshalJSON(data []byte) (err error)

type RelayGetResponseConfig

type RelayGetResponseConfig struct {
	LingeringSubscribe RelayGetResponseConfigLingeringSubscribe `json:"lingering_subscribe"`
	// Upstreams are external MOQT server publishers that a relay falls back to when it
	// has no local publisher for a requested namespace/track.
	Upstreams RelayGetResponseConfigUpstreams `json:"upstreams"`
	JSON      relayGetResponseConfigJSON      `json:"-"`
}

upstreams and lingering_subscribe are mutually exclusive.

func (*RelayGetResponseConfig) UnmarshalJSON

func (r *RelayGetResponseConfig) UnmarshalJSON(data []byte) (err error)

type RelayGetResponseConfigLingeringSubscribe

type RelayGetResponseConfigLingeringSubscribe struct {
	Enabled bool `json:"enabled"`
	// Relay-level ceiling on lingering subscribe timeout (ms). Default 30000.
	MaxTimeoutMs int64                                        `json:"max_timeout_ms"`
	JSON         relayGetResponseConfigLingeringSubscribeJSON `json:"-"`
}

func (*RelayGetResponseConfigLingeringSubscribe) UnmarshalJSON

func (r *RelayGetResponseConfigLingeringSubscribe) UnmarshalJSON(data []byte) (err error)

type RelayGetResponseConfigUpstreams

type RelayGetResponseConfigUpstreams struct {
	Enabled bool `json:"enabled"`
	// Ordered list of upstream MOQT server publishers. Each entry is an object (not a
	// bare string) so per-upstream configuration can be added in the future without
	// another breaking change.
	Upstreams []RelayGetResponseConfigUpstreamsUpstream `json:"upstreams"`
	JSON      relayGetResponseConfigUpstreamsJSON       `json:"-"`
}

Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track.

func (*RelayGetResponseConfigUpstreams) UnmarshalJSON

func (r *RelayGetResponseConfigUpstreams) UnmarshalJSON(data []byte) (err error)

type RelayGetResponseConfigUpstreamsUpstream

type RelayGetResponseConfigUpstreamsUpstream struct {
	// Upstream MOQT server publisher URL.
	URL  string                                      `json:"url"`
	JSON relayGetResponseConfigUpstreamsUpstreamJSON `json:"-"`
}

A single upstream MOQT server publisher.

func (*RelayGetResponseConfigUpstreamsUpstream) UnmarshalJSON

func (r *RelayGetResponseConfigUpstreamsUpstream) UnmarshalJSON(data []byte) (err error)

type RelayGetResponseEnvelope

type RelayGetResponseEnvelope struct {
	Errors   []RelayGetResponseEnvelopeErrors   `json:"errors" api:"required"`
	Messages []RelayGetResponseEnvelopeMessages `json:"messages" api:"required"`
	Success  bool                               `json:"success" api:"required"`
	// Full relay details (no tokens).
	Result RelayGetResponse             `json:"result"`
	JSON   relayGetResponseEnvelopeJSON `json:"-"`
}

func (*RelayGetResponseEnvelope) UnmarshalJSON

func (r *RelayGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RelayGetResponseEnvelopeErrors

type RelayGetResponseEnvelopeErrors struct {
	Code    int64                              `json:"code"`
	Message string                             `json:"message"`
	JSON    relayGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RelayGetResponseEnvelopeErrors) UnmarshalJSON

func (r *RelayGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RelayGetResponseEnvelopeMessages

type RelayGetResponseEnvelopeMessages struct {
	Code    int64                                `json:"code"`
	Message string                               `json:"message"`
	JSON    relayGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RelayGetResponseEnvelopeMessages) UnmarshalJSON

func (r *RelayGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RelayGetResponseStatus

type RelayGetResponseStatus string

"connected" when active, omitted otherwise.

const (
	RelayGetResponseStatusConnected RelayGetResponseStatus = "connected"
)

func (RelayGetResponseStatus) IsKnown

func (r RelayGetResponseStatus) IsKnown() bool

type RelayListParams

type RelayListParams struct {
	// Cloudflare account identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Sort order by `created`. When true, results are returned oldest-first
	// (ascending); otherwise newest-first (descending, the default).
	Asc param.Field[bool] `query:"asc"`
	// Cursor for pagination. Returns relays created strictly after this RFC 3339
	// timestamp (typically the `created` value of the last item on the current page,
	// to fetch the next page).
	CreatedAfter param.Field[time.Time] `query:"created_after" format:"date-time"`
	// Cursor for pagination. Returns relays created strictly before this RFC 3339
	// timestamp (typically the `created` value of the first item on the current page,
	// to fetch the previous page).
	CreatedBefore param.Field[time.Time] `query:"created_before" format:"date-time"`
	// Maximum number of relays to return per page.
	PerPage param.Field[int64] `query:"per_page"`
}

func (RelayListParams) URLQuery

func (r RelayListParams) URLQuery() (v url.Values)

URLQuery serializes RelayListParams's query parameters as `url.Values`.

type RelayListResponse

type RelayListResponse struct {
	Created  time.Time             `json:"created" api:"required" format:"date-time"`
	Modified time.Time             `json:"modified" api:"required" format:"date-time"`
	Name     string                `json:"name" api:"required"`
	UID      string                `json:"uid" api:"required"`
	JSON     relayListResponseJSON `json:"-"`
}

Abbreviated relay for list responses.

func (*RelayListResponse) UnmarshalJSON

func (r *RelayListResponse) UnmarshalJSON(data []byte) (err error)

type RelayNewParams

type RelayNewParams struct {
	// Cloudflare account identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Human-readable name for the relay.
	Name param.Field[string] `json:"name" api:"required"`
}

func (RelayNewParams) MarshalJSON

func (r RelayNewParams) MarshalJSON() (data []byte, err error)

type RelayNewResponse

type RelayNewResponse struct {
	// upstreams and lingering_subscribe are mutually exclusive.
	Config   RelayNewResponseConfig `json:"config" api:"required"`
	Created  time.Time              `json:"created" api:"required" format:"date-time"`
	Modified time.Time              `json:"modified" api:"required" format:"date-time"`
	Name     string                 `json:"name" api:"required"`
	// Full access token (publish + subscribe). Treat as sensitive.
	TokenPublishSubscribe string `json:"token_publish_subscribe" api:"required"`
	// Subscribe-only token. Treat as sensitive.
	TokenSubscribe string `json:"token_subscribe" api:"required"`
	// Server-generated unique identifier (32 hex chars).
	UID  string               `json:"uid" api:"required"`
	JSON relayNewResponseJSON `json:"-"`
}

Relay with auto-generated tokens (shown once).

func (*RelayNewResponse) UnmarshalJSON

func (r *RelayNewResponse) UnmarshalJSON(data []byte) (err error)

type RelayNewResponseConfig

type RelayNewResponseConfig struct {
	LingeringSubscribe RelayNewResponseConfigLingeringSubscribe `json:"lingering_subscribe"`
	// Upstreams are external MOQT server publishers that a relay falls back to when it
	// has no local publisher for a requested namespace/track.
	Upstreams RelayNewResponseConfigUpstreams `json:"upstreams"`
	JSON      relayNewResponseConfigJSON      `json:"-"`
}

upstreams and lingering_subscribe are mutually exclusive.

func (*RelayNewResponseConfig) UnmarshalJSON

func (r *RelayNewResponseConfig) UnmarshalJSON(data []byte) (err error)

type RelayNewResponseConfigLingeringSubscribe

type RelayNewResponseConfigLingeringSubscribe struct {
	Enabled bool `json:"enabled"`
	// Relay-level ceiling on lingering subscribe timeout (ms). Default 30000.
	MaxTimeoutMs int64                                        `json:"max_timeout_ms"`
	JSON         relayNewResponseConfigLingeringSubscribeJSON `json:"-"`
}

func (*RelayNewResponseConfigLingeringSubscribe) UnmarshalJSON

func (r *RelayNewResponseConfigLingeringSubscribe) UnmarshalJSON(data []byte) (err error)

type RelayNewResponseConfigUpstreams

type RelayNewResponseConfigUpstreams struct {
	Enabled bool `json:"enabled"`
	// Ordered list of upstream MOQT server publishers. Each entry is an object (not a
	// bare string) so per-upstream configuration can be added in the future without
	// another breaking change.
	Upstreams []RelayNewResponseConfigUpstreamsUpstream `json:"upstreams"`
	JSON      relayNewResponseConfigUpstreamsJSON       `json:"-"`
}

Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track.

func (*RelayNewResponseConfigUpstreams) UnmarshalJSON

func (r *RelayNewResponseConfigUpstreams) UnmarshalJSON(data []byte) (err error)

type RelayNewResponseConfigUpstreamsUpstream

type RelayNewResponseConfigUpstreamsUpstream struct {
	// Upstream MOQT server publisher URL.
	URL  string                                      `json:"url"`
	JSON relayNewResponseConfigUpstreamsUpstreamJSON `json:"-"`
}

A single upstream MOQT server publisher.

func (*RelayNewResponseConfigUpstreamsUpstream) UnmarshalJSON

func (r *RelayNewResponseConfigUpstreamsUpstream) UnmarshalJSON(data []byte) (err error)

type RelayNewResponseEnvelope

type RelayNewResponseEnvelope struct {
	Errors   []RelayNewResponseEnvelopeErrors   `json:"errors" api:"required"`
	Messages []RelayNewResponseEnvelopeMessages `json:"messages" api:"required"`
	Success  bool                               `json:"success" api:"required"`
	// Relay with auto-generated tokens (shown once).
	Result RelayNewResponse             `json:"result"`
	JSON   relayNewResponseEnvelopeJSON `json:"-"`
}

func (*RelayNewResponseEnvelope) UnmarshalJSON

func (r *RelayNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RelayNewResponseEnvelopeErrors

type RelayNewResponseEnvelopeErrors struct {
	Code    int64                              `json:"code"`
	Message string                             `json:"message"`
	JSON    relayNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RelayNewResponseEnvelopeErrors) UnmarshalJSON

func (r *RelayNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RelayNewResponseEnvelopeMessages

type RelayNewResponseEnvelopeMessages struct {
	Code    int64                                `json:"code"`
	Message string                               `json:"message"`
	JSON    relayNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RelayNewResponseEnvelopeMessages) UnmarshalJSON

func (r *RelayNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RelayService

type RelayService struct {
	Options []option.RequestOption
	Tokens  *RelayTokenService
}

RelayService 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 NewRelayService method instead.

func NewRelayService

func NewRelayService(opts ...option.RequestOption) (r *RelayService)

NewRelayService 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 (*RelayService) Delete

func (r *RelayService) Delete(ctx context.Context, relayID string, body RelayDeleteParams, opts ...option.RequestOption) (res *RelayDeleteResponse, err error)

Soft-deletes a MoQ relay.

func (*RelayService) Get

func (r *RelayService) Get(ctx context.Context, relayID string, query RelayGetParams, opts ...option.RequestOption) (res *RelayGetResponse, err error)

Retrieves a single MoQ relay including config and status. Tokens are NOT included.

func (*RelayService) List

Lists all MoQ relays for the account. Returns only metadata. Config, status, and tokens are omitted.

Results are cursor-paginated (keyset on the `created` timestamp). Use `created_before` / `created_after` with the `created` value of the first/last item in a page to fetch the adjacent page. `result_info` reports the page `count` and the `total` matching the cursor filters.

func (*RelayService) ListAutoPaging

Lists all MoQ relays for the account. Returns only metadata. Config, status, and tokens are omitted.

Results are cursor-paginated (keyset on the `created` timestamp). Use `created_before` / `created_after` with the `created` value of the first/last item in a page to fetch the adjacent page. `result_info` reports the page `count` and the `total` matching the cursor filters.

func (*RelayService) New

func (r *RelayService) New(ctx context.Context, params RelayNewParams, opts ...option.RequestOption) (res *RelayNewResponse, err error)

Provisions a new MoQ relay instance. Auto-creates a publish+subscribe token and a subscribe-only token. Token values are included in the response (shown once). Config is set to defaults (lingering subscribe enabled, 30s ceiling, upstreams off). Use PUT to modify.

func (*RelayService) Update

func (r *RelayService) Update(ctx context.Context, relayID string, params RelayUpdateParams, opts ...option.RequestOption) (res *RelayUpdateResponse, err error)

Updates a relay's name and/or configuration. Partial updates: omitted fields are preserved. Config sub-objects replace as whole objects when present. upstreams and lingering_subscribe are mutually exclusive.

type RelayTokenRotateParams

type RelayTokenRotateParams struct {
	// Cloudflare account identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Which token type to rotate.
	Type param.Field[RelayTokenRotateParamsType] `json:"type" api:"required"`
}

func (RelayTokenRotateParams) MarshalJSON

func (r RelayTokenRotateParams) MarshalJSON() (data []byte, err error)

type RelayTokenRotateParamsType

type RelayTokenRotateParamsType string

Which token type to rotate.

const (
	RelayTokenRotateParamsTypePublishSubscribe RelayTokenRotateParamsType = "publish_subscribe"
	RelayTokenRotateParamsTypeSubscribe        RelayTokenRotateParamsType = "subscribe"
)

func (RelayTokenRotateParamsType) IsKnown

func (r RelayTokenRotateParamsType) IsKnown() bool

type RelayTokenRotateResponse

type RelayTokenRotateResponse struct {
	// New token value (shown once). Treat as sensitive.
	Token string                       `json:"token" api:"required"`
	Type  RelayTokenRotateResponseType `json:"type" api:"required"`
	JSON  relayTokenRotateResponseJSON `json:"-"`
}

func (*RelayTokenRotateResponse) UnmarshalJSON

func (r *RelayTokenRotateResponse) UnmarshalJSON(data []byte) (err error)

type RelayTokenRotateResponseEnvelope

type RelayTokenRotateResponseEnvelope struct {
	Errors   []RelayTokenRotateResponseEnvelopeErrors   `json:"errors" api:"required"`
	Messages []RelayTokenRotateResponseEnvelopeMessages `json:"messages" api:"required"`
	Success  bool                                       `json:"success" api:"required"`
	Result   RelayTokenRotateResponse                   `json:"result"`
	JSON     relayTokenRotateResponseEnvelopeJSON       `json:"-"`
}

func (*RelayTokenRotateResponseEnvelope) UnmarshalJSON

func (r *RelayTokenRotateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RelayTokenRotateResponseEnvelopeErrors

type RelayTokenRotateResponseEnvelopeErrors struct {
	Code    int64                                      `json:"code"`
	Message string                                     `json:"message"`
	JSON    relayTokenRotateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RelayTokenRotateResponseEnvelopeErrors) UnmarshalJSON

func (r *RelayTokenRotateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RelayTokenRotateResponseEnvelopeMessages

type RelayTokenRotateResponseEnvelopeMessages struct {
	Code    int64                                        `json:"code"`
	Message string                                       `json:"message"`
	JSON    relayTokenRotateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RelayTokenRotateResponseEnvelopeMessages) UnmarshalJSON

func (r *RelayTokenRotateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RelayTokenRotateResponseType

type RelayTokenRotateResponseType string
const (
	RelayTokenRotateResponseTypePublishSubscribe RelayTokenRotateResponseType = "publish_subscribe"
	RelayTokenRotateResponseTypeSubscribe        RelayTokenRotateResponseType = "subscribe"
)

func (RelayTokenRotateResponseType) IsKnown

func (r RelayTokenRotateResponseType) IsKnown() bool

type RelayTokenService

type RelayTokenService struct {
	Options []option.RequestOption
}

RelayTokenService 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 NewRelayTokenService method instead.

func NewRelayTokenService

func NewRelayTokenService(opts ...option.RequestOption) (r *RelayTokenService)

NewRelayTokenService 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 (*RelayTokenService) Rotate

Generates a new token for the specified type. The old token is immediately invalidated. Token value is shown once in the response.

type RelayUpdateParams

type RelayUpdateParams struct {
	// Cloudflare account identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// upstreams and lingering_subscribe are mutually exclusive.
	Config param.Field[RelayUpdateParamsConfig] `json:"config"`
	Name   param.Field[string]                  `json:"name"`
}

func (RelayUpdateParams) MarshalJSON

func (r RelayUpdateParams) MarshalJSON() (data []byte, err error)

type RelayUpdateParamsConfig

type RelayUpdateParamsConfig struct {
	LingeringSubscribe param.Field[RelayUpdateParamsConfigLingeringSubscribe] `json:"lingering_subscribe"`
	// Upstreams are external MOQT server publishers that a relay falls back to when it
	// has no local publisher for a requested namespace/track.
	Upstreams param.Field[RelayUpdateParamsConfigUpstreams] `json:"upstreams"`
}

upstreams and lingering_subscribe are mutually exclusive.

func (RelayUpdateParamsConfig) MarshalJSON

func (r RelayUpdateParamsConfig) MarshalJSON() (data []byte, err error)

type RelayUpdateParamsConfigLingeringSubscribe

type RelayUpdateParamsConfigLingeringSubscribe struct {
	Enabled param.Field[bool] `json:"enabled"`
	// Relay-level ceiling on lingering subscribe timeout (ms). Default 30000.
	MaxTimeoutMs param.Field[int64] `json:"max_timeout_ms"`
}

func (RelayUpdateParamsConfigLingeringSubscribe) MarshalJSON

func (r RelayUpdateParamsConfigLingeringSubscribe) MarshalJSON() (data []byte, err error)

type RelayUpdateParamsConfigUpstreams

type RelayUpdateParamsConfigUpstreams struct {
	Enabled param.Field[bool] `json:"enabled"`
	// Ordered list of upstream MOQT server publishers. Each entry is an object (not a
	// bare string) so per-upstream configuration can be added in the future without
	// another breaking change.
	Upstreams param.Field[[]RelayUpdateParamsConfigUpstreamsUpstream] `json:"upstreams"`
}

Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track.

func (RelayUpdateParamsConfigUpstreams) MarshalJSON

func (r RelayUpdateParamsConfigUpstreams) MarshalJSON() (data []byte, err error)

type RelayUpdateParamsConfigUpstreamsUpstream

type RelayUpdateParamsConfigUpstreamsUpstream struct {
	// Upstream MOQT server publisher URL.
	URL param.Field[string] `json:"url"`
}

A single upstream MOQT server publisher.

func (RelayUpdateParamsConfigUpstreamsUpstream) MarshalJSON

func (r RelayUpdateParamsConfigUpstreamsUpstream) MarshalJSON() (data []byte, err error)

type RelayUpdateResponse

type RelayUpdateResponse struct {
	// upstreams and lingering_subscribe are mutually exclusive.
	Config   RelayUpdateResponseConfig `json:"config" api:"required"`
	Created  time.Time                 `json:"created" api:"required" format:"date-time"`
	Modified time.Time                 `json:"modified" api:"required" format:"date-time"`
	Name     string                    `json:"name" api:"required"`
	UID      string                    `json:"uid" api:"required"`
	// "connected" when active, omitted otherwise.
	Status RelayUpdateResponseStatus `json:"status"`
	JSON   relayUpdateResponseJSON   `json:"-"`
}

Full relay details (no tokens).

func (*RelayUpdateResponse) UnmarshalJSON

func (r *RelayUpdateResponse) UnmarshalJSON(data []byte) (err error)

type RelayUpdateResponseConfig

type RelayUpdateResponseConfig struct {
	LingeringSubscribe RelayUpdateResponseConfigLingeringSubscribe `json:"lingering_subscribe"`
	// Upstreams are external MOQT server publishers that a relay falls back to when it
	// has no local publisher for a requested namespace/track.
	Upstreams RelayUpdateResponseConfigUpstreams `json:"upstreams"`
	JSON      relayUpdateResponseConfigJSON      `json:"-"`
}

upstreams and lingering_subscribe are mutually exclusive.

func (*RelayUpdateResponseConfig) UnmarshalJSON

func (r *RelayUpdateResponseConfig) UnmarshalJSON(data []byte) (err error)

type RelayUpdateResponseConfigLingeringSubscribe

type RelayUpdateResponseConfigLingeringSubscribe struct {
	Enabled bool `json:"enabled"`
	// Relay-level ceiling on lingering subscribe timeout (ms). Default 30000.
	MaxTimeoutMs int64                                           `json:"max_timeout_ms"`
	JSON         relayUpdateResponseConfigLingeringSubscribeJSON `json:"-"`
}

func (*RelayUpdateResponseConfigLingeringSubscribe) UnmarshalJSON

func (r *RelayUpdateResponseConfigLingeringSubscribe) UnmarshalJSON(data []byte) (err error)

type RelayUpdateResponseConfigUpstreams

type RelayUpdateResponseConfigUpstreams struct {
	Enabled bool `json:"enabled"`
	// Ordered list of upstream MOQT server publishers. Each entry is an object (not a
	// bare string) so per-upstream configuration can be added in the future without
	// another breaking change.
	Upstreams []RelayUpdateResponseConfigUpstreamsUpstream `json:"upstreams"`
	JSON      relayUpdateResponseConfigUpstreamsJSON       `json:"-"`
}

Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track.

func (*RelayUpdateResponseConfigUpstreams) UnmarshalJSON

func (r *RelayUpdateResponseConfigUpstreams) UnmarshalJSON(data []byte) (err error)

type RelayUpdateResponseConfigUpstreamsUpstream

type RelayUpdateResponseConfigUpstreamsUpstream struct {
	// Upstream MOQT server publisher URL.
	URL  string                                         `json:"url"`
	JSON relayUpdateResponseConfigUpstreamsUpstreamJSON `json:"-"`
}

A single upstream MOQT server publisher.

func (*RelayUpdateResponseConfigUpstreamsUpstream) UnmarshalJSON

func (r *RelayUpdateResponseConfigUpstreamsUpstream) UnmarshalJSON(data []byte) (err error)

type RelayUpdateResponseEnvelope

type RelayUpdateResponseEnvelope struct {
	Errors   []RelayUpdateResponseEnvelopeErrors   `json:"errors" api:"required"`
	Messages []RelayUpdateResponseEnvelopeMessages `json:"messages" api:"required"`
	Success  bool                                  `json:"success" api:"required"`
	// Full relay details (no tokens).
	Result RelayUpdateResponse             `json:"result"`
	JSON   relayUpdateResponseEnvelopeJSON `json:"-"`
}

func (*RelayUpdateResponseEnvelope) UnmarshalJSON

func (r *RelayUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RelayUpdateResponseEnvelopeErrors

type RelayUpdateResponseEnvelopeErrors struct {
	Code    int64                                 `json:"code"`
	Message string                                `json:"message"`
	JSON    relayUpdateResponseEnvelopeErrorsJSON `json:"-"`
}

func (*RelayUpdateResponseEnvelopeErrors) UnmarshalJSON

func (r *RelayUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type RelayUpdateResponseEnvelopeMessages

type RelayUpdateResponseEnvelopeMessages struct {
	Code    int64                                   `json:"code"`
	Message string                                  `json:"message"`
	JSON    relayUpdateResponseEnvelopeMessagesJSON `json:"-"`
}

func (*RelayUpdateResponseEnvelopeMessages) UnmarshalJSON

func (r *RelayUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type RelayUpdateResponseStatus

type RelayUpdateResponseStatus string

"connected" when active, omitted otherwise.

const (
	RelayUpdateResponseStatusConnected RelayUpdateResponseStatus = "connected"
)

func (RelayUpdateResponseStatus) IsKnown

func (r RelayUpdateResponseStatus) IsKnown() bool

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

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 Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token

type Token = shared.Token

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 TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNested

type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectString

type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesUnion

type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenPolicyResourcesUnionParam

type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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