Help us shape the future of Go! Take the 2026 Go Developer Survey

mediatailor

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 25 Imported by: 0

README

MediaTailor

Parity grade: A · SDK aws-sdk-go-v2/service/mediatailor@v1.63.4 · last audited 2026-10-07 (ed6ef1a53)

Coverage

Metric Value
PARITY entries audited 48 (46 ok, 2 partial)
Feature families 2 (2 ok)
Known gaps 3
Structural gaps (can't be emulated) 2
Deferred items 0
Resource leaks clean
Known gaps
  • GetChannelSchedule.DurationMinutes is not applied: the pinned SDK doc says only 'duration in minutes of the channel schedule' with no windowing baseline, so any choice would be invented.
  • CreateProgram accepts both VodSourceName and LiveSourceName: neither the API reference nor the pinned SDK (v1.63.4) documents an error for it. Unreferenced-source rejection is proven by TestCreateProgram_RejectsUnknownReferences.
  • PlaybackConfiguration dual-stack response prefixes (DualStackPlaybackEndpointPrefix, DualStackSessionInitializationEndpointPrefix, HlsConfiguration.DualStackManifestEndpointPrefix) are never set: the SDK gives only the dual-stack API host (api.mediatailor.{region}.api.aws), not the playback host pattern, so deriving one would be invented.
Structural gaps

These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.

  • ListAlerts always returns an empty Items page (resourceArn is validated as required): alerts are raised by MediaTailor's runtime when it fails to process sources or playback, and no such processing exists to raise them.
  • ProgramScheduleEntry.ScheduleAdBreaks is always empty: real MediaTailor fills it from SCTE-35 avails detected by parsing source manifests, which this service does not do. Deriving it from the client-set Program.AdBreaks would be fabrication.

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConflict = awserr.New("BadRequestException", awserr.ErrAlreadyExists)

ErrConflict is returned for state conflict operations.

View Source
var ErrInvalidParameter = awserr.New("BadRequestException", awserr.ErrInvalidParameter)

ErrInvalidParameter is returned for invalid input.

View Source
var ErrNilAppContext = errors.New("AppContext is required")

ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.

View Source
var ErrNotFound = awserr.New("NotFoundException", awserr.ErrNotFound)

ErrNotFound is returned when a resource does not exist.

Functions

This section is empty.

Types

type AccessConfiguration added in v1.3.1

type AccessConfiguration struct {
	SecretsManagerAccessTokenConfiguration *SecretsManagerAccessTokenConfiguration
	AccessType                             string
}

AccessConfiguration is the authentication configuration for a source location's HttpConfiguration.BaseUrl.

type AdBreak added in v1.2.0

type AdBreak struct {
	Slate               *SlateSource
	SpliceInsertMessage *SpliceInsertMessage
	TimeSignalMessage   *TimeSignalMessage
	MessageType         string
	AdBreakMetadata     []KeyValuePair
	OffsetMillis        int64
}

AdBreak is an ad break configuration attached to a Program or AlternateMedia.

type AlternateMedia added in v1.2.0

type AlternateMedia struct {
	ClipRange                *ClipRange
	SourceLocationName       string
	VodSourceName            string
	LiveSourceName           string
	AdBreaks                 []AdBreak
	ScheduledStartTimeMillis int64
	DurationMillis           int64
}

AlternateMedia is a playlist of media that plays instead of the default media on a particular program, scoped to an Audience.

type AudienceMedia added in v1.2.0

type AudienceMedia struct {
	Audience       string
	AlternateMedia []AlternateMedia
}

AudienceMedia pairs an audience with the AlternateMedia MediaTailor plays for it.

type Channel

type Channel struct {
	FillerSlate      *SlateSource
	TimeShift        *TimeShiftConfiguration
	CreationTime     time.Time
	LastModified     time.Time
	Tags             map[string]string
	LogConfiguration ChannelLogConfiguration
	ARN              string
	Name             string
	PlaybackMode     string
	ChannelState     string
	Tier             string
	Outputs          []OutputItem
	Audiences        []string
}

Channel represents a MediaTailor channel. Tags first, strings before slice: reduces GC pointer scan.

type ChannelLogConfiguration added in v1.2.0

type ChannelLogConfiguration struct {
	LogTypes []string
}

ChannelLogConfiguration is the log configuration for a channel, set via ConfigureLogsForChannel.

type ChannelSummary

type ChannelSummary struct {
	FillerSlate      *SlateSource
	TimeShift        *TimeShiftConfiguration
	CreationTime     time.Time
	LastModified     time.Time
	Tags             map[string]string
	LogConfiguration ChannelLogConfiguration
	Name             string
	ARN              string
	PlaybackMode     string
	ChannelState     string
	Tier             string
	Outputs          []OutputItem
	Audiences        []string
}

ChannelSummary is a channel in a list response.

type ClipRange added in v1.2.0

type ClipRange struct {
	StartOffsetMillis int64
	EndOffsetMillis   int64
}

ClipRange is a VOD source clip range configuration.

type DashPlaylistSettings

type DashPlaylistSettings struct {
	ManifestWindowSeconds             int `json:"manifestWindowSeconds"`
	MinBufferTimeSeconds              int `json:"minBufferTimeSeconds"`
	MinUpdatePeriodSeconds            int `json:"minUpdatePeriodSeconds"`
	SuggestedPresentationDelaySeconds int `json:"suggestedPresentationDelaySeconds"`
}

DashPlaylistSettings holds DASH playlist configuration.

type DefaultSegmentDeliveryConfiguration added in v1.3.1

type DefaultSegmentDeliveryConfiguration struct {
	BaseURL string
}

DefaultSegmentDeliveryConfiguration is the default host for a source location's segment delivery server.

type Function

type Function struct {
	CustomOutputConfiguration       map[string]any
	HTTPRequestConfiguration        map[string]any
	SequentialExecutorConfiguration map[string]any
	Tags                            map[string]string
	FunctionID                      string
	FunctionType                    string
	ARN                             string
	Description                     string
}

Function represents a MediaTailor function. CustomOutputConfiguration, HTTPRequestConfiguration and SequentialExecutorConfiguration are stored as decoded-JSON pass-through (the FunctionType-specific config gopherstack does not execute/interpret, matching PlaybackConfiguration's Extra pattern in handler_helpers.go's extractExtraConfig/mergeExtraConfig) so a client reads back exactly what it Put.

type FunctionSummary

type FunctionSummary struct {
	CustomOutputConfiguration       map[string]any
	HTTPRequestConfiguration        map[string]any
	SequentialExecutorConfiguration map[string]any
	Tags                            map[string]string
	FunctionID                      string
	FunctionType                    string
	ARN                             string
	Description                     string
}

FunctionSummary is a function in a list response.

type HTTPPackageConfiguration

type HTTPPackageConfiguration struct {
	Path        string `json:"path"`
	SourceGroup string `json:"sourceGroup"`
	Type        string `json:"type"`
}

HTTPPackageConfiguration is a packaging configuration for a VOD source.

type Handler

type Handler struct {
	Backend StorageBackend
	// contains filtered or unexported fields
}

Handler handles MediaTailor HTTP requests.

func NewHandler

func NewHandler(b StorageBackend) *Handler

NewHandler constructs a new Handler.

func (*Handler) BackendFor

func (h *Handler) BackendFor(region string) StorageBackend

BackendFor returns the backend serving region: the home backend, or the sibling built on first use.

func (*Handler) EnableRegions

func (h *Handler) EnableRegions()

EnableRegions makes h serve every other region through lazily built per-region siblings.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation classifies the request into an operation name.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource returns the resource identifier from the request.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns all supported operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler serves each request from the handler of its region.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) RegionBackends

