job

package
Version: v0.0.0-...-39c852c Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package job provides the /jobs APIs

Index

Constants

View Source
const (
	JobStateUndefined trimmer.JobState = ""
	JobStateAll       trimmer.JobState = "all"    // used for listing states only
	JobStateActive    trimmer.JobState = "active" // used for listing states only
	JobStateDone      trimmer.JobState = "done"   // used for listing states only
	JobStateCreated   trimmer.JobState = "created"
	JobStateQueued    trimmer.JobState = "queued"
	JobStateRunning   trimmer.JobState = "running"
	JobStateComplete  trimmer.JobState = "complete"
	JobStateFailed    trimmer.JobState = "failed"
	JobStateAborted   trimmer.JobState = "aborted"
)
View Source
const (
	JobTypeUndefined trimmer.JobType = ""
	JobTypeUpload    trimmer.JobType = "upload"    // client-side upload
	JobTypeCopy      trimmer.JobType = "copy"      // copy media bewteen volumes
	JobTypeScan      trimmer.JobType = "scan"      // volume scan
	JobTypeWipe      trimmer.JobType = "wipe"      // volume wipe
	JobTypeWatch     trimmer.JobType = "watch"     // volume watch
	JobTypeUnwatch   trimmer.JobType = "unwatch"   // volume unwatch
	JobTypeAnalyze   trimmer.JobType = "analyze"   // transcoder analyze media
	JobTypeTranscode trimmer.JobType = "transcode" // transcode media
	JobTypeRender    trimmer.JobType = "render"    // render editlist into media
	JobTypeEMail     trimmer.JobType = "email"     // send email(s)
	JobTypeInvoice   trimmer.JobType = "invoice"   // create invoice PDF
	JobTypeReceipt   trimmer.JobType = "receipt"   // create receipt PDF
	JobTypePublish   trimmer.JobType = "publish"   // publishing job
)

Variables

This section is empty.

Functions

func Cancel

func Cancel(ctx context.Context, jobId string) (*trimmer.Job, error)

func Get

func Get(ctx context.Context, jobId string, params *trimmer.JobParams) (*trimmer.Job, error)

func ParseJobState

func ParseJobState(s string) trimmer.JobState

func ParseJobType

func ParseJobType(s string) trimmer.JobType

func Update

func Update(ctx context.Context, jobId string, params *trimmer.JobParams) (*trimmer.Job, error)

Types

type Client

type Client struct {
	B    trimmer.Backend
	CDN  trimmer.Backend
	Key  trimmer.ApiKey
	Sess *trimmer.Session
}

Client is used to invoke /users APIs.

func (Client) Cancel

func (c Client) Cancel(ctx context.Context, jobId string) (*trimmer.Job, error)

func (Client) Get

func (c Client) Get(ctx context.Context, jobId string, params *trimmer.JobParams) (*trimmer.Job, error)

func (Client) Update

func (c Client) Update(ctx context.Context, jobId string, params *trimmer.JobParams) (*trimmer.Job, error)

type Iter

type Iter struct {
	*trimmer.Iter
}

Iter is an iterator for lists of Jobs. The embedded Iter carries methods with it; see its documentation for details.

func (*Iter) Job

func (i *Iter) Job() *trimmer.Job

JOb returns the most recent Job visited by a call to Next.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL