google_ads

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFieldTypes

func LoadFieldTypes() error
Example
var err error
// uncomment this line to refresh fields.csv. But comment it back before committing to repo.
// err = LoadFieldTypes()
if err != nil {
	fmt.Println(err)
	return
}
fmt.Println("ok")
Output:

ok

func NewGoogleAds

func NewGoogleAds(ctx context.Context, sourceConfig *base.SourceConfig, collection *base.Collection) (base.Driver, error)

NewGoogleAds returns configured Google Ads driver instance

func TestGoogleAds

func TestGoogleAds(sourceConfig *base.SourceConfig) error

TestGoogleAds tests connection to Google Ads without creating Driver instance

Types

type GoogleAds struct {
	base.IntervalDriver
	// contains filtered or unexported fields
}

func (*GoogleAds) Close

func (g *GoogleAds) Close() error

func (*GoogleAds) GetAllAvailableIntervals

func (g *GoogleAds) GetAllAvailableIntervals() ([]*base.TimeInterval, error)

func (*GoogleAds) GetCollectionMetaKey

func (g *GoogleAds) GetCollectionMetaKey() string

func (*GoogleAds) GetCollectionTable

func (g *GoogleAds) GetCollectionTable() string

func (*GoogleAds) GetObjectsFor

func (g *GoogleAds) GetObjectsFor(interval *base.TimeInterval, objectsLoader base.ObjectsLoader) error

func (*GoogleAds) GetRefreshWindow

func (g *GoogleAds) GetRefreshWindow() (time.Duration, error)

func (*GoogleAds) ReplaceTables

func (g *GoogleAds) ReplaceTables() bool

func (*GoogleAds) Type

func (g *GoogleAds) Type() string

type GoogleAdsCollectionConfig

type GoogleAdsCollectionConfig struct {
	StartDateStr string `mapstructure:"start_date" json:"start_date,omitempty" yaml:"start_date,omitempty"`
	Fields       string `mapstructure:"fields" json:"fields,omitempty" yaml:"fields,omitempty"`
}

type GoogleAdsConfig

type GoogleAdsConfig struct {
	AuthConfig        *base.GoogleAuthConfig `mapstructure:"auth" json:"auth,omitempty" yaml:"auth,omitempty"`
	CustomerId        string                 `mapstructure:"customer_id" json:"customer_id,omitempty" yaml:"customer_id,omitempty"`
	ManagerCustomerId string                 `mapstructure:"manager_customer_id" json:"manager_customer_id,omitempty" yaml:"manager_customer_id,omitempty"`
	DeveloperToken    string                 `mapstructure:"developer_token" json:"developer_token,omitempty" yaml:"developer_token,omitempty"`
}

func (*GoogleAdsConfig) FillPreconfiguredOauth

func (gac *GoogleAdsConfig) FillPreconfiguredOauth(sourceType string)

func (*GoogleAdsConfig) Validate

func (gac *GoogleAdsConfig) Validate() error

type GoogleAdsFieldGranularity

type GoogleAdsFieldGranularity struct {
	// contains filtered or unexported fields
}

type PagedResponse

type PagedResponse struct {
	NextPageToken     string
	TotalResultsCount int
	Results           []map[string]interface{}
}

Jump to

Keyboard shortcuts

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