scte224v20180501

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 7 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 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 Any added in v0.0.3

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"`
}

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

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 added in v0.0.3

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 2018 ESNI Objects. Table 3

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"`
}

Table 8

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"`
}

********************* Media Types *************************// Table 6

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) 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 added in v0.0.3

type NamespaceCleaner string

func (NamespaceCleaner) MarshalXMLAttr added in v0.0.3

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

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"`
}

********************* Audience Types *************************// Table 11

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

type SignalPoint added in v0.0.6

type SignalPoint struct {
	Offset               Duration   `xml:"offset,attr,omitempty" json:"offset,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"`
}

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"`
	ActionProperty       []Any                       `xml:",any" json:"actionProperty,omitempty"`
}

Table 12

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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