{"modulePath":"github.com/cbsinteractive/transcode-orchestrator/client","version":"v0.0.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package transcoding\n\n## Types\n\n```go\ntype AudioChannel struct {\n\tTrackIdx   int\n\tChannelIdx int\n\tLayout     string\n}\n```\nAudioChannel describes and Audio Mix\n\n```go\ntype AudioDownmix struct {\n\tSrcChannels  []AudioChannel\n\tDestChannels []AudioChannel\n}\n```\nAudioDownmix holds source and output channels layouts for providers to handle downmixing\n\n```go\ntype AudioPreset struct {\n\tCodec         string `json:\"codec,omitempty\"`\n\tBitrate       string `json:\"bitrate,omitempty\"`\n\tNormalization bool   `json:\"normalization,omitempty\"`\n\n\tDiscreteTracks bool `json:\"discreteTracks,omitempty\"`\n}\n```\nAudioPreset defines the set of parameters for audio on a given preset\n\n```go\ntype CancelJobRequest struct {\n\tJobID JobID `json:\"jobId\"`\n}\n```\n\n```go\ntype CancelJobResponse struct{ JobStatus }\n```\n\n```go\ntype Client interface {\n\t// Jobs\n\tCreateJob(ctx context.Context, job CreateJobRequest) (CreateJobResponse, error)\n\tDescribeJob(ctx context.Context, jobID JobID) (JobStatusResponse, error)\n\tCancelJob(ctx context.Context, jobID JobID) (CancelJobResponse, error)\n\n\t// Presets\n\tCreatePreset(ctx context.Context, preset CreatePresetRequest) (CreatePresetResponse, error)\n\tDeletePreset(ctx context.Context, name PresetName) (DeletePresetResponse, error)\n\n\t// Providers\n\tAllProviders(ctx context.Context) (ProviderNames, error)\n\tGetProvider(ctx context.Context, name ProviderName) (ProviderDescription, error)\n}\n```\nClient holds video-transcoding-api configuration and exposes methods for interacting with the transcoding service\n\n```go\ntype ComputeClass = string\n```\nComputeClass represents a group of resources with similar capability TODO(as): This is a type alias, we shouldn't be using it.\n\n```go\nconst (\n\tComputeClassTranscodeDefault      ComputeClass = \"transcodeDefault\" // any default transcodes\n\tComputeClassDolbyVisionTranscode  ComputeClass = \"doViTranscode\"    // Dolby Vision transcodes\n\tComputeClassDolbyVisionPreprocess ComputeClass = \"doViPreprocess\"   // Dolby Vision pre-processing\n)\n```\n\n```go\ntype CreateJobRequest struct {\n\tName       string `json:\"name,omitempty\"`\n\tSource     string `json:\"source\"`\n\tSourceInfo File   `json:\"sourceInfo,omitempty\"`\n\n\t// Splice is a request to cut the source before processing. It falls somewhere\n\t// between file metadata and a request by the user to operate on the source.\n\t// Not every provider currently supports this feature.\n\tSplice timecode.Splice `json:\"splice,omitempty\"`\n\n\tProvider          string                      `json:\"provider\"`\n\tExecutionFeatures ExecutionFeatures           `json:\"executionFeatures,omitempty\"`\n\tExecutionEnv      ExecutionEnvironment        `json:\"executionEnv,omitempty\"`\n\tStreamingParams   StreamingParams             `json:\"streamingParams,omitempty\"`\n\tSidecarAssets     map[SidecarAssetKind]string `json:\"sidecarAssets,omitempty\"`\n\n\tDestinationBasePath string      `json:\"destinationBasePath,omitempty\"`\n\tOutputs             []JobOutput `json:\"outputs\"`\n\n\tAudioDownmix            AudioDownmix `json:\"audioDownmix\"`\n\tExplicitKeyframeOffsets []float64    `json:\"explicitKeyframeOffsets,omitempty\"`\n\tLabels                  []string     `json:\"labels,omitempty\"`\n}\n```\nCreateJobRequest and similar data structures describe the requests and replies of the Job management endpoints.\n\n```go\ntype CreateJobResponse struct {\n\tJobID JobID `json:\"jobId\"`\n}\n```\n\n```go\ntype CreatePresetRequest struct {\n\tProviders     []string      `json:\"providers\"`\n\tPreset        Preset        `json:\"preset\"`\n\tOutputOptions OutputOptions `json:\"outputOptions\"`\n}\n```\nCreatePresetRequest represents the request body structure when creating a preset\n\n```go\ntype CreatePresetResponse struct {\n\tResults   map[string]NewPresetSummary\n\tPresetMap string\n}\n```\nCreatePresetResponse contains the results of requests to generate new presets\n\n```go\ntype DefaultClient struct {\n\tBaseURL *url.URL\n\tClient  *http.Client\n}\n```\n\n```go\nfunc (c *DefaultClient) AllProviders(ctx context.Context) (ProviderNames, error)\n```\nAllProviders returns all configured providers\n\n```go\nfunc (c *DefaultClient) CancelJob(ctx context.Context, jobID JobID) (CancelJobResponse, error)\n```\nCancelJob will stop the execution of work in given provider\n\n```go\nfunc (c *DefaultClient) CreateJob(ctx context.Context, job CreateJobRequest) (CreateJobResponse, error)\n```\nCreateJob creates a new transcode job based on the request definition\n\n```go\nfunc (c *DefaultClient) CreatePreset(ctx context.Context, preset CreatePresetRequest) (CreatePresetResponse, error)\n```\nCreatePreset attempts to create a new preset based on the request definition\n\n```go\nfunc (c *DefaultClient) DeletePreset(ctx context.Context, name PresetName) (DeletePresetResponse, error)\n```\nDeletePreset removes the preset from all providers\n\n```go\nfunc (c *DefaultClient) DescribeJob(ctx context.Context, jobID JobID) (JobStatusResponse, error)\n```\nDescribeJob returns details about a single job\n\n```go\nfunc (c *DefaultClient) GetProvider(ctx context.Context, name ProviderName) (ProviderDescription, error)\n```\nGetProvider returns information on a specific provider\n\n```go\ntype DeletePresetResponse struct {\n\tResults   map[string]DeletePresetSummary `json:\"results\"`\n\tPresetMap string                         `json:\"presetMap\"`\n}\n```\nDeletePresetResponse contains the results of requests to remove a preset\n\n```go\ntype DeletePresetSummary struct {\n\tPresetID string `json:\"presetId\"`\n\tError    string `json:\"error,omitempty\"`\n}\n```\nDeletePresetSummary contains preset deletion results for a single provider\n\n```go\ntype DolbyVisionSettings struct {\n\tEnabled bool `json:\"enabled\" redis-hash:\"enabled\"`\n}\n```\nDolbyVisionSettings defines a set of configurations for setting DolbyVision metadata\n\n```go\ntype ExecutionEnvironment struct {\n\tCloud            string                  `json:\"cloud\"`\n\tRegion           string                  `json:\"region\"`\n\tComputeTags      map[ComputeClass]string `json:\"computeTags,omitempty\"`\n\tCredentialsAlias string                  `json:\"credentialsAlias,omitempty\"`\n\tInputAlias       string                  `json:\"inputAlias,omitempty\"`\n\tOutputAlias      string                  `json:\"outputAlias,omitempty\"`\n}\n```\nExecutionEnvironment contains configurations for the environment used while transcoding\n\n```go\ntype ExecutionFeatures map[string]interface{}\n```\nExecutionFeatures is a map whose key is a custom feature name and value is a json string representing the corresponding custom feature definition\n\n```go\ntype File struct {\n\tPath      string        `json:\"path\"`\n\tSize      int64         `json:\"fileSize\"`\n\tContainer string        `json:\"container\"`\n\tDuration  time.Duration `json:\"duration,omitempty\"`\n\n\tVideoCodec string   `json:\"videoCodec,omitempty\"`\n\tWidth      int      `json:\"width,omitempty\"`\n\tHeight     int      `json:\"height,omitempty\"`\n\tFrameRate  float64  `json:\"frameRate,omitempty\"`\n\tScanType   ScanType `json:\"scanType,omitempty\"`\n}\n```\nFile is a media file. It replaces the following objects SourceInfo: Duration, Height, Width, Codec CreateJobSourceInfo: Height, Width, FrameRate, File Size, ScanType SourceInfo:\n\n```go\ntype HDR10Settings struct {\n\tEnabled       bool   `json:\"enabled\"`\n\tMaxCLL        uint   `json:\"maxCLL,omitempty\"`\n\tMaxFALL       uint   `json:\"maxFALL,omitempty\"`\n\tMasterDisplay string `json:\"masterDisplay,omitempty\"`\n}\n```\nHDR10Settings defines a set of configurations for defining HDR10 metadata\n\n```go\ntype Image struct {\n\tURL string `json:\"url\"`\n}\n```\nImage defines the image overlay settings\n\n```go\ntype JobID string\n```\nJobID is our job's unique identifier\n\n```go\ntype JobOutput struct {\n\tFileName string     `json:\"fileName\"`\n\tPreset   PresetName `json:\"preset\"`\n}\n```\nJobOutput defines config parameters for single output in a job\n\n```go\ntype JobStatus struct {\n\tProgress      float64 `json:\"progress\"`\n\tStatus        Status  `json:\"status,omitempty\"`\n\tStatusMessage string  `json:\"statusMessage,omitempty\"`\n\n\tProviderJobID  string                 `json:\"providerJobId,omitempty\"`\n\tProviderName   string                 `json:\"providerName,omitempty\"`\n\tProviderStatus map[string]interface{} `json:\"providerStatus,omitempty\"`\n\n\tSourceInfo File `json:\"sourceInfo,omitempty\"`\n\n\tOutput OutputFiles `json:\"output\"`\n}\n```\nJobStatus is the representation of the status as the provider sees it.\n\n```go\ntype JobStatusResponse struct {\n\tJobStatus\n}\n```\nJobStatusResponse contains the results of describe job request\n\n```go\ntype NewPresetSummary struct {\n\tPresetID string\n\tError    string\n}\n```\nNewPresetSummary contains preset creation results for a single provider\n\n```go\ntype OutputFiles struct {\n\tDestination string `json:\"destination,omitempty\"`\n\tFiles       []File `json:\"files,omitempty\"`\n}\n```\nOutputFiles represents information about a job's outputs\n\n```go\ntype OutputOptions struct {\n\tExtension string `json:\"extension\"`\n}\n```\nOutputOptions is the set of options for the output file.\n\n```go\ntype Overlays struct {\n\tImages         []Image         `json:\"images,omitempty\"`\n\tTimecodeBurnin *TimecodeBurnin `json:\"timecodeBurnin,omitempty\"`\n}\n```\nOverlays defines all the overlay settings for a Video preset\n\n```go\ntype Preset struct {\n\tName            PresetName  `json:\"name,omitempty\"`\n\tDescription     string      `json:\"description,omitempty\"`\n\tSourceContainer string      `json:\"sourceContainer,omitempty\"`\n\tContainer       string      `json:\"container,omitempty\"`\n\tRateControl     string      `json:\"rateControl,omitempty\"`\n\tTwoPass         bool        `json:\"twoPass\"`\n\tVideo           VideoPreset `json:\"video\"`\n\tAudio           AudioPreset `json:\"audio\"`\n}\n```\nPreset defines the set of parameters of a given preset\n\n```go\ntype PresetName string\n```\nPresetName is a custom string type with the name of the preset\n\n```go\ntype ProviderCapabilities struct {\n\tInputFormats  []string `json:\"input\"`\n\tOutputFormats []string `json:\"output\"`\n\tDestinations  []string `json:\"destinations\"`\n}\n```\nCapabilities describes the available features in the provider.\n\n```go\ntype ProviderDescription struct {\n\tName         string               `json:\"name\"`\n\tCapabilities ProviderCapabilities `json:\"capabilities\"`\n\tHealth       ProviderHealth       `json:\"health\"`\n\tEnabled      bool                 `json:\"enabled\"`\n}\n```\nDescription fully describes a provider.\n\n```go\ntype ProviderHealth struct {\n\tOK      bool   `json:\"ok\"`\n\tMessage string `json:\"message,omitempty\"`\n}\n```\nHealth describes the current health status of the provider.\n\n```go\ntype ProviderName string\n```\nProviderName is a custom string type with the name of the provider\n\n```go\ntype ProviderNames []ProviderName\n```\nProviderNames holds many ProviderName instances\n\n```go\ntype ScanType string\n```\nScanType is a string that represents the scan type of the content.\n\n```go\nconst (\n\tScanTypeUnknown     ScanType = \"unknown\"\n\tScanTypeProgressive ScanType = \"progressive\"\n\tScanTypeInterlaced  ScanType = \"interlaced\"\n)\n```\n\n```go\ntype SidecarAssetKind = string\n```\nSidecarAssetKind is the type of sidecar asset being defined TODO(as): This is a type alias, we shouldn't be using it.\n\n```go\nconst SidecarAssetKindDolbyVisionMetadata SidecarAssetKind = \"dolbyVisionMetadata\"\n```\nSidecarAssetKindDolbyVisionMetadata defines the dolby vision dynamic metadata location\n\n```go\ntype Status string\n```\nStatus is the status of a transcoding job.\n\n```go\ntype StreamingParams struct {\n\tSegmentDuration  uint   `json:\"segmentDuration\"`\n\tProtocol         string `json:\"protocol\"`\n\tPlaylistFileName string `json:\"playlistFileName,omitempty\"`\n}\n```\nStreamingParams contains the configuration for media packaging\n\n```go\ntype TimecodeBurnin struct {\n\tEnabled  bool   `json:\"enabled\"`\n\tFontSize int    `json:\"fontSize,omitempty\"`\n\tPosition int    `json:\"position,omitempty\"`\n\tPrefix   string `json:\"prefix,omitempty\"`\n}\n```\nTimecodeBurnin defines the timecode burnin settings\n\n```go\ntype VideoPreset struct {\n\tProfile             string              `json:\"profile,omitempty\"`\n\tProfileLevel        string              `json:\"profileLevel,omitempty\"`\n\tWidth               string              `json:\"width,omitempty\"`\n\tHeight              string              `json:\"height,omitempty\"`\n\tCodec               string              `json:\"codec,omitempty\"`\n\tBitrate             string              `json:\"bitrate,omitempty\"`\n\tGopSize             string              `json:\"gopSize,omitempty\"`\n\tGopUnit             string              `json:\"gopUnit,omitempty\"`\n\tGopMode             string              `json:\"gopMode,omitempty\"`\n\tInterlaceMode       string              `json:\"interlaceMode,omitempty\"`\n\tHDR10Settings       HDR10Settings       `json:\"hdr10\"`\n\tDolbyVisionSettings DolbyVisionSettings `json:\"dolbyVision\"`\n\tOverlays            *Overlays           `json:\"overlays,omitempty\"`\n\n\t// Crop contains offsets for top, bottom, left and right src cropping\n\tCrop video.Crop `json:\"crop\"`\n\n\t// Framerate contains individual integer elements of a fractional framerate\n\t// including both the numerator and its divisor\n\tFramerate video.Framerate `json:\"framerate\"`\n}\n```\nVideoPreset defines the set of parameters for video on a given preset\n\n","path":"github.com/cbsinteractive/transcode-orchestrator/client/transcoding","name":"transcoding","synopsis":"","isRedistributable":true}
