/iab-tcf

A Go wrapper over the LiveRamp implementation of the IAB Consent String Specs (v1.1 and v2)

Primary LanguageGoMIT LicenseMIT

iab-tcf CircleCI

Go code to parse IAB v1/v2 consent based on github.com/LiveRamp/iabconsent library.

This package is just a wrapper on their amazing work to fill our needs.

Usage

Install

go get github.com/affectv/iab-tcf

Example

package main

import (
    "fmt"
    iab "github.com/affectv/iab-tcf"
)

func main() {
    encoded := "COyt4MbOyt4MbMOAAAENAiCgAIAAAAAAAAAAADEAAgIAAAAAAAA.YAAAAAAAAAA"
    consent, err := iab.NewConsent(encoded)
}

Testing

We use Ginkgo and Gomega for testing purposes.

ginkgo ./...