Documentation
¶
Index ¶
- Variables
- type Channel
- type ChannelSummary
- type DashPlaylistSettings
- type Function
- type FunctionSummary
- type HTTPPackageConfiguration
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type HlsPlaylistSettings
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) ConfigureLogsForChannel(channelName string, logTypes []string) (string, []string, error)
- func (b *InMemoryBackend) ConfigureLogsForPlaybackConfiguration(playbackConfigName string, percentEnabled int) (string, int, error)
- func (b *InMemoryBackend) CreateChannel(name, playbackMode string, outputs []OutputItem, fillerSlate *SlateSource, ...) (*Channel, error)
- func (b *InMemoryBackend) CreateLiveSource(sourceLocationName, liveSourceName string, ...) (*LiveSource, error)
- func (b *InMemoryBackend) CreatePrefetchSchedule(playbackConfigName, name string, retrieval *PrefetchRetrieval, ...) (*PrefetchSchedule, error)
- func (b *InMemoryBackend) CreateProgram(...) (*Program, error)
- func (b *InMemoryBackend) CreateSourceLocation(name, baseURL string, tags map[string]string) (*SourceLocation, error)
- func (b *InMemoryBackend) CreateVodSource(sourceLocationName, vodSourceName string, ...) (*VodSource, error)
- func (b *InMemoryBackend) DeleteChannel(name string) error
- func (b *InMemoryBackend) DeleteChannelPolicy(channelName string) error
- func (b *InMemoryBackend) DeleteFunction(functionID string) error
- func (b *InMemoryBackend) DeleteLiveSource(sourceLocationName, liveSourceName string) error
- func (b *InMemoryBackend) DeletePlaybackConfiguration(name string) error
- func (b *InMemoryBackend) DeletePrefetchSchedule(playbackConfigName, name string) error
- func (b *InMemoryBackend) DeleteProgram(channelName, programName string) error
- func (b *InMemoryBackend) DeleteSourceLocation(name string) error
- func (b *InMemoryBackend) DeleteVodSource(sourceLocationName, vodSourceName string) error
- func (b *InMemoryBackend) DescribeChannel(name string) (*Channel, error)
- func (b *InMemoryBackend) DescribeLiveSource(sourceLocationName, liveSourceName string) (*LiveSource, error)
- func (b *InMemoryBackend) DescribeProgram(channelName, programName string) (*Program, error)
- func (b *InMemoryBackend) DescribeSourceLocation(name string) (*SourceLocation, error)
- func (b *InMemoryBackend) DescribeVodSource(sourceLocationName, vodSourceName string) (*VodSource, error)
- func (b *InMemoryBackend) GetChannelPolicy(channelName string) (string, error)
- func (b *InMemoryBackend) GetChannelSchedule(channelName string, maxResults int, nextToken string) ([]*ProgramScheduleEntry, string, error)
- func (b *InMemoryBackend) GetFunction(functionID string) (*Function, error)
- func (b *InMemoryBackend) GetPlaybackConfiguration(name string) (*PlaybackConfiguration, error)
- func (b *InMemoryBackend) GetPrefetchSchedule(playbackConfigName, name string) (*PrefetchSchedule, error)
- func (b *InMemoryBackend) ListChannels(maxResults int, nextToken string) ([]*ChannelSummary, string, error)
- func (b *InMemoryBackend) ListFunctions(maxResults int, nextToken string) ([]*FunctionSummary, string, error)
- func (b *InMemoryBackend) ListLiveSources(sourceLocationName string, maxResults int, nextToken string) ([]*LiveSourceSummary, string, error)
- func (b *InMemoryBackend) ListPlaybackConfigurations(maxResults int, nextToken string) ([]*PlaybackConfigurationSummary, string, error)
- func (b *InMemoryBackend) ListPrefetchSchedules(playbackConfigName string, maxResults int, nextToken string) ([]*PrefetchSchedule, string, error)
- func (b *InMemoryBackend) ListSourceLocations(maxResults int, nextToken string) ([]*SourceLocationSummary, string, error)
- func (b *InMemoryBackend) ListTagsForResource(resourceARN string) (map[string]string, error)
- func (b *InMemoryBackend) ListVodSources(sourceLocationName string, maxResults int, nextToken string) ([]*VodSourceSummary, string, error)
- func (b *InMemoryBackend) PutChannelPolicy(channelName, policy string) error
- func (b *InMemoryBackend) PutFunction(functionID, functionType, description string, tags map[string]string) (*Function, error)
- func (b *InMemoryBackend) PutPlaybackConfiguration(name, adDecisionServerURL, videoContentSourceURL string, ...) (*PlaybackConfiguration, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartChannel(name string) error
- func (b *InMemoryBackend) StopChannel(name string) error
- func (b *InMemoryBackend) TagResource(resourceARN string, tags map[string]string) error
- func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateChannel(name string, outputs []OutputItem) (*Channel, error)
- func (b *InMemoryBackend) UpdateLiveSource(sourceLocationName, liveSourceName string, ...) (*LiveSource, error)
- func (b *InMemoryBackend) UpdateProgram(channelName, programName string) (*Program, error)
- func (b *InMemoryBackend) UpdateSourceLocation(name, baseURL string) (*SourceLocation, error)
- func (b *InMemoryBackend) UpdateVodSource(sourceLocationName, vodSourceName string, ...) (*VodSource, error)
- type LiveSource
- type LiveSourceSummary
- type OutputItem
- type PlaybackConfiguration
- type PlaybackConfigurationSummary
- type PrefetchConsumption
- type PrefetchRetrieval
- type PrefetchSchedule
- type Program
- type ProgramScheduleEntry
- type Provider
- type SlateSource
- type SourceLocation
- type SourceLocationSummary
- type StorageBackend
- type VodSource
- type VodSourceSummary
Constants ¶
This section is empty.
Variables ¶
var ErrConflict = awserr.New("ConflictException", awserr.ErrAlreadyExists)
ErrConflict is returned for state conflict operations.
var ErrInvalidParameter = awserr.New("BadRequestException", awserr.ErrInvalidParameter)
ErrInvalidParameter is returned for invalid input.
var ErrNilAppContext = errors.New("AppContext is required")
ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.
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 (*Handler) ExtractOperation ¶
ExtractOperation classifies the request into an operation name.
func (*Handler) ExtractResource ¶
ExtractResource returns the resource identifier from the request.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns all supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) Restore ¶
Restore implements persistence.Persistable by delegating to the backend. See the Snapshot doc comment above for why this delegation is new.
func (*Handler) RouteMatcher ¶
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 ¶
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) 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 ¶
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 ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the MediaTailor backend and handler.
type SlateSource ¶
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.
Source Files
¶
- channel_policy.go
- channels.go
- errors.go
- functions.go
- handler.go
- handler_alerts.go
- handler_channel_policy.go
- handler_channels.go
- handler_functions.go
- handler_helpers.go
- handler_live_sources.go
- handler_logs.go
- handler_playback_configurations.go
- handler_prefetch_schedules.go
- handler_programs.go
- handler_source_locations.go
- handler_tags.go
- handler_vod_sources.go
- interfaces.go
- live_sources.go
- persistence.go
- playback_configurations.go
- prefetch_schedules.go
- programs.go
- provider.go
- source_locations.go
- store.go
- store_setup.go
- tags.go
- vod_sources.go