Documentation
¶
Overview ¶
Package consentage is the age of digital consent by country (R52): the table of spec's part consent-age/, at the tag api pins, and the category of a learner it gives. api keeps the category, the day it was given and applied, the age of the country on that day, and never the age in years (R06 spec, R134 spec).
Index ¶
Constants ¶
const ( Under13 = "under_13" From13ToConsent = "from_13_to_consent" FromConsentTo18 = "from_consent_to_18" Adult = "adult" )
The categories of a learner by age (R134 spec).
Variables ¶
This section is empty.
Functions ¶
func FromYAML ¶
FromYAML reads a value of the part's YAML into v by its JSON names, as the generated types of spec take them.
func ParentConsents ¶
ParentConsents says whether a learner of the category consents by a parent: below the age of digital consent of their country.
Types ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table is the table of the age of digital consent, read and checked.
func Load ¶
Load is the table of spec's Go module at the tag api pins, spec.ConsentAge: spec's own check accepted it before its release, so it is read, not checked again.
func New ¶
func New(table consentagev1.ConsentAge) (*Table, error)
New is the table of a value read already, with no list of countries.
func Read ¶
Read is the table of the part in fsys: consent-age.yaml, and the codes of countries of its schema.
func Spec ¶
func Spec() *Table
Spec is the table of the tag api pins. It is embedded in the binary and read by the tests of this package, so that it cannot fail to read: a release that broke it is refused before it is made.
func (*Table) AgeOn ¶
AgeOn is the age of digital consent of the country on the day: the age of its latest entry that applies by then, or the age outside the table.
func (*Table) AskAgain ¶
AskAgain says whether a profile of the category, given by applied, needs its age given again on today: a learner who consents themselves, in a country whose age rose above applied. A lower age waits for the yearly check.