configure

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrCantBeZeroOrNegative indicates that an integer value cannot be zero negative, but a zero or negative value was
	// provided.
	ErrCantBeZeroOrNegative = errors.New("integer cannot be negative")
)

Functions

func DefaultCtx

func DefaultCtx() (ctx context.Context, cancel context.CancelFunc)

DefaultCtx creates a context and its cancel function using the default timeout or one provided during configuration.

func HTMLProducer added in v0.0.3

func HTMLProducer(logger *zap.SugaredLogger) (htmlProducer runtime.ProducerFunc)

HTMLProducer creates a runtime.ProducerFunc that will read an HTML io.ReadCloser and write it to the given writer.

Types

type Configuration

type Configuration struct {
	ErrChan         chan error
	Logger          *zap.SugaredLogger
	InvalidPaths    []string
	JWKSURL         string
	Prefix          string
	ShortID         *shortid.Shortid
	ShortIDParanoid bool
	StoreManager    storage.StoreManager
	Template        *template.Template
	UseAuth         bool
}

Configuration is the Go structure that contains all needed configurations gathered on startup.

func Configure

func Configure() (config Configuration, err error)

Configure gathers all startup configurations, formats them, and returns them as a Go struct.

Jump to

Keyboard shortcuts

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