internal

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: CC0-1.0 Imports: 22 Imported by: 0

Documentation

Overview

Package internal centralizes a lot of other boring configuration and startup logic into a common place.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fnv added in v1.5.0

func Fnv(data string) string

Fnv is a non-cryptographic hashing function based on non-cryptographic hash functions created by Glenn Fowler, Landon Curt Noll, and Phong Vo. This wraps the standard library FNV hash function by representing it as a 32 bit integer. Then it takes that number and "hashes" it by adding the rune's unicode value (as a uint 32) and then takes the modulus of 26, letting the number be represented as a letter of the alphabet. This is not a cryptographically secure operation, it is purely to replace numbers with a human-readable string to satisfy the requirement that any vhost with a "/" in it cannot end in a number (to avoid someone obtaining a vhost that is a cidr mask, it can cause issues).

func HandleCompletion added in v1.2.0

func HandleCompletion(args complete.Predictor, subcommands complete.Commands)

func HandleStartup

func HandleStartup()

HandleStartup optionally shows all software licenses or other things. This always loads from the following configuration sources in the following order:

  • command line flags (to get -config)
  • environment variables
  • any secrets mounted to /run/secrets
  • configuration file (if -config is set)
  • command line flags

This is done this way to ensure that command line flags always are the deciding factor as an escape hatch, at the cost of potentially evaluating flags twice.

func Hash added in v1.5.0

func Hash(data string, salt string) string

Hash is a simple wrapper around the MD5 algorithm implementation in the Go standard library. It takes in data and a salt and returns the hashed representation.

func PasswordMiddleware added in v1.10.0

func PasswordMiddleware(username, password string, next http.Handler) http.Handler

Types

This section is empty.

Directories

Path Synopsis
Package appsluggr packages a given binary into a Heroku-compatible slug.
Package appsluggr packages a given binary into a Heroku-compatible slug.
Package avif implements a AVIF image encoder.
Package avif implements a AVIF image encoder.
flagconfyg
Package flagconfyg is a hack around confyg.
Package flagconfyg is a hack around confyg.
Package flagenv provides the ability to populate flags from environment variables.
Package flagenv provides the ability to populate flags from environment variables.
Package gokrazy makes it easier to adapt tools to https://gokrazy.org.
Package gokrazy makes it easier to adapt tools to https://gokrazy.org.
Package kahless is a set of functions to copy files to https://xena.greedo.xeserv.us/files.
Package kahless is a set of functions to copy files to https://xena.greedo.xeserv.us/files.
Package mainsa is a small set of conversion or other useful utility functions for converting plane 432 units to ma Insa units.
Package mainsa is a small set of conversion or other useful utility functions for converting plane 432 units to ma Insa units.
Package manpage is a manpage generator based on command line flags from package flag.
Package manpage is a manpage generator based on command line flags from package flag.
Package minipaas is a set of functions for interfacing with minipaas.xeserv.us.
Package minipaas is a set of functions for interfacing with minipaas.xeserv.us.
Package slog is my set of wrappers around package slog.
Package slog is my set of wrappers around package slog.
Package tokipona adds a copyright notice that pu wants to the list of licenses.
Package tokipona adds a copyright notice that pu wants to the list of licenses.
Package yeet is a set of small helper functions useful for yeeting out scripts.
Package yeet is a set of small helper functions useful for yeeting out scripts.

Jump to

Keyboard shortcuts

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