func (h *Handler) RegionBackends() []StorageBackend

RegionBackends returns the home backend followed by every sibling built so far.

func (*Handler) RegionHandler

func (h *Handler) RegionHandler(region string) *Handler

RegionHandler returns the handler serving region: h itself for the home region, else its sibling.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears every region.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a function that matches MediaTailor requests by path and Authorization header. MediaTailor shares /channels paths with MediaPackage and IoTAnalytics, so we distinguish by the service name in the AWS Signature header.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable; other regions ride in an additive "regions" key.

type HlsPlaylistSettings

type HlsPlaylistSettings struct {
	ManifestWindowSeconds int `json:"manifestWindowSeconds"`
}

HlsPlaylistSettings holds HLS playlist configuration.

type InMemoryBackend

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

InMemoryBackend is an in-memory implementation of StorageBackend.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the configured account ID.

func (*InMemoryBackend) ConfigureLogsForChannel

func (b *InMemoryBackend) ConfigureLogsForChannel(channelName string, logTypes []string) (string, []string, error)

ConfigureLogsForChannel sets log types on a channel and persists them so they are queryable back from Describe/List/CreateChannel's LogConfiguration.

func (*InMemoryBackend) ConfigureLogsForPlaybackConfiguration

func (b *InMemoryBackend) ConfigureLogsForPlaybackConfiguration(
	playbackConfigName string,
	percentEnabled int,
	enabledLoggingStrategies []string,
	adsInteractionLog, manifestServiceInteractionLog map[string]any,
) (*PlaybackConfigurationLogConfiguration, error)

ConfigureLogsForPlaybackConfiguration sets the logging configuration for a playback configuration and persists it so it is queryable back from Get/List/PutPlaybackConfiguration's LogConfiguration.

func (*InMemoryBackend) CreateChannel

func (b *InMemoryBackend) CreateChannel(
	name, playbackMode, tier string,
	outputs []OutputItem,
	fillerSlate *SlateSource,
	audiences []string,
	timeShift *TimeShiftConfiguration,
	tags map[string]string,
) (*Channel, error)

