Documentation ¶
Index ¶
- Constants
- Variables
- func ApiScopes(scopes ...ApiAccessScope) string
- func IsNilUUID(u string) bool
- func PrintApiEmbedFlag(f ApiEmbedFlags) string
- func PrintMetaFlag(f MetaFlags) string
- func SetBackend(backend SupportedBackend, b Backend)
- func SetHTTPClient(backend SupportedBackend, client *http.Client)
- type AccessAction
- type AccessClass
- type AclObjectType
- type AclSubjectType
- type AnalyzerOptions
- type ApiAccessScope
- type ApiEmbedFlags
- func (f ApiEmbedFlags) Complement(b ApiEmbedFlags) bool
- func (f ApiEmbedFlags) Contains(b ApiEmbedFlags) bool
- func (f ApiEmbedFlags) IsValid() bool
- func (f ApiEmbedFlags) MarshalText() ([]byte, error)
- func (f *ApiEmbedFlags) Scan(value interface{}) error
- func (f ApiEmbedFlags) String() string
- func (f *ApiEmbedFlags) UnmarshalText(data []byte) error
- func (f ApiEmbedFlags) Value() (driver.Value, error)
- type ApiKey
- type ArriSDKConfig
- type Asset
- type AssetAnalyzeParams
- type AssetCountParams
- type AssetForkParams
- type AssetList
- type AssetListEvent
- type AssetListParams
- type AssetOrigin
- type AssetParams
- type AssetSnapshotParams
- type AssetState
- type AssetStatistics
- type AssetTranscodeParams
- type AssetTrimParams
- type AssetUpdateParams
- type AudioAttr
- type AudioCodec
- type AudioLayout
- type AudioMixConfig
- type Backend
- type BackendConfiguration
- func (s BackendConfiguration) Call(ctx context.Context, method, path string, key ApiKey, sess *Session, ...) error
- func (s BackendConfiguration) CallChecksum(ctx context.Context, method, path string, key ApiKey, sess *Session, ...) (int64, hash.HashBlock, hash.HashBlock, error)
- func (s BackendConfiguration) CallMultipart(ctx context.Context, method, path string, key ApiKey, sess *Session, ...) error
- func (s *BackendConfiguration) Do(ctx context.Context, req *http.Request, sess *Session, v interface{}, ...) (int64, hash.HashBlock, error)
- func (s BackendConfiguration) GetUrl() string
- func (s *BackendConfiguration) NewRequest(method, path string, key ApiKey, sess *Session, headers *CallHeaders, ...) (*http.Request, error)
- type Backends
- type Box2i
- type CDL
- type CDLMode
- type CallHeaders
- type ClientToken
- type ColorConfig
- type ColorLocation
- type ColorModel
- type ColorPrimaries
- type ColorRange
- type ColorSampling
- type ColorTransfer
- type CropConfig
- type CropMode
- type DataAttr
- type DocumentAttr
- type EmbedParams
- type Error
- type Event
- type EventKey
- type EventList
- type EventListParams
- type EventType
- type FileInfo
- type FileInfoList
- type FlipMode
- type GeneralConfig
- type GridAttr
- type ImageAttr
- type IsoLanguage
- type Iter
- type Job
- type JobList
- type JobListParams
- type JobParams
- type JobState
- type JobType
- type Link
- type LinkList
- type LinkListParams
- type LinkParams
- type ListMeta
- type ListParams
- type LoginParams
- type ManifestAttr
- type Media
- type MediaAction
- type MediaAttr
- type MediaEmbed
- type MediaFamily
- type MediaFamilyList
- type MediaFormat
- type MediaFormatList
- type MediaList
- type MediaListEvent
- type MediaListKind
- type MediaListParams
- type MediaMatch
- type MediaParams
- type MediaReference
- type MediaRelation
- type MediaRelationList
- type MediaRole
- type MediaRoleList
- type MediaRoleMatch
- type MediaState
- type MediaStateList
- type MediaTrack
- type MediaType
- type MediaTypeList
- type MediaUploadCompletionParams
- type Member
- type MemberList
- type MemberListParams
- type MemberParams
- type MemberRole
- type MemberType
- type MetaDiffParams
- type MetaDocument
- type MetaFlags
- type MetaGroup
- type MetaListParams
- type MetaPath
- type MetaQueryParams
- type MetaRevision
- type MetaRevisionList
- type MetaUpdateParams
- type MetaValue
- type MetaValueList
- type MetadataAction
- type Mount
- type MountList
- type MountListParams
- type MountParams
- type Org
- type OrgList
- type OrgListParams
- type OrgParams
- type OrgState
- type OrgStatistics
- type Permission
- type Permissions
- type PixelFormat
- type Point2i
- type Profile
- type ProfileAudioDetails
- type ProfileDetails
- type ProfileImageDetails
- type ProfileList
- type ProfileListParams
- type ProfileSubtitleDetails
- type ProfileVideoDetails
- type QualityConfig
- type Query
- type RenderOptions
- type Replica
- type ReplicaDeleteParams
- type ReplicaList
- type ReplicaListParams
- type ReplicaParams
- type RotateMode
- type SequenceAttr
- type SequenceFile
- type SequenceFileList
- type Session
- type SourceOptions
- type Stash
- type StashList
- type StashListParams
- type StashParams
- type StashStatistics
- type StashType
- type SubtitleAttr
- type SubtitleCodec
- type SupportedBackend
- type Tag
- type TagLabel
- type TagLabelList
- type TagList
- type TagListParams
- type TagParams
- type Team
- type TeamList
- type TeamListParams
- type TeamParams
- type TranscoderOptions
- type TransformConfig
- type TrimConfig
- type TrimmerError
- type User
- type UserList
- type UserLookupParams
- type UserParams
- type UserSearchFields
- type UserSearchParams
- type UserState
- type UserStatistics
- type VideoAttr
- type VideoCodec
- type Volume
- type VolumeAuth
- type VolumeAuthScope
- type VolumeAuthType
- type VolumeAutomountState
- type VolumeClearParams
- type VolumeCounts
- type VolumeLimits
- type VolumeList
- type VolumeListParams
- type VolumeManifest
- type VolumeNamespace
- type VolumeOnlineState
- type VolumeOptions
- type VolumeParams
- type VolumeProvider
- type VolumeReadonlyState
- type VolumeScanParams
- type VolumeState
- type VolumeStateList
- type VolumeStatistics
- type VolumeType
- type VolumeTypeList
- type WatermarkConfig
- type WatermarkList
- type WatermarkMode
- type WorkflowAction
- type Workspace
- type WorkspaceList
- type WorkspaceListParams
- type WorkspaceParams
- type WorkspaceState
- type WorkspaceStateList
- type WorkspaceStatistics
Constants ¶
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 )
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 )
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 )
const ( LIST_GET_LIMIT = 5 LIST_MAX_LIMIT = 200 )
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.
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" )
const ( TRIMMER_USERNAME_KEY = "TRIMMER_API_USERNAME" TRIMMER_PASSWORD_KEY = "TRIMMER_API_PASSWORD" TRIMMER_CLIENT_TOKEN_KEY = "TRIMMER_CLIENT_TOKEN" )
--------------------------------------------------------------------------- Environment Variables
const ( TAG_MAX_CONTENT_LENGTH = 140 TAG_MAX_DATA_LENGTH = 8192 )
const ApiVersion = "2018-08-04"
apiversion is the currently supported API version
const ClientVersion = "1.3"
clientversion is the binding version
const DefaultPartSize = int64(16) << 20
DefaultPartSize defines the minimum size in bytes for upload parts (= 16 MiB).
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
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.
const TotalBackends = 2
Totalbackends is the total number of Trimmer API endpoints supported by the binding.
Variables ¶
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 */} )
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
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
var UploadPartSize = DefaultPartSize
minimal size of upload parts
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 PrintApiEmbedFlag ¶
func PrintApiEmbedFlag(f ApiEmbedFlags) 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 AnalyzerOptions ¶
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) 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 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 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 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 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 (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
type Backends ¶
type Backends struct {
API, CDN Backend
}
Backends are the currently supported endpoints.
type Box2i ¶
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 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 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 CropConfig ¶
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 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 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 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 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 (*Iter) Current ¶
func (it *Iter) Current() interface{}
Current returns the most recent item visited by a call to Next.
func (*Iter) Err ¶
Err returns the error, if any, that caused the Iter to stop. It must be inspected after Next returns false.
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 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 ¶
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 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"` }
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 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 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 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 ¶
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 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 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 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 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 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 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 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 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 ¶
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 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)
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 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 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 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 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 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 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 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 VolumeLimits ¶
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 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 (l *WorkspaceStateList) Add(f WorkspaceState)
func (WorkspaceStateList) Contains ¶
func (l WorkspaceStateList) Contains(f WorkspaceState) bool
func (*WorkspaceStateList) Del ¶
func (l *WorkspaceStateList) Del(f WorkspaceState)
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.
Source Files ¶
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 |