types

package
v0.0.0-...-bcb87c1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatHttpTime

func FormatHttpTime(t time.Time) string

Types

type MD5Hash

type MD5Hash string

MD5Hash is the hex of an MD5 hash.

type NormalizedHostname

type NormalizedHostname string

NormalizedHostname would be "EXAMPLEORG" for "example.org".

func NormalizeHostname

func NormalizeHostname(hostname string) NormalizedHostname

func NormalizeURLHostname

func NormalizeURLHostname(u *url.URL) NormalizedHostname

NormalizeURLHostname returns the url's hostname, normalized for TTL matches. So https://example.org/foo would become "EXAMPLEORG", etc.

func (NormalizedHostname) Reverse

Reverse reverses the hostname string. Note that 'reversing a string' is really confusing because of glyphs, but since we are just dealing with hostnames, and for bytewise indexing, we can just reverse bytes.

type TTL

type TTL time.Duration

TTL is the time-to-live is some expiration interval.

Jump to

Keyboard shortcuts

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