scte224v20200407

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertDuration

func ConvertDuration(xmlDuration string) (duration time.Duration)

TODO: I doubt we will see durations longer than days but in theory we should handle them

Types

type AdsReferenceId

type AdsReferenceId struct {
	XMLName       xml.Name `xml:"urn:scte:224:action AdsReferenceId" json:"-"`
	ID            string   `xml:",chardata" json:"data,omitempty"`
	ReferenceType string   `xml:"referenceType,attr,omitempty" json:"referenceType,omitempty"`
	Exclude       bool     `xml:"exclude,attr,omitempty" json:"exclude,omitempty"`
}

type Allocation

type Allocation struct {
	XMLName   xml.Name `xml:"urn:scte:224:action Allocation" json:"-"`
	Slots     []*Slots `xml:"Slots,omitempty" json:"Slots,omitempty"`
	OwnerType string   `xml:"ownerType,attr,omitempty" json:"ownerType,attr,omitempty"`
	OwnerName string   `xml:"ownerName,attr,omitempty" json:"ownerName,attr,omitempty"`
	Duration  Duration `xml:"duration,attr,omitempty" json:"duration,omitempty"`
	Ads       string   `xml:"ads,attr,omitempty" json:"ads,attr,omitempty"`
}

type AltID

type AltID struct {
	XMLName     xml.Name `xml:"http://www.scte.org/schemas/224 AltID" json:"-"`
	Description string   `xml:"description,attr,omitempty" json:"description,omitempty"`
	Value       string   `xml:",chardata" json:"value,omitempty"`
	Type        string   `xml:"type,attr,omitempty" json:"type,omitempty"`
}

type Any

type Any struct {
	XMLName xml.Name `json:"xmlname"`
	// mapping xmlns to a field that will avoid marshalling a duplicate namespace
	Namespace  NamespaceCleaner `xml:"xmlns,attr"`
	Attributes []xml.Attr       `xml:",any,attr"`
	Value      string           `xml:",innerxml" json:"value"`
}

func (Any) Get2018

func (any Any) Get2018() scte224_2018.Any

type Apply

type Apply struct {
	XMLName  xml.Name `xml:"http://www.scte.org/schemas/224 Apply" json:"-"`
	Duration Duration `xml:"duration,attr,omitempty" json:"duration,omitempty"`
	Priority *uint    `xml:"priority,attr,omitempty" json:"priority,omitempty"`
	Policy   *Policy  `xml:"http://www.scte.org/schemas/224 Policy,omitempty" json:"policy,omitempty"`
}

Table 10

func (*Apply) GetPriority

func (ap *Apply) GetPriority() uint

func (*Apply) HasExplicitPriority

func (ap *Apply) HasExplicitPriority() bool

type Assert

type Assert struct {
	XMLName     xml.Name `xml:"http://www.scte.org/schemas/224 Assert" json:"-"`
	Declaration string   `xml:",chardata" json:"declaration,omitempty"`
}

type Audience

type Audience struct {
	ReusableType
	XMLName          xml.Name    `xml:"http://www.scte.org/schemas/224 Audience" json:"-"`
	Match            Match       `xml:"match,attr,omitempty" json:"match,omitempty"`
	Audiences        []*Audience `xml:"http://www.scte.org/schemas/224 Audience,omitempty" json:"audiences,omitempty"`
	AudienceProperty []Any       `xml:",any" json:"audienceProperty,omitempty"`
}

Table 13

func (*Audience) Get2015

func (aud *Audience) Get2015() scte224_2015.Audience

func (*Audience) Get2018

func (aud *Audience) Get2018() scte224_2018.Audience

type Audit

type Audit struct {
	IdentifiableType
	XMLName       xml.Name `xml:"http://www.scte.org/schemas/224 Audit" json:"-"`
	XLinkHRef     string   `xml:"http://www.w3.org/1999/xlink href,attr,omitempty" json:"href,omitempty"`
	XLinkRole     string   `xml:"http://www.w3.org/1999/xlink role,attr,omitempty" json:"role,omitempty"`
	Authorization string   `xml:"authorization,attr,omitempty" json:"authorization,omitempty"`
	PolicyMode    string   `xml:"policyMode,attr,omitempty" json:"policyMode,omitempty"`
	Trigger       string   `xml:"trigger,attr,omitempty" json:"trigger,omitempty"`
	Result        string   `xml:"result,attr,omitempty" json:"result,omitempty"`
	Audits        []*Audit `xml:"http://www.scte.org/schemas/224 Audit" json:"audits,omitempty"`
}