CreateChannel creates a new channel.

func (*InMemoryBackend) CreateLiveSource

func (b *InMemoryBackend) CreateLiveSource(
	sourceLocationName, liveSourceName string,
	httpPackageConfigurations []HTTPPackageConfiguration,
	tags map[string]string,
) (*LiveSource, error)

CreateLiveSource creates a new live source.

func (*InMemoryBackend) CreatePrefetchSchedule

func (b *InMemoryBackend) CreatePrefetchSchedule(
	playbackConfigName, name, scheduleType, streamID string,
	retrieval *PrefetchRetrieval,
	consumption *PrefetchConsumption,
	recurringConfig map[string]any,
	tags map[string]string,
) (*PrefetchSchedule, error)

CreatePrefetchSchedule creates a prefetch schedule.

func (*InMemoryBackend) CreateProgram

func (b *InMemoryBackend) CreateProgram(
	channelName, programName, sourceLocationName, vodSourceName, liveSourceName string,
	scheduleConfig *ScheduleConfiguration,
	adBreaks []AdBreak,
	audienceMedia []AudienceMedia,
	tags map[string]string,
) (*Program, error)

CreateProgram creates a program within a channel.

func (*InMemoryBackend) CreateSourceLocation

func (b *InMemoryBackend) CreateSourceLocation(
	name, baseURL string,
	accessConfig *AccessConfiguration,
	defaultSegmentDelivery *DefaultSegmentDeliveryConfiguration,
	segmentDeliveryConfigs []SegmentDeliveryConfiguration,
	tags map[string]string,
) (*SourceLocation, error)

CreateSourceLocation creates a new source location.

func (*InMemoryBackend) CreateVodSource

func (b *InMemoryBackend) CreateVodSource(
	sourceLocationName, vodSourceName string,
	httpPackageConfigurations []HTTPPackageConfiguration,
	tags map[string]string,
) (*VodSource, error)

CreateVodSource creates a new VOD source.

func (*InMemoryBackend) DeleteChannel

func (b *InMemoryBackend) DeleteChannel(name string) error

DeleteChannel deletes a channel, cascade-deleting its policy and every program scheduled on it so no ghost rows remain in the programs table (or its byChannel index) after the channel itself is gone.

func (*InMemoryBackend) DeleteChannelPolicy

func (b *InMemoryBackend) DeleteChannelPolicy(channelName string) error

DeleteChannelPolicy deletes a channel policy.

func (*InMemoryBackend) DeleteFunction

func (b *InMemoryBackend) DeleteFunction(functionID string) error

DeleteFunction deletes a function.

func (*InMemoryBackend) DeleteLiveSource

func (b *InMemoryBackend) DeleteLiveSource(sourceLocationName, liveSourceName string) error

DeleteLiveSource deletes a live source.

func (*InMemoryBackend) DeletePlaybackConfiguration

func (b *InMemoryBackend) DeletePlaybackConfiguration(name string) error

DeletePlaybackConfiguration deletes a playback configuration, cascading to every prefetch schedule attached to it so no ghost rows remain in the prefetchSchedules table (or its byPlaybackConfig index) afterward. Idempotent: returns nil if the configuration does not exist.

func (*InMemoryBackend) DeletePrefetchSchedule

func (b *InMemoryBackend) DeletePrefetchSchedule(playbackConfigName, name string) error

DeletePrefetchSchedule deletes a prefetch schedule.

func (*InMemoryBackend) DeleteProgram

func (b *InMemoryBackend) DeleteProgram(channelName, programName string) error

DeleteProgram deletes a program.

func (*InMemoryBackend) DeleteSourceLocation

func (b *InMemoryBackend) DeleteSourceLocation(name string) error

DeleteSourceLocation deletes a source location. Returns ConflictException if any vod or live sources are still attached.

func (*InMemoryBackend) DeleteVodSource

func (b *InMemoryBackend) DeleteVodSource(sourceLocationName, vodSourceName string) error

DeleteVodSource deletes a VOD source.

func (*InMemoryBackend) DescribeChannel

func (b *InMemoryBackend) DescribeChannel(name string) (*Channel, error)

DescribeChannel returns a channel by name.

func (*InMemoryBackend) DescribeLiveSource

func (b *InMemoryBackend) DescribeLiveSource(sourceLocationName, liveSourceName string) (*LiveSource, error)

DescribeLiveSource returns a live source by name.

func (*InMemoryBackend) DescribeProgram

func (b *InMemoryBackend) DescribeProgram(channelName, programName string) (*Program, error)

DescribeProgram returns a program.

func (*InMemoryBackend) DescribeSourceLocation

func (b *InMemoryBackend) DescribeSourceLocation(name string) (*SourceLocation, error)

DescribeSourceLocation returns a source location by name.

func (*InMemoryBackend) DescribeVodSource

