Versions in this module Expand all Collapse all v1 v1.0.0 Jan 14, 2026 Changes in this version + const DefaultBaseURL + const DefaultTimeout + const DefaultWebhookTolerance + func Bool(v bool) *bool + func Float64(v float64) *float64 + func Int(v int) *int + func Int64(v int64) *int64 + func IsAuthenticationError(err error) bool + func IsAuthorizationError(err error) bool + func IsConflictError(err error) bool + func IsNetworkError(err error) bool + func IsNotFoundError(err error) bool + func IsRateLimitError(err error) bool + func IsServerError(err error) bool + func IsTimeoutError(err error) bool + func IsValidationError(err error) bool + func IsWebhookSignatureError(err error) bool + func String(v string) *string + func VerifyWebhookSignature(payload []byte, signature, timestamp, secret string, tolerance int) error + type APIKey struct + CreatedAt time.Time + ExpiresAt *time.Time + ID string + KeyPrefix string + LastUsedAt *time.Time + Name string + type APIKeyListResponse struct + APIKeys []APIKey + type APIKeyWithKey struct + Key string + type APIKeysService struct + func (s *APIKeysService) Create(ctx context.Context, params *CreateAPIKeyParams) (*CreateAPIKeyResponse, error) + func (s *APIKeysService) Delete(ctx context.Context, id string) error + func (s *APIKeysService) List(ctx context.Context) (*APIKeyListResponse, error) + type Account struct + AllowLocalhost bool + AllowedDomains []string + CreatedAt time.Time + Email string + ID string + Name *string + Plan Plan + R2BucketName *string + R2BucketRegion *string + type AccountService struct + func (s *AccountService) Get(ctx context.Context) (*Account, error) + func (s *AccountService) Update(ctx context.Context, params *UpdateAccountParams) (*UpdateAccountResponse, error) + type AuthenticationError struct + Code string + Message string + Param string + RequestID string + StatusCode int + func (e *AuthenticationError) Error() string + type AuthorizationError struct + Code string + Message string + Param string + RequestID string + StatusCode int + func (e *AuthorizationError) Error() string + type Client struct + APIKeys *APIKeysService + Account *AccountService + Collections *CollectionsService + Embed *EmbedService + Usage *UsageService + Videos *VideosService + Webhooks *WebhooksService + func NewClient(apiKey string, opts ...ClientOption) *Client + type ClientOption func(*Client) + func WithBaseURL(url string) ClientOption + func WithHTTPClient(httpClient *http.Client) ClientOption + func WithTimeout(timeout time.Duration) ClientOption + type Collection struct + CreatedAt time.Time + Description *string + ID string + Name string + Slug string + StorageUsed int64 + UpdatedAt time.Time + VideoCount int + type CollectionListResponse struct + Collections []Collection + type CollectionWithVideos struct + Videos []Video + type CollectionsService struct + func (s *CollectionsService) Create(ctx context.Context, params *CreateCollectionParams) (*Collection, error) + func (s *CollectionsService) Delete(ctx context.Context, slug string) error + func (s *CollectionsService) Get(ctx context.Context, slug string) (*CollectionWithVideos, error) + func (s *CollectionsService) List(ctx context.Context) (*CollectionListResponse, error) + type ConflictError struct + Code string + Message string + Param string + RequestID string + StatusCode int + func (e *ConflictError) Error() string + type CreateAPIKeyParams struct + Name string + type CreateAPIKeyResponse struct + APIKey APIKeyWithKey + Message string + type CreateCollectionParams struct + Description *string + Name string + type CreateWebhookParams struct + Events []WebhookEventType + URL string + type CreateWebhookResponse struct + Message string + Webhook WebhookWithSecret + type EmbedCode struct + Fixed string + Responsive string + type EmbedService struct + func (s *EmbedService) GetSettings(ctx context.Context) (*EmbedSettings, error) + func (s *EmbedService) Sign(ctx context.Context, params *SignEmbedParams) (*SignEmbedResponse, error) + func (s *EmbedService) UpdateSettings(ctx context.Context, params *UpdateEmbedSettingsParams) (*UpdateEmbedSettingsResponse, error) + type EmbedSettings struct + AccentColor string + AllowLocalhost bool + AllowedDomains []string + Autoplay bool + LogoOpacity float64 + LogoPosition LogoPosition + LogoURL *string + Loop bool + Muted bool + PrimaryColor string + ShowFullscreen bool + ShowKeyboardHints bool + ShowPlaybackSpeed bool + ShowProgress bool + ShowQualitySelector bool + ShowTime bool + ShowVolume bool + type Error struct + Code string + Err error + Message string + Param string + RequestID string + RetryAfter int + StatusCode int + func (e *Error) Error() string + func (e *Error) Unwrap() error + type LogoPosition string + const LogoPositionBottomLeft + const LogoPositionBottomRight + const LogoPositionTopLeft + const LogoPositionTopRight + type NetworkError struct + Err error + Message string + func (e *NetworkError) Error() string + func (e *NetworkError) Unwrap() error + type NotFoundError struct + Code string + Message string + Param string + RequestID string + StatusCode int + func (e *NotFoundError) Error() string + type Plan string + const PlanBusiness + const PlanFree + const PlanPro + type ProgressEvent struct + Duration float64 + Error string + Message string + PlaylistURL string + PreviewURL *string + ProcessedSize *int64 + Resolutions []string + Stage ProgressStage + ThumbnailURL *string + type ProgressStage string + const ProgressStageCompleted + const ProgressStageFailed + const ProgressStagePending + const ProgressStageProcessing + const ProgressStageTimeout + type RateLimitError struct + Code string + Message string + Param string + RequestID string + RetryAfter int + StatusCode int + func (e *RateLimitError) Error() string + type ServerError struct + Code string + Message string + Param string + RequestID string + StatusCode int + func (e *ServerError) Error() string + type SignEmbedParams struct + BaseURL *string + VideoID string + type SignEmbedResponse struct + EmbedCode EmbedCode + EmbedURL string + Signature string + VideoID string + type TestWebhookResponse struct + Error *string + Message string + StatusCode *int + type TimeoutError struct + Err error + Message string + func (e *TimeoutError) Error() string + func (e *TimeoutError) Unwrap() error + type UpdateAccountParams struct + AllowLocalhost *bool + AllowedDomains []string + type UpdateAccountResponse struct + Account Account + Message string + type UpdateEmbedSettingsParams struct + AccentColor *string + AllowLocalhost *bool + AllowedDomains []string + Autoplay *bool + LogoOpacity *float64 + LogoPosition *LogoPosition + LogoURL *string + Loop *bool + Muted *bool + PrimaryColor *string + ShowFullscreen *bool + ShowKeyboardHints *bool + ShowPlaybackSpeed *bool + ShowProgress *bool + ShowQualitySelector *bool + ShowTime *bool + ShowVolume *bool + type UpdateEmbedSettingsResponse struct + Message string + Settings EmbedSettings + type UpdateWebhookParams struct + Events []WebhookEventType + IsActive *bool + URL *string + type UploadProgress struct + Loaded int64 + Percent int + Total int64 + type UploadProgressFunc func(progress UploadProgress) + type UploadResponse struct + Message string + Video UploadVideo + type UploadVideo struct + Collection string + Filename string + ID string + Status VideoStatus + type Usage struct + Limits UsageLimits + Plan Plan + Usage UsageInfo + type UsageInfo struct + StorageLimitGB int + StorageUsedBytes int64 + StorageUsedGB string + VideosLimit interface{} + VideosThisMonth int + type UsageLimits struct + APIAccess bool + DeliveryGB int + MaxDurationMinutes int + MaxFileSizeMB int + Resolutions []string + Webhooks bool + type UsageService struct + func (s *UsageService) Get(ctx context.Context) (*Usage, error) + type ValidationError struct + Code string + Message string + Param string + RequestID string + StatusCode int + func (e *ValidationError) Error() string + type Video struct + Collection *VideoCollection + CreatedAt time.Time + Duration *float64 + ErrorMessage *string + Filename string + ID string + OriginalSize int64 + PlaylistURL *string + PreviewURL *string + ProcessedSize *int64 + Resolutions []string + Status VideoStatus + ThumbnailURL *string + UpdatedAt time.Time + type VideoCollection struct + Name string + Slug string + type VideoEmbedInfo struct + EmbedPath string + Signature string + VideoID string + type VideoListParams struct + Collection string + Limit int + Offset int + Status VideoStatus + type VideoListResponse struct + Videos []Video + type VideoStatus string + const VideoStatusCompleted + const VideoStatusFailed + const VideoStatusPending + const VideoStatusProcessing + type VideosService struct + func (s *VideosService) Delete(ctx context.Context, id string) error + func (s *VideosService) Get(ctx context.Context, id string) (*Video, error) + func (s *VideosService) GetEmbedInfo(ctx context.Context, id string) (*VideoEmbedInfo, error) + func (s *VideosService) List(ctx context.Context, params *VideoListParams) (*VideoListResponse, error) + func (s *VideosService) Upload(ctx context.Context, file io.Reader, filename, collection string, ...) (*UploadResponse, error) + func (s *VideosService) UploadFile(ctx context.Context, filePath, collection string, ...) (*UploadResponse, error) + func (s *VideosService) WatchProgress(ctx context.Context, id string) (<-chan *ProgressEvent, <-chan error) + type Webhook struct + CreatedAt time.Time + Events []WebhookEventType + ID string + IsActive bool + URL string + UpdatedAt time.Time + type WebhookDelivery struct + AttemptCount int + CreatedAt time.Time + DeliveredAt *time.Time + Error *string + Event WebhookEventType + ID string + StatusCode *int + type WebhookEventType string + const WebhookEventCollectionCreated + const WebhookEventCollectionDeleted + const WebhookEventVideoCompleted + const WebhookEventVideoFailed + const WebhookEventVideoProcessing + const WebhookEventVideoUploaded + type WebhookListResponse struct + AvailableEvents []WebhookEventType + Webhooks []Webhook + type WebhookPayload struct + Data map[string]interface{} + Event WebhookEventType + Timestamp int64 + func ConstructEvent(payload []byte, signature, timestamp, secret string) (*WebhookPayload, error) + type WebhookSignatureError struct + Message string + func NewWebhookSignatureError(message string) *WebhookSignatureError + func (e *WebhookSignatureError) Error() string + type WebhookWithDeliveries struct + RecentDeliveries []WebhookDelivery + type WebhookWithSecret struct + Secret string + type WebhooksService struct + func (s *WebhooksService) Create(ctx context.Context, params *CreateWebhookParams) (*CreateWebhookResponse, error) + func (s *WebhooksService) Delete(ctx context.Context, id string) error + func (s *WebhooksService) Get(ctx context.Context, id string) (*WebhookWithDeliveries, error) + func (s *WebhooksService) List(ctx context.Context) (*WebhookListResponse, error) + func (s *WebhooksService) Test(ctx context.Context, id string) (*TestWebhookResponse, error) + func (s *WebhooksService) Update(ctx context.Context, id string, params *UpdateWebhookParams) (*Webhook, error)