mediatailor

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 22 Imported by: 0

README

MediaTailor

Parity grade: A · SDK aws-sdk-go-v2/service/mediatailor@v1.59.2 · last audited 2026-07-13 (024e43bf)

Coverage

Metric Value
Operations audited 48 (43 ok, 4 partial, 1 gap)
Feature families 1 (1 ok)
Known gaps 4
Deferred items 3
Resource leaks clean
Known gaps
  • UpdateProgram doesn't implement AdBreaks/ScheduleConfiguration mutation (real op requires ScheduleConfiguration and updates ad breaks; gopherstack's Program type has no AdBreaks/ClipRange/AudienceMedia fields at all). Modeling this properly requires adding AdBreak/ScheduleConfiguration/ClipRange/AudienceMedia types to interfaces.go and wiring them through Create/UpdateProgram - a materially larger feature than this pass's budget covered. (needs bd issue)
  • CreateProgram/DescribeProgram/UpdateProgram/ProgramScheduleEntry omit optional response fields the real API returns: AdBreaks, AudienceMedia, ClipRange, ScheduledStartTime, DurationMillis, CreationTime. Missing optional fields don't break real SDK clients (zero-value on the Go struct), so this is lower severity than the wire-shape bugs fixed this pass, but is a completeness gap. (needs bd issue)
  • SourceLocation/VodSource/LiveSource/PrefetchSchedule Go structs in interfaces.go declare CreationTime/LastModified fields that the backend never populates and the handler never serializes into responses (dead fields). Real DescribeSourceLocation/DescribeVodSource/etc. responses include these. Same completeness-gap severity as the Program fields above. (needs bd issue)
  • ConfigureLogsForChannel/ConfigureLogsForPlaybackConfiguration validate + echo their inputs but don't persist log-delivery config anywhere queryable (no real op reads it back, so this is low-impact, but flagged for completeness).
Deferred
  • CreateChannel/UpdateChannel Audiences and TimeShiftConfiguration fields (real API supports them; not modeled in gopherstack at all)
  • PutPlaybackConfiguration's many optional sub-configs (AdConditioningConfiguration, AvailSuppression, Bumper, CdnConfiguration, DashConfiguration, ManifestProcessingRules, etc.) - only Name/AdDecisionServerUrl/VideoContentSourceUrl/Tags are modeled
  • ListPrefetchSchedules ScheduleType/StreamId request filters (routing + pagination fixed this pass; filtering by type/stream not implemented)

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConflict = awserr.New("ConflictException", 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 Channel

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

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

type ChannelSummary

type ChannelSummary struct {
	FillerSlate  *SlateSource
	CreationTime time.Time
	LastModified time.Time
	Tags         map[string]string
	Name         string
	ARN          string
	PlaybackMode string
	ChannelState string
	Tier         string
}

ChannelSummary is a channel in a list response.

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 Function

type Function struct {
	Tags         map[string]string
	FunctionID   string
	FunctionType string
	ARN          string
	Description  string
}

Function represents a MediaTailor function.

type FunctionSummary

type FunctionSummary struct {
	Tags         map[string]string
	FunctionID   string
	FunctionType string
	ARN          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
}

Handler handles MediaTailor HTTP requests.

func NewHandler

func NewHandler(b StorageBackend) *Handler

NewHandler constructs a new Handler.

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 returns the Echo handler function.

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) Reset

func (h *Handler) Reset()

Reset resets the backend.

func (*Handler) Restore

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

Restore implements persistence.Persistable by delegating to the backend. See the Snapshot doc comment above for why this delegation is new.

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 by delegating to the backend.

Prior to Phase 3.3, Handler had no Snapshot/Restore of its own even though InMemoryBackend implemented both (dead wiring: nothing ever called them). This delegation is what actually wires MediaTailor into the persistence Manager.

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.

func (*InMemoryBackend) ConfigureLogsForPlaybackConfiguration

func (b *InMemoryBackend) ConfigureLogsForPlaybackConfiguration(
	playbackConfigName string,
	percentEnabled int,
) (string, int, error)

ConfigureLogsForPlaybackConfiguration sets the percent enabled for playback config logs.

func (*InMemoryBackend) CreateChannel

func (b *InMemoryBackend) CreateChannel(
	name, playbackMode string,
	outputs []OutputItem,
	fillerSlate *SlateSource,
	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 string,
	retrieval *PrefetchRetrieval,
	consumption *PrefetchConsumption,
) (*PrefetchSchedule, error)