func (b *InMemoryBackend) DescribeVodSource(sourceLocationName, vodSourceName string) (*VodSource, error)

DescribeVodSource returns a VOD source by name.

func (*InMemoryBackend) GetChannelPolicy

func (b *InMemoryBackend) GetChannelPolicy(channelName string) (string, error)

GetChannelPolicy returns a channel policy.

func (*InMemoryBackend) GetChannelSchedule

func (b *InMemoryBackend) GetChannelSchedule(
	channelName, audience string, maxResults int, nextToken string,
) ([]*ProgramScheduleEntry, string, error)

GetChannelSchedule returns a paginated schedule for a channel.

func (*InMemoryBackend) GetFunction

func (b *InMemoryBackend) GetFunction(functionID string) (*Function, error)

GetFunction returns a function by ID.

func (*InMemoryBackend) GetPlaybackConfiguration

func (b *InMemoryBackend) GetPlaybackConfiguration(name string) (*PlaybackConfiguration, error)

GetPlaybackConfiguration returns a playback configuration by name.

func (*InMemoryBackend) GetPrefetchSchedule

func (b *InMemoryBackend) GetPrefetchSchedule(playbackConfigName, name string) (*PrefetchSchedule, error)

GetPrefetchSchedule returns a prefetch schedule.

func (*InMemoryBackend) ListChannels

func (b *InMemoryBackend) ListChannels(maxResults int, nextToken string) ([]*ChannelSummary, string, error)

ListChannels returns a paginated list of channels.

func (*InMemoryBackend) ListFunctions

func (b *InMemoryBackend) ListFunctions(maxResults int, nextToken string) ([]*FunctionSummary, string, error)

ListFunctions returns a paginated list of functions.

func (*InMemoryBackend) ListLiveSources

func (b *InMemoryBackend) ListLiveSources(
	sourceLocationName string, maxResults int, nextToken string,
) ([]*LiveSourceSummary, string, error)

ListLiveSources returns live sources for a source location.

func (*InMemoryBackend) ListPlaybackConfigurations

func (b *InMemoryBackend) ListPlaybackConfigurations(
	maxResults int,
	nextToken string,
) ([]*PlaybackConfigurationSummary, string, error)

ListPlaybackConfigurations returns a paginated list of playback configurations.

func (*InMemoryBackend) ListPrefetchSchedules

func (b *InMemoryBackend) ListPrefetchSchedules(
	playbackConfigName, scheduleType, streamID string,
	maxResults int,
	nextToken string,
) ([]*PrefetchSchedule, string, error)

ListPrefetchSchedules returns prefetch schedules for a playback configuration, optionally filtered by scheduleType ("SINGLE", "RECURRING", "ALL", or "" -- all three are treated as no filter, matching ListPrefetchScheduleType's ALL member) and by an exact streamID match.

func (*InMemoryBackend) ListSourceLocations

func (b *InMemoryBackend) ListSourceLocations(
	maxResults int,
	nextToken string,
) ([]*SourceLocationSummary, string, error)

ListSourceLocations returns a paginated list of source locations.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceARN string) (map[string]string, error)

ListTagsForResource returns all tags for a resource.

func (*InMemoryBackend) ListVodSources

func (b *InMemoryBackend) ListVodSources(
	sourceLocationName string,
	maxResults int,
	nextToken string,
) ([]*VodSourceSummary, string, error)

ListVodSources returns a paginated list of VOD sources for a source location.

func (*InMemoryBackend) PutChannelPolicy

func (b *InMemoryBackend) PutChannelPolicy(channelName, policy string) error

PutChannelPolicy sets a policy on a channel.

func (*InMemoryBackend) PutFunction

func (b *InMemoryBackend) PutFunction(
	functionID, functionType, description string,
	customOutput, httpRequest, sequentialExecutor map[string]any,
	tags map[string]string,
) (*Function, error)

PutFunction creates or updates a function.

func (*InMemoryBackend) PutPlaybackConfiguration

func (b *InMemoryBackend) PutPlaybackConfiguration(
	name, adDecisionServerURL, videoContentSourceURL string,
	tags map[string]string,
	extra map[string]any,
) (*PlaybackConfiguration, error)

PutPlaybackConfiguration creates or updates a playback configuration.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the configured region.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all stored data.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore deserializes state from JSON.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serializes current state to JSON.

func (*InMemoryBackend) StartChannel

func (b *InMemoryBackend) StartChannel(name string) error

StartChannel transitions a channel to RUNNING. Idempotent: no error if already running.

func (*InMemoryBackend) StopChannel

func (b *InMemoryBackend) StopChannel(name string) error

StopChannel transitions a channel to STOPPED. Idempotent: no error if already stopped.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceARN string, tags map[string]string) error

TagResource adds tags to a resource.

func (*InMemoryBackend) TaggedResources added in v1.3.1

func (b *InMemoryBackend) TaggedResources() []TaggedEntry

