Documentation
¶
Index ¶
- Constants
- type Ad
- type AdBreak
- type AdSource
- type AdTagURI
- type ClickThrough
- type ClickTracking
- type Creative
- type CreativeParameter
- type CustomClick
- type Duration
- type Error
- type Extension
- type Impression
- type InLine
- type Linear
- type MediaFile
- type TimeOffset
- type TrackingEvent
- type UniversalAdId
- type VAST
- type VASTData
- type VMAP
Constants ¶
View Source
const ( OffsetStart = -1 OffsetEnd = -2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ad ¶
type Ad struct {
Id string `xml:"id,attr" json:"id"`
Sequence int `xml:"sequence,attr" json:"sequence"`
InLine *InLine `xml:"InLine" json:"inLine"`
}
func (*Ad) UnmarshalToken ¶ added in v0.3.0
func (ad *Ad) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error
type AdBreak ¶
type AdBreak struct {
AdSource *AdSource `xml:"AdSource" json:"adSource"`
TrackingEvents []TrackingEvent `xml:"TrackingEvents>Tracking" json:"trackingEvents"`
Id string `xml:"breakId,attr" json:"id"`
BreakType string `xml:"breakType,attr" json:"breakType"`
TimeOffset TimeOffset `xml:"timeOffset,attr" json:"timeOffset"`
}
func (*AdBreak) UnmarshalToken ¶ added in v0.3.0
func (adBreak *AdBreak) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error
type ClickThrough ¶
type ClickTracking ¶ added in v0.1.3
type Creative ¶
type Creative struct {
Id string `xml:"id,attr" json:"id"`
AdId string `xml:"adId,attr" json:"adId"`
UniversalAdId *UniversalAdId `xml:"UniversalAdId" json:"universalAdId"`
Linear *Linear `xml:"Linear" json:"linear"`
}
func (*Creative) UnmarshalToken ¶ added in v0.3.0
func (c *Creative) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error
type CreativeParameter ¶ added in v0.2.6
type CustomClick ¶ added in v0.1.3
type Duration ¶ added in v0.2.0
func (Duration) MarshalText ¶ added in v0.2.1
func (*Duration) UnmarshalText ¶ added in v0.2.0
type Extension ¶ added in v0.2.6
type Extension struct {
ExtensionType string `xml:"type,attr" json:"type"`
CreativeParameters []CreativeParameter `xml:"CreativeParameters>CreativeParameter" json:"creativeParameters"`
}
NOTE: Specifically built for FreeWheel's CreativeParamer extension at the moment.
func (*Extension) UnmarshalToken ¶ added in v0.3.0
func (ext *Extension) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error
type Impression ¶
type InLine ¶
type InLine struct {
AdSystem string `xml:"AdSystem" json:"adSystem"`
AdTitle string `xml:"AdTitle" json:"adTitle"`
Impression []Impression `xml:"Impression" json:"impression"`
Creatives []Creative `xml:"Creatives>Creative" json:"creatives"`
Extensions []Extension `xml:"Extensions>Extension" json:"extensions"`
Error *Error `xml:"Error" json:"error"`
}
func (*InLine) UnmarshalToken ¶ added in v0.3.0
func (inline *InLine) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error
type Linear ¶
type Linear struct {
Duration Duration `xml:"Duration" json:"duration"`
TrackingEvents []TrackingEvent `xml:"TrackingEvents>Tracking" json:"trackingEvents"`
MediaFiles []MediaFile `xml:"MediaFiles>MediaFile" json:"mediaFiles"`
ClickThrough *ClickThrough `xml:"VideoClicks>ClickThrough" json:"clickThrough"`
ClickTracking []ClickTracking `xml:"VideoClicks>ClickTracking" json:"clickTracking"`
CustomClick []CustomClick `xml:"VideoClicks>CustomClick" json:"customClick"`
}
type MediaFile ¶
type MediaFile struct {
Text string `xml:",chardata" json:"text"`
Bitrate int `xml:"bitrate,attr" json:"bitrate"`
Width int `xml:"width,attr" json:"width"`
Height int `xml:"height,attr" json:"height"`
Delivery string `xml:"delivery,attr" json:"delivery"`
MediaType string `xml:"type,attr" json:"mediaType"`
Codec string `xml:"codec,attr" json:"codec"`
}
type TimeOffset ¶ added in v0.2.0
type TimeOffset struct {
// If this is not nil, we're dealing with a duration offset.
Duration *Duration
//If not zero and duration is nil, it's a position number.
// -1 is reserved for start, -2 for end.
Position int
// If duration is nil and position is zero, this is a percentage offset.
Percent float32
}
TimeOffset represents the time offset for an ad break in the VMAP document.
func (TimeOffset) MarshalText ¶ added in v0.2.1
func (to TimeOffset) MarshalText() ([]byte, error)
func (*TimeOffset) UnmarshalText ¶ added in v0.2.0
func (to *TimeOffset) UnmarshalText(data []byte) error
type TrackingEvent ¶
type UniversalAdId ¶
type VAST ¶
type VAST struct {
Text string `xml:",chardata" json:"text"`
Xsi string `xml:"xsi,attr" json:"xsi"`
NoNamespaceSchemaLocation string `xml:"noNamespaceSchemaLocation,attr" json:"noNamespaceSchemaLocation"`
Version string `xml:"version,attr" json:"version"`
Ad []Ad `xml:"Ad" json:"ad"`
}
func DecodeVast ¶ added in v0.3.0
func (*VAST) UnmarshalToken ¶ added in v0.3.0
func (vast *VAST) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltokenizer.Token) error
Click to show internal directories.
Click to hide internal directories.