godfp

package module
v0.0.0-...-bd1eaa4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2017 License: MIT Imports: 8 Imported by: 0

README

godfp

GoDoc Build Status Coverage StatusMIT License

godfp is a library for DoubleClick for Publishers.

Installation

Make sure that Go is installed on your computer. Type the following command in your terminal:

go get gopkg.in/hapoon/godfp.v1

After it the package is ready to use.

Add following line in your *.go file:

import "gopkg.in/hapoon/godfp.v1"

Usage

License

MIT License

Documentation

Index

Constants

View Source
const (
	VideoURL     = "https://pubads.g.doubleclick.net/gampad/ads"
	VideoLiveURL = "https://pubads.g.doubleclick.net/gampad/live/ads"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomParameters

type CustomParameters map[string][]string

func (CustomParameters) Add

func (c CustomParameters) Add(key, value string)

Add adds the value to key. It appends to any existing values associated with key.

func (CustomParameters) Del

func (c CustomParameters) Del(key string)

Del deletes the values associated with key.

func (CustomParameters) Encode

func (c CustomParameters) Encode() string

func (CustomParameters) Get

func (c CustomParameters) Get(key string) string

Get gets the first value associated with the given key. If there are no values associated with the key, Get returns the empty string. To access multiple values, use Gets method.

func (CustomParameters) Gets

func (c CustomParameters) Gets(key string) []string

Gets gets the values associated with the given key. If there are no values associated with the key, Gets returns nil.

func (CustomParameters) Set

func (c CustomParameters) Set(key, value string)

Set sets the key to value. It replaces any existing values.

type VideoTag

type VideoTag struct {
	IsLive bool

	Correlator     uint
	DescriptionURL string

	Iu     string
	Output string
	Sz     string

	URL string
	// Optional Parameters
	AdRule     gomu.Int
	CiuSzs     []string
	CmsID      string
	VID        string
	CustParams CustomParameters
	// contains filtered or unexported fields
}

VideoTag is

func NewVideoTag

func NewVideoTag() VideoTag

NewVideoTag creates VideoTag struct with default values.

func (VideoTag) Create

func (v VideoTag) Create() string

Create creates URL.

type VideoTagValues

type VideoTagValues map[string][]string

VideoTagValues maps a string key to a list of values. It is typically used for DFP VideoTag's query parameters.

func (VideoTagValues) Add

func (v VideoTagValues) Add(key, value string)

Add adds the value to key. It appends to any existing values associated with key.

func (VideoTagValues) Del

func (v VideoTagValues) Del(key string)

Del deletes the values associated with key.

func (VideoTagValues) Encode

func (v VideoTagValues) Encode() string

Encode encodes the values into form ("bar=baz&foo=quux") sorted by key.

func (VideoTagValues) Get

func (v VideoTagValues) Get(key string) string

Get gets the first value associated with the given key. If there are no values associated with the key, Get returns the empty string. To access multiple values, use Gets method.

func (VideoTagValues) Gets

func (v VideoTagValues) Gets(key string) []string

Gets gets the values associated with the given key. If there are no values associated with the key, Gets returns nil.

func (VideoTagValues) Set

func (v VideoTagValues) Set(key, value string)

Set sets the key to value. It replaces any existing values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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