CreatePrefetchSchedule creates a prefetch schedule.

func (*InMemoryBackend) CreateProgram

func (b *InMemoryBackend) CreateProgram(
	channelName, programName, sourceLocationName, vodSourceName, liveSourceName string,
	tags map[string]string,
) (*Program, error)

CreateProgram creates a program within a channel.

func (*InMemoryBackend) CreateSourceLocation

func (b *InMemoryBackend) CreateSourceLocation(
	name, baseURL string,
	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.

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. 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 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 string,
	maxResults int,
	nextToken string,
) ([]*PrefetchSchedule, string, error)

ListPrefetchSchedules returns prefetch schedules for a playback configuration.

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,
	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,
) (*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) 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) (*Channel, error)

UpdateChannel updates a channel's outputs.

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) (*Program, error)

UpdateProgram updates a program.

func (*InMemoryBackend) UpdateSourceLocation

func (b *InMemoryBackend) UpdateSourceLocation(name, baseURL string) (*SourceLocation, error)

UpdateSourceLocation updates a source location's base URL.

func (*InMemoryBackend) UpdateVodSource

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

UpdateVodSource updates a VOD source's package configurations.

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
}

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
	Name                        string
	AdDecisionServerURL         string
	VideoContentSourceURL       string
	PlaybackConfigurationARN    string
	PlaybackEndpointPrefix      string
	SessionInitializationPrefix string
	HlsManifestEndpointPrefix   string
}

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

type PlaybackConfigurationSummary

type PlaybackConfigurationSummary struct {
	Tags                     map[string]string
	Name                     string
	AdDecisionServerURL      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
	ARN                       string
	Name                      string
	PlaybackConfigurationName string
	StreamID                  string
}

PrefetchSchedule represents a MediaTailor prefetch schedule.

type Program

type Program struct {
	ScheduledStartTime time.Time
	CreationTime       time.Time
	Tags               map[string]string
	ARN                string
	ChannelName        string
	ProgramName        string
	SourceLocationName string
	VodSourceName      string
	LiveSourceName     string
	DurationInSeconds  int64
}

Program represents a MediaTailor program within a channel.

type ProgramScheduleEntry

type ProgramScheduleEntry struct {
	ARN                        string
	ChannelName                string
	ProgramName                string
	SourceLocationName         string
	VodSourceName              string
	LiveSourceName             string
	ScheduleEntryType          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 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
	Tags                 map[string]string
	Name                 string
	ARN                  string
	HTTPConfigurationURL string
}

SourceLocation represents a MediaTailor source location.

type SourceLocationSummary

type SourceLocationSummary struct {
	CreationTime         time.Time
	LastModified         time.Time
	Tags                 map[string]string
	Name                 string
	ARN                  string
	HTTPConfigurationURL string
}

SourceLocationSummary is a source location in a list response.

type StorageBackend

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

	// Channel
	CreateChannel(
		name, playbackMode string,
		outputs []OutputItem,
		fillerSlate *SlateSource,
		tags map[string]string,
	) (*Channel, error)
	DescribeChannel(name string) (*Channel, error)
	UpdateChannel(name string, outputs []OutputItem) (*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, tags map[string]string) (*SourceLocation, error)
	DescribeSourceLocation(name string) (*SourceLocation, error)
	UpdateSourceLocation(name, baseURL string) (*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 string,
		retrieval *PrefetchRetrieval,
		consumption *PrefetchConsumption,
	) (*PrefetchSchedule, error)
	GetPrefetchSchedule(playbackConfigName, name string) (*PrefetchSchedule, error)
	DeletePrefetchSchedule(playbackConfigName, name string) error
	ListPrefetchSchedules(
		playbackConfigName string,
		maxResults int,
		nextToken string,
	) ([]*PrefetchSchedule, string, error)

	// Program
	CreateProgram(
		channelName, programName, sourceLocationName, vodSourceName, liveSourceName string,
		tags map[string]string,
	) (*Program, error)
	DescribeProgram(channelName, programName string) (*Program, error)
	UpdateProgram(channelName, programName string) (*Program, error)
	DeleteProgram(channelName, programName string) error
	GetChannelSchedule(
		channelName 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,
		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,
	) (string, int, 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 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
}

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