moq

package
v7.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 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 {
	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 {
	// 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:"-"`
}

func (*RelayGetResponseConfig) UnmarshalJSON

func (r *RelayGetResponseConfig) 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. Must be an absolute URL with a host and a
	// scheme the relay can dial: moqt:// (raw QUIC) or https:// (WebTransport).
	// Validated on update (PUT); rejected with 21013.
	URL  string                                      `json:"url" api:"required" format:"uri"`
	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. Values above the maximum are
	// clamped to it rather than rejected.
	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 {
	Config  RelayNewResponseConfig `json:"config" api:"required"`
	Created time.Time              `json:"created" api:"required" format:"date-time"`
	// Token collection (discriminated union on `type`). On create this holds the
	// auto-created default pair, each including its one-time secret.
	Issuers  []RelayNewResponseIssuer `json:"issuers" api:"required"`
	Modified time.Time                `json:"modified" api:"required" format:"date-time"`
	Name     string                   `json:"name" api:"required"`
	// Server-generated unique identifier (32 hex chars).
	UID  string               `json:"uid" api:"required"`
	JSON relayNewResponseJSON `json:"-"`
}

Relay with its auto-created default token pair (one full-access [publish, subscribe] and one [subscribe]-only), each with its one-time secret, wrapped in the issuers envelope.

func (*RelayNewResponse) UnmarshalJSON

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

type RelayNewResponseConfig

type RelayNewResponseConfig struct {
	// 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:"-"`
}

func (*RelayNewResponseConfig) UnmarshalJSON

func (r *RelayNewResponseConfig) 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. Must be an absolute URL with a host and a
	// scheme the relay can dial: moqt:// (raw QUIC) or https:// (WebTransport).
	// Validated on update (PUT); rejected with 21013.
	URL  string                                      `json:"url" api:"required" format:"uri"`
	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 its auto-created default token pair (one full-access [publish,
	// subscribe] and one [subscribe]-only), each with its one-time secret, wrapped in
	// the issuers envelope.
	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 RelayNewResponseIssuer added in v7.8.0

type RelayNewResponseIssuer struct {
	// Always present ([] when empty).
	CloudflareTokens []RelayNewResponseIssuersCloudflareToken `json:"cloudflare_tokens" api:"required"`
	Issuer           RelayNewResponseIssuersIssuer            `json:"issuer" api:"required"`
	Type             RelayNewResponseIssuersType              `json:"type" api:"required"`
	JSON             relayNewResponseIssuerJSON               `json:"-"`
}

One arm of the discriminated-union token collection.

func (*RelayNewResponseIssuer) UnmarshalJSON added in v7.8.0

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

type RelayNewResponseIssuersCloudflareToken added in v7.8.0

type RelayNewResponseIssuersCloudflareToken struct {
	Created time.Time `json:"created" api:"required" format:"date-time"`
	// Mandatory; no more than 1 year after `created`.
	Expires time.Time `json:"expires" api:"required" format:"date-time"`
	// Token identity and registry key (32 hex chars).
	Jti string `json:"jti" api:"required"`
	// Signed allowlist of what the token may do. V1 coarse roles; the array form
	// extends to fine-grained MoQT message names later without a breaking change.
	Operations []RelayNewResponseIssuersCloudflareTokensOperation `json:"operations" api:"required"`
	// Optional, customer-set.
	Label string `json:"label"`
	// The signed JWT. Present ONLY in create / auto-create responses (shown once);
	// never returned by list, never stored.
	Secret string                                     `json:"secret"`
	JSON   relayNewResponseIssuersCloudflareTokenJSON `json:"-"`
}

func (*RelayNewResponseIssuersCloudflareToken) UnmarshalJSON added in v7.8.0

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

type RelayNewResponseIssuersCloudflareTokensOperation added in v7.8.0

type RelayNewResponseIssuersCloudflareTokensOperation string
const (
	RelayNewResponseIssuersCloudflareTokensOperationPublish   RelayNewResponseIssuersCloudflareTokensOperation = "publish"
	RelayNewResponseIssuersCloudflareTokensOperationSubscribe RelayNewResponseIssuersCloudflareTokensOperation = "subscribe"
)

func (RelayNewResponseIssuersCloudflareTokensOperation) IsKnown added in v7.8.0

type RelayNewResponseIssuersIssuer added in v7.8.0

type RelayNewResponseIssuersIssuer string
const (
	RelayNewResponseIssuersIssuerCloudflare RelayNewResponseIssuersIssuer = "cloudflare"
)

func (RelayNewResponseIssuersIssuer) IsKnown added in v7.8.0

func (r RelayNewResponseIssuersIssuer) IsKnown() bool

type RelayNewResponseIssuersType added in v7.8.0

type RelayNewResponseIssuersType string
const (
	RelayNewResponseIssuersTypeCloudflareJWT RelayNewResponseIssuersType = "cloudflare_jwt"
)

func (RelayNewResponseIssuersType) IsKnown added in v7.8.0

func (r RelayNewResponseIssuersType) IsKnown() bool

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. The relay ID goes in the URL path — `DELETE /accounts/{account_id}/moq/relays/{relay_id}` — not the request body; there is no collection-level delete endpoint.

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 always set to defaults (upstreams off) and cannot be supplied here — sending a non-empty `config` is rejected (21014); `null` or `{}` is accepted as absent. Use PUT to configure the relay after it exists.

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. The relay ID goes in the URL path — `PUT /accounts/{account_id}/moq/relays/{relay_id}` — not the request body; there is no collection-level update endpoint. This is also the only way to set a relay's config (config cannot be set at create time). Partial updates: omitted fields are preserved; config sub-objects replace as whole objects when present.

type RelayTokenDeleteParams added in v7.8.0

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

type RelayTokenDeleteResponse added in v7.8.0

type RelayTokenDeleteResponse struct {
	Errors   []RelayTokenDeleteResponseError   `json:"errors" api:"required"`
	Messages []RelayTokenDeleteResponseMessage `json:"messages" api:"required"`
	Success  bool                              `json:"success" api:"required"`
	JSON     relayTokenDeleteResponseJSON      `json:"-"`
}

func (*RelayTokenDeleteResponse) UnmarshalJSON added in v7.8.0

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

type RelayTokenDeleteResponseError added in v7.8.0

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

func (*RelayTokenDeleteResponseError) UnmarshalJSON added in v7.8.0

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

type RelayTokenDeleteResponseMessage added in v7.8.0

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

func (*RelayTokenDeleteResponseMessage) UnmarshalJSON added in v7.8.0

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

type RelayTokenListParams added in v7.8.0

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

type RelayTokenListResponse added in v7.8.0

type RelayTokenListResponse struct {
	Issuers []RelayTokenListResponseIssuer `json:"issuers" api:"required"`
	JSON    relayTokenListResponseJSON     `json:"-"`
}

A relay's token collection, keyed on issuer `type` (a discriminated union). V1 ships exactly one arm (`cloudflare_jwt`). Clients iterate `issuers`, switch on `type`, and ignore unknown types — that contract is what makes adding or removing an arm non-breaking.

func (*RelayTokenListResponse) UnmarshalJSON added in v7.8.0

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

type RelayTokenListResponseEnvelope added in v7.8.0

type RelayTokenListResponseEnvelope struct {
	Errors   []RelayTokenListResponseEnvelopeErrors   `json:"errors" api:"required"`
	Messages []RelayTokenListResponseEnvelopeMessages `json:"messages" api:"required"`
	Success  bool                                     `json:"success" api:"required"`
	// A relay's token collection, keyed on issuer `type` (a discriminated union). V1
	// ships exactly one arm (`cloudflare_jwt`). Clients iterate `issuers`, switch on
	// `type`, and ignore unknown types — that contract is what makes adding or
	// removing an arm non-breaking.
	Result RelayTokenListResponse             `json:"result"`
	JSON   relayTokenListResponseEnvelopeJSON `json:"-"`
}

func (*RelayTokenListResponseEnvelope) UnmarshalJSON added in v7.8.0

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

type RelayTokenListResponseEnvelopeErrors added in v7.8.0

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

func (*RelayTokenListResponseEnvelopeErrors) UnmarshalJSON added in v7.8.0

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

type RelayTokenListResponseEnvelopeMessages added in v7.8.0

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

func (*RelayTokenListResponseEnvelopeMessages) UnmarshalJSON added in v7.8.0

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

type RelayTokenListResponseIssuer added in v7.8.0

type RelayTokenListResponseIssuer struct {
	// Always present ([] when empty).
	CloudflareTokens []RelayTokenListResponseIssuersCloudflareToken `json:"cloudflare_tokens" api:"required"`
	Issuer           RelayTokenListResponseIssuersIssuer            `json:"issuer" api:"required"`
	Type             RelayTokenListResponseIssuersType              `json:"type" api:"required"`
	JSON             relayTokenListResponseIssuerJSON               `json:"-"`
}

One arm of the discriminated-union token collection.

func (*RelayTokenListResponseIssuer) UnmarshalJSON added in v7.8.0

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

type RelayTokenListResponseIssuersCloudflareToken added in v7.8.0

type RelayTokenListResponseIssuersCloudflareToken struct {
	Created time.Time `json:"created" api:"required" format:"date-time"`
	// Mandatory; no more than 1 year after `created`.
	Expires time.Time `json:"expires" api:"required" format:"date-time"`
	// Token identity and registry key (32 hex chars).
	Jti string `json:"jti" api:"required"`
	// Signed allowlist of what the token may do. V1 coarse roles; the array form
	// extends to fine-grained MoQT message names later without a breaking change.
	Operations []RelayTokenListResponseIssuersCloudflareTokensOperation `json:"operations" api:"required"`
	// Optional, customer-set.
	Label string `json:"label"`
	// The signed JWT. Present ONLY in create / auto-create responses (shown once);
	// never returned by list, never stored.
	Secret string                                           `json:"secret"`
	JSON   relayTokenListResponseIssuersCloudflareTokenJSON `json:"-"`
}

func (*RelayTokenListResponseIssuersCloudflareToken) UnmarshalJSON added in v7.8.0

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

type RelayTokenListResponseIssuersCloudflareTokensOperation added in v7.8.0

type RelayTokenListResponseIssuersCloudflareTokensOperation string
const (
	RelayTokenListResponseIssuersCloudflareTokensOperationPublish   RelayTokenListResponseIssuersCloudflareTokensOperation = "publish"
	RelayTokenListResponseIssuersCloudflareTokensOperationSubscribe RelayTokenListResponseIssuersCloudflareTokensOperation = "subscribe"
)

func (RelayTokenListResponseIssuersCloudflareTokensOperation) IsKnown added in v7.8.0

type RelayTokenListResponseIssuersIssuer added in v7.8.0

type RelayTokenListResponseIssuersIssuer string
const (
	RelayTokenListResponseIssuersIssuerCloudflare RelayTokenListResponseIssuersIssuer = "cloudflare"
)

func (RelayTokenListResponseIssuersIssuer) IsKnown added in v7.8.0

type RelayTokenListResponseIssuersType added in v7.8.0

type RelayTokenListResponseIssuersType string
const (
	RelayTokenListResponseIssuersTypeCloudflareJWT RelayTokenListResponseIssuersType = "cloudflare_jwt"
)

func (RelayTokenListResponseIssuersType) IsKnown added in v7.8.0

type RelayTokenNewParams added in v7.8.0

type RelayTokenNewParams struct {
	// Cloudflare account identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
	// Non-empty subset of the V1 roles the token is allowed to perform. Signed into
	// the token.
	Operations param.Field[[]RelayTokenNewParamsOperation] `json:"operations" api:"required"`
	// Optional expiry (RFC 3339). Defaults to 1 year from creation; rejected if more
	// than 1 year in the future.
	Expires param.Field[time.Time] `json:"expires" format:"date-time"`
	// Optional, customer-set label.
	Label param.Field[string] `json:"label"`
}

func (RelayTokenNewParams) MarshalJSON added in v7.8.0

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

type RelayTokenNewParamsOperation added in v7.8.0

type RelayTokenNewParamsOperation string
const (
	RelayTokenNewParamsOperationPublish   RelayTokenNewParamsOperation = "publish"
	RelayTokenNewParamsOperationSubscribe RelayTokenNewParamsOperation = "subscribe"
)

func (RelayTokenNewParamsOperation) IsKnown added in v7.8.0

func (r RelayTokenNewParamsOperation) IsKnown() bool

type RelayTokenNewResponse added in v7.8.0

type RelayTokenNewResponse struct {
	Issuers []RelayTokenNewResponseIssuer `json:"issuers" api:"required"`
	JSON    relayTokenNewResponseJSON     `json:"-"`
}

A relay's token collection, keyed on issuer `type` (a discriminated union). V1 ships exactly one arm (`cloudflare_jwt`). Clients iterate `issuers`, switch on `type`, and ignore unknown types — that contract is what makes adding or removing an arm non-breaking.

func (*RelayTokenNewResponse) UnmarshalJSON added in v7.8.0

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

type RelayTokenNewResponseEnvelope added in v7.8.0

type RelayTokenNewResponseEnvelope struct {
	Errors   []RelayTokenNewResponseEnvelopeErrors   `json:"errors" api:"required"`
	Messages []RelayTokenNewResponseEnvelopeMessages `json:"messages" api:"required"`
	Success  bool                                    `json:"success" api:"required"`
	// A relay's token collection, keyed on issuer `type` (a discriminated union). V1
	// ships exactly one arm (`cloudflare_jwt`). Clients iterate `issuers`, switch on
	// `type`, and ignore unknown types — that contract is what makes adding or
	// removing an arm non-breaking.
	Result RelayTokenNewResponse             `json:"result"`
	JSON   relayTokenNewResponseEnvelopeJSON `json:"-"`
}

func (*RelayTokenNewResponseEnvelope) UnmarshalJSON added in v7.8.0

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

type RelayTokenNewResponseEnvelopeErrors added in v7.8.0

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

func (*RelayTokenNewResponseEnvelopeErrors) UnmarshalJSON added in v7.8.0

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

type RelayTokenNewResponseEnvelopeMessages added in v7.8.0

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

func (*RelayTokenNewResponseEnvelopeMessages) UnmarshalJSON added in v7.8.0

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

type RelayTokenNewResponseIssuer added in v7.8.0

type RelayTokenNewResponseIssuer struct {
	// Always present ([] when empty).
	CloudflareTokens []RelayTokenNewResponseIssuersCloudflareToken `json:"cloudflare_tokens" api:"required"`
	Issuer           RelayTokenNewResponseIssuersIssuer            `json:"issuer" api:"required"`
	Type             RelayTokenNewResponseIssuersType              `json:"type" api:"required"`
	JSON             relayTokenNewResponseIssuerJSON               `json:"-"`
}

One arm of the discriminated-union token collection.

func (*RelayTokenNewResponseIssuer) UnmarshalJSON added in v7.8.0

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

type RelayTokenNewResponseIssuersCloudflareToken added in v7.8.0

type RelayTokenNewResponseIssuersCloudflareToken struct {
	Created time.Time `json:"created" api:"required" format:"date-time"`
	// Mandatory; no more than 1 year after `created`.
	Expires time.Time `json:"expires" api:"required" format:"date-time"`
	// Token identity and registry key (32 hex chars).
	Jti string `json:"jti" api:"required"`
	// Signed allowlist of what the token may do. V1 coarse roles; the array form
	// extends to fine-grained MoQT message names later without a breaking change.
	Operations []RelayTokenNewResponseIssuersCloudflareTokensOperation `json:"operations" api:"required"`
	// Optional, customer-set.
	Label string `json:"label"`
	// The signed JWT. Present ONLY in create / auto-create responses (shown once);
	// never returned by list, never stored.
	Secret string                                          `json:"secret"`
	JSON   relayTokenNewResponseIssuersCloudflareTokenJSON `json:"-"`
}

func (*RelayTokenNewResponseIssuersCloudflareToken) UnmarshalJSON added in v7.8.0

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

type RelayTokenNewResponseIssuersCloudflareTokensOperation added in v7.8.0

type RelayTokenNewResponseIssuersCloudflareTokensOperation string
const (
	RelayTokenNewResponseIssuersCloudflareTokensOperationPublish   RelayTokenNewResponseIssuersCloudflareTokensOperation = "publish"
	RelayTokenNewResponseIssuersCloudflareTokensOperationSubscribe RelayTokenNewResponseIssuersCloudflareTokensOperation = "subscribe"
)

func (RelayTokenNewResponseIssuersCloudflareTokensOperation) IsKnown added in v7.8.0

type RelayTokenNewResponseIssuersIssuer added in v7.8.0

type RelayTokenNewResponseIssuersIssuer string
const (
	RelayTokenNewResponseIssuersIssuerCloudflare RelayTokenNewResponseIssuersIssuer = "cloudflare"
)

func (RelayTokenNewResponseIssuersIssuer) IsKnown added in v7.8.0

type RelayTokenNewResponseIssuersType added in v7.8.0

type RelayTokenNewResponseIssuersType string
const (
	RelayTokenNewResponseIssuersTypeCloudflareJWT RelayTokenNewResponseIssuersType = "cloudflare_jwt"
)

func (RelayTokenNewResponseIssuersType) IsKnown added in v7.8.0

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) Delete added in v7.8.0

Revokes a token by removing it from the set the relay accepts. Relays cache that set, so revocation takes effect within seconds rather than instantly, and connections already established with the token are not closed. Revoking an unknown token succeeds, so the call is idempotent.

func (*RelayTokenService) List added in v7.8.0

Returns metadata for every token the relay accepts. Secrets are never returned, so a token that has been lost cannot be recovered here. There is no expiry filter: compare each token's `expires` to the current time to tell which ones have lapsed.

func (*RelayTokenService) New added in v7.8.0

Mints a new relay-scoped token and adds it to the relay's accepted-auth registry. The token value (secret) is shown once in the response. A relay may hold up to 10 tokens; creating an 11th is rejected.

type RelayUpdateParams

type RelayUpdateParams struct {
	// Cloudflare account identifier.
	AccountID param.Field[string]                  `path:"account_id" api:"required"`
	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 {
	// 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"`
}

func (RelayUpdateParamsConfig) MarshalJSON

func (r RelayUpdateParamsConfig) 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. Must be an absolute URL with a host and a
	// scheme the relay can dial: moqt:// (raw QUIC) or https:// (WebTransport).
	// Validated on update (PUT); rejected with 21013.
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
}

A single upstream MOQT server publisher.

func (RelayUpdateParamsConfigUpstreamsUpstream) MarshalJSON

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

type RelayUpdateResponse

type RelayUpdateResponse struct {
	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 {
	// 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:"-"`
}

func (*RelayUpdateResponseConfig) UnmarshalJSON

func (r *RelayUpdateResponseConfig) 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. Must be an absolute URL with a host and a
	// scheme the relay can dial: moqt:// (raw QUIC) or https:// (WebTransport).
	// Validated on update (PUT); rejected with 21013.
	URL  string                                         `json:"url" api:"required" format:"uri"`
	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