Versions in this module Expand all Collapse all v0 v0.1.2 Oct 28, 2026 Changes in this version + type RtcAddonRate struct + AppliesTo []string + CuPerParticipantSecond string + ID string + IncludedIn []string + Label string + Price string + Unit string + type RtcAddons struct + Music *RtcAddonRate type RtcRates + Addons *RtcAddons v0.1.1 Oct 27, 2026 v0.1.0 Oct 23, 2026 Changes in this version + const CuPerCredit + const DefaultTolerance + const Version + var ErrorCodes = func() []string { ... }() + var RESTErrorCodes = []string + func ParseCu(amount string) (*big.Int, error) + func Ptr[T any](v T) *T + func VerifyWebhook(body []byte, header string, secrets []string, opts *VerifyOptions) bool + type Allowance struct + Blocked string + DailyCapMinutes int64 + FreeDailyMinutes int64 + FreeMonthlyMinutes int64 + FreeRemainingSeconds int64 + FreeUsedMonthSeconds int64 + FreeUsedTodaySeconds int64 + MonthlyCapMinutes int64 + PaidRemainingSeconds int64 + Plan string + RemainingSeconds int64 + UsedMonthSeconds int64 + UsedTodaySeconds int64 + type BroadcastStream struct + CreatedAt int64 + EndedAt int64 + Metadata json.RawMessage + PeakViewers int + Playback PlaybackPolicy + PlaybackURLs PlaybackURLs + StartedAt int64 + State string + StreamID string + StreamKey string + TenantID string + Viewers int + type BroadcastStreamWithPublish struct + Publish PublishInfo + type BurnView struct + LiveParticipants int + ProjectCuPerSecond string + WalletCuPerSecond string + type ChatInfo struct + Channel string + Members int + type ChatMessage struct + Channel string + ClientMsgID string + From string + ID string + Metadata json.RawMessage + TS int64 + Text string + To string + Type string + type ChatToken struct + Channel string + ExpiresAt int64 + Identity string + Role Role + RoomID string + Token string + WSURL string + type CodeInfo struct + Code string + Origin Origin + Retryable bool + Terminal bool + func ErrorInfo(code string) (CodeInfo, bool) + type Config struct + APIKey string + BaseURL string + HTTPClient *http.Client + RatesBaseURL string + Retries *int + Timeout time.Duration + func (c Config) Format(f fmt.State, verb rune) + func (c Config) GoString() string + func (c Config) LogValue() slog.Value + func (c Config) MarshalJSON() ([]byte, error) + func (c Config) String() string + type CreateChatTokenParams struct + Channel string + Identity string + Role Role + type CreateRoomParams struct + HostIdentity string + Metadata any + RoomID string + type CreateStreamParams struct + Metadata any + Playback PlaybackPolicy + StreamID string + type CreateStreamTokenParams struct + Action StreamAction + Identity string + StreamID string + TTLSeconds int + type CreateTokenParams struct + Identity string + Role Role + RoomID string + type DailyUsage struct + Day string + type EnsureRoomParams struct + HostIdentity string + Metadata any + RoomID string + type Error struct + Code string + Message string + Retryable bool + Status int + func (e *Error) Error() string + func (e *Error) IsBillingUnavailable() bool + func (e *Error) IsBroadcastDisabled() bool + func (e *Error) IsCapacityExhausted() bool + func (e *Error) IsNotFound() bool + func (e *Error) IsOutOfMinutes() bool + func (e *Error) IsQuota() bool + type LegacyFunds struct + FreeSeconds int64 + OwnSeconds int64 + SharedSeconds int64 + TotalSeconds int64 + Unlimited bool + type ListMessagesOptions struct + Before string + Limit int + type Origin string + const OriginSDK + const OriginServer + type Participant struct + HandMetadata json.RawMessage + HandRaised bool + Identity string + JoinedAt int64 + Kicked bool + Metadata json.RawMessage + Muted bool + NodeID string + Role Role + VideoBlocked bool + type PlaybackPolicy string + const PlaybackPublic + const PlaybackToken + type PlaybackURLs struct + ExpiresAt int64 + LLHLS string + Token string + WebRTC string + type Producer struct + Identity string + Kind string + NodeID string + Paused bool + ProducerID string + Source string + type ProjectBalance struct + BillingMode string + Blocked *string + Burn BurnView + CanJoin bool + Legacy LegacyFunds + PricingVersion *int + RemainingSeconds int64 + TenantID string + UpdatedAt int64 + Wallet *WalletFunds + WalletLow WalletLowState + type PublishInfo struct + ExpiresAt int64 + Token string + WHIPURL string + type ReceiveKbps struct + Audio int + Total int + Video int + type Role string + const RoleCohost + const RoleHost + const RoleModerator + const RoleViewer + type Room struct + CreatedAt int64 + Demo bool + HostIdentity string + Metadata json.RawMessage + Nodes []string + OriginNode string + Participants int + RoomID string + State string + TenantID string + type RoomList struct + Rooms []Room + type RoomToken struct + ExpiresAt int64 + Identity string + Role Role + RoomID string + Token string + WSURL string + type RoomView struct + Participants []Participant + Producers []Producer + Room Room + type RoomWithHostToken struct + Existed bool + ExpiresAt int64 + HostToken string + WSURL string + type RtcConversion struct + CreditsPerRupee string + Denominator string + EffectiveAt *string + InrPerCredit string + Numerator string + Source string + Version *int + type RtcMode struct + Channels int + Codecs []string + Enabled bool + FPS int + Height int + Kind string + Label string + Layers int + ProfileID string + ReceiveKbps ReceiveKbps + Tier string + TierLabel string + Width int + type RtcRates struct + Conversion RtcConversion + EffectiveAt *string + IdleTier string + Kind string + Modes []RtcMode + Notes []string + Surcharges []RtcSurcharge + Tiers []RtcTierRate + Unit RtcUnit + Version int + type RtcSurcharge struct + Credits string + FPS int + Height int + Tier string + type RtcTierRate struct + Available bool + Base string + Credits string + CuPerParticipantSecond string + ID string + Label string + Media string + Rank int + Surcharge *string + type RtcUnit struct + CuPerCredit string + Price string + Rate string + type SendMessageParams struct + Channel string + Ephemeral bool + From string + Metadata any + Text string + To string + Type string + type StreamAction string + const ActionPlay + const ActionPublish + type StreamClient struct + func NewStreamClient(cfg Config) (*StreamClient, error) + func NewStreamClientFromEnv() (*StreamClient, error) + func (c *StreamClient) CreateChatToken(ctx context.Context, params CreateChatTokenParams) (*ChatToken, error) + func (c *StreamClient) CreateRoom(ctx context.Context, params CreateRoomParams) (*RoomWithHostToken, error) + func (c *StreamClient) CreateStream(ctx context.Context, params CreateStreamParams) (*BroadcastStreamWithPublish, error) + func (c *StreamClient) CreateStreamToken(ctx context.Context, params CreateStreamTokenParams) (*StreamToken, error) + func (c *StreamClient) CreateToken(ctx context.Context, params CreateTokenParams) (*RoomToken, error) + func (c *StreamClient) DeleteMessage(ctx context.Context, channel, messageID string) error + func (c *StreamClient) DeleteRoom(ctx context.Context, roomID string) error + func (c *StreamClient) DeleteStream(ctx context.Context, streamID string) error + func (c *StreamClient) EnsureRoom(ctx context.Context, params EnsureRoomParams) (*RoomWithHostToken, error) + func (c *StreamClient) GetBalance(ctx context.Context) (*ProjectBalance, error) + func (c *StreamClient) GetChatInfo(ctx context.Context, channel string) (*ChatInfo, error) + func (c *StreamClient) GetRates(ctx context.Context) (*RtcRates, error) + func (c *StreamClient) GetRoom(ctx context.Context, roomID string) (*RoomView, error) + func (c *StreamClient) GetStream(ctx context.Context, streamID string) (*BroadcastStream, error) + func (c *StreamClient) GetUsage(ctx context.Context) (*UsageSummary, error) + func (c *StreamClient) GetUsageSeries(ctx context.Context, days int) ([]DailyUsage, error) + func (c *StreamClient) ListChatMutes(ctx context.Context, channel string) ([]string, error) + func (c *StreamClient) ListMessages(ctx context.Context, channel string, opts *ListMessagesOptions) ([]ChatMessage, error) + func (c *StreamClient) ListParticipants(ctx context.Context, roomID string) ([]Participant, error) + func (c *StreamClient) ListRooms(ctx context.Context) (*RoomList, error) + func (c *StreamClient) ListStreams(ctx context.Context) ([]BroadcastStream, error) + func (c *StreamClient) MuteChat(ctx context.Context, channel, identity string) error + func (c *StreamClient) SendMessage(ctx context.Context, params SendMessageParams) (*ChatMessage, error) + func (c *StreamClient) UnmuteChat(ctx context.Context, channel, identity string) error + func (c *StreamClient) UpdateStream(ctx context.Context, streamID string, patch UpdateStreamParams) (*BroadcastStream, error) + func (c StreamClient) Format(f fmt.State, verb rune) + func (c StreamClient) GoString() string + func (c StreamClient) LogValue() slog.Value + func (c StreamClient) MarshalJSON() ([]byte, error) + func (c StreamClient) String() string + type StreamEvent struct + CreatedAt int64 + Data json.RawMessage + ID string + RoomID string + TenantID string + Type string + func ParseWebhook(body []byte, header string, secrets []string, opts *VerifyOptions) (*StreamEvent, error) + type StreamToken struct + Action StreamAction + ExpiresAt int64 + LLHLS string + StreamID string + Token string + WHIPURL string + WebRTC string + type UpdateStreamParams struct + Metadata any + Playback PlaybackPolicy + type Usage struct + BillableSeconds int64 + BroadcastSeconds int64 + BroadcastViewerSeconds int64 + ChatConnectionSeconds int64 + ChatMessages int64 + FreeSeconds int64 + ParticipantSeconds int64 + PeakParticipants int64 + PublisherSeconds int64 + RoomSeconds int64 + RoomsCreated int64 + StreamsStarted int64 + type UsageSummary struct + Allowance *Allowance + Lifetime Usage + MinutesLimit int64 + MinutesRemaining int64 + Month Usage + Plan string + SharedUsedMinutes int64 + Status string + TenantID string + Today Usage + UsedMinutes int64 + type VerifyOptions struct + Now func() time.Time + Tolerance *time.Duration + type WalletFunds struct + AvailableCredits string + AvailableCu string + PaidCu string + PromoCu string + Scopes map[string]WalletScopeAmount + SpendOrder []string + type WalletLowState struct + Active bool + GraceSeconds int64 + type WalletScopeAmount struct + PaidCu string + PromoCu string