asset

package
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: 13 Imported by: 0

Documentation

Overview

Package asset provides the /assets APIs

Index

Constants

View Source
const (
	AssetStateUndefined  trimmer.AssetState = ""
	AssetStateEmpty      trimmer.AssetState = "empty"
	AssetStateUploading  trimmer.AssetState = "uploading"
	AssetStateProcessing trimmer.AssetState = "processing"
	AssetStatePublishing trimmer.AssetState = "publishing"
	AssetStatePublished  trimmer.AssetState = "published"
	AssetStateReviewing  trimmer.AssetState = "reviewing"
	AssetStateApproved   trimmer.AssetState = "approved"
	AssetStateRejected   trimmer.AssetState = "rejected"
	AssetStateArchived   trimmer.AssetState = "archived"
	AssetStateAttention  trimmer.AssetState = "attention"
	AssetStateReady      trimmer.AssetState = "ready"
	AssetStateBlocked    trimmer.AssetState = "blocked"
	AssetStateBanned     trimmer.AssetState = "banned"
	AssetStateDeleting   trimmer.AssetState = "deleting"
	AssetStateCleaning   trimmer.AssetState = "cleaning"
	AssetStateDeleted    trimmer.AssetState = "deleted"
)
View Source
const (
	AssetListEventUndefined trimmer.AssetListEvent = ""
	AssetListEventCreated   trimmer.AssetListEvent = "created"
	AssetListEventUpdated   trimmer.AssetListEvent = "updated"
)

AssetListEvent

Variables

This section is empty.

Functions

func Analyze

func Analyze(ctx context.Context, assetId string, params *trimmer.AssetAnalyzeParams) (*trimmer.Job, error)

func CommitRevision

func CommitRevision(ctx context.Context, assetId string, params *trimmer.MetaUpdateParams) (*trimmer.MetaRevision, error)

func Count

func Count(ctx context.Context, assetId string, params *trimmer.AssetCountParams) (*trimmer.Asset, error)

func Delete

func Delete(ctx context.Context, assetId string) error

func DeleteMedia

func DeleteMedia(ctx context.Context, assetId, mediaId string) error

func DeleteVersions

func DeleteVersions(ctx context.Context, assetId string) error

func DiffRevisions

func DiffRevisions(ctx context.Context, assetId string, params *trimmer.MetaDiffParams) ([]byte, error)

func ForkCopy

func ForkCopy(ctx context.Context, assetId string, params *trimmer.AssetForkParams) (*trimmer.Asset, error)

func ForkVersion

func ForkVersion(ctx context.Context, assetId string, params *trimmer.AssetForkParams) (*trimmer.Asset, error)

func Get

func Get(ctx context.Context, assetId string, params *trimmer.AssetParams) (*trimmer.Asset, error)

func GetRevision

func GetRevision(ctx context.Context, assetId string, params *trimmer.MetaQueryParams) (*trimmer.MetaRevision, error)
func ListLinks(ctx context.Context, assetId string, params *trimmer.LinkListParams) *link.Iter

func ListMedia

func ListMedia(ctx context.Context, assetId string, params *trimmer.MediaListParams) *media.Iter

func ListRevisions

func ListRevisions(ctx context.Context, assetId string, params *trimmer.MetaListParams) *meta.Iter

func ListTags

func ListTags(ctx context.Context, assetId string, params *trimmer.TagListParams) *tag.Iter

func Lock

func Lock(ctx context.Context, assetId string, params *trimmer.EmbedParams) (*trimmer.Asset, error)

func NewMedia

func NewMedia(ctx context.Context, assetId string, params *trimmer.MediaParams) (*trimmer.Media, error)

func NewTag

func NewTag(ctx context.Context, assetId string, params *trimmer.TagParams) (*trimmer.Tag, error)

func NewUpload

func NewUpload(ctx context.Context, assetId string, params *trimmer.MediaParams) (*trimmer.Media, error)

func ParseAssetListEvent

func ParseAssetListEvent(s string) trimmer.AssetListEvent

func ParseAssetState

func ParseAssetState(s string) trimmer.AssetState

func Snapshot

func Snapshot(ctx context.Context, assetId string, params *trimmer.AssetSnapshotParams) (*trimmer.Job, error)

func Transcode

func Transcode(ctx context.Context, assetId string, params *trimmer.AssetTranscodeParams) (*trimmer.Job, error)

func Trash

func Trash(ctx context.Context, assetId string) (*trimmer.Asset, error)

func Trim

func Trim(ctx context.Context, assetId string, params *trimmer.AssetTrimParams) (*trimmer.Media, error)

func Undelete

func Undelete(ctx context.Context, assetId string) (*trimmer.Asset, error)

func Unlock

func Unlock(ctx context.Context, assetId string, params *trimmer.EmbedParams) (*trimmer.Asset, error)

