Documentation ¶
Index ¶
- Constants
- Variables
- func PushXML(w http.ResponseWriter, xml string)
- func SetXMLHeaders(w http.ResponseWriter)
- type Ad
- type AdAttributes
- type AdParameters
- type AdServingID
- type AdSystem
- type AdTitle
- type AdVerifications
- type Advertiser
- type AltText
- type Category
- type ClickThrough
- type ClickTracking
- type ClosedCaptionFile
- type ClosedCaptionFiles
- type Code
- type Companion
- type CompanionAds
- type CompanionClickThrough
- type Creative
- type CreativeExtension
- type CreativeExtensions
- type Creatives
- type CustomClick
- type CustomTracking
- type CustomXML
- type Description
- type Duration
- type ExecutableResource
- type Expires
- type Extension
- type Extensions
- type FlashResource
- type HTMLResource
- type HashExt
- type IFrameResource
- type Icon
- type IconClickThrough
- type IconClickTracking
- type IconClicks
- type IconViewTracking
- type Icons
- type Impression
- type InLine
- type InLineWrapperData
- type InteractiveCreativeFile
- type JavaScriptResource
- type Linear
- type MediaFile
- type MediaFiles
- type Mezzanine
- type NonLinear
- type NonLinearAds
- type NonLinearClickThrough
- type NonLinearClickTracking
- type NotViewable
- type Pricing
- type StaticResource
- type Survey
- type TotalAvailable
- type Tracking
- type TrackingEvents
- type URL
- type UniversalAdID
- type VAST
- func (v *VAST) FormatAd() *VAST
- func (v *VAST) FormatAdAttrs(attrs AdAttributes)
- func (v *VAST) FormatCreativeWithNonLinearAds(s string) *VAST
- func (v *VAST) FromFile(filename string)
- func (v *VAST) FromString(body string)
- func (v *VAST) FromXML(body string)
- func (v *VAST) GetAdPos() int
- func (v *VAST) GetAds() []*Ad
- func (v *VAST) GetAdsAdServing() map[string][]*AdServingID
- func (v *VAST) GetAdsAdSystem() map[string][]*AdSystem
- func (v *VAST) GetAdsAdTitle() map[string][]*AdTitle
- func (v *VAST) GetAdsAdVerification() map[string][]*Verification
- func (v *VAST) GetAdsAdVerificationExecutableResource() map[string][]*ExecutableResource
- func (v *VAST) GetAdsAdVerificationFlashResource() map[string][]*FlashResource
- func (v *VAST) GetAdsAdVerificationJavaScriptResource() map[string][]*JavaScriptResource
- func (v *VAST) GetAdsAdVerificationNotViewable() map[string][]*NotViewable
- func (v *VAST) GetAdsAdVerificationTracking() map[string][]*Tracking
- func (v *VAST) GetAdsAdVerificationVerificationParameters() map[string][]*VerificationParameters
- func (v *VAST) GetAdsAdVerificationViewUndetermined() map[string][]*ViewUndetermined
- func (v *VAST) GetAdsAdVerificationViewable() map[string][]*Viewable
- func (v *VAST) GetAdsAdVerificationViewableImpression() map[string][]*ViewableImpression
- func (v *VAST) GetAdsAdVerifications() map[string][]*AdVerifications
- func (v *VAST) GetAdsAdvertiser() map[string][]*Advertiser
- func (v *VAST) GetAdsCategory() map[string][]*Category
- func (v *VAST) GetAdsCreative() map[string][]*Creative
- func (v *VAST) GetAdsCreativeCompanion() map[string][]*Companion
- func (v *VAST) GetAdsCreativeCompanionAdParameters() map[string][]*AdParameters
- func (v *VAST) GetAdsCreativeCompanionAds() map[string][]*CompanionAds
- func (v *VAST) GetAdsCreativeCompanionAltText() map[string][]*AltText
- func (v *VAST) GetAdsCreativeCompanionClickThrough() map[string][]*CompanionClickThrough
- func (v *VAST) GetAdsCreativeCompanionHTMLResource() map[string][]*HTMLResource
- func (v *VAST) GetAdsCreativeCompanionIFrameResource() map[string][]*IFrameResource
- func (v *VAST) GetAdsCreativeCompanionStaticResource() map[string][]*StaticResource
- func (v *VAST) GetAdsCreativeCompanionTracking() map[string][]*Tracking
- func (v *VAST) GetAdsCreativeExtension() map[string][]*CreativeExtension
- func (v *VAST) GetAdsCreativeExtensions() map[string][]*CreativeExtensions
- func (v *VAST) GetAdsCreativeLinear() map[string][]*Linear
- func (v *VAST) GetAdsCreativeLinearClosedCaptionFile() map[string][]*ClosedCaptionFile
- func (v *VAST) GetAdsCreativeLinearClosedCaptionFiles() map[string][]*ClosedCaptionFiles
- func (v *VAST) GetAdsCreativeLinearDuration() map[string][]*Duration
- func (v *VAST) GetAdsCreativeLinearIcon() map[string][]*Icon
- func (v *VAST) GetAdsCreativeLinearIcons() map[string][]*Icons
- func (v *VAST) GetAdsCreativeLinearInteractiveCreativeFile() map[string][]*InteractiveCreativeFile
- func (v *VAST) GetAdsCreativeLinearMediaFile() map[string][]*MediaFile
- func (v *VAST) GetAdsCreativeLinearMediaFiles() map[string][]*MediaFiles
- func (v *VAST) GetAdsCreativeLinearMezzanine() map[string][]*Mezzanine
- func (v *VAST) GetAdsCreativeLinearTracking() map[string][]*Tracking
- func (v *VAST) GetAdsCreativeLinearTrackingEvents() map[string][]*TrackingEvents
- func (v *VAST) GetAdsCreativeLinearVideoClickThrough() map[string][]*ClickThrough
- func (v *VAST) GetAdsCreativeLinearVideoClickTracking() map[string][]*ClickTracking
- func (v *VAST) GetAdsCreativeLinearVideoClicks() map[string][]*VideoClicks
- func (v *VAST) GetAdsCreativeLinearVideoCustomClick() map[string][]*CustomClick
- func (v *VAST) GetAdsCreativeNonLinear() map[string][]*NonLinear
- func (v *VAST) GetAdsCreativeNonLinearAds() map[string][]*NonLinearAds
- func (v *VAST) GetAdsCreativeNonLinearClickThrough() map[string][]*NonLinearClickThrough
- func (v *VAST) GetAdsCreativeNonLinearClickTracking() map[string][]*NonLinearClickTracking
- func (v *VAST) GetAdsCreativeNonLinearStaticResource() map[string][]*StaticResource
- func (v *VAST) GetAdsCreativeNonLinearTracking() map[string][]*Tracking
- func (v *VAST) GetAdsCreativeUniversalAd() map[string][]*UniversalAdID
- func (v *VAST) GetAdsCreatives() map[string][]*Creatives
- func (v *VAST) GetAdsDescription() map[string][]*Description
- func (v *VAST) GetAdsError() map[string][]*VASTError
- func (v *VAST) GetAdsErrorURL() map[string][]*VASTError
- func (v *VAST) GetAdsExpires() map[string][]*Expires
- func (v *VAST) GetAdsExtension() map[string][]*Extension
- func (v *VAST) GetAdsExtensionAdVerification() map[string][]*Verification
- func (v *VAST) GetAdsExtensionCustomTracking() map[string][]*Tracking
- func (v *VAST) GetAdsExtensionTotalAvailable() map[string][]*TotalAvailable
- func (v *VAST) GetAdsExtensions() map[string][]*Extensions
- func (v *VAST) GetAdsImpression() map[string][]*Impression
- func (v *VAST) GetAdsInLine() []*InLine
- func (v *VAST) GetAdsNotViewable() map[string][]*NotViewable
- func (v *VAST) GetAdsPricing() map[string][]*Pricing
- func (v *VAST) GetAdsSurvey() map[string][]*Survey
- func (v *VAST) GetAdsVASTAdTagURI() map[string][]*VASTAdTagURI
- func (v *VAST) GetAdsViewUndetermined() map[string][]*ViewUndetermined
- func (v *VAST) GetAdsViewable() map[string][]*Viewable
- func (v *VAST) GetAdsViewableImpression() map[string][]*ViewableImpression
- func (v *VAST) GetAdsViewableImpressionNotViewable() map[string][]*NotViewable
- func (v *VAST) GetAdsViewableImpressionViewUndetermined() map[string][]*ViewUndetermined
- func (v *VAST) GetAdsViewableImpressionViewable() map[string][]*Viewable
- func (v *VAST) GetAdsWrapper() []*Wrapper
- func (v *VAST) IsAdHasCreatives(s string) bool
- func (v *VAST) IsAdInLine() bool
- func (v *VAST) IsAdWrapper() bool
- func (v *VAST) LenCreative(s string) int
- func (v *VAST) LenCreativeNonLinear(s string) int
- func (v *VAST) SetAd(adVersion, adID, adSequence, adConditional string) *VAST
- func (v *VAST) SetAdServing(adID, adValue string) *VAST
- func (v *VAST) SetAdSystem(s string) *VAST
- func (v *VAST) SetAdTitle(s string) *VAST
- func (v *VAST) SetAdvertiser(s string) *VAST
- func (v *VAST) SetCategory(sID, sAuth, sValue string) *VAST
- func (v *VAST) SetCompanion(...) *VAST
- func (v *VAST) SetCompanionAd(row *CompanionAds) *VAST
- func (v *VAST) SetCompanionClickThrough(sID, sValue string) *VAST
- func (v *VAST) SetCompanionHTMLResource(sID, sValue string) *VAST
- func (v *VAST) SetCompanionIFrameResource(sID, sValue string) *VAST
- func (v *VAST) SetCompanionStaticResource(sType, sValue string) *VAST
- func (v *VAST) SetCompanionTracking(sEvent, sOffset, sValue string) *VAST
- func (v *VAST) SetCreative(sID, sAdID, sSequence, sFramework string) *VAST
- func (v *VAST) SetCreativeRow(sID, sAdID, sSequence, sFramework string, linear *Linear, ...) *VAST
- func (v *VAST) SetDescription(s string) *VAST
- func (v *VAST) SetErrorURL(s string) *VAST
- func (v *VAST) SetExtension(sType, sValue string, total *TotalAvailable, adverifications *AdVerifications) *VAST
- func (v *VAST) SetExtensionAdVerification(js *JavaScriptResource, vp *VerificationParameters, tk *TrackingEvents) *VAST
- func (v *VAST) SetExtensionJavaScriptResource(sID, sValue string) *VAST
- func (v *VAST) SetExtensionTotalAvailable(sValue string) *VAST
- func (v *VAST) SetExtensionTracking(sEvent, sOffset, sValue string) *VAST
- func (v *VAST) SetExtensionVerificationParameters(sID, sValue string) *VAST
- func (v *VAST) SetImpression(impID, impURL string) *VAST
- func (v *VAST) SetImpressionURL(impID, impURL string) *VAST
- func (v *VAST) SetInLineAd(inlineID string) *VAST
- func (v *VAST) SetLinear(row *Linear) *VAST
- func (v *VAST) SetLinearClickThrough(sID, sValue string) *VAST
- func (v *VAST) SetLinearClickTracking(sID, sValue string) *VAST
- func (v *VAST) SetLinearCustomClick(sID, sValue string) *VAST
- func (v *VAST) SetLinearDuration(sID, sValue string) *VAST
- func (v *VAST) SetLinearInteractiveCreativeFile(sID, sValue string) *VAST
- func (v *VAST) SetLinearMediaFile(...) *VAST
- func (v *VAST) SetLinearMezzanine(sID, sValue string) *VAST
- func (v *VAST) SetLinearTracking(sEvent, sOffset, sValue string) *VAST
- func (v *VAST) SetNonLinear(row *NonLinearAds) *VAST
- func (v *VAST) SetNonLinearAd(...) *VAST
- func (v *VAST) SetNonLinearClickThrough(sID, sValue string) *VAST
- func (v *VAST) SetNonLinearClickTracking(sID, sValue string) *VAST
- func (v *VAST) SetNonLinearStaticResource(sType, sValue string) *VAST
- func (v *VAST) SetNonLinearTracking(sEvent, sOffset, sValue string) *VAST
- func (v *VAST) SetPricing(adID, adModel, adCurr, adValue string) *VAST
- func (v *VAST) SetSurvey(s string) *VAST
- func (v *VAST) SetUniversalAd(sID, sIDRegistry, sIDValue, sValue string) *VAST
- func (v *VAST) SetVASTAdTagURI(adID, adValue string) *VAST
- func (v *VAST) SetVerification(jscript *JavaScriptResource, verificationp *VerificationParameters, ...) *VAST
- func (v *VAST) SetVerificationJavaScriptResource(sID, sValue string) *VAST
- func (v *VAST) SetVerificationTracking(sEvent, sOffset, sValue string) *VAST
- func (v *VAST) SetVerificationVerificationParameters(sID, sValue string) *VAST
- func (v *VAST) SetVersion(version string) *VAST
- func (v *VAST) SetViewableImpression(sID string, viewable *Viewable, notviewable *NotViewable, ...) *VAST
- func (v *VAST) SetViewableImpressionNotViewable(sID, sValue string) *VAST
- func (v *VAST) SetViewableImpressionViewUndetermined(sID, sValue string) *VAST
- func (v *VAST) SetViewableImpressionViewable(sID, sValue string) *VAST
- func (v *VAST) SetWrapperAd(wrapperID, followAdditionalWrappers, allowMultipleAds, fallbackOnNoAd string) *VAST
- func (v *VAST) Stringify() (string, error)
- func (v *VAST) ToFile(filename, body string) (bool, error)
- func (v *VAST) ToJSON() (string, error)
- func (v *VAST) ToString() (string, error)
- func (v *VAST) ToXML() (string, error)
- func (v *VAST) VideoDuration(secs int) *Duration
- type VASTAdTagURI
- type VASTError
- type VastOptions
- type Verification
- type VerificationParameters
- type VideoAdServingTemplate
- type VideoClicks
- type ViewUndetermined
- type Viewable
- type ViewableImpression
- type Wrapper
Constants ¶
const ( VastInlineLinear = 1 + iota VastInlineNonlinear VastWrapperLinear1 VastWrapperLinear2 VastWrapperNonlinear1 VastWrapperNonlinear2 )
const for sample vast xmls
const ( TrkEventMute = "mute" TrkEventUnmute = "unmute" TrkEventPause = "pause" TrkEventResume = "resume" TrkEventRewind = "rewind" TrkEventSkip = "skip" TrkEventPlayerExpand = "playerExpand" TrkEventPlayerCollapse = "playerCollapse" TrkEventStart = "start" TrkEventFirstQuartile = "firstQuartile" TrkEventMidpoint = "midpoint" TrkEventThirdQuartile = "thirdQuartile" TrkEventComplete = "complete" TrkEventAcceptInvitationLinear = "acceptInvitationLinear" TrkEventTimeSpentViewing = "timeSpentViewing" TrkEventOtherAdInteraction = "otherAdInteraction" TrkEventProgress = "progress" TrkEventAcceptInvitation = "acceptInvitation" TrkEventAdExpand = "adExpand" TrkEventAdCollapse = "adCollapse" TrkEventMinimize = "minimize" TrkEventClose = "close" TrkEventOverlayViewDuration = "overlayViewDuration" TrkEventCreativeView = "creativeView" VastXMLNs = "http://www.iab.com/VAST" VastXMLNsXs = "http://www.w3.org/2001/XMLSchema" )
const more
const ( MacroUnknown = -1 AdsPreRoll = 1 AdsMidRoll = 2 AdsPostRoll = 3 )
constant Generic Macros
Variables ¶
var ( XMLInlineNonLinear = `` /* 2428-byte string literal not displayed */ XMLInlineLinear = `` /* 2215-byte string literal not displayed */ XMLWrapperLinear1 = `` /* 1787-byte string literal not displayed */ XMLWrapperLinear2 = `` /* 1243-byte string literal not displayed */ XMLWrapperNonLinear1 = `` /* 1236-byte string literal not displayed */ XMLWrapperNonLinear2 = `` /* 1386-byte string literal not displayed */ )
SAMPLE VAST XMLS
var ( ErrFailedToString = errors.New("mongersvast: string Format failed") ErrFailedToStringNilValue = errors.New("mongersvast: string Format failed (nil value found)") ErrFailedFileOpen = errors.New("mongersvast: XML file open failed") ErrFailedFileSave = errors.New("mongersvast: XML file save failed") VastXMLVer1 = "1.0" VastXMLVer2 = "2.0" VastXMLVer3 = "3.0" VastXMLVer4 = "4.0" VastXMLHeader = `<?xml version="1.0" encoding="UTF-8"?>` AdTypeIsInline = "inline" AdTypeIsWrapper = "wrapper" )
misc vars here
var TrackingEventTypes = map[string]string{ "AcceptInvitationLinear": TrkEventAcceptInvitationLinear, "AcceptInvitation": TrkEventAcceptInvitation, "AdCollapse": TrkEventAdCollapse, "AdExpand": TrkEventAdExpand, "Close": TrkEventClose, "Complete": TrkEventComplete, "CreativeView": TrkEventCreativeView, "FirstQuartile": TrkEventFirstQuartile, "Midpoint": TrkEventMidpoint, "Minimize": TrkEventMinimize, "Mute": TrkEventMute, "OtherAdInteraction": TrkEventOtherAdInteraction, "OverlayViewDuration": TrkEventOverlayViewDuration, "Pause": TrkEventPause, "PlayerCollapse": TrkEventPlayerCollapse, "PlayerExpand": TrkEventPlayerExpand, "Progress": TrkEventProgress, "Resume": TrkEventResume, "Rewind": TrkEventRewind, "Skip": TrkEventSkip, "Start": TrkEventStart, "ThirdQuartile": TrkEventThirdQuartile, "TimeSpentViewing": TrkEventTimeSpentViewing, "Unmute": TrkEventUnmute, }
TrackingEventTypes list of known event types of Tracking
var VASTErrorCodes = map[string]string{
"100": "XML parsing error",
"101": "VAST schema validation error",
"102": "VAST version of response not supported",
"200": "Trafficking error Video player received an Ad type that it was not expecting and/or cannot display",
"201": "Video player expecting different linearity",
"202": "Video player expecting different duration",
"203": "Video player expecting different size",
"300": "General Wrapper error",
"301": "Timeout of VAST URI provided in Wrapper element, or of VAST URI provided in a subsequent Wrapper element (URI was either unavailable or reached a timeout as defined by the video player)",
"302": "Wrapper limit reached, as defined by the video player Too many Wrapper responses have been received with no InLine response",
"303": "No Ads VAST response after one or more Wrappers",
"400": "General Linear error Video player is unable to display the Linear Ad",
"401": "File not found Unable to find Linear/MediaFile from URI",
"402": "Timeout of MediaFile URI",
"403": "Couldn’t find MediaFile that is supported by this video player, based on the attributes of the MediaFile element",
"405": "Problem displaying MediaFile Video player found a MediaFile with supported type but couldn’t display it MediaFile may include: unsupported codecs, different MIME type than MediaFile@type, unsupported delivery method, etc",
"500": "General NonLinearAds error",
"501": "Unable to display NonLinear Ad because creative dimensions do not align with creative display area (ie creative dimension too large)",
"502": "Unable to fetch NonLinearAds/NonLinear resource",
"503": "Couldn’t find NonLinear resource with supported type",
"600": "General CompanionAds error",
"601": "Unable to display Companion because creative dimensions do not fit within Companiondisplay area (ie, no available space)",
"602": "Unable to display Required Companion",
"603": "Unable to fetch CompanionAds/Companion resource",
"604": "Couldn’t find Companion resource with supported type",
"900": "Undefined Error",
"901": "General VPAID error",
}
VASTErrorCodes list of standard vast errror codes
var VASTMacros = map[string]string{
"Timestamp": `[TIMESTAMP]`,
"CacheBusting": `[CACHEBUSTING]`,
"ContentplayHead": `[CONTENTPLAYHEAD]`,
"MediaplayHead": `[MEDIAPLAYHEAD]`,
"BreakPosition": `[BREAKPOSITION]`,
"BlockedAdCategories": `[BLOCKEDADCATEGORIES]`,
"AdCategories": `[ADCATEGORIES]`,
"AdCount": `[ADCOUNT]`,
"TransactionID": `[TRANSACTIONID]`,
"PlacementType": `[PLACEMENTTYPE]`,
"AdType": `[ADTYPE]`,
"UniversalAdID": `[UNIVERSALADID]`,
"IFA": `[IFA]`,
"IFAtype": `[IFATYPE]`,
"ClientUA": `[CLIENTUA]`,
"ServerUA": `[SERVERUA]`,
"DeviceUA": `[DEVICEUA]`,
"DeviceIP": `[DEVICEIP]`,
"LatLong": `[LATLONG]`,
"Domain": `[DOMAIN]`,
"PageURL": `[PAGEURL]`,
"AppName": `[APPNAME]`,
"VastVersions": `[VASTVERSIONS]`,
"ApiFrameworks": `[APIFRAMEWORKS]`,
"Extensions": `[EXTENSIONS]`,
"VerificationVendors": `[VERIFICATIONVENDORS]`,
"MediaMime": `[MEDIAMIME]`,
"PlayerCapabilities": `[PLAYERCAPABILITIES]`,
"ClickType": `[CLICKTYPE]`,
"PlayerState": `[PLAYERSTATE]`,
"PlayerSize": `[PLAYERSIZE]`,
"AdPlayHead": `[ADPLAYHEAD]`,
"AssetURI": `[ASSETURI]`,
"PodSequence": `[PODSEQUENCE]`,
"AdServingID": `[ADSERVINGID]`,
"ClickPos": `[CLICKPOS]`,
"ErrorCode": `[ERRORCODE]`,
"Reason": `[REASON]`,
"LimitAdTracking": `[LIMITADTRACKING]`,
"Regulations": `[REGULATIONS]`,
"GdprConsent": `[GDPRCONSENT]`,
}
VASTMacros generic macros for VAST
Functions ¶
func PushXML ¶
func PushXML(w http.ResponseWriter, xml string)
PushXML push content with proper xml hdrs
func SetXMLHeaders ¶
func SetXMLHeaders(w http.ResponseWriter)
SetXMLHeaders set the xml headers simply
Types ¶
type Ad ¶
type Ad struct { ID string `xml:"id,attr,omitempty"` Sequence string `xml:"sequence,attr,omitempty"` ConditionalAd string `xml:"conditionalAd,attr,omitempty"` InLine *InLine `xml:",omitempty"` Wrapper *Wrapper `xml:",omitempty"` }
Ad is an element of the VAST structure
type AdParameters ¶
type AdParameters struct { ID string `xml:"id,attr,omitempty"` XMLEncoded string `xml:"xmlEncoded,attr,omitempty"` Value string `xml:",cdata"` }
AdParameters vast ad params
type AdServingID ¶
AdServingID vast
type AdVerifications ¶
type AdVerifications struct {
Verification []*Verification `xml:",omitempty"`
}
AdVerifications list of Verification
type Advertiser ¶
Advertiser name of the advertiser
type Category ¶
type Category struct { ID string `xml:"id,attr,omitempty"` Authority string `xml:"authority,attr,omitempty"` Value string `xml:",cdata"` }
Category name of the category in creative
type ClickThrough ¶
type ClickThrough struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
ClickThrough vast url
type ClickTracking ¶
type ClickTracking struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
ClickTracking vast url
type ClosedCaptionFile ¶
type ClosedCaptionFile struct { ID string `xml:"id,attr,omitempty"` Type string `xml:"type,attr,omitempty"` Language string `xml:"language,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
ClosedCaptionFile vast element
type ClosedCaptionFiles ¶
type ClosedCaptionFiles struct {
ClosedCaptionFile []*ClosedCaptionFile `xml:",omitempty"`
}
ClosedCaptionFiles is an element list
type Companion ¶
type Companion struct { ID string `xml:"id,attr,omitempty"` Width string `xml:"width,attr,omitempty"` Height string `xml:"height,attr,omitempty"` AssetWidth string `xml:"assetWidth,attr,omitempty"` AssetHeight string `xml:"assetHeight,attr,omitempty"` ExpandedWidth string `xml:"expandedWidth,attr,omitempty"` ExpandedHeight string `xml:"expandedHeight,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` AdSlotID string `xml:"adSlotID,attr,omitempty"` PxRatio string `xml:"pxratio,attr,omitempty"` RenderingMode string `xml:"renderingMode,attr,omitempty"` LogoTile string `xml:"logoTile,attr,omitempty"` LogoTitle string `xml:"logoTitle,attr,omitempty"` LogoURL string `xml:"logoURL,attr,omitempty"` HTMLResource *HTMLResource `xml:",omitempty"` IFrameResource *IFrameResource `xml:",omitempty"` StaticResource *StaticResource `xml:",omitempty"` CompanionClickThrough *CompanionClickThrough `xml:",omitempty"` TrackingEvents *TrackingEvents `xml:",omitempty"` AdParameters *AdParameters `xml:",omitempty"` AltText *AltText `xml:",omitempty"` }
Companion is an element of the VAST structure
type CompanionAds ¶
type CompanionAds struct { Required string `xml:"required,attr,omitempty"` Companion []*Companion `xml:",omitempty"` }
CompanionAds is an element list
type CompanionClickThrough ¶
type CompanionClickThrough struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
CompanionClickThrough vast url
type Creative ¶
type Creative struct { ID string `xml:"id,attr,omitempty"` AdID string `xml:"adId,attr,omitempty"` Sequence string `xml:"sequence,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` Linear *Linear `xml:",omitempty"` NonLinearAds *NonLinearAds `xml:",omitempty"` CompanionAds *CompanionAds `xml:",omitempty"` UniversalAdID *UniversalAdID `xml:"UniversalAdId,omitempty"` CreativeExtensions *CreativeExtensions `xml:",omitempty"` }
Creative is an element of the VAST structure
type CreativeExtension ¶
type CreativeExtension struct { Type string `xml:"type,attr,omitempty"` Value string `xml:",cdata"` }
CreativeExtension is an element
type CreativeExtensions ¶
type CreativeExtensions struct {
CreativeExtension []*CreativeExtension `xml:",omitempty"`
}
CreativeExtensions is an element list
type Creatives ¶
type Creatives struct {
Creative []*Creative `xml:"Creative,omitempty"`
}
Creatives is an element of the VAST structure
type CustomClick ¶
type CustomClick struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
CustomClick vast url
type CustomTracking ¶
type CustomTracking struct {
Tracking []*Tracking `xml:",omitempty"`
}
CustomTracking is an element of the VAST structure
type Description ¶
Description vast
type ExecutableResource ¶
type ExecutableResource struct { ID string `xml:"id,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` Value string `xml:",cdata"` }
ExecutableResource vast url for javascript res
type Extension ¶
type Extension struct { Type string `xml:"type,attr,omitempty"` FallbackIndex string `xml:"fallback_index,attr,omitempty"` TotalAvailable *TotalAvailable `xml:"total_available,omitempty"` Value string `xml:",cdata"` AdVerifications *AdVerifications `xml:",omitempty"` CustomTracking *CustomTracking `xml:",omitempty"` }
Extension is an element of the VAST structure
type Extensions ¶
type Extensions struct {
Extension []*Extension `xml:",omitempty"`
}
Extensions is an element list
type FlashResource ¶
type FlashResource struct { ID string `xml:"id,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` Value string `xml:",cdata"` }
FlashResource vast url for javascript res
type HTMLResource ¶
HTMLResource source url
type HashExt ¶
type HashExt []byte
HashExt is a raw encoded JSON value.
func (HashExt) MarshalJSON ¶
MarshalJSON returns e as the JSON encoding of e.
func (*HashExt) UnmarshalJSON ¶
UnmarshalJSON sets *e to a copy of data.
type IFrameResource ¶
IFrameResource source url
type Icon ¶
type Icon struct { ID string `xml:"id,attr,omitempty"` Program string `xml:"program,attr,omitempty"` Width string `xml:"width,attr,omitempty"` Height string `xml:"height,attr,omitempty"` XPosition string `xml:"xPosition,attr,omitempty"` YPosition string `xml:"yPosition,attr,omitempty"` Duration string `xml:"duration,attr,omitempty"` Offset string `xml:"offset,attr,omitempty"` PxRatio string `xml:"pxratio,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` HTMLResource *HTMLResource `xml:",omitempty"` IFrameResource *IFrameResource `xml:",omitempty"` StaticResource *StaticResource `xml:",omitempty"` IconClicks *IconClicks `xml:",omitempty"` IconViewTracking *IconViewTracking `xml:",omitempty"` }
Icon is an element of the VAST structure
type IconClickThrough ¶
type IconClickThrough struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
IconClickThrough vast url
type IconClickTracking ¶
type IconClickTracking struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
IconClickTracking vast url
type IconClicks ¶
type IconClicks struct { IconClickThrough *IconClickThrough `xml:",omitempty"` IconClickTracking *IconClickTracking `xml:",omitempty"` }
IconClicks is an element of the VAST structure
type IconViewTracking ¶
type IconViewTracking struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
IconViewTracking vast url
type Impression ¶
type Impression struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
Impression vast url
type InLine ¶
type InLine struct { InLineWrapperData ID string `xml:"id,attr,omitempty"` }
InLine is an element of the VAST structure (LINEAR)
type InLineWrapperData ¶
type InLineWrapperData struct { AdSystem *AdSystem `xml:",omitempty"` AdTitle *AdTitle `xml:",omitempty"` AdServingID *AdServingID `xml:"AdServingId,omitempty"` Description *Description `xml:",omitempty"` Survey *Survey `xml:",omitempty"` Error *VASTError `xml:",omitempty"` Impression []*Impression `xml:",omitempty"` ViewableImpression []*ViewableImpression `xml:",omitempty"` Creatives *Creatives `xml:",omitempty"` VASTAdTagURI *VASTAdTagURI `xml:",omitempty"` Extensions *Extensions `xml:",omitempty"` Pricing *Pricing `xml:",omitempty"` AdVerifications *AdVerifications `xml:",omitempty"` Advertiser *Advertiser `xml:",omitempty"` Category []*Category `xml:",omitempty"` Expires *Expires `xml:",omitempty"` }
InLineWrapperData common data for InLine/Wrapper
type InteractiveCreativeFile ¶
type InteractiveCreativeFile struct { ID string `xml:"id,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` VariableDuration string `xml:"variableDuration,attr,omitempty"` Value string `xml:",cdata"` }
InteractiveCreativeFile creative is interactive
type JavaScriptResource ¶
type JavaScriptResource struct { ID string `xml:"id,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` BrowserOptional string `xml:"browserOptional,attr,omitempty"` Browser string `xml:"browser,attr,omitempty"` Value string `xml:",cdata"` }
JavaScriptResource vast url for javascript res
type Linear ¶
type Linear struct { SkipOffset string `xml:"skipoffset,attr,omitempty"` AdParameters *AdParameters `xml:",omitempty"` Duration *Duration `xml:",omitempty"` TrackingEvents *TrackingEvents `xml:",omitempty"` VideoClicks *VideoClicks `xml:",omitempty"` MediaFiles *MediaFiles `xml:",omitempty"` Icons *Icons `xml:",omitempty"` }
Linear is an element of the VAST structure
type MediaFile ¶
type MediaFile struct { ID string `xml:"id,attr,omitempty"` Delivery string `xml:"delivery,attr,omitempty"` Type string `xml:"type,attr,omitempty"` Width string `xml:"width,attr,omitempty"` Height string `xml:"height,attr,omitempty"` Bitrate string `xml:"bitrate,attr,omitempty"` MinBitrate string `xml:"minBitrate,attr,omitempty"` MaxBitrate string `xml:"maxBitrate,attr,omitempty"` Scalable string `xml:"scalable,attr,omitempty"` MaintainAspectRatio string `xml:"maintainAspectRatio,attr,omitempty"` Codec string `xml:"codec,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` MediaType string `xml:"mediaType,attr,omitempty"` Value string `xml:",cdata"` }
MediaFile is an element of the VAST structure
type MediaFiles ¶
type MediaFiles struct { MediaFile []*MediaFile `xml:",omitempty"` Mezzanine *Mezzanine `xml:",omitempty"` InteractiveCreativeFile *InteractiveCreativeFile `xml:",omitempty"` ClosedCaptionFiles *ClosedCaptionFiles `xml:",omitempty"` }
MediaFiles is an element list
type Mezzanine ¶
type Mezzanine struct { ID string `xml:"id,attr,omitempty"` Delivery string `xml:"delivery,attr,omitempty"` Type string `xml:"type,attr,omitempty"` Width string `xml:"width,attr,omitempty"` Height string `xml:"height,attr,omitempty"` Codec string `xml:"codec,attr,omitempty"` FileSize string `xml:"fileSize,attr,omitempty"` MediaType string `xml:"mediaType,attr,omitempty"` Value string `xml:",cdata"` }
Mezzanine vast url
type NonLinear ¶
type NonLinear struct { ID string `xml:"id,attr,omitempty"` APIFramework string `xml:"apiFramework,attr,omitempty"` Height string `xml:"height,attr,omitempty"` Width string `xml:"width,attr,omitempty"` MinSuggestedDuration string `xml:"minSuggestedDuration,attr,omitempty"` Scalable string `xml:"scalable,attr,omitempty"` MaintainAspectRatio string `xml:"maintainAspectRatio,attr,omitempty"` StaticResource *StaticResource `xml:",omitempty"` NonLinearClickThrough *NonLinearClickThrough `xml:",omitempty"` NonLinearClickTracking *NonLinearClickTracking `xml:",omitempty"` URL []*URL `xml:",omitempty"` }
NonLinear is an element of the VAST structure
type NonLinearAds ¶
type NonLinearAds struct { TrackingEvents *TrackingEvents `xml:",omitempty"` NonLinear []*NonLinear `xml:",omitempty"` }
NonLinearAds is an element of the VAST structure
type NonLinearClickThrough ¶
type NonLinearClickThrough struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
NonLinearClickThrough vast url
type NonLinearClickTracking ¶
type NonLinearClickTracking struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
NonLinearClickTracking vast url
type NotViewable ¶
NotViewable creative cant be viewed
type Pricing ¶
type Pricing struct { ID string `xml:"id,attr,omitempty"` Model string `xml:"model,attr,omitempty"` Currency string `xml:"currency,attr,omitempty"` Value string `xml:",cdata"` }
Pricing price tag of the vast creative
type StaticResource ¶
type StaticResource struct { CreativeType string `xml:"creativeType,attr,omitempty"` Value string `xml:",cdata"` }
StaticResource is an element of the VAST structure
type TotalAvailable ¶
type TotalAvailable struct {
Value string `xml:",cdata"`
}
TotalAvailable total avail count
type Tracking ¶
type Tracking struct { Event string `xml:"event,attr,omitempty"` Offset string `xml:"offset,attr,omitempty"` Value string `xml:",cdata"` URL []*URL `xml:",omitempty"` }
Tracking is an element of the VAST structure
type TrackingEvents ¶
type TrackingEvents struct {
Tracking []*Tracking `xml:",omitempty"`
}
TrackingEvents is an element of the VAST structure
type UniversalAdID ¶
type UniversalAdID struct { ID string `xml:"id,attr,omitempty"` IDRegistry string `xml:"idRegistry,attr,omitempty"` IDValue string `xml:"idValue,attr,omitempty"` Value string `xml:",cdata"` }
UniversalAdID ad id
type VAST ¶
type VAST struct { Version string `xml:"version,attr,omitempty"` XMLNs string `xml:"xmlns,attr,omitempty"` XMLNsXs string `xml:"xmlns:xs,attr,omitempty"` Ad []*Ad `xml:",omitempty"` }
VAST the root element of the XML
func InLineAd ¶
func InLineAd(attrs AdAttributes, adSystem *AdSystem, title *AdTitle, desc *Description, verr *VASTError, imps []*Impression, creatives *Creatives) (req *VAST)
InLineAd inline ad template
func WrapperAd ¶
func WrapperAd(attrs AdAttributes, adSystem *AdSystem, title *AdTitle, desc *Description, verr *VASTError, imps []*Impression, creatives *Creatives, adURI *VASTAdTagURI) (req *VAST)
WrapperAd wrapper ad template
func (*VAST) FormatAdAttrs ¶
func (v *VAST) FormatAdAttrs(attrs AdAttributes)
FormatAdAttrs sync all possible options/attrs
func (*VAST) FormatCreativeWithNonLinearAds ¶
FormatCreativeWithNonLinearAds prep if no nonlinearads
func (*VAST) FromString ¶
FromString load and unmarshal from string
func (*VAST) GetAdsAdServing ¶
func (v *VAST) GetAdsAdServing() map[string][]*AdServingID
GetAdsAdServing get the list of all AdServingID
func (*VAST) GetAdsAdSystem ¶
GetAdsAdSystem get the list of all AdSystem
func (*VAST) GetAdsAdTitle ¶
GetAdsAdTitle get the list of all AdTitle
func (*VAST) GetAdsAdVerification ¶
func (v *VAST) GetAdsAdVerification() map[string][]*Verification
GetAdsAdVerification get the list of all AdVerifications.Verification
func (*VAST) GetAdsAdVerificationExecutableResource ¶
func (v *VAST) GetAdsAdVerificationExecutableResource() map[string][]*ExecutableResource
GetAdsAdVerificationExecutableResource get the list of all AdVerifications.Verification.ExecutableResource
func (*VAST) GetAdsAdVerificationFlashResource ¶
func (v *VAST) GetAdsAdVerificationFlashResource() map[string][]*FlashResource
GetAdsAdVerificationFlashResource get the list of all AdVerifications.Verification.FlashResource
func (*VAST) GetAdsAdVerificationJavaScriptResource ¶
func (v *VAST) GetAdsAdVerificationJavaScriptResource() map[string][]*JavaScriptResource
GetAdsAdVerificationJavaScriptResource get the list of all AdVerifications.Verification.JavaScriptResource
func (*VAST) GetAdsAdVerificationNotViewable ¶
func (v *VAST) GetAdsAdVerificationNotViewable() map[string][]*NotViewable
GetAdsAdVerificationNotViewable get the list of all AdVerifications.Verification.ViewableImpression.NotViewable
func (*VAST) GetAdsAdVerificationTracking ¶
GetAdsAdVerificationTracking get the list of all AdVerifications.Verification.TrackingEvents.Tracking
func (*VAST) GetAdsAdVerificationVerificationParameters ¶
func (v *VAST) GetAdsAdVerificationVerificationParameters() map[string][]*VerificationParameters
GetAdsAdVerificationVerificationParameters get the list of all AdVerifications.Verification.VerificationParameters
func (*VAST) GetAdsAdVerificationViewUndetermined ¶
func (v *VAST) GetAdsAdVerificationViewUndetermined() map[string][]*ViewUndetermined
GetAdsAdVerificationViewUndetermined get the list of all AdVerifications.Verification.ViewableImpression.ViewUndetermined
func (*VAST) GetAdsAdVerificationViewable ¶
GetAdsAdVerificationViewable get the list of all AdVerifications.Verification.ViewableImpression.Viewable
func (*VAST) GetAdsAdVerificationViewableImpression ¶
func (v *VAST) GetAdsAdVerificationViewableImpression() map[string][]*ViewableImpression
GetAdsAdVerificationViewableImpression get the list of all AdVerifications.Verification.ViewableImpression
func (*VAST) GetAdsAdVerifications ¶
func (v *VAST) GetAdsAdVerifications() map[string][]*AdVerifications
GetAdsAdVerifications get the list of all AdVerifications
func (*VAST) GetAdsAdvertiser ¶
func (v *VAST) GetAdsAdvertiser() map[string][]*Advertiser
GetAdsAdvertiser get the list of all Advertiser
func (*VAST) GetAdsCategory ¶
GetAdsCategory get the list of all Category
func (*VAST) GetAdsCreative ¶
GetAdsCreative get the list of all Creative
func (*VAST) GetAdsCreativeCompanion ¶
GetAdsCreativeCompanion get the list of all Creative.CompanionAds.Companion
func (*VAST) GetAdsCreativeCompanionAdParameters ¶
func (v *VAST) GetAdsCreativeCompanionAdParameters() map[string][]*AdParameters
GetAdsCreativeCompanionAdParameters get the list of all Creative.CompanionAds.Companion.AdParameters
func (*VAST) GetAdsCreativeCompanionAds ¶
func (v *VAST) GetAdsCreativeCompanionAds() map[string][]*CompanionAds
GetAdsCreativeCompanionAds get the list of all Creative.CompanionAds
func (*VAST) GetAdsCreativeCompanionAltText ¶
GetAdsCreativeCompanionAltText get the list of all Creative.CompanionAds.Companion.AltText
func (*VAST) GetAdsCreativeCompanionClickThrough ¶
func (v *VAST) GetAdsCreativeCompanionClickThrough() map[string][]*CompanionClickThrough
GetAdsCreativeCompanionClickThrough get the list of all Creative.CompanionAds.Companion.CompanionClickThrough
func (*VAST) GetAdsCreativeCompanionHTMLResource ¶
func (v *VAST) GetAdsCreativeCompanionHTMLResource() map[string][]*HTMLResource
GetAdsCreativeCompanionHTMLResource get the list of all Creative.CompanionAds.Companion.HTMLResource
func (*VAST) GetAdsCreativeCompanionIFrameResource ¶
func (v *VAST) GetAdsCreativeCompanionIFrameResource() map[string][]*IFrameResource
GetAdsCreativeCompanionIFrameResource get the list of all Creative.CompanionAds.Companion.IFrameResource
func (*VAST) GetAdsCreativeCompanionStaticResource ¶
func (v *VAST) GetAdsCreativeCompanionStaticResource() map[string][]*StaticResource
GetAdsCreativeCompanionStaticResource get the list of all Creative.CompanionAds.Companion.StaticResource
func (*VAST) GetAdsCreativeCompanionTracking ¶
GetAdsCreativeCompanionTracking get the list of all Creative.CompanionAds.Companion.TrackingEvents.Tracking
func (*VAST) GetAdsCreativeExtension ¶
func (v *VAST) GetAdsCreativeExtension() map[string][]*CreativeExtension
GetAdsCreativeExtension get the list of all Creative.CreativeExtensions.CreativeExtension
func (*VAST) GetAdsCreativeExtensions ¶
func (v *VAST) GetAdsCreativeExtensions() map[string][]*CreativeExtensions
GetAdsCreativeExtensions get the list of all Creative.CreativeExtensions
func (*VAST) GetAdsCreativeLinear ¶
GetAdsCreativeLinear get the list of all Creative.Linear
func (*VAST) GetAdsCreativeLinearClosedCaptionFile ¶
func (v *VAST) GetAdsCreativeLinearClosedCaptionFile() map[string][]*ClosedCaptionFile
GetAdsCreativeLinearClosedCaptionFile get the list of all Creative.Linear.MediaFiles.ClosedCaptionFiles.ClosedCaptionFile
func (*VAST) GetAdsCreativeLinearClosedCaptionFiles ¶
func (v *VAST) GetAdsCreativeLinearClosedCaptionFiles() map[string][]*ClosedCaptionFiles
GetAdsCreativeLinearClosedCaptionFiles get the list of all Creative.Linear.MediaFiles.ClosedCaptionFiles
func (*VAST) GetAdsCreativeLinearDuration ¶
GetAdsCreativeLinearDuration get the list of all Creative.Linear.Duration
func (*VAST) GetAdsCreativeLinearIcon ¶
GetAdsCreativeLinearIcon get the list of all Creative.Linear.Icons.Icon
func (*VAST) GetAdsCreativeLinearIcons ¶
GetAdsCreativeLinearIcons get the list of all Creative.Linear.Icons
func (*VAST) GetAdsCreativeLinearInteractiveCreativeFile ¶
func (v *VAST) GetAdsCreativeLinearInteractiveCreativeFile() map[string][]*InteractiveCreativeFile
GetAdsCreativeLinearInteractiveCreativeFile get the list of all Creative.Linear.MediaFiles.InteractiveCreativeFile
func (*VAST) GetAdsCreativeLinearMediaFile ¶
GetAdsCreativeLinearMediaFile get the list of all Creative.Linear.MediaFiles.MediaFile
func (*VAST) GetAdsCreativeLinearMediaFiles ¶
func (v *VAST) GetAdsCreativeLinearMediaFiles() map[string][]*MediaFiles
GetAdsCreativeLinearMediaFiles get the list of all Creative.Linear.MediaFiles
func (*VAST) GetAdsCreativeLinearMezzanine ¶
GetAdsCreativeLinearMezzanine get the list of all Creative.Linear.MediaFiles.Mezzanine
func (*VAST) GetAdsCreativeLinearTracking ¶
GetAdsCreativeLinearTracking get the list of all Creative.Linear.TrackingEvents.Tracking
func (*VAST) GetAdsCreativeLinearTrackingEvents ¶
func (v *VAST) GetAdsCreativeLinearTrackingEvents() map[string][]*TrackingEvents
GetAdsCreativeLinearTrackingEvents get the list of all Creative.Linear.TrackingEvents
func (*VAST) GetAdsCreativeLinearVideoClickThrough ¶
func (v *VAST) GetAdsCreativeLinearVideoClickThrough() map[string][]*ClickThrough
GetAdsCreativeLinearVideoClickThrough get the list of all Creative.Linear.VideoClicks.ClickThrough
func (*VAST) GetAdsCreativeLinearVideoClickTracking ¶
func (v *VAST) GetAdsCreativeLinearVideoClickTracking() map[string][]*ClickTracking
GetAdsCreativeLinearVideoClickTracking get the list of all Creative.Linear.VideoClicks.ClickTracking
func (*VAST) GetAdsCreativeLinearVideoClicks ¶
func (v *VAST) GetAdsCreativeLinearVideoClicks() map[string][]*VideoClicks
GetAdsCreativeLinearVideoClicks get the list of all Creative.Linear.VideoClicks
func (*VAST) GetAdsCreativeLinearVideoCustomClick ¶
func (v *VAST) GetAdsCreativeLinearVideoCustomClick() map[string][]*CustomClick
GetAdsCreativeLinearVideoCustomClick get the list of all Creative.Linear.VideoClicks.CustomClick
func (*VAST) GetAdsCreativeNonLinear ¶
GetAdsCreativeNonLinear get the list of all Creative.NonLinearAds.NonLinear
func (*VAST) GetAdsCreativeNonLinearAds ¶
func (v *VAST) GetAdsCreativeNonLinearAds() map[string][]*NonLinearAds
GetAdsCreativeNonLinearAds get the list of all Creative.NonLinearAds
func (*VAST) GetAdsCreativeNonLinearClickThrough ¶
func (v *VAST) GetAdsCreativeNonLinearClickThrough() map[string][]*NonLinearClickThrough
GetAdsCreativeNonLinearClickThrough get the list of all Creative.NonLinearAds.NonLinear.NonLinearClickThrough
func (*VAST) GetAdsCreativeNonLinearClickTracking ¶
func (v *VAST) GetAdsCreativeNonLinearClickTracking() map[string][]*NonLinearClickTracking
GetAdsCreativeNonLinearClickTracking get the list of all Creative.NonLinearAds.NonLinear.NonLinearClickTracking
func (*VAST) GetAdsCreativeNonLinearStaticResource ¶
func (v *VAST) GetAdsCreativeNonLinearStaticResource() map[string][]*StaticResource
GetAdsCreativeNonLinearStaticResource get the list of all Creative.NonLinearAds.NonLinear.StaticResource
func (*VAST) GetAdsCreativeNonLinearTracking ¶
GetAdsCreativeNonLinearTracking get the list of all Creative.NonLinearAds.TrackingEvents.Tracking
func (*VAST) GetAdsCreativeUniversalAd ¶
func (v *VAST) GetAdsCreativeUniversalAd() map[string][]*UniversalAdID
GetAdsCreativeUniversalAd get the list of all Creative.UniversalAdID
func (*VAST) GetAdsCreatives ¶
GetAdsCreatives get the list of all Creatives
func (*VAST) GetAdsDescription ¶
func (v *VAST) GetAdsDescription() map[string][]*Description
GetAdsDescription get the list of all Description
func (*VAST) GetAdsError ¶
GetAdsError get the list of all VASTError
func (*VAST) GetAdsErrorURL ¶
GetAdsErrorURL get the list of all VASTError
func (*VAST) GetAdsExpires ¶
GetAdsExpires get the list of all Expires
func (*VAST) GetAdsExtension ¶
GetAdsExtension get the list of all Extensions.Extension
func (*VAST) GetAdsExtensionAdVerification ¶
func (v *VAST) GetAdsExtensionAdVerification() map[string][]*Verification
GetAdsExtensionAdVerification get the list of all Extensions.Extension.AdVerifications.Verification
func (*VAST) GetAdsExtensionCustomTracking ¶
GetAdsExtensionCustomTracking get the list of all Extensions.Extension.CustomTracking.Tracking
func (*VAST) GetAdsExtensionTotalAvailable ¶
func (v *VAST) GetAdsExtensionTotalAvailable() map[string][]*TotalAvailable
GetAdsExtensionTotalAvailable get the list of all Extensions.Extension.TotalAvailable
func (*VAST) GetAdsExtensions ¶
func (v *VAST) GetAdsExtensions() map[string][]*Extensions
GetAdsExtensions get the list of all Extensions
func (*VAST) GetAdsImpression ¶
func (v *VAST) GetAdsImpression() map[string][]*Impression
GetAdsImpression get the list of all Impression
func (*VAST) GetAdsInLine ¶
GetAdsInLine get the list of all inline
func (*VAST) GetAdsNotViewable ¶
func (v *VAST) GetAdsNotViewable() map[string][]*NotViewable
GetAdsNotViewable get the list of all Viewable
func (*VAST) GetAdsPricing ¶
GetAdsPricing get the list of all Pricing
func (*VAST) GetAdsSurvey ¶
GetAdsSurvey get the list of all Survey
func (*VAST) GetAdsVASTAdTagURI ¶
func (v *VAST) GetAdsVASTAdTagURI() map[string][]*VASTAdTagURI
GetAdsVASTAdTagURI get the list of all VASTAdTagURI
func (*VAST) GetAdsViewUndetermined ¶
func (v *VAST) GetAdsViewUndetermined() map[string][]*ViewUndetermined
GetAdsViewUndetermined get the list of all Viewable
func (*VAST) GetAdsViewable ¶
GetAdsViewable get the list of all Viewable
func (*VAST) GetAdsViewableImpression ¶
func (v *VAST) GetAdsViewableImpression() map[string][]*ViewableImpression
GetAdsViewableImpression get the list of all ViewableImpression
func (*VAST) GetAdsViewableImpressionNotViewable ¶
func (v *VAST) GetAdsViewableImpressionNotViewable() map[string][]*NotViewable
GetAdsViewableImpressionNotViewable get the list of all ViewableImpression.NotViewable
func (*VAST) GetAdsViewableImpressionViewUndetermined ¶
func (v *VAST) GetAdsViewableImpressionViewUndetermined() map[string][]*ViewUndetermined
GetAdsViewableImpressionViewUndetermined get the list of all ViewableImpression.ViewUndetermined
func (*VAST) GetAdsViewableImpressionViewable ¶
GetAdsViewableImpressionViewable get the list of all ViewableImpression.Viewable
func (*VAST) GetAdsWrapper ¶
GetAdsWrapper get the list of all wrapper
func (*VAST) IsAdHasCreatives ¶
IsAdHasCreatives check if creative element is valid
func (*VAST) LenCreative ¶
LenCreative get total length of creatives.creative
func (*VAST) LenCreativeNonLinear ¶
LenCreativeNonLinear prep if no nonlinearads
func (*VAST) SetAdServing ¶
SetAdServing set the AdServingID
func (*VAST) SetAdvertiser ¶
SetAdvertiser set the Advertiser
func (*VAST) SetCategory ¶
SetCategory add into the list of Category
func (*VAST) SetCompanion ¶
func (v *VAST) SetCompanion(sID, sWidth, sHeight, sAltText, sAssetWidth, sAssetHeight, sExpandedWidth, sExpandedHeight, sAPIFramework, sAdSlotID, sPxRatio string) *VAST
SetCompanion add into the CompanionAds.Companion obj
func (*VAST) SetCompanionAd ¶
func (v *VAST) SetCompanionAd(row *CompanionAds) *VAST
SetCompanionAd add into the CompanionAds obj
func (*VAST) SetCompanionClickThrough ¶
SetCompanionClickThrough add into the CompanionAds.Companion.CompanionClickThrough obj
func (*VAST) SetCompanionHTMLResource ¶
SetCompanionHTMLResource add into the CompanionAds.Companion.HTMLResource obj
func (*VAST) SetCompanionIFrameResource ¶
SetCompanionIFrameResource add into the CompanionAds.Companion.IFrameResource obj
func (*VAST) SetCompanionStaticResource ¶
SetCompanionStaticResource add into the CompanionAds.Companion.StaticResource obj
func (*VAST) SetCompanionTracking ¶
SetCompanionTracking add into the CompanionAds.Companion.TrackingEvents obj
func (*VAST) SetCreative ¶
SetCreative add into the list of Creative
func (*VAST) SetCreativeRow ¶
func (v *VAST) SetCreativeRow(sID, sAdID, sSequence, sFramework string, linear *Linear, nonLinear *NonLinearAds, companion *CompanionAds, universal *UniversalAdID) *VAST
SetCreativeRow add into the list of Creative
func (*VAST) SetDescription ¶
SetDescription set the Description
func (*VAST) SetExtension ¶
func (v *VAST) SetExtension(sType, sValue string, total *TotalAvailable, adverifications *AdVerifications) *VAST
SetExtension add into the list of Extension
func (*VAST) SetExtensionAdVerification ¶
func (v *VAST) SetExtensionAdVerification(js *JavaScriptResource, vp *VerificationParameters, tk *TrackingEvents) *VAST
SetExtensionAdVerification add into the list of Extension.AdVerifications.Verification
func (*VAST) SetExtensionJavaScriptResource ¶
SetExtensionJavaScriptResource add into the list of Extension.AdVerifications.Verification.JavaScriptResource
func (*VAST) SetExtensionTotalAvailable ¶
SetExtensionTotalAvailable add into the list of Extension.TotalAvailable
func (*VAST) SetExtensionTracking ¶
SetExtensionTracking add into the list of Extension.AdVerifications.Verification.TrackingEvents.Tracking
func (*VAST) SetExtensionVerificationParameters ¶
SetExtensionVerificationParameters add into the list of Extension.AdVerifications.Verification.VerificationParameters
func (*VAST) SetImpression ¶
SetImpression set the Impression URL
func (*VAST) SetImpressionURL ¶
SetImpressionURL set the Impression URL
func (*VAST) SetInLineAd ¶
SetInLineAd set the minimum InLineAd
func (*VAST) SetLinearClickThrough ¶
SetLinearClickThrough add into the Linear.VideoClicks.ClickThrough obj
func (*VAST) SetLinearClickTracking ¶
SetLinearClickTracking add into the Linear.VideoClicks.ClickTracking obj
func (*VAST) SetLinearCustomClick ¶
SetLinearCustomClick add into the Linear.VideoClicks.CustomClick obj
func (*VAST) SetLinearDuration ¶
SetLinearDuration add into the Linear.Duration obj
func (*VAST) SetLinearInteractiveCreativeFile ¶
SetLinearInteractiveCreativeFile add into the Linear.MediaFiles.InteractiveCreativeFile obj
func (*VAST) SetLinearMediaFile ¶
func (v *VAST) SetLinearMediaFile(sID, sValue, sDelivery, sType, sWidth, sHeight, sBitrate, sMinBitrate, sMaxBitrate, sScalable, sMaintainAspectRatio, sCodec, sAPIFramework string) *VAST
SetLinearMediaFile add into the Linear.MediaFiles.MediaFile obj
func (*VAST) SetLinearMezzanine ¶
SetLinearMezzanine add into the Linear.MediaFiles.Mezzanine obj
func (*VAST) SetLinearTracking ¶
SetLinearTracking add into the Linear.TrackingEvents.Tracking obj
func (*VAST) SetNonLinear ¶
func (v *VAST) SetNonLinear(row *NonLinearAds) *VAST
SetNonLinear add into the NonLinearAds obj
func (*VAST) SetNonLinearAd ¶
func (v *VAST) SetNonLinearAd(sID, sAPIFramework, sWidth, sHeight, sMinSuggestedDuration, sScalable, sMaintainAspectRatio string) *VAST
SetNonLinearAd add into the NonLinearAds.NonLinear obj
func (*VAST) SetNonLinearClickThrough ¶
SetNonLinearClickThrough add into the NonLinearAds.NonLinear.NonLinearClickThrough obj
func (*VAST) SetNonLinearClickTracking ¶
SetNonLinearClickTracking add into the NonLinearAds.NonLinear.NonLinearClickTracking obj
func (*VAST) SetNonLinearStaticResource ¶
SetNonLinearStaticResource add into the NonLinearAds.NonLinear.StaticResource obj
func (*VAST) SetNonLinearTracking ¶
SetNonLinearTracking add into the NonLinearAds.TrackingEvents obj
func (*VAST) SetPricing ¶
SetPricing set the Pricing
func (*VAST) SetUniversalAd ¶
SetUniversalAd add into the UniversalAdID obj
func (*VAST) SetVASTAdTagURI ¶
SetVASTAdTagURI set the VASTAdTagURI
func (*VAST) SetVerification ¶
func (v *VAST) SetVerification(jscript *JavaScriptResource, verificationp *VerificationParameters, trkevents *TrackingEvents) *VAST
SetVerification add into the list of Verification
func (*VAST) SetVerificationJavaScriptResource ¶
SetVerificationJavaScriptResource add into the list of Verification.JavaScriptResource
func (*VAST) SetVerificationTracking ¶
SetVerificationTracking add into the list of Verification.TrackingEvents.Tracking
func (*VAST) SetVerificationVerificationParameters ¶
SetVerificationVerificationParameters add into the list of Verification.VerificationParameters
func (*VAST) SetVersion ¶
SetVersion set the VAST version
func (*VAST) SetViewableImpression ¶
func (v *VAST) SetViewableImpression(sID string, viewable *Viewable, notviewable *NotViewable, undetermined *ViewUndetermined) *VAST
SetViewableImpression add into the list of ViewableImpression
func (*VAST) SetViewableImpressionNotViewable ¶
SetViewableImpressionNotViewable add into the list of ViewableImpression.NotViewable
func (*VAST) SetViewableImpressionViewUndetermined ¶
SetViewableImpressionViewUndetermined add into the list of ViewableImpression.ViewUndetermined
func (*VAST) SetViewableImpressionViewable ¶
SetViewableImpressionViewable add into the list of ViewableImpression.Viewable
func (*VAST) SetWrapperAd ¶
func (v *VAST) SetWrapperAd(wrapperID, followAdditionalWrappers, allowMultipleAds, fallbackOnNoAd string) *VAST
SetWrapperAd set the minimum WrapperAd
func (*VAST) VideoDuration ¶
VideoDuration convert duration seconds
type VASTAdTagURI ¶
VASTAdTagURI URL of the wrapper
type Verification ¶
type Verification struct { ID string `xml:"id,attr,omitempty"` Vendor string `xml:"vendor,attr,omitempty"` JavaScriptResource *JavaScriptResource `xml:",omitempty"` VerificationParameters *VerificationParameters `xml:",omitempty"` TrackingEvents *TrackingEvents `xml:",omitempty"` ExecutableResource *ExecutableResource `xml:",omitempty"` FlashResource *FlashResource `xml:",omitempty"` ViewableImpression []*ViewableImpression `xml:",omitempty"` }
Verification is a JavaScriptResource
type VerificationParameters ¶
type VerificationParameters struct { ID string `xml:"id,attr,omitempty"` Value string `xml:",cdata"` }
VerificationParameters vast element
type VideoAdServingTemplate ¶
type VideoAdServingTemplate struct { Version string `xml:"version,attr,omitempty"` Ad []*Ad `xml:",omitempty"` }
VideoAdServingTemplate compat for ver1.0
type VideoClicks ¶
type VideoClicks struct { ClickThrough *ClickThrough `xml:",omitempty"` ClickTracking *ClickTracking `xml:",omitempty"` CustomClick *CustomClick `xml:",omitempty"` }
VideoClicks is an element of the VAST structure
type ViewUndetermined ¶
ViewUndetermined view not determined
type ViewableImpression ¶
type ViewableImpression struct { ID string `xml:"id,attr,omitempty"` Viewable *Viewable `xml:",omitempty"` NotViewable *NotViewable `xml:",omitempty"` ViewUndetermined *ViewUndetermined `xml:",omitempty"` }
ViewableImpression viewable imp
type Wrapper ¶
type Wrapper struct { InLineWrapperData ID string `xml:"id,attr,omitempty"` FollowAdditionalWrappers string `xml:"followAdditionalWrappers,attr,omitempty"` AllowMultipleAds string `xml:"allowMultipleAds,attr,omitempty"` FallbackOnNoAd string `xml:"fallbackOnNoAd,attr,omitempty"` }
Wrapper is an element of the VAST structure (WRAPPER)