util

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorKey = "error"
View Source
const SubsystemKey = "subsys"
View Source
const SubsystemPrefix = "dyndns"

Variables

This section is empty.

Functions

func ErrorAttr

func ErrorAttr(value error) slog.Attr

func MakePromSubsystem

func MakePromSubsystem(subsystem string) string

func SubsystemAttr

func SubsystemAttr(value string) slog.Attr

Types

type PollStatus

type PollStatus struct {
	Last      time.Time `json:"last"`
	Succeeded bool      `json:"succeeded"`
}

type PushStatus

type PushStatus struct {
	Last      time.Time `json:"last"`
	Succeeded bool      `json:"succeeded"`
}

type Status

type Status struct {
	Push    *PushStatus     `json:"push"`
	Poll    *PollStatus     `json:"poll"`
	Updates []*UpdateStatus `json:"updates"`
}

type TokenHandler

type TokenHandler struct {
	// contains filtered or unexported fields
}

func NewTokenHandler

func NewTokenHandler(h http.Handler, token string) TokenHandler

func (TokenHandler) ServeHTTP

func (t TokenHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type UpdateStatus

type UpdateStatus struct {
	Last      time.Time `json:"last"`
	Domain    string    `json:"domain"`
	IpVersion uint8     `json:"ipVersion"`
	Succeeded bool      `json:"succeeded"`
}

Jump to

Keyboard shortcuts

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