api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

@BasePath /api/

Index

Constants

View Source
const (
	BlockingStatusPath  = "/api/blocking/status"
	BlockingEnablePath  = "/api/blocking/enable"
	BlockingDisablePath = "/api/blocking/disable"
	BlockingQueryPath   = "/api/query"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockingStatus

type BlockingStatus struct {
	// True if blocking is enabled
	Enabled bool `json:"enabled"`
	// If blocking is temporary disabled: amount of seconds until blocking will be enabled
	AutoEnableInSec uint `json:"autoEnableInSec"`
}

type QueryRequest

type QueryRequest struct {
	// query for DNS request
	Query string
	// request type (A, AAAA, ...)
	Type string
}

type QueryResult

type QueryResult struct {
	// blocky reason for resolution
	Reason string `json:"reason"`
	// response type (CACHED, BLOCKED, ...)
	ResponseType string `json:"responseType"`
	// actual DNS response
	Response string `json:"response"`
	// DNS return code (NOERROR, NXDOMAIN, ...)
	ReturnCode string `json:"returnCode"`
}

Jump to

Keyboard shortcuts

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