config

package
v0.0.0-...-00c8e8d Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2018 License: MIT Imports: 2 Imported by: 4

Documentation

Overview

Package config owns common functions to get the application's configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorsAllowedOrigins

func CorsAllowedOrigins() []string

CorsAllowedOrigins returns a list of allowed origins to configure the CORS middleware.

func DSN

func DSN() string

DSN returns the CRICK_DSN value from environment.

func Port

func Port() string

Port returns the PORT value from environment.

Types

type Auth0Config

type Auth0Config struct {
	Domain   string
	JwksURI  string
	Audience []string
}

Auth0Config represents the Auth0 configuration.

func Auth0

func Auth0() Auth0Config

Auth0 returns the Auth0 configuration, based on the AUTH0_* environment variables:

  • AUTH0_DOMAIN is the Auth0 domain
  • AUTH0_AUDIENCE is expected to be a comma-separated string value, containing audiences
  • AUTH0_JWKS_URI is the Auth0 JWKS URI

Jump to

Keyboard shortcuts

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