-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconstants.go
65 lines (53 loc) · 1.58 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package iabtcfv2
type SegmentType int
const (
SegmentTypeUndefined SegmentType = -1
SegmentTypeCoreString SegmentType = 0
SegmentTypeDisclosedVendors SegmentType = 1
SegmentTypePublisherTC SegmentType = 3
)
type TcfVersion int
const (
TcfVersionUndefined TcfVersion = -1
TcfVersion1 TcfVersion = 1
TcfVersion2 TcfVersion = 2
)
type RestrictionType int
const (
RestrictionTypeNotAllowed RestrictionType = 0
RestrictionTypeRequireConsent RestrictionType = 1
RestrictionTypeRequireLI RestrictionType = 2
RestrictionTypeUndefined RestrictionType = 3
)
const (
bitsBool = 1
bitsChar = 6
bitsTime = 36
bitsSegmentType = 3
bitsVersion = 6
bitsCreated = bitsTime
bitsLastUpdated = bitsTime
bitsCmpId = 12
bitsCmpVersion = 12
bitsConsentScreen = 6
bitsConsentLanguage = bitsChar * 2
bitsVendorListVersion = 12
bitsTcfPolicyVersion = 6
bitsIsServiceSpecific = bitsBool
bitsUseNonStandardTexts = bitsBool
bitsSpecialFeatureOptIns = 12
bitsPurposesConsent = 24
bitsPurposesLITransparency = 24
bitsPurposeOneTreatment = bitsBool
bitsPublisherCC = bitsChar * 2
bitsMaxVendorId = 16
bitsIsRangeEncoding = bitsBool
bitsNumEntries = 12
bitsVendorId = 16
bitsNumPubRestrictions = 12
bitsPubRestrictionsEntryPurposeId = 6
bitsPubRestrictionsEntryRestrictionType = 2
bitsPubPurposesConsent = 24
bitsPubPurposesLITransparency = 24
bitsNumCustomPurposes = 6
)