cloudconvert

package module
v0.0.0-...-1972f5e Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2015 License: BSD-3-Clause Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DEFAULT_API_URL = "https://api.cloudconvert.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	APIKey  string
	BaseURL string
	// contains filtered or unexported fields
}

func New

func New(key string) (*Client, error)

func (Client) CreateProcess

func (c Client) CreateProcess(inputFormat, outputFormat string) (*Process, error)

type ErrCloudConvert

type ErrCloudConvert struct {
	Value string `json:"error"`
	Code  int    `json:"code"`
}

func (ErrCloudConvert) Error

func (e ErrCloudConvert) Error() string

func (ErrCloudConvert) String

func (e ErrCloudConvert) String() string

type ErrInvalidStatusCode

type ErrInvalidStatusCode struct {
	Expected int
	Actual   int
}

func (ErrInvalidStatusCode) Error

func (e ErrInvalidStatusCode) Error() string

func (ErrInvalidStatusCode) String

func (e ErrInvalidStatusCode) String() string

type Process

type Process struct {
	// contains filtered or unexported fields
}

func (Process) ConvertStream

func (p Process) ConvertStream(input io.Reader, filename string, outputFormat string, converterOptions map[string]string) (*ProcessStatus, error)

func (Process) Download

func (p Process) Download() (io.ReadCloser, error)

func (Process) DownloadOne

func (p Process) DownloadOne(f string) (io.ReadCloser, error)

func (Process) Status

func (p Process) Status() (*ProcessStatus, error)

func (Process) Wait

func (p Process) Wait(w bool) Process

type ProcessConverterInfo

type ProcessConverterInfo struct {
	Format  string                 `json:"format"`
	Type    string                 `json:"type"`
	Options map[string]interface{} `json:"options"`
}

type ProcessInputInfo

type ProcessInputInfo struct {
	Type     string `json:"type"`
	Name     string `json:"name"`
	Filename string `json:"filename"`
	Ext      string `json:"ext"`
}

type ProcessOutputInfo

type ProcessOutputInfo struct {
	URL      string   `json:"url"`
	Size     int      `json:"size"`
	Filename string   `json:"filename"`
	Ext      string   `json:"ext"`
	Files    []string `json:"files"`
}

type ProcessStatus

type ProcessStatus struct {
	ID        string                `json:"id"`
	URL       string                `json:"url"`
	Percent   int                   `json:"percent"`
	Message   string                `json:"message"`
	Step      string                `json:"step"`
	StartTime int                   `json:"starttime"`
	EndTime   int                   `json:"endtime"`
	Expire    int                   `json:"expire"`
	Minutes   int                   `json:"minutes"`
	Group     string                `json:"group"`
	Input     *ProcessInputInfo     `json:"input"`
	Output    *ProcessOutputInfo    `json:"output"`
	Converter *ProcessConverterInfo `json:"converter"`
}

Jump to

Keyboard shortcuts

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