Documentation ¶
Index ¶
- Variables
- func NewAllowlistService(client *Client) *allowlistService
- func NewDenylistService(client *Client) *denylistService
- func NewParentalControlCategoriesService(client *Client) *parentalControlCategoriesService
- func NewParentalControlService(client *Client) *parentalControlService
- func NewParentalControlServicesService(client *Client) *parentalControlServicesService
- func NewPrivacyBlocklistsService(client *Client) *privacyBlocklistsService
- func NewPrivacyNativesService(client *Client) *privacyNativesService
- func NewPrivacyService(client *Client) *privacyService
- func NewProfilesService(client *Client) *profilesService
- func NewRewritesService(client *Client) *rewritesService
- func NewSecurityService(client *Client) *securityService
- func NewSecurityTldsService(client *Client) *securityTldsService
- func NewSettingsBlockPageService(client *Client) *settingsBlockPageService
- func NewSettingsLogsService(client *Client) *settingsLogsService
- func NewSettingsPerformanceService(client *Client) *settingsPerformanceService
- func NewSettingsService(client *Client) *settingsService
- func NewSetupLinkedIPService(client *Client) *setupLinkedIPService
- func NewSetupService(client *Client) *setupService
- type Allowlist
- type AllowlistService
- type Client
- type ClientOption
- type CreateAllowlistRequest
- type CreateDenylistRequest
- type CreateParentalControlCategoriesRequest
- type CreateParentalControlServicesRequest
- type CreatePrivacyBlocklistsRequest
- type CreatePrivacyNativesRequest
- type CreateProfileRequest
- type CreateRewritesRequest
- type CreateSecurityTldsRequest
- type DeleteProfileRequest
- type DeleteRewritesRequest
- type Denylist
- type DenylistService
- type Error
- type ErrorResponse
- type ErrorType
- type GetParentalControlRequest
- type GetPrivacyRequest
- type GetProfileRequest
- type GetSecurityRequest
- type GetSettingsBlockPageRequest
- type GetSettingsLogsRequest
- type GetSettingsPerformanceRequest
- type GetSettingsRequest
- type GetSetupLinkedIPRequest
- type GetSetupRequest
- type ListAllowlistRequest
- type ListDenylistRequest
- type ListParentalControlCategoriesRequest
- type ListParentalControlServicesRequest
- type ListPrivacyBlocklistsRequest
- type ListPrivacyNativesRequest
- type ListProfileRequest
- type ListRewritesRequest
- type ListSecurityTldsRequest
- type ParentalControl
- type ParentalControlCategories
- type ParentalControlCategoriesService
- type ParentalControlRecreation
- type ParentalControlRecreationInterval
- type ParentalControlRecreationTimes
- type ParentalControlService
- type ParentalControlServices
- type ParentalControlServicesService
- type Privacy
- type PrivacyBlocklists
- type PrivacyBlocklistsService
- type PrivacyNatives
- type PrivacyNativesService
- type PrivacyService
- type Profile
- type Profiles
- type ProfilesService
- type Rewrites
- type RewritesService
- type Security
- type SecurityService
- type SecurityTlds
- type SecurityTldsService
- type Settings
- type SettingsBlockPage
- type SettingsBlockPageService
- type SettingsLogs
- type SettingsLogsDrop
- type SettingsLogsService
- type SettingsPerformance
- type SettingsPerformanceService
- type SettingsService
- type Setup
- type SetupLinkedIP
- type SetupLinkedIPService
- type SetupService
- type UpdateAllowlistRequest
- type UpdateDenylistRequest
- type UpdateParentalControlCategoriesRequest
- type UpdateParentalControlRequest
- type UpdateParentalControlServicesRequest
- type UpdatePrivacyRequest
- type UpdateProfileRequest
- type UpdateSecurityRequest
- type UpdateSettingsBlockPageRequest
- type UpdateSettingsLogsRequest
- type UpdateSettingsPerformanceRequest
- type UpdateSettingsRequest
- type UpdateSetupLinkedIPRequest
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyAPIToken = errors.New("api key must not be empty")
Functions ¶
func NewAllowlistService ¶
func NewAllowlistService(client *Client) *allowlistService
NewAllowlistService returns a new NextDNS allowlist service. nolint: revive
func NewDenylistService ¶
func NewDenylistService(client *Client) *denylistService
NewDenylistService returns a new NextDNS denylist service. nolint: revive
func NewParentalControlCategoriesService ¶
func NewParentalControlCategoriesService(client *Client) *parentalControlCategoriesService
NewParentalControlCategoriesService returns a new NextDNS parental control categories service. nolint: revive
func NewParentalControlService ¶
func NewParentalControlService(client *Client) *parentalControlService
NewParentalControlService returns a new NextDNS parental control service. nolint: revive
func NewParentalControlServicesService ¶
func NewParentalControlServicesService(client *Client) *parentalControlServicesService
NewParentalControlServicesService returns a new NextDNS parental control services service. nolint: revive
func NewPrivacyBlocklistsService ¶
func NewPrivacyBlocklistsService(client *Client) *privacyBlocklistsService
NewPrivacyBlocklistsService returns a new NextDNS privacy blocklist service. nolint: revive
func NewPrivacyNativesService ¶
func NewPrivacyNativesService(client *Client) *privacyNativesService
NewPrivacyNativesService returns a new NextDNS privacy native tracking protection service. nolint: revive
func NewPrivacyService ¶
func NewPrivacyService(client *Client) *privacyService
NewPrivacyService returns a new NextDNS privacy service. nolint: revive
func NewProfilesService ¶
func NewProfilesService(client *Client) *profilesService
NewProfilesService returns a new NextDNS profiles service. nolint: revive
func NewRewritesService ¶ added in v0.2.0
func NewRewritesService(client *Client) *rewritesService
NewRewritesService returns a new NextDNS rewrites service. nolint: revive
func NewSecurityService ¶
func NewSecurityService(client *Client) *securityService
NewSecurityService returns a new NextDNS security service. nolint: revive
func NewSecurityTldsService ¶
func NewSecurityTldsService(client *Client) *securityTldsService
NewSecurityTldsService returns a new NextDNS security TLDs service. nolint: revive
func NewSettingsBlockPageService ¶
func NewSettingsBlockPageService(client *Client) *settingsBlockPageService
NewSettingsBlockPageService returns a new NextDNS settings block page service. nolint: revive
func NewSettingsLogsService ¶
func NewSettingsLogsService(client *Client) *settingsLogsService
NewSettingsLogsService returns a new NextDNS settings logs service. nolint: revive
func NewSettingsPerformanceService ¶
func NewSettingsPerformanceService(client *Client) *settingsPerformanceService
NewSettingsPerformanceService returns a new NextDNS settings performance service. nolint: revive
func NewSettingsService ¶
func NewSettingsService(client *Client) *settingsService
NewSettingsService returns a new NextDNS settings service. nolint: revive
func NewSetupLinkedIPService ¶ added in v0.5.0
func NewSetupLinkedIPService(client *Client) *setupLinkedIPService
NewSetupLinkedIPService returns a new NextDNS setup linked ip service. nolint: revive
func NewSetupService ¶ added in v0.5.0
func NewSetupService(client *Client) *setupService
NewSetupService returns a new NextDNS setup service. nolint: revive
Types ¶
type AllowlistService ¶
type AllowlistService interface { Create(context.Context, *CreateAllowlistRequest) error List(context.Context, *ListAllowlistRequest) ([]*Allowlist, error) Update(context.Context, *UpdateAllowlistRequest) error }
AllowlistService is an interface for communicating with the NextDNS allowlist API endpoint.
type Client ¶
type Client struct { // Service for the Profile. Profiles ProfilesService // Services for the Allowlist and Denylist. Allowlist AllowlistService Denylist DenylistService // Services for the ParentalControl. ParentalControl ParentalControlService ParentalControlServices ParentalControlServicesService ParentalControlCategories ParentalControlCategoriesService // Services for the Privacy. Privacy PrivacyService PrivacyBlocklists PrivacyBlocklistsService PrivacyNatives PrivacyNativesService // Services for the Settings. Settings SettingsService SettingsLogs SettingsLogsService SettingsBlockPage SettingsBlockPageService SettingsPerformance SettingsPerformanceService // Services for the Security. Security SecurityService SecurityTlds SecurityTldsService // Services for the Rewrites. Rewrites RewritesService // Services for the Setup. Setup SetupService SetupLinkedIP SetupLinkedIPService // Debug mode for the HTTP requests. Debug bool // contains filtered or unexported fields }
Client represents a NextDNS client.
type ClientOption ¶
ClientOption is a function that can be used to customize the client.
func WithAPIKey ¶
func WithAPIKey(apiKey string) ClientOption
WithAPIKey sets the API key to be used for requests.
func WithBaseURL ¶
func WithBaseURL(baseURL string) ClientOption
WithBaseURL sets the base URL of the NextDNS API.
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) ClientOption
WithHTTPClient sets a custom HTTP client that can be used for requests.
type CreateAllowlistRequest ¶
CreateAllowlistRequest encapsulates the request for creating an allowlist.
type CreateDenylistRequest ¶
CreateDenylistRequest encapsulates the request for creating a denylist.
type CreateParentalControlCategoriesRequest ¶
type CreateParentalControlCategoriesRequest struct { ProfileID string ParentalControlCategories []*ParentalControlCategories }
CreateParentalControlCategoriesRequest encapsulates the request for creating a parental control categories list.
type CreateParentalControlServicesRequest ¶
type CreateParentalControlServicesRequest struct { ProfileID string ParentalControlServices []*ParentalControlServices }
CreateParentalControlServicesRequest encapsulates the request for creating a parental control services list.
type CreatePrivacyBlocklistsRequest ¶
type CreatePrivacyBlocklistsRequest struct { ProfileID string PrivacyBlocklists []*PrivacyBlocklists }
CreatePrivacyBlocklistsRequest encapsulates the request for creating a privacy blocklist.
type CreatePrivacyNativesRequest ¶
type CreatePrivacyNativesRequest struct { ProfileID string PrivacyNatives []*PrivacyNatives }
CreatePrivacyNativesRequest encapsulates the request for creating a privacy native tracking protection list.
type CreateProfileRequest ¶
type CreateProfileRequest struct { Name string `json:"name,omitempty"` Security *Security `json:"security,omitempty"` Privacy *Privacy `json:"privacy,omitempty"` ParentalControl *ParentalControl `json:"parentalControl,omitempty"` Denylist []*Denylist `json:"denylist,omitempty"` Allowlist []*Allowlist `json:"allowlist,omitempty"` Settings *Settings `json:"settings,omitempty"` Rewrites []*Rewrites `json:"rewrites,omitempty"` }
CreateProfileRequest encapsulates the request for creating a new profile.
type CreateRewritesRequest ¶ added in v0.4.0
CreateRewritesRequest encapsulates the request for creating a new rewrite.
type CreateSecurityTldsRequest ¶
type CreateSecurityTldsRequest struct { ProfileID string SecurityTlds []*SecurityTlds }
CreateSecurityTldsRequest encapsulates the request for creating a security TLDs list.
type DeleteProfileRequest ¶
type DeleteProfileRequest struct {
ProfileID string
}
DeleteProfileRequest encapsulates the request for deleting a profile.
type DeleteRewritesRequest ¶ added in v0.4.0
DeleteRewritesRequest encapsulates the request for deleting a rewrite.
type DenylistService ¶
type DenylistService interface { Create(context.Context, *CreateDenylistRequest) error List(context.Context, *ListDenylistRequest) ([]*Denylist, error) Update(context.Context, *UpdateDenylistRequest) error }
DenylistService is an interface for communicating with the NextDNS denylist API endpoint.
type Error ¶
type Error struct { Type ErrorType Message string Errors *ErrorResponse Meta map[string]string }
Error represents the error from the Client.
type ErrorResponse ¶
type ErrorResponse struct { Errors []struct { Code string `json:"code"` Detail string `json:"detail,omitempty"` Source struct { Parameter string `json:"parameter,omitempty"` } `json:"source,omitempty"` } `json:"errors"` }
ErrorResponse represents the error response from the NextDNS API.
type ErrorType ¶
type ErrorType string
ErrorType defines the code of an error.
const ( ErrorTypeServiceError ErrorType = "service_error" // Internal service error. ErrorTypeRequest ErrorType = "request" // Regular request error. ErrorTypeMalformed ErrorType = "malformed" // Response body is malformed. ErrorTypeAuthentication ErrorType = "authentication" // Authentication error. ErrorTypeNotFound ErrorType = "not_found" // Resource not found. )
type GetParentalControlRequest ¶
type GetParentalControlRequest struct {
ProfileID string
}
GetParentalControlRequest encapsulates the request for getting a parental control settings.
type GetPrivacyRequest ¶
type GetPrivacyRequest struct {
ProfileID string
}
GetPrivacyRequest encapsulates the request for getting the privacy settings of a profile.
type GetProfileRequest ¶
type GetProfileRequest struct {
ProfileID string
}
GetProfileRequest encapsulates the request for getting a profile.
type GetSecurityRequest ¶
type GetSecurityRequest struct {
ProfileID string
}
GetSecurityRequest encapsulates the request for getting a security settings.
type GetSettingsBlockPageRequest ¶
type GetSettingsBlockPageRequest struct {
ProfileID string
}
GetSettingsBlockPageRequest encapsulates the request for getting the settings block page of a profile.
type GetSettingsLogsRequest ¶
type GetSettingsLogsRequest struct {
ProfileID string
}
GetSettingsLogsRequest encapsulates the request for getting the settings logs of a profile.
type GetSettingsPerformanceRequest ¶
type GetSettingsPerformanceRequest struct {
ProfileID string
}
GetSettingsPerformanceRequest encapsulates the request for getting the settings performance of a profile.
type GetSettingsRequest ¶
type GetSettingsRequest struct {
ProfileID string
}
GetSettingsRequest encapsulates the request for getting the settings of a profile.
type GetSetupLinkedIPRequest ¶ added in v0.5.0
type GetSetupLinkedIPRequest struct {
ProfileID string
}
GetSetupLinkedIPRequest encapsulates the request for getting the setup linked ip settings of a profile.
type GetSetupRequest ¶ added in v0.5.0
type GetSetupRequest struct {
ProfileID string
}
GetSetupRequest encapsulates the request for getting the setup settings.
type ListAllowlistRequest ¶ added in v0.4.0
type ListAllowlistRequest struct {
ProfileID string
}
ListAllowlistRequest encapsulates the request for getting an allowlist.
type ListDenylistRequest ¶ added in v0.4.0
type ListDenylistRequest struct {
ProfileID string
}
ListDenylistRequest encapsulates the request for getting a denylist.
type ListParentalControlCategoriesRequest ¶ added in v0.4.0
type ListParentalControlCategoriesRequest struct {
ProfileID string
}
ListParentalControlCategoriesRequest encapsulates the request for getting a parental control categories list.
type ListParentalControlServicesRequest ¶ added in v0.4.0
type ListParentalControlServicesRequest struct {
ProfileID string
}
GetParentalControlServicesRequest encapsulates the request for getting a parental control services list.
type ListPrivacyBlocklistsRequest ¶ added in v0.4.0
type ListPrivacyBlocklistsRequest struct {
ProfileID string
}
ListPrivacyBlocklistsRequest encapsulates the request for getting the privacy blocklist.
type ListPrivacyNativesRequest ¶ added in v0.4.0
type ListPrivacyNativesRequest struct {
ProfileID string
}
ListPrivacyNativesRequest encapsulates the request for getting the privacy native tracking protection list.
type ListProfileRequest ¶
type ListProfileRequest struct{}
ListProfileRequest encapsulates the request for listing all the profiles.
type ListRewritesRequest ¶ added in v0.4.0
type ListRewritesRequest struct {
ProfileID string
}
ListRewritesRequest encapsulates the request for getting an rewrites.
type ListSecurityTldsRequest ¶ added in v0.4.0
type ListSecurityTldsRequest struct {
ProfileID string
}
ListSecurityTldsRequest encapsulates the request for getting a security TLDs list.
type ParentalControl ¶
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"` }
ParentalControl represents the parental control settings of a profile.
type ParentalControlCategories ¶
type ParentalControlCategories struct { ID string `json:"id,omitempty"` Active bool `json:"active"` Recreation bool `json:"recreation"` }
ParentalControlCategories represents the parental control categories of a profile.
type ParentalControlCategoriesService ¶
type ParentalControlCategoriesService interface { Create(context.Context, *CreateParentalControlCategoriesRequest) error List(context.Context, *ListParentalControlCategoriesRequest) ([]*ParentalControlCategories, error) Update(context.Context, *UpdateParentalControlCategoriesRequest) error }
ParentalControlCategoriesService is an interface for communicating with the NextDNS parental control categories API endpoint.
type ParentalControlRecreation ¶ added in v0.3.0
type ParentalControlRecreation struct { Times *ParentalControlRecreationTimes `json:"times"` Timezone string `json:"timezone"` }
ParentalControlRecreation represents the parental control recreation of a profile.
type ParentalControlRecreationInterval ¶ added in v0.3.0
type ParentalControlRecreationInterval struct { Start string `json:"start"` End string `json:"end"` }
ParentalControlRecreationInterval represents the start and end time of a parental control recreation interval.
type ParentalControlRecreationTimes ¶ added in v0.3.0
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"` }
ParentalControlRecreationTimes represents the days and times of the week when the parental control is active.
type ParentalControlService ¶
type ParentalControlService interface { Get(context.Context, *GetParentalControlRequest) (*ParentalControl, error) Update(context.Context, *UpdateParentalControlRequest) error }
ParentalControlService is an interface for communicating with the NextDNS parental control API endpoint.
type ParentalControlServices ¶
type ParentalControlServices struct { ID string `json:"id,omitempty"` Active bool `json:"active"` Recreation bool `json:"recreation"` }
ParentalControlServices represents the parental control services of a profile.
type ParentalControlServicesService ¶
type ParentalControlServicesService interface { Create(context.Context, *CreateParentalControlServicesRequest) error List(context.Context, *ListParentalControlServicesRequest) ([]*ParentalControlServices, error) Update(context.Context, *UpdateParentalControlServicesRequest) error }
ParentalControlServicesService is an interface for communicating with the NextDNS parental control services API endpoint.
type Privacy ¶
type Privacy struct { Blocklists []*PrivacyBlocklists `json:"blocklists,omitempty"` Natives []*PrivacyNatives `json:"natives,omitempty"` DisguisedTrackers bool `json:"disguisedTrackers"` AllowAffiliate bool `json:"allowAffiliate"` }
Privacy represents the privacy settings of a profile.
type PrivacyBlocklists ¶
type PrivacyBlocklists struct { ID string `json:"id"` Name string `json:"name,omitempty"` Website string `json:"website,omitempty"` Entries int `json:"entries,omitempty"` UpdatedOn *time.Time `json:"updatedOn,omitempty"` }
PrivacyBlocklists represents a privacy blocklist of a profile.
type PrivacyBlocklistsService ¶
type PrivacyBlocklistsService interface { Create(context.Context, *CreatePrivacyBlocklistsRequest) error List(context.Context, *ListPrivacyBlocklistsRequest) ([]*PrivacyBlocklists, error) }
PrivacyBlocklistsService is an interface for communicating with the NextDNS privacy blocklist API endpoint.
type PrivacyNatives ¶
type PrivacyNatives struct {
ID string `json:"id"`
}
PrivacyNatives represents a privacy native tracking protection of a profile.
type PrivacyNativesService ¶
type PrivacyNativesService interface { Create(context.Context, *CreatePrivacyNativesRequest) error List(context.Context, *ListPrivacyNativesRequest) ([]*PrivacyNatives, error) }
PrivacyNativesService is an interface for communicating with the NextDNS privacy native tracking protection API endpoint.
type PrivacyService ¶
type PrivacyService interface { Get(context.Context, *GetPrivacyRequest) (*Privacy, error) Update(context.Context, *UpdatePrivacyRequest) error }
PrivacyService is an interface for communicating with the NextDNS privacy settings API endpoint.
type Profile ¶
type Profile struct { Name string `json:"name,omitempty"` Security *Security `json:"security,omitempty"` Privacy *Privacy `json:"privacy,omitempty"` ParentalControl *ParentalControl `json:"parentalControl,omitempty"` Denylist []*Denylist `json:"denylist,omitempty"` Allowlist []*Allowlist `json:"allowlist,omitempty"` Settings *Settings `json:"settings,omitempty"` Rewrites []*Rewrites `json:"rewrites,omitempty"` Setup *Setup `json:"setup,omitempty"` }
Profile represents a NextDNS profile.
type Profiles ¶
type Profiles struct { ID string `json:"id"` Fingerprint string `json:"fingerprint"` Name string `json:"name"` }
Profiles represents a list of NextDNS profiles.
type ProfilesService ¶
type ProfilesService interface { Create(context.Context, *CreateProfileRequest) (string, error) Get(context.Context, *GetProfileRequest) (*Profile, error) Update(context.Context, *UpdateProfileRequest) error List(context.Context, *ListProfileRequest) ([]*Profiles, error) Delete(context.Context, *DeleteProfileRequest) error }
ProfilesService is an interface for communicating with the NextDNS API.
type Rewrites ¶ added in v0.2.0
type Rewrites struct { ID string `json:"id,omitempty"` Name string `json:"name"` Type string `json:"type,omitempty"` Content string `json:"content"` }
Rewrites represents the rewrite list of a profile.
type RewritesService ¶ added in v0.2.0
type RewritesService interface { Create(context.Context, *CreateRewritesRequest) (string, error) List(context.Context, *ListRewritesRequest) ([]*Rewrites, error) Delete(context.Context, *DeleteRewritesRequest) error }
RewritesService is an interface for communicating with the NextDNS rewrites API endpoint.
type Security ¶
type Security struct { ThreatIntelligenceFeeds bool `json:"threatIntelligenceFeeds"` AiThreatDetection bool `json:"aiThreatDetection"` GoogleSafeBrowsing bool `json:"googleSafeBrowsing"` Cryptojacking bool `json:"cryptojacking"` DNSRebinding bool `json:"dnsRebinding"` IdnHomographs bool `json:"idnHomographs"` Typosquatting bool `json:"typosquatting"` Dga bool `json:"dga"` Nrd bool `json:"nrd"` DDNS bool `json:"ddns"` Parking bool `json:"parking"` Csam bool `json:"csam"` Tlds []*SecurityTlds `json:"tlds,omitempty"` }
Security represents the security settings of a profile.
type SecurityService ¶
type SecurityService interface { Get(context.Context, *GetSecurityRequest) (*Security, error) Update(context.Context, *UpdateSecurityRequest) error }
SecurityService is an interface for communicating with the NextDNS security API endpoint.
type SecurityTlds ¶
type SecurityTlds struct {
ID string `json:"id"`
}
Allowlist represents the security TLDs of a profile.
type SecurityTldsService ¶
type SecurityTldsService interface { Create(context.Context, *CreateSecurityTldsRequest) error List(context.Context, *ListSecurityTldsRequest) ([]*SecurityTlds, error) }
SecurityTldsService is an interface for communicating with the NextDNS security TLDs API endpoint.
type Settings ¶
type Settings struct { Logs *SettingsLogs `json:"logs,omitempty"` BlockPage *SettingsBlockPage `json:"blockPage,omitempty"` Performance *SettingsPerformance `json:"performance,omitempty"` Web3 bool `json:"web3"` }
Settings represents the settings of a profile.
type SettingsBlockPage ¶
type SettingsBlockPage struct {
Enabled bool `json:"enabled"`
}
SettingsBlockPage represents the settings block page of a profile.
type SettingsBlockPageService ¶
type SettingsBlockPageService interface { Get(context.Context, *GetSettingsBlockPageRequest) (*SettingsBlockPage, error) Update(context.Context, *UpdateSettingsBlockPageRequest) error }
SettingsBlockPageService is an interface for communicating with the NextDNS settings block page API endpoint.
type SettingsLogs ¶
type SettingsLogs struct { Enabled bool `json:"enabled"` Drop *SettingsLogsDrop `json:"drop,omitempty"` Retention int `json:"retention,omitempty"` Location string `json:"location,omitempty"` }
SettingsLogs represents the settings logs of a profile.
type SettingsLogsDrop ¶
SettingsLogsDrop represents the settings logs privacy adjustments of a profile.
type SettingsLogsService ¶
type SettingsLogsService interface { Get(context.Context, *GetSettingsLogsRequest) (*SettingsLogs, error) Update(context.Context, *UpdateSettingsLogsRequest) error }
SettingsLogsService is an interface for communicating with the NextDNS settings logs API endpoint.
type SettingsPerformance ¶
type SettingsPerformance struct { Ecs bool `json:"ecs"` CacheBoost bool `json:"cacheBoost"` CnameFlattening bool `json:"cnameFlattening"` }
SettingsPerformance represents the settings performance of a profile.
type SettingsPerformanceService ¶
type SettingsPerformanceService interface { Get(context.Context, *GetSettingsPerformanceRequest) (*SettingsPerformance, error) Update(context.Context, *UpdateSettingsPerformanceRequest) error }
SettingsPerformanceService is an interface for communicating with the NextDNS settings performance API endpoint.
type SettingsService ¶
type SettingsService interface { Get(context.Context, *GetSettingsRequest) (*Settings, error) Update(context.Context, *UpdateSettingsRequest) error }
SettingsService is an interface for communicating with the NextDNS settings API endpoint.
type Setup ¶ added in v0.5.0
type Setup struct { Ipv4 []string `json:"ipv4"` Ipv6 []string `json:"ipv6"` LinkedIP *SetupLinkedIP `json:"linkedIp"` Dnscrypt string `json:"dnscrypt"` }
Setup represents the setup settings.
type SetupLinkedIP ¶ added in v0.5.0
type SetupLinkedIPService ¶ added in v0.5.0
type SetupLinkedIPService interface { Get(context.Context, *GetSetupLinkedIPRequest) (*SetupLinkedIP, error) Update(context.Context, *UpdateSetupLinkedIPRequest) error }
SetupLinkedIPService is an interface for communicating with the NextDNS setup linked ip API endpoint.
type SetupService ¶ added in v0.5.0
type SetupService interface {
Get(context.Context, *GetSetupRequest) (*Setup, error)
}
SetupService is an interface for communicating with the NextDNS setup API endpoint.
type UpdateAllowlistRequest ¶
UpdateAllowlistRequest encapsulates the request for updating an allowlist.
type UpdateDenylistRequest ¶
UpdateDenylistRequest encapsulates the request for updating a denylist.
type UpdateParentalControlCategoriesRequest ¶
type UpdateParentalControlCategoriesRequest struct { ProfileID string ID string ParentalControlCategories *ParentalControlCategories }
UpdateParentalControlCategoriesRequest encapsulates the request for updating a parental control categories list.
type UpdateParentalControlRequest ¶
type UpdateParentalControlRequest struct { ProfileID string ParentalControl *ParentalControl }
UpdateParentalControlRequest encapsulates the request for updating a parental control settings.
type UpdateParentalControlServicesRequest ¶
type UpdateParentalControlServicesRequest struct { ProfileID string ID string ParentalControlServices *ParentalControlServices }
UpdateParentalControlServicesRequest encapsulates the request for updating a parental control services list.
type UpdatePrivacyRequest ¶
UpdatePrivacyRequest encapsulates the request for updating the privacy settings of a profile.
type UpdateProfileRequest ¶
UpdateProfileRequest encapsulates the request for setting custom profile settings.
type UpdateSecurityRequest ¶
UpdateSecurityRequest encapsulates the request for updating security settings.
type UpdateSettingsBlockPageRequest ¶
type UpdateSettingsBlockPageRequest struct { ProfileID string SettingsBlockPage *SettingsBlockPage }
UpdateSettingsBlockPageRequest encapsulates the request for updating the settings block page of a profile.
type UpdateSettingsLogsRequest ¶
type UpdateSettingsLogsRequest struct { ProfileID string SettingsLogs *SettingsLogs }
UpdateSettingsLogsRequest encapsulates the request for updating the settings logs of a profile.
type UpdateSettingsPerformanceRequest ¶
type UpdateSettingsPerformanceRequest struct { ProfileID string SettingsPerformance *SettingsPerformance }
UpdateSettingsPerformanceRequest encapsulates the request for updating the settings performance of a profile.
type UpdateSettingsRequest ¶
UpdateSettingsRequest encapsulates the request for updating the settings of a profile.
type UpdateSetupLinkedIPRequest ¶ added in v0.5.0
type UpdateSetupLinkedIPRequest struct { ProfileID string SetupLinkedIP *SetupLinkedIP }
UpdateSetupLinkedIPRequest encapsulates the request for updating the setup linked ip of a profile.
Source Files ¶
- allowlist.go
- client.go
- denylist.go
- errors.go
- parentalcontrol.go
- parentalcontrol_categories.go
- parentalcontrol_services.go
- privacy.go
- privacy_blocklists.go
- privacy_natives.go
- profiles.go
- rewrites.go
- security.go
- security_tlds.go
- settings.go
- settings_blockpage.go
- settings_logs.go
- settings_performance.go
- setup.go
- setup_linkedip.go