Documentation ¶
Index ¶
- func Parse(data []byte) (api.VendorConsents, error)
- type ConsentMetadata
- func (c ConsentMetadata) CheckPubRestriction(purposeID uint8, restrictType uint8, vendor uint16) bool
- func (c ConsentMetadata) CmpID() uint16
- func (c ConsentMetadata) CmpVersion() uint16
- func (c ConsentMetadata) ConsentLanguage() string
- func (c ConsentMetadata) ConsentScreen() uint8
- func (c ConsentMetadata) Created() time.Time
- func (c ConsentMetadata) LastUpdated() time.Time
- func (c ConsentMetadata) MaxVendorID() uint16
- func (c ConsentMetadata) PurposeAllowed(id consentconstants.Purpose) bool
- func (c ConsentMetadata) PurposeLITransparency(id consentconstants.Purpose) bool
- func (c ConsentMetadata) PurposeOneTreatment() bool
- func (c ConsentMetadata) SpecialFeatureOptIn(id uint16) bool
- func (c ConsentMetadata) VendorConsent(id uint16) bool
- func (c ConsentMetadata) VendorLegitInterest(id uint16) bool
- func (c ConsentMetadata) VendorListVersion() uint16
- func (c ConsentMetadata) Version() uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(data []byte) (api.VendorConsents, error)
Parse parses the TCF 2.0 vendor consent data from the string. This string should *not* be encoded (by base64 or any other encoding). If the data is malformed and cannot be interpreted as a vendor consent string, this will return an error.
Types ¶
type ConsentMetadata ¶ added in v0.8.0
type ConsentMetadata struct {
// contains filtered or unexported fields
}
ConsentMetadata implements the parts of the VendorConsents interface which are common to BitFields and RangeSections. This relies on Parse to have done some validation already, to make sure that functions on it don't overflow the bounds of the byte array.
func (ConsentMetadata) CheckPubRestriction ¶ added in v0.8.0
func (c ConsentMetadata) CheckPubRestriction(purposeID uint8, restrictType uint8, vendor uint16) bool
func (ConsentMetadata) CmpID ¶ added in v0.8.0
func (c ConsentMetadata) CmpID() uint16
func (ConsentMetadata) CmpVersion ¶ added in v0.8.0
func (c ConsentMetadata) CmpVersion() uint16
func (ConsentMetadata) ConsentLanguage ¶ added in v0.8.0
func (c ConsentMetadata) ConsentLanguage() string
func (ConsentMetadata) ConsentScreen ¶ added in v0.8.0
func (c ConsentMetadata) ConsentScreen() uint8
func (ConsentMetadata) Created ¶ added in v0.8.0
func (c ConsentMetadata) Created() time.Time
func (ConsentMetadata) LastUpdated ¶ added in v0.8.0
func (c ConsentMetadata) LastUpdated() time.Time
func (ConsentMetadata) MaxVendorID ¶ added in v0.8.0
func (c ConsentMetadata) MaxVendorID() uint16
func (ConsentMetadata) PurposeAllowed ¶ added in v0.8.0
func (c ConsentMetadata) PurposeAllowed(id consentconstants.Purpose) bool
func (ConsentMetadata) PurposeLITransparency ¶ added in v0.8.1
func (c ConsentMetadata) PurposeLITransparency(id consentconstants.Purpose) bool
func (ConsentMetadata) PurposeOneTreatment ¶ added in v0.8.0
func (c ConsentMetadata) PurposeOneTreatment() bool
func (ConsentMetadata) SpecialFeatureOptIn ¶ added in v0.8.0
func (c ConsentMetadata) SpecialFeatureOptIn(id uint16) bool
func (ConsentMetadata) VendorConsent ¶ added in v0.8.0
func (c ConsentMetadata) VendorConsent(id uint16) bool
func (ConsentMetadata) VendorLegitInterest ¶ added in v0.8.0
func (c ConsentMetadata) VendorLegitInterest(id uint16) bool
func (ConsentMetadata) VendorListVersion ¶ added in v0.8.0
func (c ConsentMetadata) VendorListVersion() uint16
func (ConsentMetadata) Version ¶ added in v0.8.0
func (c ConsentMetadata) Version() uint8
Click to show internal directories.
Click to hide internal directories.