TaggedResources returns every MediaTailor resource ARN that currently has at least one tag applied via TagResource.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error

UntagResource removes tag keys from a resource. Idempotent: returns nil if the resource has no tags.

func (*InMemoryBackend) UpdateChannel

func (b *InMemoryBackend) UpdateChannel(
	name string,
	outputs []OutputItem,
	fillerSlate *SlateSource,
	audiences []string,
	timeShift *TimeShiftConfiguration,
) (*Channel, error)

UpdateChannel updates a channel's outputs, filler slate, audiences, and time-shift configuration.

func (*InMemoryBackend) UpdateLiveSource

func (b *InMemoryBackend) UpdateLiveSource(
	sourceLocationName, liveSourceName string,
	httpPackageConfigurations []HTTPPackageConfiguration,
) (*LiveSource, error)

UpdateLiveSource updates a live source.

func (*InMemoryBackend) UpdateProgram

func (b *InMemoryBackend) UpdateProgram(
	channelName, programName string,
	scheduleConfig *UpdateProgramScheduleConfiguration,
	adBreaks []AdBreak,
	audienceMedia []AudienceMedia,
) (*Program, error)

UpdateProgram updates a program's schedule configuration, ad breaks, and audience media. Per the real UpdateProgramInput model, ScheduleConfiguration is a required top-level member, but its Transition/ClipRange sub-fields are individually optional -- an empty ScheduleConfiguration changes nothing.

func (*InMemoryBackend) UpdateSourceLocation

func (b *InMemoryBackend) UpdateSourceLocation(
	name, baseURL string,
	accessConfig *AccessConfiguration,
	defaultSegmentDelivery *DefaultSegmentDeliveryConfiguration,
	segmentDeliveryConfigs []SegmentDeliveryConfiguration,
) (*SourceLocation, error)

UpdateSourceLocation updates a source location's base URL and optional access/segment-delivery configuration.

func (*InMemoryBackend) UpdateVodSource

func (b *InMemoryBackend) UpdateVodSource(
	sourceLocationName, vodSourceName string,
	httpPackageConfigurations []HTTPPackageConfiguration,
) (*VodSource, error)

UpdateVodSource updates a VOD source's package configurations.

type KeyValuePair added in v1.2.0

type KeyValuePair struct {
	Key   string
	Value string
}

KeyValuePair is a SCTE35_ENHANCED ad break metadata entry.

type LiveSource

type LiveSource struct {
	CreationTime              time.Time
	LastModified              time.Time
	Tags                      map[string]string
	ARN                       string
	SourceLocationName        string
	LiveSourceName            string
	HTTPPackageConfigurations []HTTPPackageConfiguration
}

LiveSource represents a MediaTailor live source. Tags first, strings before slice: reduces GC pointer scan.

type LiveSourceSummary

type LiveSourceSummary struct {
	CreationTime              time.Time
	LastModified              time.Time
	Tags                      map[string]string
	SourceLocationName        string
	LiveSourceName            string
	ARN                       string
	HTTPPackageConfigurations []HTTPPackageConfiguration
}

LiveSourceSummary is a live source in a list response.

type OutputItem

type OutputItem struct {
	HlsPlaylistSettings  *HlsPlaylistSettings  `json:"hlsPlaylistSettings,omitempty"`
	DashPlaylistSettings *DashPlaylistSettings `json:"dashPlaylistSettings,omitempty"`
	ManifestName         string                `json:"manifestName"`
	SourceGroup          string                `json:"sourceGroup"`
}

OutputItem represents a channel output configuration. Pointer fields first: reduces GC pointer scan.

type PlaybackConfiguration

type PlaybackConfiguration struct {
	Tags                        map[string]string
	LogConfiguration            *PlaybackConfigurationLogConfiguration
	Extra                       map[string]any
	Name                        string
	AdDecisionServerURL         string
	VideoContentSourceURL       string
	PlaybackConfigurationARN    string
	PlaybackEndpointPrefix      string
	SessionInitializationPrefix string
	HlsManifestEndpointPrefix   string
	// DualStackPlaybackEndpointPrefix and DualStackSessionInitializationEndpointPrefix
	// are response-only members of the real PlaybackConfiguration type (no
	// PutPlaybackConfigurationInput member sets them; aws-sdk-go-v2/service/mediatailor
	// @v1.63.4 types/types.go:1049,1053). gopherstack never populates them -- doing so
	// would mean fabricating a dual-stack URL a client might actually dial, which is
	// worse than the field being absent, matching a real account with dual-stack
	// endpoints not provisioned.
	DualStackPlaybackEndpointPrefix              string
	DualStackSessionInitializationEndpointPrefix string
	// HlsDualStackManifestEndpointPrefix is HlsConfiguration's own response-only
	// dual-stack member (no PutPlaybackConfigurationInput counterpart;
	// aws-sdk-go-v2/service/mediatailor@v1.63.4 types/types.go:688). Same
	// reasoning as the two fields above: never populated, absent rather than
	// a fabricated dialable URL.
	HlsDualStackManifestEndpointPrefix string
}

