Skip to content

Commit

Permalink
feat: add parental control recreation times
Browse files Browse the repository at this point in the history
  • Loading branch information
amalucelli committed Dec 27, 2022
1 parent cb5e9eb commit f1736df
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions nextdns/parentalcontrol.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,34 @@ import (
// parentalControlAPIPath is the HTTP path for the parental control settings API.
const parentalControlAPIPath = "parentalControl"

// ParentalControlRecreationInterval represents the start and end time of a parental control recreation interval.
type ParentalControlRecreationInterval struct {
Start string `json:"start"`
End string `json:"end"`
}

// ParentalControlRecreationTimes represents the days and times of the week when the parental control is active.
type ParentalControlRecreationTimes struct {
Monday *ParentalControlRecreationInterval `json:"monday,omitempty"`
Tuesday *ParentalControlRecreationInterval `json:"tuesday,omitempty"`
Wednesday *ParentalControlRecreationInterval `json:"wednesday,omitempty"`
Thursday *ParentalControlRecreationInterval `json:"thursday,omitempty"`
Friday *ParentalControlRecreationInterval `json:"friday,omitempty"`
Saturday *ParentalControlRecreationInterval `json:"saturday,omitempty"`
Sunday *ParentalControlRecreationInterval `json:"sunday,omitempty"`
}

// ParentalControlRecreation represents the parental control recreation of a profile.
type ParentalControlRecreation struct {
Times *ParentalControlRecreationTimes `json:"times"`
Timezone string `json:"timezone"`
}

// ParentalControl represents the parental control settings of a profile.
type ParentalControl struct {
Services []*ParentalControlServices `json:"services,omitempty"`
Categories []*ParentalControlCategories `json:"categories,omitempty"`
Recreation *ParentalControlRecreation `json:"recreation,omitempty"`
SafeSearch bool `json:"safeSearch"`
YoutubeRestrictedMode bool `json:"youtubeRestrictedMode"`
BlockBypass bool `json:"blockBypass"`
Expand Down

0 comments on commit f1736df

Please sign in to comment.