Versions in this module Expand all Collapse all v0 v0.1.0 Nov 15, 2026 Changes in this version + const DefaultBaseURL + const StatusError + const StatusFinished + const StatusProcessing + const StatusWaiting + const Version + var ErrWaitTimeout = errors.New("runconvert: timed out waiting for the job") + func VerifySignature(rawBody []byte, signature, secret string) bool + type Client struct + Files *FilesService + Jobs *JobsService + Operations *OperationsService + func New(apiKey string, opts ...Option) *Client + func (c *Client) Convert(ctx context.Context, input any, o ConvertOptions) (*ConvertResult, error) + func (c *Client) Me(ctx context.Context) (*Me, error) + type ConvertOptions struct + Filename string + From string + OnUpdate func(*Job) + Options map[string]any + OutDir string + Tag string + To string + type ConvertResult struct + Files []File + Job *Job + Saved []string + type Engine struct + Credits int + Name string + Options []EngineOption + type EngineOption struct + Description string + Name string + SupportedValues []json.RawMessage + Type string + type Error struct + Body []byte + Code string + Message string + Status int + func (e *Error) Error() string + type File struct + CreatedAt string + Filename string + Size int64 + URL string + type FilesService struct + func (s *FilesService) Download(ctx context.Context, fileURL, dir, filename string) (string, error) + func (s *FilesService) Upload(ctx context.Context, uploadURL string, file any, filename string) error + type InputFormat struct + Category string + Format string + Outputs []OutputTarget + type Job struct + CreatedAt string + CreditType string + CreditsUsed int + EndedAt *string + ExpiresAt *string + ID string + Metadata map[string]any + StartedAt *string + Status string + Tag *string + Tasks []*Task + UpdatedAt string + func (j *Job) ExportedFiles() []File + func (j *Job) Task(name string) *Task + type JobCreate struct + Metadata map[string]any + Tag string + Tasks map[string]TaskDefinition + type JobFailedError struct + Job *Job + Task *Task + func (e *JobFailedError) Error() string + type JobsService struct + func (s *JobsService) All(ctx context.Context, p ListParams, fn func(*Job) bool) error + func (s *JobsService) Cancel(ctx context.Context, id string) (*Job, error) + func (s *JobsService) Create(ctx context.Context, body JobCreate) (*Job, error) + func (s *JobsService) Delete(ctx context.Context, id string) error + func (s *JobsService) Get(ctx context.Context, id string) (*Job, error) + func (s *JobsService) List(ctx context.Context, p ListParams) ([]*Job, ListMeta, error) + func (s *JobsService) Wait(ctx context.Context, id string, o WaitOptions) (*Job, error) + type ListMeta struct + Page int + PerPage int + Total int + TotalPages int + type ListParams struct + IncludeTasks bool + Page int + PerPage int + Status string + Tag string + type Me struct + APIKey ... + Credits ... + Team struct{ ... } + User struct{ ... } + type OperationsCatalog struct + Categories []string + Formats []InputFormat + type OperationsService struct + func (s *OperationsService) ForInput(ctx context.Context, input string) (*InputFormat, error) + func (s *OperationsService) ForPair(ctx context.Context, input, output string) (*PairEngines, error) + func (s *OperationsService) List(ctx context.Context, category string) (*OperationsCatalog, error) + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithMaxRetries(n int) Option + func WithTimeout(d time.Duration) Option + type OutputTarget struct + BrowserCapable bool + BrowserMaxBytes int64 + BrowserMaxSeconds int + Category string + Credits int + Engine string + Format string + type PairEngines struct + Engines []Engine + Input string + Output string + type Task struct + Code string + CreatedAt string + Credits int + EndedAt *string + Engine string + EngineVersion string + ExpiresAt *string + ID string + Input []string + JobID string + Message string + Name string + Operation string + Percent int + Reason string + ReasonParams map[string]any + Result ... + StartedAt *string + Status string + UploadDeadline string + UploadURL string + type TaskDefinition map[string]any + func ConvertTask(inputFormat, outputFormat string, input any, options map[string]any) TaskDefinition + func ExportURL(input any) TaskDefinition + func ImportURL(sourceURL string) TaskDefinition + func ImportUpload() TaskDefinition + type WaitOptions struct + NoErrorOnFail bool + OnUpdate func(*Job) + Timeout time.Duration + type WebhookEvent struct + Event string + Job *Job + Task *Task + func ConstructEvent(rawBody []byte, signature, secret string) (*WebhookEvent, error)