mirror of
https://github.com/cubixle/iabtcfv2.git
synced 2026-04-24 21:14:46 +01:00
Add comment on functions
This commit is contained in:
@@ -11,22 +11,29 @@ type PublisherTC struct {
|
||||
CustomPurposesLITransparency map[int]bool
|
||||
}
|
||||
|
||||
// Returns true if user has given consent to standard purpose id
|
||||
func (p *PublisherTC) IsPurposeAllowed(id int) bool {
|
||||
return p.PubPurposesConsent[id]
|
||||
}
|
||||
|
||||
// Returns true if legitimate interest is established for standard purpose id
|
||||
// and user didn't exercise their right to object
|
||||
func (p *PublisherTC) IsPurposeLIAllowed(id int) bool {
|
||||
return p.PubPurposesLITransparency[id]
|
||||
}
|
||||
|
||||
// Returns true if user has given consent to custom purpose id
|
||||
func (p *PublisherTC) IsCustomPurposeAllowed(id int) bool {
|
||||
return p.CustomPurposesConsent[id]
|
||||
}
|
||||
|
||||
// Returns true if legitimate interest is established for custom purpose id
|
||||
// and user didn't exercise their right to object
|
||||
func (p *PublisherTC) IsCustomPurposeLIAllowed(id int) bool {
|
||||
return p.CustomPurposesLITransparency[id]
|
||||
}
|
||||
|
||||
// Returns structure as a base64 raw url encoded string
|
||||
func (p *PublisherTC) Encode() string {
|
||||
bitSize := 57 + (p.NumCustomPurposes * 2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user