trimmer

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

README

Trimmer SDK for Go

go-trimmer is the official Trimmer SDK for the Go programming language.

Checkout our releases and the Changelog for information about the latest bug fixes, updates, and features added to the SDK.

Installing

Install the SDK with the following go get command.

$ go get trimmer.io/go-trimmer

or integrate it as Git submodule into your vendor/ directory

$ git submodule add https://trimmer.io/go-trimmer vendor/trimmer.io/go-trimmer

Environment Variables

# API Key (required)
TRIMMER_API_KEY

# Servers (optionally overwrite configured servers)
TRIMMER_API_SERVER
TRIMMER_CDN_SERVER

# default client token authentication
TRIMMER_CLIENT_TOKEN

# default user login options, use: session.ParseEnv()
TRIMMER_API_USERNAME
TRIMMER_API_PASSWORD

Using the Go SDK

package main

import (
	"log"
    "trimmer.io/go-trimmer"
    "trimmer.io/go-trimmer/user"
    "trimmer.io/go-trimmer/session"
)

func main() {

// Direct calls use a default http client configuration and a global login
// session. You may create long-lived API client objects and pass them
// custom configurations if needed and use custom login sessions.
//
// For convenience and security you can parse the process environment for
// exported TRIMMER_API_* variables
//
//  TRIMMER_API_USERNAME
//  TRIMMER_API_PASSWORD
//

// get login data from ENV and store session in global LoginSession struct
if err := session.Login(session.ParseEnv()); err != nil {
	log.Fatalln(err)
}
defer session.Logout()

// get the currently logged in user (will read the global LoginSession)
me, err := user.Me()
if err != nil {
	log.Fatalln(err)
}

Documentation

Index

Constants

View Source
const (
	PERM_NONE    = 0
	PERM_READ    = 0x1
	PERM_COPY    = 0x2
	PERM_WRITE   = 0x4
	PERM_CREATE  = 0x8
	PERM_DELETE  = 0x10
	PERM_ADMIN   = 0x20
	PERM_RELEASE = 0x40
	PERM_CHOWN   = 0x80
	PERM_MAX     = 0xFF
	// mask for user-settable permissions
	PERM_MASK_USER   = 0x1F
	PERM_MASK_SYSTEM = 0xE0
)
View Source
const (
	API_EMBED_UNDEFINED = 0
	API_EMBED_MEDIA     = 1 << (iota - 1)
	API_EMBED_STATS
	API_EMBED_WORKSPACE
	API_EMBED_OWNER
	API_EMBED_AUTHOR
	API_EMBED_ORIGIN
	API_EMBED_META
	API_EMBED_PERMS
	API_EMBED_DETAILS
	API_EMBED_URLS
	API_EMBED_ALL = 0x3FF
)
View Source
const (
	META_NOFLAG = 0
	META_CREATE = 1 << (iota - 1)
	META_REPLACE
	META_DELETE
	META_APPEND
	META_UNIQUE
	META_NOFAIL
	META_DEFAULT = META_CREATE | META_REPLACE | META_DELETE | META_UNIQUE
	META_MERGE   = META_CREATE | META_REPLACE | META_UNIQUE | META_NOFAIL
	META_ADD     = META_CREATE | META_UNIQUE | META_NOFAIL
)
View Source
const (
	LIST_GET_LIMIT = 5
	LIST_MAX_LIMIT = 200
)
View Source
const (
	TRIMMER_API_KEY_KEY    = "TRIMMER_API_KEY"
	TRIMMER_API_SERVER_KEY = "TRIMMER_API_SERVER"
	TRIMMER_CDN_SERVER_KEY = "TRIMMER_CDN_SERVER"
)

Key is the Trimmer API key used globally in the binding.

View Source
const (
	API_SCOPE_PUBLIC   = "public"
	API_SCOPE_PRIVATE  = "private"
	API_SCOPE_UPLOAD   = "upload"
	API_SCOPE_PUBLISH  = "publish"
	API_SCOPE_ADMIN    = "admin"
	API_SCOPE_CALLBACK = "callback"
)
View Source
const (
	TRIMMER_USERNAME_KEY     = "TRIMMER_API_USERNAME"
	TRIMMER_PASSWORD_KEY     = "TRIMMER_API_PASSWORD"
	TRIMMER_CLIENT_TOKEN_KEY = "TRIMMER_CLIENT_TOKEN"
)

--------------------------------------------------------------------------- Environment Variables

View Source
const (
	TAG_MAX_CONTENT_LENGTH = 140
	TAG_MAX_DATA_LENGTH    = 8192
)
View Source
const ApiVersion = "2018-08-04"

apiversion is the currently supported API version

View Source
const ClientVersion = "1.3"

clientversion is the binding version

View Source
const DefaultPartSize = int64(16) << 20

DefaultPartSize defines the minimum size in bytes for upload parts (= 16 MiB).

View Source
const MaxRetries = 10

MaxRetries is the maximum number of times the client tries issuing a call after transient errors (io, network or 5xx server errors), the first retry is performed immediately, subsequent retries will wait

View Source
const RetryBackoffTime = time.Duration(5) * time.Second

RetryBackoffTime defines the time instant that is added to the wait time before a new retry attempt is made. The first retry is sent immediately, any subsequent retry will wait an additional RetryBackoffTime longer.

View Source
const TotalBackends = 2

Totalbackends is the total number of Trimmer API endpoints supported by the binding.

Variables

View Source
var (
	ENilPointer   = TrimmerError{Message: "unexpected nil pointer", /* contains filtered or unexported fields */}
	EIDMissing    = TrimmerError{Message: "id value missing", /* contains filtered or unexported fields */}
	EParamMissing = TrimmerError{Message: "missing parameter", /* contains filtered or unexported fields */}
	EParamInvalid = TrimmerError{Message: "invalid parameter", /* contains filtered or unexported fields */}
)
View Source
var LogLevel = 2

LogLevel is the logging level for this library. 0: no logging 1: errors only 2: errors + informational (default) 3: errors + informational + debug

View Source
var Logger *log.Logger

Logger controls how the SDK performs logging at a package level. It is useful to customise if you need it prefixed for your application to meet other requirements

View Source
var UploadPartSize = DefaultPartSize

minimal size of upload parts

View Source
var UserAgent string

user-defined User agent string

Functions

func ApiScopes

func ApiScopes(scopes ...ApiAccessScope) string

ApiScopes is a wrapper function used for concatenating multiple scopes for requests.

func IsNilUUID

func IsNilUUID(u string) bool

func PrintApiEmbedFlag

func PrintApiEmbedFlag(f ApiEmbedFlags) string

func PrintMetaFlag

func PrintMetaFlag(f MetaFlags) string

func SetBackend

func SetBackend(backend SupportedBackend, b Backend)

SetBackend sets the backend used in the binding.

func SetHTTPClient

func SetHTTPClient(backend SupportedBackend, client *http.Client)

SetHTTPClient overrides the default HTTP client. This is useful if you're running in a Google AppEngine environment where the http.DefaultClient is not available.

Types

type AccessAction

type AccessAction struct {
	SubjectId   string         `json:"subjectId"`
	SubjectType AclSubjectType `json:"subjectType"`
	AccessClass AccessClass    `json:"access"`
	IpRange     string         `json:"ipRange"`
	ValidAfter  time.Time      `json:"validAfter"`
	ValidUntil  time.Time      `json:"validUntil"`
	Perm        Permission     `json:"permissions"`
}

type AccessClass

type AccessClass string
const (
	ACCESS_INVALID  AccessClass = ""
	ACCESS_PUBLIC   AccessClass = "public"
	ACCESS_PRIVATE  AccessClass = "private"
	ACCESS_PERSONAL AccessClass = "personal"
)

type AclObjectType

type AclObjectType string

type AclSubjectType

type AclSubjectType string

type AnalyzerOptions

type AnalyzerOptions struct {
	ExtractMetadata        bool `json:"metadata"`
	ExtractDynamicMetadata bool `json:"dynamicMetadata"`
	ExtractLook            bool `json:"look"`
	ExtractThumbnail       bool `json:"thumbnail"`
}

type ApiAccessScope

type ApiAccessScope string

ApiAccessScope is the list of allowed values for login session scopes allowed values are "public", "private", "upload", "publish", "admin", "callback"

type ApiEmbedFlags

type ApiEmbedFlags int64

func ParseApiEmbedFlag

func ParseApiEmbedFlag(s string) ApiEmbedFlags

func ParseApiEmbedFlags

func ParseApiEmbedFlags(s string) (ApiEmbedFlags, error)

func (ApiEmbedFlags) Complement

func (f ApiEmbedFlags) Complement(b ApiEmbedFlags) bool

func (ApiEmbedFlags) Contains

func (f ApiEmbedFlags) Contains(b ApiEmbedFlags) bool

func (ApiEmbedFlags) IsValid

func (f ApiEmbedFlags) IsValid() bool

func (ApiEmbedFlags) MarshalText

func (f ApiEmbedFlags) MarshalText() ([]byte, error)

func (*ApiEmbedFlags) Scan

func (f *ApiEmbedFlags) Scan(value interface{}) error

SQL conversion

func (ApiEmbedFlags) String

func (f ApiEmbedFlags) String() string

func (*ApiEmbedFlags) UnmarshalText

func (f *ApiEmbedFlags) UnmarshalText(data []byte) error

func (ApiEmbedFlags) Value

func (f ApiEmbedFlags) Value() (driver.Value, error)

type ApiKey

type ApiKey string

user-settable API key

var Key ApiKey

type ArriSDKConfig

type ArriSDKConfig struct {
	Version   string  `json:"version"`    // colorimetric processing version: 5.0
	Quality   string  `json:"quality"`    // quality mode: HQ, proxy1, proxy2
	Debayer   string  `json:"debayer"`    // debayer algorithm: ADA-1 to ADA-5 (SW/HW)
	Denoise   float32 `json:"denoise"`    // denoising strength: 0.0(off) 1.0 to 3.5
	TuneRed   int     `json:"tune_red"`   // fine-tuning ADA-5 SW: 0 to 100
	TuneGreen int     `json:"tune_green"` // fine-tuning ADA-5 SW: 0 to 100
	TuneBlue  int     `json:"tune_blue"`  // fine-tuning ADA-5 SW: 0 to 100
	Cct       float32 `json:"cct"`        // correlated color temperatore: 2000/3200 to 7000/11000
	Tint      float32 `json:"tint"`       // -12.0 to 12.0
	Crispness float32 `json:"crispness"`  // downscale crispness: 0.0 to 3.0
	ISO       int     `json:"iso"`        // AsaLUT ISO value: 50 to 500/1600/3200 depending on camera
}

type Asset

type Asset struct {
	ID          string           `json:"assetId"`
	State       AssetState       `json:"state"`
	AccountId   string           `json:"accountId"`
	WorkspaceId string           `json:"workspaceId"`
	AuthorId    string           `json:"authorId"`
	OriginId    string           `json:"originId"`
	ParentId    string           `json:"parentId"`
	Uuid        string           `json:"uuid"`
	Version     string           `json:"version"`
	Locked      bool             `json:"locked"`
	AccessClass AccessClass      `json:"access"`
	CreatedAt   time.Time        `json:"createdAt"`
	UpdatedAt   time.Time        `json:"updatedAt"`
	Statistics  *AssetStatistics `json:"stats"`
	Permissions *Permissions     `json:"perms"`
	Workspace   *Workspace       `json:"workspace"`
	Author      *User            `json:"author"`
	Origin      *AssetOrigin     `json:"origin"`
	Poster      []*MediaEmbed    `json:"poster"`
	Thumbnail   []*MediaEmbed    `json:"thumbnail"`
	Metadata    *MetaDocument    `json:"meta"`
	Revision    string           `json:"revision"`
}

Asset is the resource representing a Trimmer asset.

type AssetAnalyzeParams

type AssetAnalyzeParams struct {
	MediaId string           `json:"-"`
	Options *AnalyzerOptions `json:"options"`
	Embed   ApiEmbedFlags    `json:"embed,omitempty"`
}

AssetAnalyzeParams is the set of parameters that can be used to analyze asset media.

type AssetCountParams

type AssetCountParams struct {
	Download bool          `json:"download,omitempty"`
	View     bool          `json:"view,omitempty"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

AssetCountParams is the set of parameters that can be used to increase public asset counters.

type AssetForkParams

type AssetForkParams struct {
	WorkspaceId    string        `json:"workspaceId,omitempty"`
	MediaIn        int64         `json:"mediaIn,omitempty"`
	MediaOut       int64         `json:"mediaOut,omitempty"`
	AccessClass    AccessClass   `json:"access,omitempty"`
	ExcludeRoles   MediaRoleList `json:"excludeRoles,omitempty"`
	ExcludeTags    TagLabelList  `json:"excludeTags,omitempty"`
	MetadataFilter string        `json:"metaFilter,omitempty"`
	Version        string        `json:"version,omitempty"`
	Locked         bool          `json:"locked,omitempty"`
	Embed          ApiEmbedFlags `json:"embed,omitempty"`
}

AssetActivationParams is the set of parameters that can be used to activate a asset subscription.

type AssetList

type AssetList []*Asset

AssetList is representing a slice of Asset structs.

func (AssetList) SearchId

func (l AssetList) SearchId(id string) (int, *Asset)

type AssetListEvent

type AssetListEvent string

AssetEventType is the list of allowed values for the asset list event field. Allowed values are "created", "updated"

type AssetListParams

type AssetListParams struct {
	ListParams
	IDs         []string       `json:"id,omitempty"`
	UUID        string         `json:"uuid,omitempty"`
	AccessClass AccessClass    `json:"access,omitempty"`
	State       AssetState     `json:"state,omitempty"`
	Version     string         `json:"version,omitempty"`
	Original    bool           `json:"original,omitempty"`
	Head        bool           `json:"head,omitempty"`
	Event       AssetListEvent `json:"event,omitempty"`
	Embed       ApiEmbedFlags  `json:"embed,omitempty"`
}

AssetListParams is the set of parameters that can be used when listing assets.

type AssetOrigin

type AssetOrigin struct {
	AccountId   string `json:"accountId"`
	WorkspaceId string `json:"workspaceId"`
	AssetId     string `json:"assetId"`
}

type AssetParams

type AssetParams struct {
	Title       string        `json:"title,omitempty"`
	Description string        `json:"description,omitempty"`
	Notes       string        `json:"notes,omitempty"`
	Copyright   string        `json:"copyright,omitempty"`
	License     string        `json:"license,omitempty"`
	Access      AccessClass   `json:"access,omitempty"`
	UUID        string        `json:"uuid,omitempty"`
	Actions     MetaValueList `json:"actions,omitempty"`
	Metadata    *MetaDocument `json:"meta,omitempty"`
	Embed       ApiEmbedFlags `json:"embed,omitempty"`
}

AssetParams is the set of parameters that can be used to create an asset.

type AssetSnapshotParams

type AssetSnapshotParams struct {
	MediaId  string        `json:"-"`
	VolumeId string        `json:"volumeId,omitempty"`
	Timecode string        `json:"timecode,omitempty"`
	Role     MediaRole     `json:"role,omitempty"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

AssetSnapshotParams is the set of parameters that can be used to create a still-image snapshot from a video sequence.

type AssetState

type AssetState string

AssetState is the list of allowed values for the asset status. Allowed values are "nomedia", "uploading", "analyzing", "transcoding", "attention", "ready", "blocked", "banned", "deleting", "cleaning", "deleted"

type AssetStatistics

type AssetStatistics struct {
	Links     int64 `json:"links"`
	Forks     int64 `json:"forks"`
	Tags      int64 `json:"tags"`
	Media     int64 `json:"media"`
	Time      int64 `json:"time"`
	Size      int64 `json:"size"`
	Files     int64 `json:"files"`
	Versions  int64 `json:"versions"`
	Views     int64 `json:"views"`
	Downloads int64 `json:"downloads"`
}

AssetStatistics is the resource representing a Asset quota counters.

type AssetTranscodeParams

type AssetTranscodeParams struct {
	Match   MediaMatch         `json:"match"`
	Options *TranscoderOptions `json:"options"`
	Embed   ApiEmbedFlags      `json:"embed,omitempty"`
}

AssetTranscodeParams is the set of parameters that can be used to transcode asset media.

type AssetTrimParams

type AssetTrimParams struct {
	MediaId  string        `json:"-"`
	Timecode string        `json:"timecode,omitempty"`
	MediaIn  time.Duration `json:"mediaIn,omitempty"`
	MediaOut time.Duration `json:"mediaOut,omitempty"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

AssetTrimParams is the set of parameters that can be used to change media in/out points and start timecode within an asset bundle.

type AssetUpdateParams

type AssetUpdateParams struct {
	State AssetState    `json:"state"`
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

AssetUpdateParams is the set of parameters that can be used to create an asset.

type AudioAttr

type AudioAttr struct {
	OriginID      string         `json:"originId,omitempty"`      // origin media (used by proxies)
	UUID          string         `json:"uuid,omitempty"`          // global unique id for track
	OriginUUID    string         `json:"originUuid,omitempty"`    // global unique id for origin track
	TrackNum      int            `json:"trackNum,omitempty"`      // track number in multi-track containers
	Lang          IsoLanguage    `json:"lang,omitempty"`          // ISO language code
	Channels      int            `json:"channels,omitempty"`      // audio channels
	ChannelLayout AudioLayout    `json:"channelLayout,omitempty"` // audio channel layout
	SampleRate    int            `json:"sampleRate,omitempty"`    // audio sampling rate (44100, 48000, 96000, ...)
	SampleBits    int            `json:"sampleBits,omitempty"`    // sample width 8/16/24/32 bit
	SampleFormat  string         `json:"sampleFormat,omitempty"`  // sample format
	Codec         AudioCodec     `json:"codec,omitempty"`         // codec name
	Profile       string         `json:"profile,omitempty"`       // codec profile/level
	Bitrate       int64          `json:"bitrate,omitempty"`       // audio encoding bitrate
	Duration      time.Duration  `json:"duration,omitempty"`      // runtime in ms
	Hashes        hash.HashBlock `json:"hashes,omitempty"`        // content checksums
	Filename      string         `json:"filename,omitempty"`      // media filename (e.g for DASH)
	Size          int64          `json:"size,omitempty"`          // file size
	Url           string         `json:"url,omitempty"`           // dynamic access url
}

type AudioCodec

type AudioCodec string

type AudioLayout

type AudioLayout string

type AudioMixConfig

type AudioMixConfig struct {
	Layout AudioLayout `json:"layout"`
}

type Backend

type Backend interface {
	GetUrl() string
	Call(ctx context.Context, method, path string, key ApiKey, sess *Session, headers *CallHeaders, data, v interface{}) error
	CallMultipart(ctx context.Context, method, path string, key ApiKey, sess *Session, headers *CallHeaders, body io.Reader, v interface{}) error
	CallChecksum(ctx context.Context, method, path string, key ApiKey, sess *Session, headers *CallHeaders, flags hash.HashFlags, body io.Reader, resp io.Writer, v interface{}) (int64, hash.HashBlock, hash.HashBlock, error)
}

Backend is an interface for making calls against a Trimmer service. This interface exists to enable mocking for tests if needed.

func GetBackend

func GetBackend(backend SupportedBackend) Backend

GetBackend returns the currently used backend in the binding.

type BackendConfiguration

type BackendConfiguration struct {
	Type       SupportedBackend
	URL        string
	HTTPClient *http.Client
}

BackendConfiguration is the internal implementation for making HTTP calls to Trimmer.

func (BackendConfiguration) Call

func (s BackendConfiguration) Call(ctx context.Context, method, path string, key ApiKey, sess *Session, headers *CallHeaders, data, v interface{}) error

Call is the Backend.Call implementation for invoking Trimmer APIs.

func (BackendConfiguration) CallChecksum

func (s BackendConfiguration) CallChecksum(ctx context.Context, method, path string, key ApiKey, sess *Session, headers *CallHeaders, flags hash.HashFlags, r io.Reader, w io.Writer, v interface{}) (int64, hash.HashBlock, hash.HashBlock, error)

func (BackendConfiguration) CallMultipart

func (s BackendConfiguration) CallMultipart(ctx context.Context, method, path string, key ApiKey, sess *Session, headers *CallHeaders, body io.Reader, v interface{}) error

func (*BackendConfiguration) Do

func (s *BackendConfiguration) Do(ctx context.Context, req *http.Request, sess *Session, v interface{}, responseHeaders *CallHeaders) (int64, hash.HashBlock, error)

Do is used by Call to execute an API request and parse the response. It uses the backend's HTTP client to execute the request and unmarshals the response into v. It also handles unmarshaling errors returned by the API.

This function also handles binary responses like downloading data.

func (BackendConfiguration) GetUrl

func (s BackendConfiguration) GetUrl() string

func (*BackendConfiguration) NewRequest

func (s *BackendConfiguration) NewRequest(method, path string, key ApiKey, sess *Session, headers *CallHeaders, body io.Reader) (*http.Request, error)

NewRequest is used by Call to generate an http.Request. It adds appropriate headers.

type Backends

type Backends struct {
	API, CDN Backend
}

Backends are the currently supported endpoints.

func NewBackends

func NewBackends(httpClient *http.Client) *Backends

NewBackends creates a new set of backends with the given HTTP client. You should only need to use this for testing purposes or on App Engine.

type Box2i

type Box2i struct {
	Left   int `json:"left"`
	Top    int `json:"top"`
	Right  int `json:"right"`
	Bottom int `json:"bottom"`
}

type CDL

type CDL struct {
	Mode       CDLMode `json:"mode,omitempty"` // apply in transcode step
	OffsetB    float32 `json:"offsetB"`        // = lift (dark tones)
	OffsetG    float32 `json:"offsetG"`        //
	OffsetR    float32 `json:"offsetR"`        //
	PowerB     float32 `json:"powerB"`         // = gamma (mid-tones)
	PowerG     float32 `json:"powerG"`         //
	PowerR     float32 `json:"powerR"`         //
	SlopeB     float32 `json:"slopeB"`         // = gain (highlights)
	SlopeG     float32 `json:"slopeG"`         //
	SlopeR     float32 `json:"slopeR"`         //
	Saturation float32 `json:"saturation"`     // all channels
}

type CDLMode

type CDLMode string

color pipeline step when CDL is applied

type CallHeaders

type CallHeaders struct {
	// in & out parameters
	ContentType        string         // Content-Type
	ContentDisposition string         // Content-Disposition
	Accept             string         // Accept
	Size               int64          // Content-Length
	Hashes             hash.HashBlock // Content-MD5, X-Trimmer-Hash

	// out only
	OAuthScopes string // X-OAuth-Scopes
	SessionId   string // X-Session-Id
	RequestId   string // X-Request-Id
	Runtime     string // X-Runtime
}

Optional HTTP header data used as call in and out parameter

type ClientToken

type ClientToken string

type ColorConfig

type ColorConfig struct {
	Model     ColorModel     `json:"model,omitempty"`     // request color space conversion
	Primaries ColorPrimaries `json:"primaries,omitempty"` // request color space conversion
	Transfer  ColorTransfer  `json:"transfer,omitempty"`  // request color space conversion
	Range     ColorRange     `json:"range,omitempty"`     // request color range conversion
	CDL       *CDL           `json:"cdl,omitempty"`       // ASC CDL values
}

type ColorLocation

type ColorLocation string

type ColorModel

type ColorModel string

type ColorPrimaries

type ColorPrimaries string

type ColorRange

type ColorRange string

type ColorSampling

type ColorSampling string

type ColorTransfer

type ColorTransfer string

type CropConfig

type CropConfig struct {
	Mode      CropMode `json:"mode,omitempty"`
	Inset     *Box2i   `json:"inset,omitempty"`
	Padding   *Box2i   `json:"padding,omitempty"`
	FillColor string   `json:"fill_color,omitempty"` // 0xFFFFFFFF [RRGGBBAA]
}

type CropMode

type CropMode string

type DataAttr

type DataAttr struct {
	OriginID   string         `json:"originId,omitempty"`   // origin media (used by proxies)
	UUID       string         `json:"uuid,omitempty"`       // global unique id for track
	OriginUUID string         `json:"originUuid,omitempty"` // global unique id for origin track
	TrackNum   int            `json:"trackNum,omitempty"`   // track number in multi-track containers
	Duration   time.Duration  `json:"duration,omitempty"`   // data stream runtime
	Codec      string         `json:"codec,omitempty"`      // codec name
	DataType   string         `json:"dataType,omitempty"`   // track datatype
	Hashes     hash.HashBlock `json:"hashes,omitempty"`     // content checksums
	Filename   string         `json:"filename,omitempty"`   // media filename, e.g. for sidecar data
	Size       int64          `json:"size,omitempty"`       // file size
	Url        string         `json:"url,omitempty"`        // dynamic access url
}

type DocumentAttr

type DocumentAttr struct {
	OriginID   string         `json:"originId,omitempty"`   // origin media (used by proxies)
	UUID       string         `json:"uuid,omitempty"`       // global unique id for track
	OriginUUID string         `json:"originUuid,omitempty"` // global unique id for origin track
	TrackNum   int            `json:"trackNum,omitempty"`   // track number in multi-track containers
	Pages      int            `json:"pages,omitempty"`      // page number
	Lang       IsoLanguage    `json:"lang,omitempty"`       // ISO language code
	DataType   string         `json:"dataType,omitempty"`   // doc datatype
	Hashes     hash.HashBlock `json:"hashes,omitempty"`     // content checksums
	Filename   string         `json:"filename,omitempty"`   // media filename, e.g. for sidecar data
	Size       int64          `json:"size,omitempty"`       // file size
	Url        string         `json:"url,omitempty"`        // dynamic access url
}

type EmbedParams

type EmbedParams struct {
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

EmbedParams is the helper that only contains an embed property.

type Error

type Error interface {
	error
	IsUsage() bool
	IsInternal() bool
	IsApi() bool
	Cause() error
}

type Event

type Event struct {
	ID          string            `json:"eventId"`
	AccountId   string            `json:"accountId"`
	AuthorId    string            `json:"authorId"`
	WorkspaceId string            `json:"workspaceId"`
	CreatedAt   time.Time         `json:"createdAt"`
	Key         EventKey          `json:"eventKey"`
	Type        EventType         `json:"eventType"`
	Data        map[string]string `json:"data"`
}

Event is the resource representing a Trimmer audit event.

type EventKey

type EventKey string

EventKey is the list of allowed values for events.

type EventList

type EventList []*Event

func (EventList) SearchId

func (l EventList) SearchId(id string) (int, *Event)

type EventListParams

type EventListParams struct {
	ListParams
	Key   EventKey      `json:"eventKey,omitempty"`
	Type  EventType     `json:"eventType,omitempty"`
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

EventListParams is the set of parameters that can be used when listing events.

type EventType

type EventType string

EventType is the list of allowed values for groups of events. Allowed values are "account", "acl", "application", "asset", "action", "auth", "billing", "media", "invite", "job", "stash", "tag", "workspace", "team", "volume", "organization".

type FileInfo

type FileInfo struct {
	Filename   string         `json:"filename,omitempty"`
	Role       MediaRole      `json:"role,omitempty"`
	Mimetype   string         `json:"mimetype,omitempty"`
	Size       int64          `json:"size,omitempty"`
	Etag       string         `json:"etag,omitempty"`
	Hashes     hash.HashBlock `json:"hashes,omitempty"`
	UUID       string         `json:"uuid,omitempty"`
	VolumeUUID string         `json:"volumeUuid,omitempty"`
	Url        string         `json:"url,omitempty"`
	Embed      ApiEmbedFlags  `json:"embed,omitempty"`
}

FileInfo represents upload and download file metadata used for direct image uploads and media upload into volumes.

type FileInfoList

type FileInfoList []*FileInfo

type FlipMode

type FlipMode string

type GeneralConfig

type GeneralConfig struct {
	Profile           string         `json:"profile"`             // target transcode profile
	Width             int            `json:"width"`               // optional width override
	Height            int            `json:"height"`              // optional height override
	Role              *MediaRole     `json:"role"`                // target role
	Relation          *MediaRelation `json:"relation"`            // target relation
	Timecode          *string        `json:"timecode"`            // start timecode
	StartFrameNumber  int            `json:"start_frame_number"`  // start frame number for output (default: 1)
	FrameNumberDigits int            `json:"frame_number_digits"` // frame number precision for output (default: 7)
}

type GridAttr

type GridAttr struct {
	OriginID       string         `json:"originId,omitempty"`       // origin media (used by proxies)
	UUID           string         `json:"uuid,omitempty"`           // global unique id for track
	OriginUUID     string         `json:"originUuid,omitempty"`     // global unique id for origin track
	TrackNum       int            `json:"trackNum,omitempty"`       // track number in multi-track containers
	FrameCount     int            `json:"frameCount,omitempty"`     // number of frames
	GridX          int            `json:"gridX,omitempty"`          // horizontal grid fields
	GridY          int            `json:"gridY,omitempty"`          // vertical grid fields
	Width          int            `json:"width"`                    // total width (may contain borders)
	Height         int            `json:"height"`                   // total height (may contain borders)
	ActiveWidth    int            `json:"activeWidth"`              // total display width
	ActiveHeight   int            `json:"activeHeight"`             // total display height
	Depth          int            `json:"depth,omitempty"`          // color depth 8/10/12/14/16/24 bit
	Codec          VideoCodec     `json:"codec,omitempty"`          // codec name
	PixelFormat    PixelFormat    `json:"pixelFormat,omitempty"`    // image pixel format (RGB)
	ColorModel     ColorModel     `json:"colorModel,omitempty"`     // image color space (sRGB)
	ColorRange     ColorRange     `json:"colorRange,omitempty"`     // color range (full or limited range)
	ColorPrimaries ColorPrimaries `json:"colorPrimaries,omitempty"` // color primaries RGB/XYZ mapping
	ColorTransfer  ColorTransfer  `json:"colorTransfer,omitempty"`  // color transfer (linearization, gamma)
	ColorLocation  ColorLocation  `json:"colorLocation,omitempty"`  // color location (chroma subsample position)
	Sar            float32        `json:"sar,omitempty"`            // sample aspect ratio
	Dar            float32        `json:"dar,omitempty"`            // display aspect ratio
	RateNum        int            `json:"rateNum,omitempty"`        // frame rate numerator
	RateDen        int            `json:"rateDen,omitempty"`        // frame rate denumerator
	Duration       time.Duration  `json:"duration,omitempty"`       // grid runtime
	Hashes         hash.HashBlock `json:"hashes,omitempty"`         // content checksums
	Size           int64          `json:"size,omitempty"`           // file size
	Filename       string         `json:"filename,omitempty"`       // media filename
	Url            string         `json:"url,omitempty"`            // dynamic access url
}

grid of images for quick thumbnail skimming

type ImageAttr

type ImageAttr struct {
	OriginID       string         `json:"originId,omitempty"`       // origin media (used by proxies)
	UUID           string         `json:"uuid,omitempty"`           // global unique id for track
	OriginUUID     string         `json:"originUuid,omitempty"`     // global unique id for origin track
	TrackNum       int            `json:"trackNum,omitempty"`       // track number in multi-track containers
	Width          int            `json:"width"`                    // native width (may contain borders)
	Height         int            `json:"height"`                   // native height (may contain borders)
	ActiveWidth    int            `json:"activeWidth"`              // display width
	ActiveHeight   int            `json:"activeHeight"`             // display height
	Depth          int            `json:"depth,omitempty"`          // color depth 8/10/12/14/16/24 bit
	Sar            float32        `json:"sar,omitempty"`            // sample aspect ratio
	Dar            float32        `json:"dar,omitempty"`            // display aspect ratio
	Codec          VideoCodec     `json:"codec,omitempty"`          // codec name
	PixelFormat    PixelFormat    `json:"pixelFormat,omitempty"`    // image pixel format (RGB24)
	ColorModel     ColorModel     `json:"colorModel,omitempty"`     // image color space (sRGB)
	ColorRange     ColorRange     `json:"colorRange,omitempty"`     // color range (full or limited range)
	ColorPrimaries ColorPrimaries `json:"colorPrimaries,omitempty"` // color primaries RGB/XYZ mapping
	ColorTransfer  ColorTransfer  `json:"colorTransfer,omitempty"`  // color transfer (linearization, gamma)
	ColorLocation  ColorLocation  `json:"colorLocation,omitempty"`  // color location (chroma subsample position)
	Hashes         hash.HashBlock `json:"hashes,omitempty"`         // content checksums
	Size           int64          `json:"size,omitempty"`           // file size
	Filename       string         `json:"filename,omitempty"`       // media filename
	Url            string         `json:"url,omitempty"`            // dynamic access url
}

single and multi-resolution image media

type IsoLanguage

type IsoLanguage string

type Iter

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

Iter provides a convenient interface for iterating over the elements returned from paginated list API calls. Successive calls to the Next method will step through each item in the list, fetching pages of items as needed. Iterators are not thread-safe, so they should not be consumed across multiple goroutines.

func GetIter

func GetIter(params *ListParams, qs *url.Values, query Query) *Iter

GetIter returns a new Iter for a given query and its options.

func GetIterErr

func GetIterErr(err error) *Iter

func (*Iter) Current

func (it *Iter) Current() interface{}

Current returns the most recent item visited by a call to Next.

func (*Iter) Err

func (it *Iter) Err() error

Err returns the error, if any, that caused the Iter to stop. It must be inspected after Next returns false.

func (*Iter) Meta

func (it *Iter) Meta() *ListMeta

Meta returns the list metadata.

func (*Iter) Next

func (it *Iter) Next() bool

Next advances the Iter to the next item in the list, which will then be available when calling Current() Next() returns false when the iterator stops at the end of the list.

type Job

type Job struct {
	ID          string           `json:"jobId"`
	State       JobState         `json:"state"`
	Type        JobType          `json:"type"`
	Queue       string           `json:"queue"`
	AccountId   string           `json:"accountId"`
	WorkspaceId string           `json:"workspaceId"`
	AuthorId    string           `json:"authorId"`
	MediaCount  int              `json:"mediaCount"`
	AssetId     string           `json:"assetId"`
	MediaId     string           `json:"mediaId"`
	VolumeId    string           `json:"volumeId"`
	CreatedAt   time.Time        `json:"createdAt"`
	UpdatedAt   time.Time        `json:"updatedAt"`
	ExpiresAt   time.Time        `json:"expiresAt"`
	Progress    int              `json:"progress"`
	Asset       *Asset           `json:"asset"`
	Media       *Media           `json:"media"`
	Volume      *Volume          `json:"volume"`
	Account     *User            `json:"account"`
	Workspace   *Workspace       `json:"workspace"`
	Author      *User            `json:"author"`
	Error       *TrimmerError    `json:"error"`
	Statistics  *json.RawMessage `json:"stats"`
	Options     *json.RawMessage `json:"options"`
}

Job is the resource representing an ongoing activity on Trimmer.

type JobList

type JobList []*Job

JobList is representing a slice of Job structs.

func (JobList) SearchId

func (l JobList) SearchId(id string) (int, *Job)

type JobListParams

type JobListParams struct {
	ListParams
	State    JobState      `json:"state,omitempty"`
	Type     JobType       `json:"type,omitempty"`
	Queue    string        `json:"queue,omitempty"`
	AuthorId string        `json:"authorId,omitempty"`
	MediaId  string        `json:"mediaId,omitempty"`
	VolumeId string        `json:"volumeId,omitempty"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

JobListParams is the set of parameters that can be used when listing workspaces.

type JobParams

type JobParams struct {
	Progress int           `json:"progress,omitempty"`
	State    JobState      `json:"state,omitempty"`
	Priority int           `json:"priority,omitempty"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

JobParams is the set of parameters that can be used to update jobs.

type JobState

type JobState string

JobState is the list of allowed values for the job state of a status object. Allowed values are "created", "queued", "running", "complete", "failed", "aborted" and special state groups "all", "active", "done".

type JobType

type JobType string

JobType is the list of allowed values for the operation in progress.

type Link struct {
	ID        string        `json:"linkId"`
	OwnerId   string        `json:"ownerId"`
	OwnerName string        `json:"ownerName"`
	AssetId   string        `json:"assetId"`
	StashId   string        `json:"stashId"`
	AuthorId  string        `json:"authorId"`
	MediaIn   time.Duration `json:"mediaIn"`
	MediaOut  time.Duration `json:"mediaOut"`
	Duration  time.Duration `json:"duration"`
	CreatedAt time.Time     `json:"createdAt"`
	UpdatedAt time.Time     `json:"updatedAt"`
	Owner     *Workspace    `json:"owner"`
	Stash     *Stash        `json:"stash"`
	Asset     *Asset        `json:"asset"`
	Author    *User         `json:"author"`
}

Link is the resource representing a Trimmer stash.

type LinkList []*Link

func (LinkList) SearchId

func (l LinkList) SearchId(id string) (int, *Link)

type LinkListParams

type LinkListParams struct {
	ListParams
	AssetId  string        `json:"assetId,omitempty"`
	StashId  string        `json:"stashId,omitempty"`
	AuthorId string        `json:"authorId,omitempty"`
	Version  string        `json:"version,omitempty"`
	Original bool          `json:"original,omitempty"`
	Head     bool          `json:"head,omitempty"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

LinkListParams is the set of parameters that can be used when listing stashes.

type LinkParams

type LinkParams struct {
	AssetId  string        `json:"assetId"`
	MediaIn  time.Duration `json:"mediaIn,omitempty"`
	MediaOut time.Duration `json:"mediaOut,omitempty"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

LinkParams is the set of parameters that can be used to create and update a invitations.

type ListMeta

type ListMeta struct {
	Count int    `json:"count"`
	MaxId string `json:"maxId"`
	MinId string `json:"minId"`
	From  int64  `json:"from"` // timecode in ms (tags only)
	To    int64  `json:"to"`   // timecode in ms (tags only)
	Total int    `json:"-"`    // internal use, not sent by server
	More  bool   `json:"-"`    // internal use, not sent by server
}

ListMeta is the structure that contains the common properties of List iterators. The Count property is only populated if the total_count include option is passed in (see tests for example).

type ListParams

type ListParams struct {
	Count  int       `json:"count,omitempty"`
	Before time.Time `json:"before,omitempty"`
	After  time.Time `json:"after,omitempty"`
	MaxId  string    `json:"maxId,omitempty"`
	MinId  string    `json:"minId,omitempty"`
}

ListParams is the structure that contains the common properties of any *ListParams structure.

func (*ListParams) AppendTo

func (p *ListParams) AppendTo(q *url.Values)

AppendTo adds the common parameters to the query string values.

type LoginParams

type LoginParams struct {
	Username string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
	Scopes   string `json:"scopes"`
}

func (LoginParams) IsValid

func (p LoginParams) IsValid() bool

func (*LoginParams) Reset

func (p *LoginParams) Reset()

type ManifestAttr

type ManifestAttr struct {
	OriginID   string `json:"originId,omitempty"`   // origin media (used by proxies)
	UUID       string `json:"uuid,omitempty"`       // global unique id for track
	OriginUUID string `json:"originUuid,omitempty"` // global unique id for origin track
	TrackNum   int    `json:"trackNum,omitempty"`   // track number in multi-track containers
	// only used for embedded manifests (i.e. a manifest is part of a media file collection
	// such as with DASH or HLS, but not when the manifest file is independent, such as
	// for IMF)
	Duration time.Duration  `json:"duration,omitempty"` // track runtime
	Format   MediaFormat    `json:"format,omitempty"`   // storage container: mpd, m3u8, imf, xml
	Mime     string         `json:"mimetype,omitempty"` // mime type
	Hashes   hash.HashBlock `json:"hashes,omitempty"`   // content checksums
	Filename string         `json:"filename,omitempty"` // media filename
	Size     int64          `json:"size,omitempty"`     // file size
	Url      string         `json:"url,omitempty"`      // dynamic access url
}

type Media

type Media struct {
	ID          string         `json:"mediaId"`
	UUID        string         `json:"uuid"`
	State       MediaState     `json:"state"`
	AccountId   string         `json:"accountId"`
	WorkspaceId string         `json:"workspaceId"`
	AuthorId    string         `json:"authorId"`
	Revision    int            `json:"revision"`
	Type        MediaType      `json:"type"`
	Family      MediaFamily    `json:"family"`
	Format      MediaFormat    `json:"format"`
	Role        MediaRole      `json:"role"`
	Mimetype    string         `json:"mimetype"`
	Relation    MediaRelation  `json:"relation"`
	Profile     string         `json:"profile"`
	Timecode    string         `json:"timecode"`
	Duration    time.Duration  `json:"duration"`
	Bitrate     int64          `json:"bitrate"`
	Filename    string         `json:"filename"`
	Size        int64          `json:"size"`
	Hashes      hash.HashBlock `json:"hashes"`
	RecordedAt  time.Time      `json:"recordedAt"`
	UploadedAt  time.Time      `json:"uploadedAt"`
	UpdatedAt   time.Time      `json:"updatedAt"`
	CreatedAt   time.Time      `json:"createdAt"`
	ExpiresAt   time.Time      `json:"expiresAt"`
	Attr        *MediaAttr     `json:"attr"`
	Metadata    *MetaDocument  `json:"meta"`
	Url         string         `json:"url"`
	JobId       string         `json:"jobId"`
	Workspace   *Workspace     `json:"workspace"`
	Account     *User          `json:"account"`
	Author      *User          `json:"author"`
}

Media is the resource representing a Trimmer media.

type MediaAction

type MediaAction struct {
	Match             MediaMatch         `json:"match"`
	TranscoderOptions *TranscoderOptions `json:"transcoderOpts,omitempty"`
	AnalyzerOptions   *AnalyzerOptions   `json:"analyzerOpts,omitempty"`
	RenderOptions     *RenderOptions     `json:"renderOpts,omitempty"`
	VolumeOptions     *VolumeOptions     `json:"volumeOpts,omitempty"`
}

type MediaAttr

type MediaAttr struct {
	References []*MediaReference `json:"refs,omitempty"`
	TrackIndex []*MediaTrack     `json:"tracks,omitempty"`
	Video      []*VideoAttr      `json:"video,omitempty"`
	Audio      []*AudioAttr      `json:"audio,omitempty"`
	Sequence   []*SequenceAttr   `json:"sequence,omitempty"`
	Image      []*ImageAttr      `json:"image,omitempty"`
	Grid       []*GridAttr       `json:"grid,omitempty"`
	Subtitle   []*SubtitleAttr   `json:"subtitle,omitempty"`
	Data       []*DataAttr       `json:"data,omitempty"`
	Document   []*DocumentAttr   `json:"document,omitempty"`
	Manifest   []*ManifestAttr   `json:"manifest,omitempty"`
}

func NewMediaAttr

func NewMediaAttr() *MediaAttr

type MediaEmbed

type MediaEmbed struct {
	ID        string            `json:"mediaId"`
	Type      MediaType         `json:"type"`
	Family    MediaFamily       `json:"family"`
	Format    MediaFormat       `json:"format"`
	Relation  MediaRelation     `json:"relation"`
	Mime      string            `json:"mime"`
	Role      MediaRole         `json:"role"`
	CreatedAt time.Time         `json:"createdAt"`
	UpdatedAt time.Time         `json:"updatedAt"`
	ExpiresAt time.Time         `json:"expiresAt"`
	Urls      map[string]string `json:"urls"`
}

MediaEmbed is a short representation of the Trimmer media resource, used when media is embedded into other resources.

type MediaFamily

type MediaFamily string

MediaFamily is the list of allowed values for media format families. Allowed values are "capture", "post", "vfx", "web", "vod", "cinema", "broadcast", "archive", "office".

func (MediaFamily) Contains

func (a MediaFamily) Contains(b MediaFamily) bool

families are hierarchical, so e.g. 'capture' contains 'capture.arri'

type MediaFamilyList

type MediaFamilyList []MediaFamily

func (*MediaFamilyList) Add

func (l *MediaFamilyList) Add(f MediaFamily)

func (MediaFamilyList) Contains

func (l MediaFamilyList) Contains(f MediaFamily) bool

func (MediaFamilyList) ContainsStrict

func (l MediaFamilyList) ContainsStrict(f MediaFamily) bool

func (*MediaFamilyList) Del

func (l *MediaFamilyList) Del(f MediaFamily)

func (MediaFamilyList) String

func (l MediaFamilyList) String() string

type MediaFormat

type MediaFormat string

MediaFormat is the list of allowed values for media format container types. Allowed values are "unkown", "webm", "avi", "m2ts", "mov", "mp4", "flac", "wav", "avchd", "acvintra", "mxf", "cinemadng", "arriraw", "svg", "json", "xml", "jpeg", "png", "r3d", "pdf".

type MediaFormatList

type MediaFormatList []MediaFormat

func (*MediaFormatList) Add

func (l *MediaFormatList) Add(f MediaFormat)

func (MediaFormatList) Contains

func (l MediaFormatList) Contains(f MediaFormat) bool

func (*MediaFormatList) Del

func (l *MediaFormatList) Del(f MediaFormat)

func (MediaFormatList) String

func (l MediaFormatList) String() string

type MediaList

type MediaList []*Media

MediaList is representing a slice of Media structs.

func (MediaList) SearchId

func (l MediaList) SearchId(id string) (int, *Media)

type MediaListEvent

type MediaListEvent string

MediaEventType is the list of allowed values for the asset list event field. Allowed values are "created", "uploaded", "updated", "recorded"

type MediaListKind

type MediaListKind string

MediaListKind is the list of allowed values for a media's kind field. Allowed values are "all", "own", "online", "offline".

type MediaListParams

type MediaListParams struct {
	ListParams
	WorkspaceId string            `json:"-"`
	AuthorId    string            `json:"authorId,omitempty"`
	States      MediaStateList    `json:"state,omitempty"`
	Types       MediaTypeList     `json:"type,omitempty"`
	Formats     MediaFormatList   `json:"format,omitempty"`
	Families    MediaFamilyList   `json:"family,omitempty"`
	Roles       MediaRoleList     `json:"role,omitempty"`
	Relations   MediaRelationList `json:"relation,omitempty"`
	Kind        MediaListKind     `json:"kind,omitempty"`
	UUID        string            `json:"uuid,omitempty"`
	Embed       ApiEmbedFlags     `json:"embed,omitempty"`
}

MediaListParams is the set of parameters that can be used when listing media.

type MediaMatch

type MediaMatch struct {
	Types     MediaTypeList     `json:"types"`
	Families  MediaFamilyList   `json:"families"`
	Roles     MediaRoleList     `json:"roles"`
	Relations MediaRelationList `json:"relations"`
}

type MediaParams

type MediaParams struct {
	Filename   string         `json:"filename"`
	Size       int64          `json:"size"`
	Type       MediaType      `json:"type"`
	Family     MediaFamily    `json:"family"`
	Format     MediaFormat    `json:"format"`
	Relation   MediaRelation  `json:"relation,omitempty"`
	Role       MediaRole      `json:"role,omitempty"`
	Mimetype   string         `json:"mimetype,omitempty"`
	UUID       string         `json:"uuid,omitempty"`
	Timecode   string         `json:"timecode,omitempty"`
	Duration   time.Duration  `json:"duration,omitempty"`
	Bitrate    int64          `json:"bitrate,omitempty"`
	Profile    string         `json:"profile,omitempty"`
	VolumeId   string         `json:"volumeId,omitempty"`
	Hashes     hash.HashBlock `json:"hashes,omitempty"`
	RecordedAt time.Time      `json:"recordedAt,omitempty"`
	Attr       *MediaAttr     `json:"attr,omitempty"`
	Metadata   *MetaDocument  `json:"meta,omitempty"`
	Embed      ApiEmbedFlags  `json:"embed,omitempty"`
}

MediaParams is the set of parameters that can be used to create and update media.

type MediaReference

type MediaReference struct {
	UUID           string        `json:"uuid,omitempty"`       // current track referencing the origin track
	Timecode       string        `json:"startTc,omitempty"`    // current media timecode
	Duration       time.Duration `json:"duration,omitempty"`   // duration [ms] for origin and current
	OriginID       string        `json:"originId,omitempty"`   // origin media id
	OriginUUID     string        `json:"originUuid,omitempty"` // global unique id for origin track
	OriginTimecode string        `json:"originTc,omitempty"`   // source media reference timecode
}

pointer to source media for bookkeeping relations after edits, muxing, etc one reference per track

type MediaRelation

type MediaRelation string

MediaRelation is the list of allowed values for media format relation types. Allowed values are "source", "inter", "proxy", "master", "sidecar".

type MediaRelationList

type MediaRelationList []MediaRelation

func (*MediaRelationList) Add

func (l *MediaRelationList) Add(f MediaRelation)

func (MediaRelationList) Contains

func (l MediaRelationList) Contains(f MediaRelation) bool

func (*MediaRelationList) Del

func (l *MediaRelationList) Del(f MediaRelation)

func (MediaRelationList) String

func (l MediaRelationList) String() string

type MediaRole

type MediaRole string

MediaRole is the list of allowed values for media roles.

func (MediaRole) Contains

func (a MediaRole) Contains(b MediaRole) bool

roles are hierarchical, so e.g. 'video' contains 'video.dailies'

type MediaRoleList

type MediaRoleList []MediaRole

func (*MediaRoleList) Add

func (l *MediaRoleList) Add(r MediaRole)

func (MediaRoleList) Contains

func (l MediaRoleList) Contains(r MediaRole) bool

func (MediaRoleList) ContainsStrict

func (l MediaRoleList) ContainsStrict(r MediaRole) bool

func (*MediaRoleList) Del

func (l *MediaRoleList) Del(r MediaRole)

func (MediaRoleList) String

func (l MediaRoleList) String() string

type MediaRoleMatch

type MediaRoleMatch string

type MediaState

type MediaState string

MediaState is the list of allowed values for a media's status. Allowed values are "created", "uploading", "uploaded", "analyzing", "transcoding", "failed", "ready", "deleting", "deleted",

type MediaStateList

type MediaStateList []MediaState

func (*MediaStateList) Add

func (l *MediaStateList) Add(f MediaState)

func (MediaStateList) Contains

func (l MediaStateList) Contains(f MediaState) bool

func (*MediaStateList) Del

func (l *MediaStateList) Del(f MediaState)

func (MediaStateList) String

func (l MediaStateList) String() string

type MediaTrack

type MediaTrack struct {
	UUID     string    `json:"uuid,omitempty"`     // global unique id for track
	TrackNum int       `json:"trackNum,omitempty"` // track number in multi-track containers
	Type     MediaType `json:"type,omitempty"`     // track type
}

track index entry

type MediaType

type MediaType string

MediaType is the list of allowed values for a media's type. Allowed values are "unknown", "audiovideo", "audio", "video", "subtitle", "geo", "image", "grid", "waveform", "index", "sample", "sequence", "text", "url".

type MediaTypeList

type MediaTypeList []MediaType

func (*MediaTypeList) Add

func (l *MediaTypeList) Add(f MediaType)

func (MediaTypeList) Contains

func (l MediaTypeList) Contains(f MediaType) bool

func (*MediaTypeList) Del

func (l *MediaTypeList) Del(f MediaType)

func (MediaTypeList) String

func (l MediaTypeList) String() string

type MediaUploadCompletionParams

type MediaUploadCompletionParams struct {
	Files FileInfoList  `json:"files"`
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

type Member

type Member struct {
	ID          string      `json:"memberId"`
	AccountID   string      `json:"accountId"`
	AuthorId    string      `json:"authorId"`
	Type        MemberType  `json:"type"`
	State       UserState   `json:"state"`
	Role        MemberRole  `json:"role"`
	Clearance   AccessClass `json:"clearance"`
	UpdatedAt   time.Time   `json:"updatedAt"`
	JoinedAt    time.Time   `json:"joinedAt"`
	WorkspaceId string      `json:"workspaceId"`
	TeamId      string      `json:"teamId"`
	OrgId       string      `json:"orgId"`
	UserId      string      `json:"userId"`
	Author      *User       `json:"author"`
	Org         *Org        `json:"organization"`
	Team        *Team       `json:"team"`
	Workspace   *Workspace  `json:"workspace"`
	User        *User       `json:"user"`
}

Member is the resource representing a Trimmer user who is member of a workspace, organization or team.

type MemberList

type MemberList []*Member

func (MemberList) SearchId

func (l MemberList) SearchId(id string) (int, *Member)

type MemberListParams

type MemberListParams struct {
	ListParams
	State UserState     `json:"state,omitempty"`
	Role  MemberRole    `json:"role,omitempty"`
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

MemberListParams is the set of parameters that can be used when listing memberships.

type MemberParams

type MemberParams struct {
	Role       MemberRole    `json:"role,omitempty"`
	Permission Permission    `json:"perm,omitempty"`
	State      UserState     `json:"state,omitempty"`
	Clearance  AccessClass   `json:"clearance,omitempty"`
	Embed      ApiEmbedFlags `json:"embed,omitempty"`
}

MemberParams is the set of parameters that can be used to create and update memberships.

type MemberRole

type MemberRole string

MemberRole is the list of allowed values for a membership role. Allowed values are "owner", "admin", "member", "guest".

type MemberType

type MemberType string

MemberType is the list of allowed values for a membership type. Allowed values are "org", "team", "work".

type MetaDiffParams

type MetaDiffParams struct {
	V1 string
	V2 string
}

MetaDiffParams is the set of parameters that can be used to generate a unified diff between two versions.

type MetaDocument

type MetaDocument struct {
	Namespaces map[string]string      `json:"namespaces"`
	Models     map[string]interface{} `json:"models"`
}

func (*MetaDocument) GetPath

func (d *MetaDocument) GetPath(path MetaPath) (string, error)

type MetaFlags

type MetaFlags int

func (MetaFlags) Complement

func (f MetaFlags) Complement(b MetaFlags) bool

func (MetaFlags) Contains

func (f MetaFlags) Contains(b MetaFlags) bool

func (MetaFlags) IsValid

func (f MetaFlags) IsValid() bool

func (MetaFlags) MarshalText

func (f MetaFlags) MarshalText() ([]byte, error)

func (MetaFlags) String

func (f MetaFlags) String() string

type MetaGroup

type MetaGroup string

type MetaListParams

type MetaListParams struct {
	ListParams
	AuthorId string        `json:"authorId,omitempty"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

MetaListParams is the set of parameters that can be used when listing an assets' metadata revisions.

type MetaPath

type MetaPath string

func (MetaPath) Fields

func (x MetaPath) Fields() []string

func (MetaPath) IsValid

func (x MetaPath) IsValid() bool

func (MetaPath) Length

func (x MetaPath) Length() int

func (MetaPath) MatchNamespace

func (x MetaPath) MatchNamespace(ns string) bool

func (MetaPath) Namespace

func (x MetaPath) Namespace() string

type MetaQueryParams

type MetaQueryParams struct {
	Filter   string        `json:"-"`
	Revision string        `json:"-"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

MetaQueryParams is the set of parameters that can be used to query asset metadata.

type MetaRevision

type MetaRevision struct {
	RevisionId  string        `json:"revisionId"`
	Hash        string        `json:"hash"`
	AssetId     string        `json:"assetId"`
	AuthorId    string        `json:"authorId"`
	WorkspaceId string        `json:"workspaceId"`
	AccessClass AccessClass   `json:"access"`
	CreatedAt   time.Time     `json:"createdAt"`
	IsFragment  bool          `json:"isFragment"`
	Comment     string        `json:"comment"`
	Action      string        `json:"action"`
	Changed     string        `json:"changed"`
	Metadata    *MetaDocument `json:"metadata"`
	Workspace   *Workspace    `json:"workspace"`
	Author      *User         `json:"author"`
}

type MetaRevisionList

type MetaRevisionList []*MetaRevision

type MetaUpdateParams

type MetaUpdateParams struct {
	Actions  MetaValueList `json:"actions"`
	Revision string        `json:"revision"`
	Comment  string        `json:"comment"`
	Embed    ApiEmbedFlags `json:"embed,omitempty"`
}

MetaUpdateParams is the set of parameters that can be used to update asset metadata.

func (*MetaUpdateParams) Add

func (x *MetaUpdateParams) Add(path MetaPath, value string)

func (*MetaUpdateParams) AddWithFlags

func (x *MetaUpdateParams) AddWithFlags(path MetaPath, value string, flags MetaFlags)

type MetaValue

type MetaValue struct {
	Path  MetaPath  `json:"path"`
	Value string    `json:"value"`
	Flags MetaFlags `json:"flags"`
}

type MetaValueList

type MetaValueList []MetaValue

type MetadataAction

type MetadataAction struct {
	Actions MetaValueList `json:"actions"`
}

type Mount

type Mount struct {
	ID          string        `json:"mountId"`
	WorkspaceId string        `json:"workspaceId"`
	AuthorId    string        `json:"authorId"`
	VolumeId    string        `json:"volumeId"`
	CreatedAt   time.Time     `json:"createdAt"`
	Volume      *Volume       `json:"volume"`
	Workspace   *Workspace    `json:"workspace"`
	Author      *User         `json:"author"`
	Statistics  *VolumeCounts `json:"stats"`
}

Mount is the secondary resource representing a Trimmer volume/workspace mount.

type MountList

type MountList []*Mount

MountList is representing a slice of Mount structs.

func (MountList) SearchId

func (l MountList) SearchId(id string) (int, *Mount)

type MountListParams

type MountListParams struct {
	ListParams
	States   VolumeStateList     `json:"state,omitempty"`
	Types    VolumeTypeList      `json:"type,omitempty"`
	Provider string              `json:"provider,omitempty"`
	Region   string              `json:"region,omitempty"`
	Readonly VolumeReadonlyState `json:"readonly,omitempty"`
	Online   VolumeOnlineState   `json:"online,omitempty"`
	Embed    ApiEmbedFlags       `json:"embed,omitempty"`
}

MountListParams is the set of parameters that can be used when listing volumes.

type MountParams

type MountParams struct {
	Readonly  VolumeReadonlyState `json:"readonly,omitempty"`
	RoleMatch MediaRoleMatch      `json:"roleMatch,omitempty"`
	Embed     ApiEmbedFlags       `json:"embed,omitempty"`
}

MountParams is the set of parameters that can be used to mount a volume into a workspace.

type Org

type Org struct {
	ID               string         `json:"orgId"`
	Name             string         `json:"name"`
	DisplayName      string         `json:"displayName"`
	State            OrgState       `json:"state"`
	Location         string         `json:"location"`
	Description      string         `json:"description"`
	Homepage         string         `json:"homepage"`
	ImageKey         string         `json:"imageKey"`
	Language         string         `json:"language"`
	CreatedAt        time.Time      `json:"createdAt"`
	UpdatedAt        time.Time      `json:"updatedAt"`
	PaymentAt        time.Time      `json:"paymentAt"`
	AccountPlan      string         `json:"plan"`
	BillingId        string         `json:"billingId"`
	BillingAccountId string         `json:"billingAccountId"`
	IsAnnual         bool           `json:"isAnnual"`
	IsTrial          bool           `json:"isTrial"`
	Quantity         int            `json:"quantity"`
	Media            *MediaEmbed    `json:"media"`
	Membership       *Member        `json:"membership"`
	Permissions      *Permissions   `json:"perms"`
	Statistics       *OrgStatistics `json:"stats"`
}

Org is the resource representing a Trimmer organization account.

type OrgList

type OrgList []*Org

func (OrgList) SearchId

func (l OrgList) SearchId(id string) (int, *Org)

type OrgListParams

type OrgListParams struct {
	ListParams
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

OrgListParams is the set of parameters that can be used when listing organizations.

type OrgParams

type OrgParams struct {
	DisplayName string        `json:"displayName,omitempty"`
	ImageId     string        `json:"imageId,omitempty"`
	Homepage    string        `json:"homepage,omitempty"`
	Location    string        `json:"location,omitempty"`
	Description string        `json:"description,omitempty"`
	Embed       ApiEmbedFlags `json:"embed,omitempty"`
}

OrgParams is the set of parameters that can be used when reading, creating or updating organizations.

type OrgState

type OrgState string

OrgState is the list of allowed values for the organization account status. Allowed values are "parked", "created", "active", "inactive", "expired" "blocked", "banned", "deleting", "cleaning", "deleted".

type OrgStatistics

type OrgStatistics struct {
	Workspaces int64 `json:"workspaces"`
	Volumes    int64 `json:"volumes"`
	Members    int64 `json:"members"`
	Teams      int64 `json:"teams"`
	Assets     int64 `json:"assets"`
	Time       int64 `json:"time"`
	Media      int64 `json:"media"`
	Size       int64 `json:"size"`
	Files      int64 `json:"files"`
}

OrgStatistics is the sub-resource representing organization counters.

type Permission

type Permission int

permission bitmask

type Permissions

type Permissions struct {
	Self    Permission `json:"self"`    // caller permissions
	Private Permission `json:"private"` // group permissions
	Public  Permission `json:"public"`  // public permissions
}

permission struct carrying multiple permission bitmasks

type PixelFormat

type PixelFormat string

type Point2i

type Point2i struct {
	Left int `json:"left"`
	Top  int `json:"top"`
}

type Profile

type Profile struct {
	ID          int64           `json:"profileId"`
	Name        string          `json:"name"`
	Description string          `json:"description"`
	Family      MediaFamily     `json:"family"`
	Type        MediaType       `json:"type"`
	Format      MediaFormat     `json:"format"`
	Role        MediaRole       `json:"role"`
	Mime        string          `json:"mimetype"`
	Details     *ProfileDetails `json:"details"`
}

Profile is the resource representing a Trimmer transcoding profile.

type ProfileAudioDetails

type ProfileAudioDetails struct {
	Codec           AudioCodec  `json:"codec"`
	Bitrate         string      `json:"bitrate"`
	Channels        int         `json:"channels"`
	Layout          AudioLayout `json:"layout"`
	Profile         string      `json:"profile"`
	SampleBits      int         `json:"sampleBits"`
	SampleRate      int         `json:"sampleRate"`
	SampleFormat    string      `json:"sampleFormat"`
	SegmentDuration string      `json:"segmentDuration"`
	MinTracks       int         `json:"minTracks"`
	MaxTracks       int         `json:"maxTracks"`
}

type ProfileDetails

type ProfileDetails struct {
	Image    *ProfileImageDetails    `json:"image"`
	Video    *ProfileVideoDetails    `json:"video"`
	Audio    *ProfileAudioDetails    `json:"audio"`
	Subtitle *ProfileSubtitleDetails `json:"subtitle"`
}

type ProfileImageDetails

type ProfileImageDetails struct {
	Width  int     `json:"width"`
	Height int     `json:"height"`
	GridX  int     `json:"gridX"`
	GridY  int     `json:"gridY"`
	Frames int     `json:"frames"`
	Rate   float32 `json:"rate"`
}

type ProfileList

type ProfileList []*Profile

type ProfileListParams

type ProfileListParams struct {
	ListParams
	Types    MediaTypeList   `json:"type,omitempty"`
	Formats  MediaFormatList `json:"format,omitempty"`
	Families MediaFamilyList `json:"family,omitempty"`
	Embed    ApiEmbedFlags   `json:"embed,omitempty"`
}

MediaListParams is the set of parameters that can be used when listing media.

type ProfileSubtitleDetails

type ProfileSubtitleDetails struct {
	Codec   SubtitleCodec `json:"codec"`
	Profile string        `json:"profile"`
}

type ProfileVideoDetails

type ProfileVideoDetails struct {
	Codec           VideoCodec     `json:"codec"`
	Width           int            `json:"width"`
	Height          int            `json:"height"`
	Strict          bool           `json:"strict"`
	Bitrate         string         `json:"bitrate"`
	Pixel           PixelFormat    `json:"pixelFormat"`
	Sar             string         `json:"sar"`
	ColorModel      ColorModel     `json:"colorModel"`
	ColorTransfer   ColorTransfer  `json:"colorTransfer"`
	ColorPrimaries  ColorPrimaries `json:"colorPrimaries"`
	ColorRange      ColorRange     `json:"colorRange"`
	Profile         string         `json:"profile"`
	Level           string         `json:"level"`
	Preset          string         `json:"preset"`
	Tune            string         `json:"tune"`
	RCMode          string         `json:"rcMode"`
	RCValue         float32        `json:"rcValue"`
	MeMethod        string         `json:"meMethod"`
	DenoiseMethod   string         `json:"denoiseMethod"`
	DenoisePreset   string         `json:"denoisePreset"`
	DenoiseTune     string         `json:"denoiseTune"`
	DenoiseValue    string         `json:"denoiseValue"`
	SegmentDuration string         `json:"segmentDuration"`
	MinTracks       int            `json:"minTracks"`
	MaxTracks       int            `json:"maxTracks"`
}

type QualityConfig

type QualityConfig struct {
	Preset        string  `json:"preset,omitempty"`   // codec-specific: e.g. x264 preset
	Tune          string  `json:"tune,omitempty"`     // codec-specific: e.g. grain, zerolatency, psnr for x264/5
	VideoProfile  string  `json:"vprofile,omitempty"` // codec-specific: video profile
	VideoLevel    string  `json:"vlevel,omitempty"`   // codec-specific: video profile level
	AudioProfile  string  `json:"aprofile,omitempty"` // codec-specific: audio profile
	RCMode        string  `json:"rc_mode,omitempty"`  // codec-specific: CRF, VBR, CBR, LOSSLESS, ...
	RCValue       float32 `json:"rc_value,omitempty"` // codec-specific: CRF: 18
	MeMethod      string  `json:"me_method"`          // x264/5 motion estimation override
	DenoiseMethod string  `json:"denoise_method"`     // ffmpeg filter (nlmeans, hqdn3d)
	DenoisePreset string  `json:"denoise_preset"`     // denoising preset
	DenoiseTune   string  `json:"denoise_tune"`       // denoising tune (nlmeans-only)
	DenoiseValue  string  `json:"denoise_value"`      // denoising custom setting
}

type Query

type Query func(url.Values) ([]interface{}, ListMeta, error)

Query is the function used to get a page listing.

type RenderOptions

type RenderOptions struct {
	General  GeneralConfig    `json:"general"`            // target profile and categories
	Metadata MetaValueList    `json:"metadata,omitempty"` // to be embedded into files
	Quality  *QualityConfig   `json:"quality,omitempty"`  // encoder quality settings
	EditList []*SourceOptions `json:"editlist,omitempty"` // per-source options
}

type Replica

type Replica struct {
	MediaEmbed
	State    MediaState `json:"state"`
	VolumeId string     `json:"volumeId"`
	JobId    string     `json:"jobId"`
	Volume   *Volume    `json:"volume"`
	Job      *Job       `json:"job"`
}

Replica is the secondary resource representing a Trimmer volume/media relation.

type ReplicaDeleteParams

type ReplicaDeleteParams struct {
	Wipe bool `json:"wipeMedia,omitempty"`
}

ReplicaDeleteParams is the set of parameters that can be used to delete media replicas from volumes.

type ReplicaList

type ReplicaList []*Replica

ReplicaList is representing a slice of Replica structs.

func (ReplicaList) SearchId

func (l ReplicaList) SearchId(id string) (int, *Replica)

type ReplicaListParams

type ReplicaListParams struct {
	ListParams
	Type     VolumeType          `json:"type,omitempty"`
	Provider string              `json:"provider,omitempty"`
	Region   string              `json:"region,omitempty"`
	Readonly VolumeReadonlyState `json:"readonly,omitempty"`
	Online   VolumeOnlineState   `json:"online,omitempty"`
	Embed    ApiEmbedFlags       `json:"embed,omitempty"`
}

ReplicaListParams is the set of parameters that can be used to list media replicas on volumes.

type ReplicaParams

type ReplicaParams struct {
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

ReplicaParams is the set of parameters that can be used to manage media replicas on volumes.

type RotateMode

type RotateMode string

type SequenceAttr

type SequenceAttr struct {
	OriginID       string           `json:"originId,omitempty"`       // origin media id
	UUID           string           `json:"uuid,omitempty"`           // global unique id for track
	OriginUUID     string           `json:"originUuid,omitempty"`     // global unique id for origin track
	TrackNum       int              `json:"trackNum,omitempty"`       // track number in multi-track containers
	FrameCount     int64            `json:"frameCount,omitempty"`     // number of frames
	RateNum        int              `json:"rateNum,omitempty"`        // video frame rate numerator
	RateDen        int              `json:"rateDen,omitempty"`        // video frame rate denumerator
	Duration       time.Duration    `json:"duration,omitempty"`       // video stream runtime
	Width          int              `json:"width"`                    // native width (may contain borders)
	Height         int              `json:"height"`                   // native height (may contain borders)
	ActiveWidth    int              `json:"activeWidth"`              // display width
	ActiveHeight   int              `json:"activeHeight"`             // display height
	Depth          int              `json:"depth,omitempty"`          // color depth 8/10/12/14/16/24 bit
	Sar            float32          `json:"sar,omitempty"`            // sample aspect ratio
	Dar            float32          `json:"dar,omitempty"`            // display aspect ratio
	Codec          VideoCodec       `json:"codec,omitempty"`          // codec name
	Profile        string           `json:"profile,omitempty"`        // codec profile/level
	Bitrate        int64            `json:"bitrate,omitempty"`        // encoding bitrate
	PixelFormat    PixelFormat      `json:"pixelFormat,omitempty"`    // video pixel format (RGB, YUV, +chroma subsampling)
	ColorModel     ColorModel       `json:"colorModel,omitempty"`     // color space
	ColorRange     ColorRange       `json:"colorRange,omitempty"`     // color range (full or limited range)
	ColorPrimaries ColorPrimaries   `json:"colorPrimaries,omitempty"` // color primaries RGB/XYZ mapping
	ColorTransfer  ColorTransfer    `json:"colorTransfer,omitempty"`  // color transfer (linearization, gamma)
	ColorLocation  ColorLocation    `json:"colorLocation,omitempty"`  // color location (chroma subsample position)
	MediaList      SequenceFileList `json:"media,omitempty"`          // list of media file details
}

type SequenceFile

type SequenceFile struct {
	Frame    int64          `json:"frame,omitempty"`    // frame number
	Size     int64          `json:"size,omitempty"`     // file size
	Hashes   hash.HashBlock `json:"hashes,omitempty"`   // content checksums
	Filename string         `json:"filename,omitempty"` // original or generated filename
	UUID     string         `json:"uuid,omitempty"`     // global unique id for media file
	Url      string         `json:"url,omitempty"`      // dynamic access url
}

HLS, DASH, DPX, JPEG2000, etc = manifest + sequence(s)

type SequenceFileList

type SequenceFileList []*SequenceFile

func (SequenceFileList) Size

func (x SequenceFileList) Size() (size int64)

type Session

type Session struct {
	TokenId      string    `json:"tokenId"`
	AccessToken  string    `json:"accessToken"`
	TokenType    string    `json:"tokenType"`
	Scopes       string    `json:"scopes"`
	RefreshToken string    `json:"refreshToken"`
	ExpiresAt    time.Time `json:"expiresAt"`
	User         *User     `json:"user"`
	// contains filtered or unexported fields
}

Global Login Session State

var (
	LoginSession Session
)

global session, safe to use from goroutines

func NewClientSession

func NewClientSession(token ClientToken) (*Session, error)

func NewSession

func NewSession() *Session

func (*Session) GetAuthorization

func (s *Session) GetAuthorization() string

func (*Session) GetRefreshToken

func (s *Session) GetRefreshToken() string

func (*Session) IsExpired

func (s *Session) IsExpired() bool

func (*Session) IsValid

func (s *Session) IsValid() bool

func (*Session) Reset

func (s *Session) Reset()

func (*Session) Update

func (s *Session) Update(ss *Session)

func (*Session) ValidFor

func (s *Session) ValidFor() time.Duration

type SourceOptions

type SourceOptions struct {
	MediaId   string           `json:"mediaId,omitempty"`   // source media id
	Crop      *CropConfig      `json:"crop,omitempty"`      // source video crop
	Transform *TransformConfig `json:"transform,omitempty"` // source video transform
	Trim      *TrimConfig      `json:"trim,omitempty"`      // source audio/video trim
	Color     *ColorConfig     `json:"color,omitempty"`     // source video color processing
}

type Stash

type Stash struct {
	ID          string           `json:"stashId"`
	WorkspaceId string           `json:"workspaceId"`
	AuthorId    string           `json:"authorId"`
	Name        string           `json:"name"`
	DisplayName string           `json:"displayName"`
	Description string           `json:"description"`
	Type        StashType        `json:"type"`
	Query       string           `json:"query"`
	AccessClass AccessClass      `json:"access"`
	ImageId     string           `json:"imageId"`
	CreatedAt   time.Time        `json:"createdAt"`
	UpdatedAt   time.Time        `json:"updatedAt"`
	Watching    bool             `json:"watching"`
	Permissions *Permissions     `json:"perms"`
	Workspace   *Workspace       `json:"workspace"`
	Author      *User            `json:"author"`
	Media       *MediaEmbed      `json:"media"`
	Statistics  *StashStatistics `json:"stats"`
}

Stash is the resource representing a Trimmer stash.

type StashList

type StashList []*Stash

func (StashList) SearchId

func (l StashList) SearchId(id string) (int, *Stash)

type StashListParams

type StashListParams struct {
	ListParams
	Name        string        `json:"name,omitempty"`
	AccessClass AccessClass   `json:"access,omitempty"`
	Type        StashType     `json:"type,omitempty"`
	Embed       ApiEmbedFlags `json:"embed,omitempty"`
}

StashListParams is the set of parameters that can be used when listing stashes.

type StashParams

type StashParams struct {
	Name        string        `json:"name"`
	DisplayName string        `json:"displayName,omitempty"`
	Description string        `json:"description,omitempty"`
	Query       string        `json:"query,omitempty"`
	AccessClass AccessClass   `json:"access,omitempty"`
	ImageId     string        `json:"imageId,omitempty"`
	Embed       ApiEmbedFlags `json:"embed,omitempty"`
}

StashParams is the set of parameters that can be used to create and update a invitations.

type StashStatistics

type StashStatistics struct {
	Links    int64 `json:"clips"`
	Assets   int64 `json:"assets"`
	Time     int64 `json:"time"`
	Watchers int64 `json:"watchers"`
	Media    int64 `json:"media"`
	Size     int64 `json:"size"`
	Files    int64 `json:"files"`
}

StashStatistics is the sub-resource representing stash counters.

type StashType

type StashType string

StashKind is the list of allowed values for stash kinds. Allowed values are "system", "virtual", "user", "smart".

type SubtitleAttr

type SubtitleAttr struct {
	OriginID   string         `json:"originId,omitempty"`   // origin media (used by proxies)
	UUID       string         `json:"uuid,omitempty"`       // global unique id for track
	OriginUUID string         `json:"originUuid,omitempty"` // global unique id for origin track
	TrackNum   int            `json:"trackNum,omitempty"`   // track number in multi-track containers
	Duration   time.Duration  `json:"duration,omitempty"`   // subtitle stream runtime
	Codec      SubtitleCodec  `json:"codec,omitempty"`      // codec name
	Lang       IsoLanguage    `json:"lang,omitempty"`       // ISO language code
	Hashes     hash.HashBlock `json:"hashes,omitempty"`     // content checksums
	Filename   string         `json:"filename,omitempty"`   // media filename, e.g. for DASH
	Size       int64          `json:"size,omitempty"`       // file size
	Url        string         `json:"url,omitempty"`        // dynamic access url
}

type SubtitleCodec

type SubtitleCodec string

type SupportedBackend

type SupportedBackend string

SupportedBackend is an enumeration of supported Trimmer endpoints. Currently supported values are "api" and "cdn".

const (
	APIBackend SupportedBackend = "api"
	CDNBackend SupportedBackend = "cdn"
)

type Tag

type Tag struct {
	ID          string          `json:"tagId"`
	WorkspaceId string          `json:"workspaceId"`
	AuthorId    string          `json:"authorId"`
	AssetId     string          `json:"assetId"`
	ParentId    string          `json:"parentId"`
	RootId      string          `json:"rootId"`
	Label       TagLabel        `json:"label"`
	AccessClass AccessClass     `json:"access"`
	Start       time.Duration   `json:"start"`
	Duration    time.Duration   `json:"duration"`
	Content     string          `json:"content"`
	Data        json.RawMessage `json:"data"`
	CreatedAt   time.Time       `json:"createdAt"`
	UpdatedAt   time.Time       `json:"updatedAt"`
	Author      *User           `json:"author"`
	Workspace   *Workspace      `json:"workspace"`
	Asset       *Asset          `json:"asset"`
	ParentTag   *Tag            `json:"parent"`
	RootTag     *Tag            `json:"root"`
}

Tag is the resource representing a Trimmer tag.

type TagLabel

type TagLabel string

TagLabel is the list of allowed values for tag labels.

type TagLabelList

type TagLabelList []TagLabel

func (*TagLabelList) Add

func (l *TagLabelList) Add(f TagLabel)

func (TagLabelList) Contains

func (l TagLabelList) Contains(f TagLabel) bool

func (*TagLabelList) Del

func (l *TagLabelList) Del(f TagLabel)

func (TagLabelList) String

func (l TagLabelList) String() string

type TagList

type TagList []*Tag

func (TagList) SearchId

func (l TagList) SearchId(id string) (int, *Tag)

type TagListParams

type TagListParams struct {
	ListParams
	IDs         []string      `json:"id,omitempty"`
	AuthorId    string        `json:"authorId,omitempty"`
	AccessClass AccessClass   `json:"access,omitempty"`
	Labels      TagLabelList  `json:"label,omitempty"`
	From        int64         `json:"from,omitempty"`
	To          int64         `json:"to,omitempty"`
	Embed       ApiEmbedFlags `json:"embed,omitempty"`
}

TagListParams is the set of parameters that can be used when listing tages.

type TagParams

type TagParams struct {
	Content     string           `json:"content,omitempty"`
	Start       time.Duration    `json:"start,omitempty"`
	Duration    time.Duration    `json:"duration,omitempty"`
	AccessClass AccessClass      `json:"access,omitempty"`
	Label       TagLabel         `json:"label,omitempty"`
	Data        *json.RawMessage `json:"data,omitempty"`
	Embed       ApiEmbedFlags    `json:"embed,omitempty"`
}

TagParams is the set of parameters that can be used to create and update a tag.

type Team

type Team struct {
	ID          string       `json:"teamId"`
	OrgID       string       `json:"orgId"`
	DisplayName string       `json:"displayName"`
	Location    string       `json:"location"`
	Description string       `json:"description"`
	Homepage    string       `json:"homepage"`
	ImageKey    string       `json:"imageKey"`
	CreatedAt   time.Time    `json:"createdAt"`
	UpdatedAt   time.Time    `json:"updatedAt"`
	Media       *MediaEmbed  `json:"media"`
	Membership  *Member      `json:"membership"`
	Permissions *Permissions `json:"perms"`
	Org         *Org         `json:"org"`
}

Team is the resource representing a Trimmer team.

type TeamList

type TeamList []*Team

func (TeamList) SearchId

func (l TeamList) SearchId(id string) (int, *Team)

type TeamListParams

type TeamListParams struct {
	ListParams
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

TeamListParams is the set of parameters that can be used when listing teams.

type TeamParams

type TeamParams struct {
	DisplayName string        `json:"displayName"`
	ImageId     string        `json:"imageId,omitempty"`
	Homepage    string        `json:"homepage,omitempty"`
	Location    string        `json:"location,omitempty"`
	Description string        `json:"description"`
	Role        MemberRole    `json:"role,omitempty"`
	Permissions Permissions   `json:"perm,omitempty"`
	Clearance   AccessClass   `json:"clearance,omitempty"`
	Embed       ApiEmbedFlags `json:"embed,omitempty"`
}

TeamParams is the set of parameters that can be used when reading, creating or updating teams.

type TranscoderOptions

type TranscoderOptions struct {
	General   GeneralConfig      `json:"general"`             // target profile and categories
	Metadata  MetaValueList      `json:"metadata,omitempty"`  // KV list for embedding into files
	Quality   *QualityConfig     `json:"quality,omitempty"`   // de-/encoder quality settings
	Crop      *CropConfig        `json:"crop,omitempty"`      // source video crop
	Transform *TransformConfig   `json:"transform,omitempty"` // source video transform
	Trim      *TrimConfig        `json:"trim,omitempty"`      // single-source audio/video trim
	Color     *ColorConfig       `json:"color,omitempty"`     // source video color processing
	Watermark []*WatermarkConfig `json:"watermark,omitempty"` // video watermark
	AudioMix  *AudioMixConfig    `json:"audio,omitempty"`     // audio routing
	ArriSDK   *ArriSDKConfig     `json:"arri_sdk,omitempty"`  // ARRI specific options
}

type TransformConfig

type TransformConfig struct {
	Flip   FlipMode    `json:"flip,omitempty"`
	Rotate *RotateMode `json:"rotate,omitempty"`
}

type TrimConfig

type TrimConfig struct {
	StartFrame int64         `json:"start_frame,omitempty"` // inclusive, relative to media start
	EndFrame   int64         `json:"end_frame,omitempty"`   // not inclusive, relative to media start
	StartTime  time.Duration `json:"start_time,omitempty"`  // inclusive, relative to media start
	EndTime    time.Duration `json:"end_time,omitempty"`    // not inclusive, relative to media start
	StartTC    string        `json:"start_tc,omitempty"`    // inclusive, relative to source media TC
	EndTC      string        `json:"end_tc,omitempty"`      // not inclusive, relative to source media TC
}

source media in/out-points (relative to start of source)

type TrimmerError

type TrimmerError struct {
	RequestId   string `json:"requestId,omitempty"`
	SessionId   string `json:"sessionId,omitempty"`
	OauthScopes string `json:"oauthScopes,omitempty"`
	ErrorCode   int    `json:"code,omitempty"`
	StatusCode  int    `json:"status,omitempty"`
	Message     string `json:"message,omitempty"`
	Scope       string `json:"scope,omitempty"`
	Detail      string `json:"detail,omitempty"`
	Cause       error  `json:"cause,omitempty"`
	// contains filtered or unexported fields
}

func NewApiError

func NewApiError(status int) TrimmerError

func NewInternalError

func NewInternalError(msg string, err error) TrimmerError

func NewUsageError

func NewUsageError(msg string, err error) TrimmerError

func ParseApiError

func ParseApiError(i io.Reader) TrimmerError

func ParseApiErrorFromByte

func ParseApiErrorFromByte(b []byte) TrimmerError

func (TrimmerError) Error

func (e TrimmerError) Error() string

func (TrimmerError) IsApi

func (e TrimmerError) IsApi() bool

func (TrimmerError) IsInternal

func (e TrimmerError) IsInternal() bool

func (TrimmerError) IsUsage

func (e TrimmerError) IsUsage() bool

func (TrimmerError) Marshal

func (e TrimmerError) Marshal() []byte

func (TrimmerError) MarshalIndent

func (e TrimmerError) MarshalIndent() []byte

type User

type User struct {
	ID           string          `json:"userId"`
	Name         string          `json:"name"`
	DisplayName  string          `json:"displayName"`
	ImageId      string          `json:"imageId"`
	Homepage     string          `json:"homepage"`
	Location     string          `json:"location"`
	Description  string          `json:"description"`
	State        UserState       `json:"state"`
	Language     string          `json:"lang"`
	MaxClearance AccessClass     `json:"maxClearance"`
	CreatedAt    time.Time       `json:"createdAt"`
	UpdatedAt    time.Time       `json:"updatedAt"`
	Media        *MediaEmbed     `json:"media"`
	Permissions  *Permissions    `json:"perms"`
	Statistics   *UserStatistics `json:"stats"`
}

User is the resource representing a Trimmer user.

type UserList

type UserList []*User

UserList is representing a slice of User structs.

func (UserList) SearchId

func (l UserList) SearchId(id string) (int, *User)

type UserLookupParams

type UserLookupParams struct {
	Names []string      `json:"name,omitempty"`
	IDs   []string      `json:"id,omitempty"`
	Embed ApiEmbedFlags `json:"embed,omitempty"`
}

UserListParams is the set of parameters that can be used when looking for multiple users with a known name or id. Names and IDs can be mixed. The maximum total number is limited to 200 entries per call. When less than 5 items are requested a GET is performed, otherwise POST is used.

func (*UserLookupParams) MarshalJSON

func (p *UserLookupParams) MarshalJSON() ([]byte, error)

Custom Marshaller for UserLookupParams because the API expects a comma separated list

type UserParams

type UserParams struct {
	DisplayName string        `json:"displayName,omitempty"`
	ImageId     string        `json:"imageId,omitempty"`
	Homepage    string        `json:"homepage,omitempty"`
	Location    string        `json:"location,omitempty"`
	Description string        `json:"description,omitempty"`
	Embed       ApiEmbedFlags `json:"embed,omitempty"`
}

UserParams is the set of parameters that can be used to fetch a user.

type UserSearchFields

type UserSearchFields string

UserSearchFields is the list of allowed values for the user's search fields. Allowed values are "default", "all", "name", "displayName", "email", "location", "description"

type UserSearchParams

type UserSearchParams struct {
	ListParams
	Query  string
	Fields UserSearchFields
	Embed  ApiEmbedFlags `json:"embed,omitempty"`
}

UserSearchParams is the set of parameters that can be used when searching users.

type UserState

type UserState string

UserState is the list of allowed values for the user's account status. Allowed values are "parked", created", "invited", "active", "inactive", "expired", "blocked", "banned", "deleting", "cleaning", "deleted", "rejected".

type UserStatistics

type UserStatistics struct {
	Workspaces int64 `json:"workspaces"`
	Volumes    int64 `json:"volumes"`
	Members    int64 `json:"members"`
	Teams      int64 `json:"teams"`
	Assets     int64 `json:"assets"`
	Time       int64 `json:"time"`
	Media      int64 `json:"media"`
	Size       int64 `json:"size"`
	Files      int64 `json:"files"`
}

UserStatistics is the resource representing a user account counters.

type VideoAttr

type VideoAttr struct {
	OriginID       string         `json:"originId,omitempty"`       // origin media id
	UUID           string         `json:"uuid,omitempty"`           // global unique id for track
	OriginUUID     string         `json:"originUuid,omitempty"`     // global unique id for origin track
	TrackNum       int            `json:"trackNum,omitempty"`       // track number in multi-track containers
	FrameCount     int64          `json:"frameCount,omitempty"`     // number of frames
	RateNum        int            `json:"rateNum,omitempty"`        // video frame rate numerator
	RateDen        int            `json:"rateDen,omitempty"`        // video frame rate denumerator
	Duration       time.Duration  `json:"duration,omitempty"`       // video stream runtime
	Width          int            `json:"width"`                    // native width (may contain borders)
	Height         int            `json:"height"`                   // native height (may contain borders)
	ActiveWidth    int            `json:"activeWidth"`              // display width
	ActiveHeight   int            `json:"activeHeight"`             // display height
	Depth          int            `json:"depth,omitempty"`          // color depth 8/10/12/14/16/24 bit
	Sar            float32        `json:"sar,omitempty"`            // sample aspect ratio
	Dar            float32        `json:"dar,omitempty"`            // display aspect ratio
	Codec          VideoCodec     `json:"codec,omitempty"`          // codec name
	Profile        string         `json:"profile,omitempty"`        // codec profile/level
	Bitrate        int64          `json:"bitrate,omitempty"`        // encoding bitrate
	PixelFormat    PixelFormat    `json:"pixelFormat,omitempty"`    // video pixel format (RGB, YUV, +chroma subsampling)
	ColorModel     ColorModel     `json:"colorModel,omitempty"`     // color space
	ColorRange     ColorRange     `json:"colorRange,omitempty"`     // color range (full or limited range)
	ColorPrimaries ColorPrimaries `json:"colorPrimaries,omitempty"` // color primaries RGB/XYZ mapping
	ColorTransfer  ColorTransfer  `json:"colorTransfer,omitempty"`  // color transfer (linearization, gamma)
	ColorLocation  ColorLocation  `json:"colorLocation,omitempty"`  // color location (chroma subsample position)
	Hashes         hash.HashBlock `json:"hashes,omitempty"`         // content checksums
	Size           int64          `json:"size,omitempty"`           // file size
	Filename       string         `json:"filename,omitempty"`       // media filename, e.g. for DASH
	Url            string         `json:"url,omitempty"`            // dynamic access url
}

type VideoCodec

type VideoCodec string

type Volume

type Volume struct {
	ID           string            `json:"volumeId"`
	UUID         string            `json:"uuid"`
	AccountId    string            `json:"accountId"`
	AuthorId     string            `json:"authorId"`
	State        VolumeState       `json:"state"`
	Name         string            `json:"name"`
	DisplayName  string            `json:"displayName"`
	Type         VolumeType        `json:"type"`
	Brand        string            `json:"brand"`
	Provider     string            `json:"provider"`
	Region       string            `json:"region"`
	Url          string            `json:"url"`
	SerialNo     string            `json:"serial"`
	Namespace    VolumeNamespace   `json:"namespace"`
	Template     string            `json:"template"`
	Online       bool              `json:"online"`
	Readonly     bool              `json:"readonly"`
	Automount    bool              `json:"automount"`
	Revision     int               `json:"revision"`
	HashTypes    hash.HashTypeList `json:"hashTypes"`
	AuthType     VolumeAuthType    `json:"authType"`
	AuthScope    VolumeAuthScope   `json:"authScope"`
	RoleMatch    MediaRoleMatch    `json:"roleMatch"`
	AccessClass  AccessClass       `json:"access"`
	CacheControl string            `json:"cacheControl"`
	Capacity     int64             `json:"capacity"`
	CreatedAt    time.Time         `json:"createdAt"`
	UpdatedAt    time.Time         `json:"updatedAt"`
	Error        *TrimmerError     `json:"error"`
	Limits       *VolumeLimits     `json:"limits"`
	Statistics   *VolumeStatistics `json:"stats"`
	Permissions  *Permissions      `json:"perms"`
	User         *User             `json:"user"`
	Org          *Org              `json:"org"`
	Author       *User             `json:"author"`
}

Volume is the resource representing a Trimmer volume.

type VolumeAuth

type VolumeAuth struct {
	Type  VolumeAuthType  `json:"type"`
	Scope VolumeAuthScope `json:"scope"`
}

type VolumeAuthScope

type VolumeAuthScope string

VolumeAuthScope is the list of allowed values for operations that require authentication. Allowed values are "read", "create", "delete".

type VolumeAuthType

type VolumeAuthType string

VolumeAuthType is the list of allowed values for authentication schemes. Allowed values are "none", "signature", "token", "aws", "oauth2", "basic".

type VolumeAutomountState

type VolumeAutomountState string

VolumeAutomountState is the list of allowed values for automount status. Allowed values are "on", "off".

type VolumeClearParams

type VolumeClearParams struct {
	Wipe bool `json:"wipe,omitempty"`
}

VolumeClearParams is the set of parameters that can be used when clearing a volume.

type VolumeCounts

type VolumeCounts struct {
	NumFiles      int64  `json:"numFiles"`
	NumBytes      int64  `json:"usedBytes"`
	NumUploads    int64  `json:"activeUploads"`
	FreeBytes     *int64 `json:"freeBytes"`
	CapacityBytes *int64 `json:"capacityBytes"`
}

type VolumeLimits

type VolumeLimits struct {
	PartSizeMin   int64 `json:"minPartSize"`
	PartSizeMax   int64 `json:"maxPartSize"`
	PartsMax      int64 `json:"maxParts"`
	FileSizeMax   int64 `json:"maxFileSize"`
	SinglePartMax int64 `json:"maxSinglePart"`
}

type VolumeList

type VolumeList []*Volume

func (VolumeList) SearchId

func (l VolumeList) SearchId(id string) (int, *Volume)

func (VolumeList) SearchUUID

func (l VolumeList) SearchUUID(u string) (int, *Volume)

type VolumeListParams

type VolumeListParams struct {
	ListParams
	AccessClass AccessClass          `json:"access,omitempty"`
	States      VolumeStateList      `json:"state,omitempty"`
	Name        string               `json:"name,omitempty"`
	UUID        string               `json:"uuid,omitempty"`
	Serial      string               `json:"serial,omitempty"`
	Types       VolumeTypeList       `json:"type,omitempty"`
	Provider    VolumeProvider       `json:"provider,omitempty"`
	Region      string               `json:"region,omitempty"`
	Brand       string               `json:"brand,omitempty"`
	Readonly    VolumeReadonlyState  `json:"readonly,omitempty"`
	Automount   VolumeAutomountState `json:"automount,omitempty"`
	Online      VolumeOnlineState    `json:"online,omitempty"`
	Embed       ApiEmbedFlags        `json:"embed,omitempty"`
}

VolumeListParams is the set of parameters that can be used when listing volumes.

type VolumeManifest

type VolumeManifest struct {
	UUID      string            `json:"uuid"`
	Name      string            `json:"name"`
	UrlBase   string            `json:"url"`
	UrlPrefix string            `json:"prefix"`
	Namespace VolumeNamespace   `json:"namespace"`
	Readonly  bool              `json:"readonly"`
	Auth      VolumeAuth        `json:"auth"`
	Limits    *VolumeLimits     `json:"limits,omitempty"`
	HashTypes hash.HashTypeList `json:"hashes"`
}

type VolumeNamespace

type VolumeNamespace string

VolumeNamespace is the list of allowed values for filename conventions. Allowed values are "sha256", "plain", "plain-sha256", "uuid", "uuid-sha256", "custom".

type VolumeOnlineState

type VolumeOnlineState string

VolumeOnlineState is the list of allowed values for online status. Allowed values are "on", "off".

type VolumeOptions

type VolumeOptions struct {
	TargetVolumeId string `json:"volumeId,omitempty"`
}

type VolumeParams

type VolumeParams struct {
	Name            string               `json:"name"`            // required
	Type            VolumeType           `json:"type"`            // required
	Namespace       VolumeNamespace      `json:"namespace"`       // required
	DisplayName     string               `json:"displayName"`     // default: = name
	State           VolumeState          `json:"state"`           // update-only
	UUID            string               `json:"uuid"`            // default: read from manifest, create
	SerialNo        string               `json:"serial"`          // default: empty
	Provider        string               `json:"provider"`        // default: trimmer
	Brand           string               `json:"brand"`           // default: empty
	Region          string               `json:"region"`          // default: by cloud provider
	Url             string               `json:"url"`             // default: empty, reqired for type cloud
	Template        string               `json:"template"`        // default: empty
	Readonly        VolumeReadonlyState  `json:"readonly"`        // default: true
	Online          VolumeOnlineState    `json:"online"`          // default: true
	Automount       VolumeAutomountState `json:"automount"`       // default: false
	HashTypes       hash.HashTypeList    `json:"hashTypes"`       // default: md5,sha256
	AuthType        VolumeAuthType       `json:"authType"`        // default: none
	AuthScope       VolumeAuthScope      `json:"authScope"`       // default: write
	AuthCredentials string               `json:"authCredentials"` // default: empty
	RoleMatch       MediaRoleMatch       `json:"roleMatch"`       // default: empty
	AccessClass     AccessClass          `json:"access"`          // default: public
	CacheControl    string               `json:"cacheControl"`    // default: public
	Capacity        int64                `json:"capacity"`        // default: 0 = unlimited
	Embed           ApiEmbedFlags        `json:"embed"`
}

VolumeParams is the set of parameters that can be used to create and update a volume.

type VolumeProvider

type VolumeProvider string

VolumeProvider is the type of a cloud storage provider supported by Trimmer.

type VolumeReadonlyState

type VolumeReadonlyState string

VolumeAuthType is the list of allowed values for readonly status. Allowed values are "on", "off".

type VolumeScanParams

type VolumeScanParams struct {
}

VolumeScanParams is the set of parameters that can be used when scanning a volume.

type VolumeState

type VolumeState string

VolumeState is the list of allowed values for states. Allowed states are "init", "ready", "failed", "scanning", "loading", "offloading", "wiping", "stopping", "transit", "lost", "archived", "retired".

type VolumeStateList

type VolumeStateList []VolumeState

func (*VolumeStateList) Add

func (l *VolumeStateList) Add(s VolumeState)

func (VolumeStateList) Contains

func (l VolumeStateList) Contains(s VolumeState) bool

func (*VolumeStateList) Del

func (l *VolumeStateList) Del(s VolumeState)

func (VolumeStateList) String

func (l VolumeStateList) String() string

type VolumeStatistics

type VolumeStatistics struct {
	Totals     *VolumeCounts            `json:"totals"`
	Accounts   map[string]*VolumeCounts `json:"accounts"`
	Workspaces map[string]*VolumeCounts `json:"workspaces"`
	Types      map[string]*VolumeCounts `json:"mediaTypes"`
	Relations  map[string]*VolumeCounts `json:"mediaRelations"`
	Families   map[string]*VolumeCounts `json:"mediaFamilies"`
	Roles      map[string]*VolumeCounts `json:"mediaRoles"`
}

type VolumeType

type VolumeType string

VolumeType is the list of allowed values for types of volumes. Allowed values are "client", "cloud", "shuttle", "nas", "san", "tape".

type VolumeTypeList

type VolumeTypeList []VolumeType

func (*VolumeTypeList) Add

func (l *VolumeTypeList) Add(s VolumeType)

func (VolumeTypeList) Contains

func (l VolumeTypeList) Contains(s VolumeType) bool

func (*VolumeTypeList) Del

func (l *VolumeTypeList) Del(s VolumeType)

func (VolumeTypeList) String

func (l VolumeTypeList) String() string

type WatermarkConfig

type WatermarkConfig struct {
	Mode      WatermarkMode `json:"mode,omitempty"`
	Position  Point2i       `json:"position,omitempty"`   // watermark top/left coordinates
	Reference CropMode      `json:"reference,omitempty"`  // reference rectangle after cropping+padding, default: display
	MediaId   string        `json:"media_id,omitempty"`   // mode: logo
	Text      string        `json:"text,omitempty"`       // mode: text
	Label     MetaPath      `json:"label,omitempty"`      // mode: metadata key
	FontSize  int           `json:"font_size,omitempty"`  // modes: text, timecode, meta
	FontColor string        `json:"font_color,omitempty"` // modes: text, timecode, meta
	ClipColor string        `json:"clip_color,omitempty"` // mode: logo (transparency)
}

type WatermarkList

type WatermarkList []*WatermarkConfig

type WatermarkMode

type WatermarkMode string

type WorkflowAction

type WorkflowAction string

type Workspace

type Workspace struct {
	ID          string               `json:"workspaceId"`
	State       WorkspaceState       `json:"state"`
	Name        string               `json:"name"`
	DisplayName string               `json:"displayName"`
	AccountId   string               `json:"accountId"`
	Company     string               `json:"company"`
	Description string               `json:"description"`
	Homepage    string               `json:"homepage"`
	ImageId     string               `json:"imageId"`
	Location    string               `json:"location"`
	CreatedAt   time.Time            `json:"createdAt"`
	UpdatedAt   time.Time            `json:"updatedAt"`
	Permissions *Permissions         `json:"perms"`
	Media       *MediaEmbed          `json:"media"`
	Statistics  *WorkspaceStatistics `json:"stats"`
	Membership  *Member              `json:"membership"`
	Org         *Org                 `json:"org"`
	User        *User                `json:"user"`
}

Workspace is the resource representing a Trimmer workspace.

type WorkspaceList

type WorkspaceList []*Workspace

WorkspaceList is representing a slice of Workspace structs.

func (WorkspaceList) SearchId

func (l WorkspaceList) SearchId(id string) (int, *Workspace)

type WorkspaceListParams

type WorkspaceListParams struct {
	ListParams
	Names  []string           `json:"name,omitempty"`
	IDs    []string           `json:"id,omitempty"`
	States WorkspaceStateList `json:"state,omitempty"`
	Embed  ApiEmbedFlags      `json:"embed,omitempty"`
}

WorkspaceListParams is the set of parameters that can be used when listing workspaces.

type WorkspaceParams

type WorkspaceParams struct {
	Name        string        `json:"name,omitempty"` // create only, required
	DisplayName string        `json:"displayName,omitempty"`
	Description string        `json:"description,omitempty"`
	Company     string        `json:"company,omitempty"`
	Location    string        `json:"location,omitempty"`
	Homepage    string        `json:"homepage,omitempty"`
	ImageId     string        `json:"imageId,omitempty"` // update only
	Embed       ApiEmbedFlags `json:"embed,omitempty"`
}

WorkspaceParams is the set of parameters that can be used to create and update a workspace.

type WorkspaceState

type WorkspaceState string

WorkspaceState is the list of allowed values for the workspace status. Allowed values are "inactive", "active", "blocked", "banned", "deleting", "cleaning", "deleted".

type WorkspaceStateList

type WorkspaceStateList []WorkspaceState

func (*WorkspaceStateList) Add

func (WorkspaceStateList) Contains

func (l WorkspaceStateList) Contains(f WorkspaceState) bool

func (*WorkspaceStateList) Del

func (WorkspaceStateList) String

func (l WorkspaceStateList) String() string

type WorkspaceStatistics

type WorkspaceStatistics struct {
	Members int64 `json:"members"`
	Stashes int64 `json:"stashes"`
	Assets  int64 `json:"assets"`
	Time    int64 `json:"time"`
	Media   int64 `json:"media"`
	Files   int64 `json:"files"`
	Size    int64 `json:"size"`
}

WorkspaceStatistics is the resource representing a Workspace counters.

Directories

Path Synopsis
Package acl provides the /acl APIs
Package acl provides the /acl APIs
Package asset provides the /assets APIs
Package asset provides the /assets APIs
Uploads a new Avatar image for the user Downloads media files from asset Outputs hash values for a given file Lists all assets and contained media across a user's workspaces Upload a sequence of media files into a new asset using multipart/chunked upload Example: ./sequence --debug --family=capture.arri 26887CcfeQK <dir> Upload a media file into a new asset using multipart/chunked upload
Uploads a new Avatar image for the user Downloads media files from asset Outputs hash values for a given file Lists all assets and contained media across a user's workspaces Upload a sequence of media files into a new asset using multipart/chunked upload Example: ./sequence --debug --family=capture.arri 26887CcfeQK <dir> Upload a media file into a new asset using multipart/chunked upload
Package event provides utilities for audit events
Package event provides utilities for audit events
Package hash provides helper functions for file hashing
Package hash provides helper functions for file hashing
go-tiger
Implements the Tiger/192 hash function as specified in http://www.cs.technion.ac.il/~biham/Reports/Tiger/tiger/tiger.html Tiger/160 and Tiger/128 are simply truncations of the Tiger/192 sum, so there's no specific implementation for those.
Implements the Tiger/192 hash function as specified in http://www.cs.technion.ac.il/~biham/Reports/Tiger/tiger/tiger.html Tiger/160 and Tiger/128 are simply truncations of the Tiger/192 sum, so there's no specific implementation for those.
xxhash
Package xxhash implements the 64-bit variant of xxHash (XXH64) as described at http://cyan4973.github.io/xxHash/.
Package xxhash implements the 64-bit variant of xxHash (XXH64) as described at http://cyan4973.github.io/xxHash/.
Package job provides the /jobs APIs
Package job provides the /jobs APIs
Package link provides utility functions for asset/stash links
Package link provides utility functions for asset/stash links
Package media provides the /media APIs
Package media provides the /media APIs
Package member provides utilities for managing members
Package member provides utilities for managing members
Package meta provides the /assets/:id/meta APIs
Package meta provides the /assets/:id/meta APIs
Package mount provides helpers for the workspace/volumes mounting API
Package mount provides helpers for the workspace/volumes mounting API
Package org provides the /orgs APIs Package org provides the /orgs APIs
Package org provides the /orgs APIs Package org provides the /orgs APIs
Package profile provides helpers for transcode profiles
Package profile provides helpers for transcode profiles
Package replica provides helpers for media replicas
Package replica provides helpers for media replicas
Package session provides the /auth APIs
Package session provides the /auth APIs
Package stash provides the /stashes APIs
Package stash provides the /stashes APIs
Package tag provides the /tags APIs
Package tag provides the /tags APIs
Package user provides the /users APIs
Package user provides the /users APIs
Package volume provides the /volumes APIs
Package volume provides the /volumes APIs
Package workspace provides the /workspaces APIs
Package workspace provides the /workspaces APIs

Jump to

Keyboard shortcuts

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