config

package
v0.0.0-...-cd2daff Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package config allows to parse a TOML config file. It houses the OAuth configuration for Google API access.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GoogleClientID is the client ID for OAuthConfig.
	// It's stored inside the config TOML file for security reasons.
	GoogleClientID = config.String("google.clientID", "Unknown")
	// GoogleClientSecret is the client secret for OAuthConfig.
	// It's stored inside the config TOML file for security reasons.
	GoogleClientSecret = config.String("google.clientSecret", "Unknown")
	// OAuthConfig is the used configuration for every Google API access.
	OAuthConfig = &oauth.Config{
		Scope:    "https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/calendar.readonly",
		AuthURL:  "https://accounts.google.com/o/oauth2/auth",
		TokenURL: "https://accounts.google.com/o/oauth2/token",

		RedirectURL: "postmessage",
	}
	ComputeEngineAddress = config.String("computeEngineAddress", "Unknown")
)

Functions

func ReadConfig

func ReadConfig()

ReadConfig parses a given TOML file and fills variables with the given information (mostly API secrets).

Types

This section is empty.

Jump to

Keyboard shortcuts

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