controld

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidConfigCode = 40401
)

Variables

View Source
var Dialer = &net.Dialer{
	Resolver: &net.Resolver{
		PreferGo: true,
		Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
			d := net.Dialer{
				Timeout: 10 * time.Second,
			}
			return d.DialContext(ctx, "udp", bootstrapDNS)
		},
	},
}

Functions

This section is empty.

Types

type ResolverConfig

type ResolverConfig struct {
	DOH     string   `json:"doh"`
	Exclude []string `json:"exclude"`
}

ResolverConfig represents Control D resolver data.

func FetchResolverConfig

func FetchResolverConfig(uid string) (*ResolverConfig, error)

FetchResolverConfig fetch Control D config for given uid.

type UtilityErrorResponse

type UtilityErrorResponse struct {
	ErrorField struct {
		Message string `json:"message"`
		Code    int    `json:"code"`
	} `json:"error"`
}

func (UtilityErrorResponse) Error

func (u UtilityErrorResponse) Error() string

Jump to

Keyboard shortcuts

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