func Update

func Update(ctx context.Context, assetId string, params *trimmer.AssetUpdateParams) (*trimmer.Asset, error)

func UploadMedia

func UploadMedia(ctx context.Context, assetId string, params *trimmer.MediaParams, src io.ReadSeeker) (*trimmer.Media, error)

Types

type Client

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

Client is used to invoke /users APIs.

func (Client) Analyze

func (c Client) Analyze(ctx context.Context, assetId string, params *trimmer.AssetAnalyzeParams) (*trimmer.Job, error)

func (Client) CommitRevision

func (c Client) CommitRevision(ctx context.Context, assetId string, params *trimmer.MetaUpdateParams) (*trimmer.MetaRevision, error)

func (Client) Count

func (c Client) Count(ctx context.Context, assetId string, params *trimmer.AssetCountParams) (*trimmer.Asset, error)

func (Client) Delete

func (c Client) Delete(ctx context.Context, assetId string) error

func (Client) DeleteMedia

func (c Client) DeleteMedia(ctx context.Context, assetId, mediaId string) error

func (Client) DeleteVersions

func (c Client) DeleteVersions(ctx context.Context, assetId string) error

func (Client) DiffRevisions

func (c Client) DiffRevisions(ctx context.Context, assetId string, params *trimmer.MetaDiffParams) ([]byte, error)

func (Client) ForkCopy

func (c Client) ForkCopy(ctx context.Context, assetId string, params *trimmer.AssetForkParams) (*trimmer.Asset, error)

func (Client) ForkVersion

func (c Client) ForkVersion(ctx context.Context, assetId string, params *trimmer.AssetForkParams) (*trimmer.Asset, error)

func (Client) Get

func (c Client) Get(ctx context.Context, assetId string, params *trimmer.AssetParams) (*trimmer.Asset, error)

func (Client) GetRevision

func (c Client) GetRevision(ctx context.Context, assetId string, params *trimmer.MetaQueryParams) (*trimmer.MetaRevision, error)
func (c Client) ListLinks(ctx context.Context, assetId string, params *trimmer.LinkListParams) *link.Iter

func (Client) ListMedia

func (c Client) ListMedia(ctx context.Context, assetId string, params *trimmer.MediaListParams) *media.Iter

func (Client) ListRevisions

func (c Client) ListRevisions(ctx context.Context, assetId string, params *trimmer.MetaListParams) *meta.Iter

func (Client) ListTags

func (c Client) ListTags(ctx context.Context, assetId string, params *trimmer.TagListParams) *tag.Iter

func (Client) ListVersions

func (c Client) ListVersions(ctx context.Context, assetId string, params *trimmer.AssetListParams) *Iter

func (Client) Lock

func (c Client) Lock(ctx context.Context, assetId string, params *trimmer.EmbedParams) (*trimmer.Asset, error)

func (Client) NewMedia

func (c Client) NewMedia(ctx context.Context, assetId string, params *trimmer.MediaParams) (*trimmer.Media, error)

func (Client) NewTag

func (c Client) NewTag(ctx context.Context, assetId string, params *trimmer.TagParams) (*trimmer.Tag, error)

func (Client) NewUpload

func (c Client) NewUpload(ctx context.Context, assetId string, params *trimmer.MediaParams) (*trimmer.Media, error)

func (Client) Snapshot

func (c Client) Snapshot(ctx context.Context, assetId string, params *trimmer.AssetSnapshotParams) (*trimmer.Job, error)

func (Client) Transcode

func (c Client) Transcode(ctx context.Context, assetId string, params *trimmer.AssetTranscodeParams) (*trimmer.Job, error)

func (Client) Trash

func (c Client) Trash(ctx context.Context, assetId string) (*trimmer.Asset, error)

func (Client) Trim

func (c Client) Trim(ctx context.Context, assetId string, params *trimmer.AssetTrimParams) (*trimmer.Media, error)

func (Client) Undelete

func (c Client) Undelete(ctx context.Context, assetId string) (*trimmer.Asset, error)

func (Client) Unlock

func (c Client) Unlock(ctx context.Context, assetId string, params *trimmer.EmbedParams) (*trimmer.Asset, error)

func (Client) Update

func (c Client) Update(ctx context.Context, assetId string, params *trimmer.AssetUpdateParams) (*trimmer.Asset, error)

func (Client) UploadMedia

func (c Client) UploadMedia(ctx context.Context, assetId string, params *trimmer.MediaParams, src io.ReadSeeker) (*trimmer.Media, error)

type Iter

type Iter struct {
	*trimmer.Iter
}

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

func ListVersions

func ListVersions(ctx context.Context, assetId string, params *trimmer.AssetListParams) *Iter

func (*Iter) Asset

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

Asset returns the most recent Asset visited by a call to Next.

Jump to

Keyboard shortcuts

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