purpose

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAvailableType

func IsAvailableType(code Type) bool

IsAvailableType ...

func SplitWeightAndEntity

func SplitWeightAndEntity(str string) (weight Weight, entity Entity, err error)

SplitWeightAndEntity ...

Types

type Entity

type Entity int

Entity is the code as a integer representing the entity, eg. purpose.PRIVATE_CORPORATION

const (
	OTHER                   Entity = 7 // b111 // Shouldn't be used if it's one of the known entity below
	STATE_ADMINISTRATION    Entity = 6 // b110
	PUBLIC_ENTREPRISE       Entity = 5 // b101
	PRIVATE_CORPORATION     Entity = 4 // b100
	NON_PROFIT_ORGANIZATION Entity = 3 // b011
	CHURCH                  Entity = 2 // b010
	INDIVIDUAL              Entity = 1 // b001
)

Purpose entities

func (Entity) IsValid

func (e Entity) IsValid() bool

IsValid ...

type Purpose

type Purpose string

Purpose is the purpose code starting with "0x" and following by the 4-characters hexadecimal code, eg. "0x007f"

const (
	// Any is to grant any and all purposes, ie. there is no specific focus; we strongly discourage its use.
	Any Purpose = "0xffff" // 1111111111111111 (65535)

)

func Build

func Build(explicit, legal, endogenous, personal, material int, entity Entity, code Type) (p Purpose, err error)

Build ...

func ToPurpose

func ToPurpose(bytes []byte) Purpose

ToPurpose ...

func (Purpose) Bytes

func (p Purpose) Bytes() []byte

Bytes ...

func (Purpose) GetEntity

func (p Purpose) GetEntity() (e Entity, err error)

GetEntity ...

func (Purpose) GetWeight

func (p Purpose) GetWeight() (w Weight, err error)

GetWeight ...

func (Purpose) IsEmpty added in v1.3.2

func (p Purpose) IsEmpty() bool

IsEmpty ...

func (Purpose) IsExplicit

func (p Purpose) IsExplicit() bool

IsExplicit returns `true` if the purpose value is within the range of explicit purposes

func (Purpose) IsImplicit

func (p Purpose) IsImplicit() bool

IsImplicit returns `true` if the purpose value is within the range of the implicit purposes

func (Purpose) IsValid

func (p Purpose) IsValid() bool

IsValid ...

func (Purpose) NonEmpty

func (p Purpose) NonEmpty() bool

NonEmpty ...

func (Purpose) String

func (p Purpose) String() string

String ...

func (Purpose) Value

func (p Purpose) Value() int

Value returns the underlying value of the hexadecimal part of the code, ie. 127 for "0x007f" => 007f => 127 or -1 if it's empty or wrong

type Type

type Type string

Type is the final 8-bit code in hexadecimal representing the actual type of the purpose, eg. "7f"

const (

	// LegitimateInterest is often associated with fraud detection or security protocols.
	// It's the weakest named implicit purpose as it should have been enforced in some document (contract, ...) elsewhere to prove it right.
	// We strongly advise against its use.
	LegitimateInterest Type = "02"

	// Compliance is a broad purpose for data used for compliance purposes (GDPR, ...)
	Compliance Type = "04"
	GDPR       Type = "05"

	// PublicInterest is for police file, fiscal administration, etc.
	PublicInterest Type = "08"
	Fiscal         Type = "09"
	Police         Type = "0a"

	// VitalInterest corresponds to accessing the data in case of epidemic, natural catastrophe, etc.
	VitalInterest      Type = "0c"
	Epidemic           Type = "0d"
	NaturalCatastrophe Type = "0e"

	Corporate Type = "10"

	// Communication is about corporate communications
	Communication Type = "11"
	// PublicRelations ...
	PublicRelations Type = "12"

	// Finance relates to KYC, bank details, credit information, etc.
	Finance Type = "14"
	KYC     Type = "15"

	// HumanResources handles payroll, employee identification, etc.
	HumanResources Type = "18"
	Payroll        Type = "19"

	Business Type = "20"

	Media Type = "22"
	// MediaPlanning ...
	MediaPlanning Type = "24"
	// SocialMedia ...
	SocialMedia Type = "25"
	// DirectMessage allows sending direct message in a social media platform
	DirectMessage Type = "26"
	// ContentSyndication ...
	ContentSyndication Type = "27"

	Marketing Type = "28"
	// Com is a general purpose for marketing communications, direct marketing, ...
	Com Type = "29"
	// BrandCommunication ...
	BrandCommunication Type = "2a"

	Prospect Type = "2b"
	// Telemarketing ...
	Telemarketing Type = "2e"
	// LeadGeneration ...
	LeadGeneration Type = "2f"

	Client Type = "30"
	// Advertising ...
	Advertising Type = "31"
	// News handles newsletter, news mag, ...
	News Type = "32"
	// Promotion ...
	Promotion Type = "33"
	// CustomerService is about claims, repair, refund, etc.
	CustomerService Type = "34"

	Sales Type = "38"
	// ProductInformation is about catalogue distribution, etc.
	ProductInformation Type = "39"
	// CustomerSupport deals with manual, drivers, hotline, etc.
	CustomerSupport Type = "3a"
	// CustomerSatisfaction handles questionnaire, polls, etc.
	CustomerSatisfaction Type = "3b"
	// Shipping is about delivery information
	Shipping Type = "3d"
	// Billing handles commands and invoices
	Billing Type = "3e"
	// Payment is about means of payment, financial information, bank details, etc.
	Payment Type = "3f"

	DataManipulation Type = "40"

	// Scoring relates to any algorithm that profiles indivuals, segments population, assess a person, etc.
	Scoring Type = "42"
	// Recommendation emcompasses recommendation engine (in realtime or not), predictive analysis, etc.
	Recommendation Type = "44"
	// Tracking ... [see below]
	Tracking Type = "48"
	// Monitoring ...
	Monitoring Type = "49"
	// Navigation is for web surfing, third-party cookies, personal statistics, etc.
	Navigation Type = "4a"
	// CustomerJourney handles broader data manipulation online or in store, on premises, etc.
	CustomerJourney Type = "4c"
	// Surveillance ...
	Surveillance Type = "4e"

	Security Type = "80"

	// DisasterRecovery relates to security questions, etc.
	DisasterRecovery Type = "84"
	// Characterization handles all other data related to characterize an individual other than in strict security protocols, eg. pseudo
	Characterization Type = "88"
	// Recognition is used for facial recognition, fingerprint and any other biometric data
	Recognition Type = "8b"
	// Identification relates to login identifiers or data used to securely identify a person
	Identification Type = "8e"

	Personal Type = "e0"

	// Creation relates to personal creation or design, like ideas, patents, art, etc.
	Creation Type = "e4"
	// Copyright is to delegate intellectual property
	Copyright Type = "e5"
	// Legal is about any legal act in the personal field
	Legal Type = "e8"
	// NDA stands for Non-Disclosure Agreement
	NDA Type = "e9"

	Medical Type = "f0"
)

Purpose types

type Weight

type Weight int

Weight is the initial 5 bits of the purpose that concatenate hierarchical informations: explicit/implicit, legal/non-legal, endogenous/exogenous, personal/professional, material/immaterial.

func ToWeight

func ToWeight(explicit, legal, endogenous, personal, material int) (weight Weight, err error)

ToWeight ...

func (Weight) IsValid

func (w Weight) IsValid() bool

IsValid ...

Jump to

Keyboard shortcuts

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