config

package
v0.0.0-...-13997a8 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package config parses the configuration from the environment and stores it in the Env variable.

Index

Constants

View Source
const APIURL = "/v1"

APIURL is the prefix for the Data Track API.

View Source
const ChronologicalURL = "/chronological"

ChronologicalURL is the API pattern for requesting that replies are sorted chronologically.

View Source
const CountURL = "/count"

CountURL is the API suffix for only returning the count of an API query.

View Source
const ExplicitURL = "/explicit"

ExplicitURL is the API pattern for requesting only explicitly disclosed data.

View Source
const ImplicitURL = "/implicit"

ImplicitURL is the API pattern for requesting only implicitly disclosed data.

View Source
const RangeURL = "/range/:first/:last"

RangeURL is the API suffix pattern for requesting a range of replies.

View Source
const ReverseURL = "/reverse"

ReverseURL is the API pattern for requesting that replies have their output reversed.

View Source
const StaticPath = "static/"

StaticPath is the relative path to the static HTML folder.

Variables

View Source
var Env = EnvT{
	Debug:          false,
	DatabasePath:   "datatrack.db",
	InsecureClient: true,
}

Env is the parsed environment set when the Data Track was started.

Functions

func Configure

func Configure() error

Configure reads the configuration from the environment into the Env variable.

Types

type EnvT

type EnvT struct {
	Debug          bool
	DatabasePath   string
	InsecureClient bool
}

EnvT is the type representing the configuration environment.

Jump to

Keyboard shortcuts

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