********************* Audit Types *************************// Table 15

type ContentAction

type ContentAction struct {
	XMLName xml.Name `xml:"urn:scte:224:action Content" json:"-"`
	Content string   `xml:",chardata" json:"data,omitempty"`
}

type Duration

type Duration string

func (Duration) GoDuration

func (dur Duration) GoDuration() time.Duration

type Ext

type Ext struct {
	XMLName xml.Name `xml:"http://www.scte.org/schemas/224 Ext"`
	Nodes   []Any    `xml:",any" json:"values,omitempty"`
}

type IdentifiableType

type IdentifiableType struct {
	Id          string     `xml:"id,attr,omitempty" json:"id,omitempty"`
	Description string     `xml:"description,attr,omitempty" json:"description,omitempty"`
	LastUpdated *time.Time `xml:"lastUpdated,attr,omitempty" json:"lastUpdated,omitempty"`
	XMLBase     string     `xml:"xml:base,attr,omitempty" json:"-"`
	AltIDs      []*AltID   `xml:"http://www.scte.org/schemas/224 AltID,omitempty" json:"altIDs,omitempty"`
	Metadata    *Metadata  `xml:"http://www.scte.org/schemas/224 Metadata,omitempty" json:"metadata,omitempty"`
	Ext         *Ext       `xml:"http://www.scte.org/schemas/224 Ext,omitempty" json:"ext,omitempty"`
}

Structs for SCTE 224 2020 ESNI Objects. Table 3

func (*IdentifiableType) Get2015

func (*IdentifiableType) Get2018

type Match

type Match string

func (Match) IsAll

func (me Match) IsAll() bool

Returns true if the value of this enumerated Match is "ALL".

func (Match) IsAny

func (me Match) IsAny() bool

Returns true if the value of this enumerated Match is "ANY".

func (Match) IsNone

func (me Match) IsNone() bool

Returns true if the value of this enumerated Match is "NONE".

type MatchSignal

type MatchSignal struct {
	XMLName         xml.Name  `xml:"http://www.scte.org/schemas/224 MatchSignal" json:"-"`
	Match           Match     `xml:"match,attr,omitempty" json:"match,omitempty"`
	SignalTolerance Duration  `xml:"signalTolerance,attr,omitempty" json:"signalTolerance,omitempty"`
	Assertions      []*Assert `xml:"http://www.scte.org/schemas/224 Assert,omitempty" json:"assertions,omitempty"`
	Schema          string    `xml:"schema,attr,omitempty" json:"schema,omitempty"`
}

Table 8

func (*MatchSignal) UnmarshalXML

func (ms *MatchSignal) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

Custom unmarshalling to provide default value to "schema" attribute, when unavailable

type Media

type Media struct {
	ReusableType
	XMLName     xml.Name      `xml:"http://www.scte.org/schemas/224 Media" json:"-"`
	Effective   *time.Time    `xml:"effective,attr,omitempty" json:"effective,omitempty"`
	Expires     *time.Time    `xml:"expires,attr,omitempty" json:"expires,omitempty"`
	Source      string        `xml:"source,attr,omitempty" json:"source,omitempty"`
	MediaPoints []*MediaPoint `xml:"http://www.scte.org/schemas/224 MediaPoint" json:"mediaPoints,omitempty"`
}

Structs for SCTE 224 2020 ESNI Objects. ********************* Media Types *************************// Table 6

func (*Media) Get2015

func (m *Media) Get2015() scte224_2015.Media

func (*Media) Get2018

func (m *Media) Get2018() scte224_2018.Media

type MediaPoint

