nits

package module
v0.0.0-...-6ffbed4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 20 Imported by: 0

README

nits.go

pkg goreportcard workflow codecov

A collection of non-essential, boring code that you come across in multiple projects.

Documentation

Overview

Package nits provides functions that are commonly needed in multiple projects and packages.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrX509InvalidPEMFormat invalid PEM format.
	ErrX509InvalidPEMFormat = errors.New("invalid PEM format")

	// ErrX509CertificateHasExpired certificate has expired.
	ErrX509CertificateHasExpired = errors.New("certificate has expired")

	// ErrX509CertificateIsNotYetValid certificate is not yet valid.
	ErrX509CertificateIsNotYetValid = errors.New("certificate is not yet valid")
)
View Source
var Crypto cryptoUtility

Crypto is an entity that allows the methods of CryptoUtility to be executed from outside the package without initializing CryptoUtility. nolint: gochecknoglobals

View Source
var Env envUtility

Env is an entity that allows the methods of EnvUtility to be executed from outside the package without initializing EnvUtility. nolint: gochecknoglobals

View Source
var ErrCryptoNoSuchCryptographicAlgorithm = errors.New("no such cryptographic algorithm")

ErrCryptoNoSuchCryptographicAlgorithm no such encryption algorithm.

View Source
var ErrEnvironmentVariableIsNotSetOrEmpty = errors.New("environment variable is not set or empty")

ErrEnvironmentVariableIsNotSetOrEmpty environment variable is not set or empty.

View Source
var HTTP httpUtility

HTTP is an entity that allows the methods of HTTPUtility to be executed from outside the package without initializing HTTPUtility. nolint: gochecknoglobals

View Source
var JSON jsonUtility

JSON is an entity that allows the methods of JSONUtility to be executed from outside the package without initializing JSONUtility. nolint: gochecknoglobals

View Source
var MIME mimeUtility

MIME is an entity that allows the methods of MIMEUtility to be executed from outside the package without initializing MIMEUtility. nolint: gochecknoglobals

View Source
var Ptr ptrUtility

Ptr is an entity that allows the methods of PtrUtility to be executed from outside the package without initializing PtrUtility. nolint: gochecknoglobals

View Source
var Slice sliceUtility

Slice is an entity that allows the methods of SliceUtility to be executed from outside the package without initializing SliceUtility. nolint: gochecknoglobals

View Source
var Strconv strconvUtility

Strconv is an entity that allows the methods of StrconvUtility to be executed from outside the package without initializing StrconvUtility. nolint: gochecknoglobals

View Source
var X509 x509Utility

X509 is an entity that allows the methods of X509Utility to be executed from outside the package without initializing X509Utility. nolint: gochecknoglobals

Functions

This section is empty.

Types

type BasicAuthPassword

type BasicAuthPassword = string

type BasicAuthUsername

type BasicAuthUsername = string

type CryptographicAlgorithm

type CryptographicAlgorithm = string

CryptographicAlgorithm is an alias of string.

const (
	// CryptoRSA2048 RSA 2048 bits.
	CryptoRSA2048 CryptographicAlgorithm = "rsa2048"
	// CryptoRSA4096 RSA 4096 bits.
	CryptoRSA4096 CryptographicAlgorithm = "rsa4096"
	// CryptoRSA8192 RSA 8192 bits.
	CryptoRSA8192 CryptographicAlgorithm = "rsa8192"
	// CryptoECDSA256 ECDSA with p-256 curve.
	CryptoECDSA256 CryptographicAlgorithm = "ecdsa256"
	// CryptoECDSA384 ECDSA with p-384 curve.
	CryptoECDSA384 CryptographicAlgorithm = "ecdsa384"
	// CryptoEd25519 Ed25519.
	CryptoEd25519 CryptographicAlgorithm = "ed25519"
)

type Method

type Method = string

type Methods

type Methods map[Method]http.Handler

func (Methods) Register

func (m Methods) Register(method Method, handler http.Handler) Methods

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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