PlaybackConfiguration represents a MediaTailor playback configuration. Tags first: reduces GC pointer scan.

type PlaybackConfigurationLogConfiguration added in v1.2.0

type PlaybackConfigurationLogConfiguration struct {
	AdsInteractionLog             map[string]any
	ManifestServiceInteractionLog map[string]any
	EnabledLoggingStrategies      []string
	PercentEnabled                int
}

PlaybackConfigurationLogConfiguration is the logging configuration for a playback configuration, set via ConfigureLogsForPlaybackConfiguration.

type PlaybackConfigurationSummary

type PlaybackConfigurationSummary struct {
	Tags                        map[string]string
	LogConfiguration            *PlaybackConfigurationLogConfiguration
	Extra                       map[string]any
	Name                        string
	AdDecisionServerURL         string
	PlaybackEndpointPrefix      string
	SessionInitializationPrefix string
	HlsManifestEndpointPrefix   string
	VideoContentSourceURL       string
	PlaybackConfigurationARN    string
}

PlaybackConfigurationSummary is a playback configuration in a list response.

type PrefetchConsumption

type PrefetchConsumption struct {
	StartTime time.Time
	EndTime   time.Time
}

PrefetchConsumption holds the consumption configuration for a prefetch schedule.

type PrefetchRetrieval

type PrefetchRetrieval struct {
	DynamicVariables map[string]string
	StartTime        time.Time
	EndTime          time.Time
}

PrefetchRetrieval holds the retrieval configuration for a prefetch schedule.

type PrefetchSchedule

type PrefetchSchedule struct {
	CreationTime                   time.Time
	Retrieval                      *PrefetchRetrieval
	Consumption                    *PrefetchConsumption
	RecurringPrefetchConfiguration map[string]any
	Tags                           map[string]string
	ARN                            string
	Name                           string
	PlaybackConfigurationName      string
	ScheduleType                   string
	StreamID                       string
}

PrefetchSchedule represents a MediaTailor prefetch schedule.

type Program

type Program struct {
	ScheduledStartTime time.Time
	CreationTime       time.Time
	ClipRange          *ClipRange
	Tags               map[string]string
	ARN                string
	ChannelName        string
	ProgramName        string
	SourceLocationName string
	VodSourceName      string
	LiveSourceName     string
	AdBreaks           []AdBreak
	AudienceMedia      []AudienceMedia
	DurationMillis     int64
}

Program represents a MediaTailor program within a channel.

type ProgramScheduleEntry

type ProgramScheduleEntry struct {
	ApproximateStartTime       time.Time
	ARN                        string
	ChannelName                string
	ProgramName                string
	SourceLocationName         string
	VodSourceName              string
	LiveSourceName             string
	ScheduleEntryType          string
	ScheduleAdBreaks           []ScheduleAdBreak
	Audiences                  []string
	ApproximateDurationSeconds int64
}

ProgramScheduleEntry is a program as returned in a channel schedule.

type Provider

type Provider struct{}

Provider implements service.Provider for the MediaTailor service.

func (*Provider) Init

Init initializes the MediaTailor backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type ScheduleAdBreak added in v1.2.0

type ScheduleAdBreak struct {
	ApproximateStartTime       time.Time
	SourceLocationName         string
	VodSourceName              string
	ApproximateDurationSeconds int64
}

ScheduleAdBreak is the schedule's ad break properties, as returned in a ProgramScheduleEntry.

type ScheduleConfiguration added in v1.2.0

type ScheduleConfiguration struct {
	ClipRange  *ClipRange
	Transition Transition
}

ScheduleConfiguration is a program's schedule configuration, required by CreateProgram.

type SecretsManagerAccessTokenConfiguration added in v1.3.1

type SecretsManagerAccessTokenConfiguration struct {
	HeaderName      string
	SecretArn       string
	SecretStringKey string
}

SecretsManagerAccessTokenConfiguration is the AWS Secrets Manager access token configuration for AccessConfiguration's SECRETS_MANAGER_ACCESS_TOKEN AccessType.

type SegmentDeliveryConfiguration added in v1.3.1

type SegmentDeliveryConfiguration struct {
	BaseURL string
	Name    string
}

SegmentDeliveryConfiguration is a named segment delivery server for a source location.

type SlateSource

type SlateSource struct {
	SourceLocationName string
	VodSourceName      string
}

SlateSource identifies a slate source for channel filler slate.

type SourceLocation

type SourceLocation struct {
	CreationTime                        time.Time
	LastModified                        time.Time
	AccessConfiguration                 *AccessConfiguration
	DefaultSegmentDeliveryConfiguration *DefaultSegmentDeliveryConfiguration
	Tags                                map[string]string
	Name                                string
	ARN                                 string
	HTTPConfigurationURL                string
	SegmentDeliveryConfigurations       []SegmentDeliveryConfiguration
}