type MediaPoint struct {
	IdentifiableType
	XMLName          xml.Name     `xml:"http://www.scte.org/schemas/224 MediaPoint" json:"-"`
	Effective        *time.Time   `xml:"effective,attr,omitempty" json:"effective,omitempty"`
	Expires          *time.Time   `xml:"expires,attr,omitempty" json:"expires,omitempty"`
	MatchTime        *time.Time   `xml:"matchTime,attr,omitempty" json:"matchTime,omitempty"`
	MatchOffset      Duration     `xml:"matchOffset,attr,omitempty" json:"matchOffset,omitempty"`
	Source           string       `xml:"source,attr,omitempty" json:"source,omitempty"`
	ExpectedDuration Duration     `xml:"expectedDuration,attr,omitempty" json:"expectedDuration,omitempty"`
	Order            *uint        `xml:"order,attr,omitempty" json:"order,omitempty"`
	Reusable         bool         `xml:"reusable,attr,omitempty" json:"reusable,omitempty"`
	Removes          []*Remove    `xml:"http://www.scte.org/schemas/224 Remove" json:"removes,omitempty"`
	Applys           []*Apply     `xml:"http://www.scte.org/schemas/224 Apply" json:"applys,omitempty"`
	MatchSignal      *MatchSignal `xml:"http://www.scte.org/schemas/224 MatchSignal" json:"matchSignal,omitempty"`
	MediaGuid        string       `xml:"-"` // used internally to track which media this point is part of
}

MediaPoint defines an SCTE 224 (ESNI) media point object. Table 7

func (*MediaPoint) Get2015

func (mp *MediaPoint) Get2015() scte224_2015.MediaPoint

func (*MediaPoint) Get2018

func (mp *MediaPoint) Get2018() scte224_2018.MediaPoint

func (*MediaPoint) GetOrder

func (mp *MediaPoint) GetOrder() uint

func (*MediaPoint) HasExplicitOrder

func (mp *MediaPoint) HasExplicitOrder() bool

type Metadata

type Metadata struct {
	XMLName xml.Name     `xml:"http://www.scte.org/schemas/224 Metadata" json:"-"`
	ADI30   *adi30.ADI30 `xml:"http://www.scte.org/schemas/236/2017/core ADI3" json:"-"`
	Nodes   []Any        `xml:",any" json:"values,omitempty"`
}

type NamespaceCleaner

type NamespaceCleaner string

func (NamespaceCleaner) MarshalXMLAttr

func (nc NamespaceCleaner) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

type Parameter added in v0.1.1

type Parameter struct {
	XMLName       xml.Name `xml:"urn:scte:224:action Parameter" json:"-"`
	ParameterName string   `xml:"parameterName,attr,omitempty" json:"parameterName,attr,omitempty"`
	Value         string   `xml:",chardata" json:"value,omitempty"`
}

type Policy

type Policy struct {
	ReusableType
	XMLName        xml.Name         `xml:"http://www.scte.org/schemas/224 Policy" json:"-"`
	ViewingPolicys []*ViewingPolicy `xml:"http://www.scte.org/schemas/224 ViewingPolicy,omitempty" json:"viewingPolicys,omitempty"`
}

Table 11

func (*Policy) Get2015

func (p *Policy) Get2015() scte224_2015.Policy

func (*Policy) Get2018

func (p *Policy) Get2018() scte224_2018.Policy

type Remove

type Remove struct {
	XMLName xml.Name `xml:"http://www.scte.org/schemas/224 Remove" json:"-"`
	Policy  *Policy  `xml:"http://www.scte.org/schemas/224 Policy,omitempty" json:"policy,omitempty"`
}

Table 9

type Results

type Results struct {
	XMLName        xml.Name         `xml:"http://www.scte.org/schemas/224 Results" json:"-"`
	Size           int              `xml:"size,attr,omitempty" json:"size,omitempty"`
	Medias         []*Media         `xml:"http://www.scte.org/schemas/224 Media" json:"medias,omitempty"`
	MediaPoints    []*MediaPoint    `xml:"http://www.scte.org/schemas/224 MediaPoint" json:"mediaPoints,omitempty"`
	Policys        []*Policy        `xml:"http://www.scte.org/schemas/224 Policy" json:"policys,omitempty"`
	ViewingPolicys []*ViewingPolicy `xml:"http://www.scte.org/schemas/224 ViewingPolicy" json:"viewingPolicys,omitempty"`
	Audiences      []*Audience      `xml:"http://www.scte.org/schemas/224 Audience" json:"audiences,omitempty"`
	Audits         []*Audit         `xml:"http://www.scte.org/schemas/224 Audit" json:"audits,omitempty"`
}

********************* Results Types *************************// Table 14

type ReusableType

type ReusableType struct {
	IdentifiableType
	XLinkHRef string `xml:"http://www.w3.org/1999/xlink href,attr,omitempty" json:"href,omitempty"`
}

Table 5

func (ReusableType) Get2015

func (rt ReusableType) Get2015() scte224_2015.ReusableType

func (ReusableType) Get2018

