config

package
v0.0.0-...-5e8daf6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Configuration. See Config struct for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// HTTPAddr is the address to start the HTTP API server
	HTTPAddr string `default:":5000" split_words:"true" required:"true"`

	// GHWebhookSecret is a secret key used to sign an HMAC of GitHub webhook requests
	// GitHub includes this HMAC in requests, we will recompute this HMAC using this key
	// and ensure that the included HMAC and our HMAC match.
	GHWebhookSecret string `split_words:"true" required:"true"`
}

Config for ops bot.

Values are passed via environment variables.

Environment variables will be prefixed by APP and be in capital underscore case (ex., APP_CAPITAL_UNDERSCORE_CASE).

For example the HTTPAddr field is set by the APP_HTTP_ADDR environment variable.

func NewConfig

func NewConfig() (*Config, error)

NewConfig loads Config values from environment variables

Jump to

Keyboard shortcuts

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