SourceLocation represents a MediaTailor source location.

type SourceLocationSummary

type SourceLocationSummary struct {
	CreationTime                        time.Time
	LastModified                        time.Time
	AccessConfiguration                 *AccessConfiguration
	DefaultSegmentDeliveryConfiguration *DefaultSegmentDeliveryConfiguration
	Tags                                map[string]string
	Name                                string
	ARN                                 string
	HTTPConfigurationURL                string
	SegmentDeliveryConfigurations       []SegmentDeliveryConfiguration
}

SourceLocationSummary is a source location in a list response.

type SpliceInsertMessage added in v1.2.0

type SpliceInsertMessage struct {
	AvailNum        int32
	AvailsExpected  int32
	SpliceEventID   int32
	UniqueProgramID int32
}

SpliceInsertMessage configures the SCTE-35 splice_insert() message for an ad break.

type StorageBackend

type StorageBackend interface {
	// PlaybackConfiguration
	PutPlaybackConfiguration(
		name, adDecisionServerURL, videoContentSourceURL string,
		tags map[string]string,
		extra map[string]any,
	) (*PlaybackConfiguration, error)
	GetPlaybackConfiguration(name string) (*PlaybackConfiguration, error)
	DeletePlaybackConfiguration(name string) error
	ListPlaybackConfigurations(
		maxResults int,
		nextToken string,
	) ([]*PlaybackConfigurationSummary, string, error)

	// Channel
	CreateChannel(
		name, playbackMode, tier string,
		outputs []OutputItem,
		fillerSlate *SlateSource,
		audiences []string,
		timeShift *TimeShiftConfiguration,
		tags map[string]string,
	) (*Channel, error)
	DescribeChannel(name string) (*Channel, error)
	UpdateChannel(
		name string,
		outputs []OutputItem,
		fillerSlate *SlateSource,
		audiences []string,
		timeShift *TimeShiftConfiguration,
	) (*Channel, error)
	DeleteChannel(name string) error
	ListChannels(maxResults int, nextToken string) ([]*ChannelSummary, string, error)
	StartChannel(name string) error
	StopChannel(name string) error

	// SourceLocation
	CreateSourceLocation(
		name, baseURL string,
		accessConfig *AccessConfiguration,
		defaultSegmentDelivery *DefaultSegmentDeliveryConfiguration,
		segmentDeliveryConfigs []SegmentDeliveryConfiguration,
		tags map[string]string,
	) (*SourceLocation, error)
	DescribeSourceLocation(name string) (*SourceLocation, error)
	UpdateSourceLocation(
		name, baseURL string,
		accessConfig *AccessConfiguration,
		defaultSegmentDelivery *DefaultSegmentDeliveryConfiguration,
		segmentDeliveryConfigs []SegmentDeliveryConfiguration,
	) (*SourceLocation, error)
	DeleteSourceLocation(name string) error
	ListSourceLocations(maxResults int, nextToken string) ([]*SourceLocationSummary, string, error)

	// VodSource
	CreateVodSource(
		sourceLocationName, vodSourceName string,
		httpPackageConfigurations []HTTPPackageConfiguration,
		tags map[string]string,
	) (*VodSource, error)
	DescribeVodSource(sourceLocationName, vodSourceName string) (*VodSource, error)
	UpdateVodSource(
		sourceLocationName, vodSourceName string,
		httpPackageConfigurations []HTTPPackageConfiguration,
	) (*VodSource, error)
	DeleteVodSource(sourceLocationName, vodSourceName string) error
	ListVodSources(
		sourceLocationName string,
		maxResults int,
		nextToken string,
	) ([]*VodSourceSummary, string, error)

	// LiveSource
	CreateLiveSource(
		sourceLocationName, liveSourceName string,
		httpPackageConfigurations []HTTPPackageConfiguration,
		tags map[string]string,
	) (*LiveSource, error)
	DescribeLiveSource(sourceLocationName, liveSourceName string) (*LiveSource, error)
	UpdateLiveSource(
		sourceLocationName, liveSourceName string,
		httpPackageConfigurations []HTTPPackageConfiguration,
	) (*LiveSource, error)
	DeleteLiveSource(sourceLocationName, liveSourceName string) error
	ListLiveSources(
		sourceLocationName string,
		maxResults int,
		nextToken string,
	) ([]*LiveSourceSummary, string, error)

	// PrefetchSchedule
	CreatePrefetchSchedule(
		playbackConfigName, name, scheduleType, streamID string,
		retrieval *PrefetchRetrieval,
		consumption *PrefetchConsumption,
		recurringConfig map[string]any,
		tags map[string]string,
	) (*PrefetchSchedule, error)
	GetPrefetchSchedule(playbackConfigName, name string) (*PrefetchSchedule, error)
	DeletePrefetchSchedule(playbackConfigName, name string) error
	ListPrefetchSchedules(
		playbackConfigName, scheduleType, streamID string,
		maxResults int,
		nextToken string,
	) ([]*PrefetchSchedule, string, error)

	// Program
	CreateProgram(
		channelName, programName, sourceLocationName, vodSourceName, liveSourceName string,
		scheduleConfig *ScheduleConfiguration,
		adBreaks []AdBreak,
		audienceMedia []AudienceMedia,
		tags map[string]string,
	) (*Program, error)
	DescribeProgram(channelName, programName string) (*Program, error)
	UpdateProgram(
		channelName, programName string,
		scheduleConfig *UpdateProgramScheduleConfiguration,
		adBreaks []AdBreak,
		audienceMedia []AudienceMedia,
	) (*Program, error)
	DeleteProgram(channelName, programName string) error
	GetChannelSchedule(
		channelName, audience string,
		maxResults int,
		nextToken string,
	) ([]*ProgramScheduleEntry, string, error)

	// ChannelPolicy
	PutChannelPolicy(channelName, policy string) error
	GetChannelPolicy(channelName string) (string, error)
	DeleteChannelPolicy(channelName string) error

	// Function
	PutFunction(
		functionID, functionType, description string,
		customOutput, httpRequest, sequentialExecutor map[string]any,
		tags map[string]string,
	) (*Function, error)
	GetFunction(functionID string) (*Function, error)
	DeleteFunction(functionID string) error
	ListFunctions(maxResults int, nextToken string) ([]*FunctionSummary, string, error)

	// Logs
	ConfigureLogsForChannel(channelName string, logTypes []string) (string, []string, error)
	ConfigureLogsForPlaybackConfiguration(
		playbackConfigName string,
		percentEnabled int,
		enabledLoggingStrategies []string,
		adsInteractionLog, manifestServiceInteractionLog map[string]any,
	) (*PlaybackConfigurationLogConfiguration, error)

	// Tags
	ListTagsForResource(resourceARN string) (map[string]string, error)
	TagResource(resourceARN string, tags map[string]string) error
	UntagResource(resourceARN string, tagKeys []string) error

	AccountID() string
	Region() string
	Reset()
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
}