func (rt ReusableType) Get2018() scte224_2018.ReusableType

type SignalPoint

type SignalPoint struct {
	Offset               Duration   `xml:"offset,attr,omitempty" json:"offset,omitempty"`
	SegmentationEventId  string     `xml:"segmentationEventId,attr,omitempty" json:"segmentationEventId,omitempty"`
	SegmentationTypeId   *uint      `xml:"segmentationTypeId,attr,omitempty" json:"segmentationTypeId,omitempty"`
	SegmentationUpidType *uint      `xml:"segmentationUpidType,attr,omitempty" json:"segmentationUpidType,omitempty"`
	SegmentationUpid     string     `xml:"segmentationUpid,attr,omitempty" json:"segmentationUpid,omitempty"`
	RepeatInterval       Duration   `xml:"repeatInterval,attr,omitempty" json:"repeatInterval,omitempty"`
	RepeatStart          *time.Time `xml:"repeatStart,attr,omitempty" json:"repeatStart,omitempty"`
	RepeatStop           *time.Time `xml:"repeatStop,attr,omitempty" json:"repeatStop,omitempty"`
}

type SignalPointDeletionAction

type SignalPointDeletionAction struct {
	XMLName             xml.Name `xml:"urn:scte:224:action SignalPointDeletion" json:"-"`
	SignalPointDeletion string   `xml:",chardata" json:"data,omitempty"`
}

type SignalPointInsertionAction

type SignalPointInsertionAction struct {
	SignalPoints   []*SignalPoint `xml:"urn:scte:224:action SignalPoint,omitempty" json:"signalPoint,omitempty"`
	ActionProperty []Any          `xml:",any" json:"actionProperty,omitempty"`
	Offset         Duration       `xml:"offset,attr,omitempty" json:"offset,omitempty"`
}

type Slot

type Slot struct {
	XMLName        xml.Name          `xml:"urn:scte:224:action Slot" json:"-"`
	AdsReferenceId []*AdsReferenceId `xml:"AdsReferenceId,omitempty" json:"AdsReferenceId,omitempty"`
	SlotRules      *SlotRules        `xml:"SlotRules,omitempty" json:"SlotRules,omitempty"`
	Duration       Duration          `xml:"duration,attr,omitempty" json:"duration,omitempty"`
	Offset         Duration          `xml:"offset,attr,omitempty" json:"offset,omitempty"`
}

type SlotRule added in v0.1.1

type SlotRule struct {
	XMLName    xml.Name     `xml:"urn:scte:224:action SlotRule" json:"-"`
	Parameters []*Parameter `xml:"Parameter,omitempty" json:"Parameter,omitempty"`
	Rule       string       `xml:"rule,attr,omitempty" json:"rule,attr,omitempty"`
}

type SlotRules added in v0.1.1

type SlotRules struct {
	XMLName  xml.Name    `xml:"urn:scte:224:action SlotRules" json:"-"`
	SlotRule []*SlotRule `xml:"SlotRule,omitempty" json:"SlotRule,omitempty"`
}

type Slots

type Slots struct {
	XMLName xml.Name `xml:"urn:scte:224:action Slots" json:"-"`
	AdSlots []*Slot  `xml:"Slot,omitempty" json:"Slot,omitempty"`
}

type ViewingPolicy

type ViewingPolicy struct {
	ReusableType
	XMLName              xml.Name                    `xml:"http://www.scte.org/schemas/224 ViewingPolicy" json:"-"`
	Audience             *Audience                   `xml:"http://www.scte.org/schemas/224 Audience,omitempty" json:"audience,omitempty"`
	SignalPointDeletion  *SignalPointDeletionAction  `xml:"urn:scte:224:action SignalPointDeletion,omitempty" json:"signalPointDeletion,omitempty"`
	SignalPointInsertion *SignalPointInsertionAction `xml:"urn:scte:224:action SignalPointInsertion,omitempty" json:"signalPointInsertion,omitempty"`
	Content              *ContentAction              `xml:"urn:scte:224:action Content,omitempty" json:"content,omitempty"`
	Allocation           *Allocation                 `xml:"urn:scte:224:action Allocation,omitempty" json:"Allocation,omitempty"`
	ActionProperty       []Any                       `xml:",any" json:"actionProperty,omitempty"`
}

Table 12

func (*ViewingPolicy) Get2015

func (*ViewingPolicy) Get2018

Jump to

Keyboard shortcuts

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