scte224v20151115

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: 6 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/2015 AltID"`
	Description string   `xml:"-"` // not in 2015 XSD
	Value       string   `xml:",chardata"`
}

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/2015 Apply"`
	Duration Duration `xml:"duration,attr,omitempty"`
	Priority *uint    `xml:"-"` // not in 2015 XSD
	Policy   *Policy  `xml:"http://www.scte.org/schemas/224/2015 Policy,omitempty"`
}

Table 10

type Assert

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

type Audience

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

Table 13

type Audit

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

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

type Duration

type Duration string

func ToDuration

func ToDuration(dur time.Duration) Duration

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/2015 Ext"`
	Nodes   []Any    `xml:",any" json:"values,omitempty"`
}

type IdentifiableType

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

Structs for SCTE 224 2015 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/2015 MatchSignal"`
	Match           Match     `xml:"match,attr,omitempty"`
	SignalTolerance Duration  `xml:"signalTolerance,attr,omitempty"`
	Assertions      []*Assert `xml:"http://www.scte.org/schemas/224/2015 Assert,omitempty"`
}

Table 8

type Media

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

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

type MediaPoint

type MediaPoint struct {
	IdentifiableType
	XMLName          xml.Name     `xml:"http://www.scte.org/schemas/224/2015 MediaPoint"`
	Effective        *time.Time   `xml:"effective,attr,omitempty"`
	Expires          *time.Time   `xml:"expires,attr,omitempty"`
	MatchTime        *time.Time   `xml:"matchTime,attr,omitempty"`
	MatchOffset      Duration     `xml:"matchOffset,attr,omitempty"`
	Source           string       `xml:"source,attr,omitempty"`
	ExpectedDuration Duration     `xml:"-"` // not in the 2015 XSD
	Order            *uint        `xml:"-"` // used internally for ordering but not in the 2015 XSD
	Reusable         bool         `xml:"-"` // not in the 2015 XSD
	Removes          []*Remove    `xml:"http://www.scte.org/schemas/224/2015 Remove"`
	Applys           []*Apply     `xml:"http://www.scte.org/schemas/224/2015 Apply"`
	MatchSignal      *MatchSignal `xml:"http://www.scte.org/schemas/224/2015 MatchSignal"`
	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

type Metadata

type Metadata struct {
	XMLName xml.Name `xml:"http://www.scte.org/schemas/224/2015 Metadata" 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/2015 Policy"`
	ViewingPolicys []*ViewingPolicy `xml:"http://www.scte.org/schemas/224/2015 ViewingPolicy,omitempty"`
}

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

type Remove

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

Table 9

type Results

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

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

type ReusableType

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

Table 5

type ViewingPolicy

type ViewingPolicy struct {
	ReusableType
	XMLName        xml.Name  `xml:"http://www.scte.org/schemas/224/2015 ViewingPolicy"`
	Audience       *Audience `xml:"http://www.scte.org/schemas/224/2015 Audience,omitempty"`
	ActionProperty []Any     `xml:",any"`
}

Table 12

Jump to

Keyboard shortcuts

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