cloudconvert

package
v2.16.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: MIT Imports: 15 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string
	APIKey  string
	Timeout time.Duration
}

func (Client) NewProcess

func (c Client) NewProcess(inputFormat, ouputFormat string) (Process, error)

func (Client) QuickConversion

func (c Client) QuickConversion(path string, awsS3 converter.AWSS3, inputFormat string, outputFormat string) ([]byte, error)

type CloudConvert

type CloudConvert struct {
	converter.UploadConversion
	Client
}

func (CloudConvert) Convert

func (c CloudConvert) Convert(s converter.ConversionSource, done <-chan struct{}) ([]byte, error)

func (CloudConvert) Upload

func (c CloudConvert) Upload(b []byte) (bool, error)

type Conversion

type Conversion struct {
	Input        string `json:"input"`
	File         string `json:"file"`
	Filename     string `json:"filename"`
	OutputFormat string `json:"outputformat"`
	Wait         bool   `json:"wait"`
	Download     string `json:"download,omitempty"`
	Timeout      string `json:"timeout,omitempty"`
	*Output      `json:"output,omitempty"`
}

type Output

type Output struct {
	S3 `json:"s3"`
}

type Process

type Process struct {
	ID      string `json:"id,omitempty"`
	URL     string `json:"url"`
	Expires string `json:"expires,omitempty"`
	MaxTime int    `json:"maxtime,omitempty"`
	Minutes int    `json:"minutes,omitempty"`
}

func (Process) StartConversion

func (p Process) StartConversion(c Conversion) ([]byte, error)

type S3

type S3 struct {
	AccessKey    string `json:"accesskeyid"`
	AccessSecret string `json:"secretaccesskey"`
	Bucket       string `json:"bucket"`
	Path         string `json:"path"`
	ACL          string `json:"acl"`
}

Jump to

Keyboard shortcuts

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