common

package
v0.0.0-...-740dce8 Latest Latest
Warning

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

Go to latest
Published: May 30, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashNameAndPKI

func HashNameAndPKI(h hash.Hash, name, pki []byte) ([]byte, []byte, error)

func HumanDuration

func HumanDuration(d time.Duration) string

func ParseCertificate

func ParseCertificate(contents []byte) (*x509.Certificate, error)

ParseCertificate parses a certificate from either it's PEM or DER form

func ProxyFunc

func ProxyFunc(proxies []string) (func(*http.Request) (*url.URL, error), error)

func ReadCertificate

func ReadCertificate(filename string) (*x509.Certificate, error)

Types

type BasicFailer

type BasicFailer struct{}

func (*BasicFailer) Fail

func (bf *BasicFailer) Fail(logger *log.Logger, msg string)

type Failer

type Failer interface {
	Fail(*log.Logger, string)
}

Jump to

Keyboard shortcuts

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