StorageBackend is the interface for MediaTailor storage operations.

type TaggedEntry added in v1.3.1

type TaggedEntry struct {
	Tags map[string]string
	ARN  string
}

TaggedEntry pairs a resource ARN with its tags.

type TimeShiftConfiguration added in v1.2.0

type TimeShiftConfiguration struct {
	MaxTimeDelaySeconds int
}

TimeShiftConfiguration is the time-shifted viewing configuration for a channel.

type TimeSignalMessage added in v1.2.0

type TimeSignalMessage struct {
	SegmentationDescriptors []map[string]any
}

TimeSignalMessage configures the SCTE-35 time_signal message for an ad break. SegmentationDescriptors is carried as decoded-JSON pass-through: MediaTailor stores this deeply nested SCTE-35 metadata without interpreting it during ad insertion, and gopherstack does not run a real ad-insertion pipeline, so exact round-trip (what a client PUTs is exactly what a client GETs back) is the correct emulation without hand-modeling every nested SCTE-35 field.

type Transition added in v1.2.0

type Transition struct {
	RelativePosition         string
	Type                     string
	RelativeProgram          string
	DurationMillis           int64
	ScheduledStartTimeMillis int64
}

Transition is a program's schedule transition configuration, required by CreateProgram's ScheduleConfiguration.

type UpdateProgramScheduleConfiguration added in v1.2.0

type UpdateProgramScheduleConfiguration struct {
	ClipRange  *ClipRange
	Transition *UpdateProgramTransition
}

UpdateProgramScheduleConfiguration is a program's schedule update configuration, required by UpdateProgram (its members are individually optional -- an empty object is a valid "change nothing" update).

type UpdateProgramTransition added in v1.2.0

type UpdateProgramTransition struct {
	DurationMillis           int64
	ScheduledStartTimeMillis int64
}

UpdateProgramTransition is a program's schedule transition update, used by UpdateProgram.

type VodSource

type VodSource struct {
	CreationTime              time.Time
	LastModified              time.Time
	Tags                      map[string]string
	ARN                       string
	SourceLocationName        string
	VodSourceName             string
	HTTPPackageConfigurations []HTTPPackageConfiguration
}

VodSource represents a MediaTailor VOD source. Tags first, strings before slice: reduces GC pointer scan.

type VodSourceSummary

type VodSourceSummary struct {
	CreationTime              time.Time
	LastModified              time.Time
	Tags                      map[string]string
	SourceLocationName        string
	VodSourceName             string
	ARN                       string
	HTTPPackageConfigurations []HTTPPackageConfiguration
}

VodSourceSummary is a VOD source in a list response.

Jump to

Keyboard shortcuts

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