config

package
v0.0.0-...-c42bc8f Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize()

Initialize configs

Types

type AWS

type AWS struct{}

AWS encapsulates all AWS configs

type Config

type Config struct {
	GSuite GSuite `json:"gsuite"`
	OAuth  OAuth  `json:"oauth"`
	Server Server `json:"server"`
}

Config ...

func Get

func Get() *Config

Get instance of the config

type GSuite

type GSuite struct {
	// Base64 encoded representation of the service account.
	// Either this or the path need to be set
	ServiceAccountBase64EncodedFile string `json:"service_account_file"`

	// The file path where the service account file can be found.
	// If this is prefixed with s3:// it will go look in S3 for the
	// file. Must be in the format of s3://<bucket>/<path>.
	// Otherwise, this must be the absolute path
	ServiceAccountPath  string `json:"service_account_path"`
	ClientID            string `json:"client_id"`
	ServiceAccountEmail string `json:"service_account_email"`
	ImpersonationEmail  string `json:"impersonation_email"`
}

GSuite encapsulates all GSuite service info

type OAuth

type OAuth struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	// Scopes will come in as a comma delimited string
	Scopes                  []string      `json:"scopes"`
	TokenURL                string        `json:"token_url"`
	AuthURL                 string        `json:"auth_url"`
	RedirectURL             string        `json:"redirect_url"`
	StateParameterGenerator func() string `json:"-"`
}

OAuth encapsulates all OAuth configs

type Server

type Server struct {
	Port        int    `json:"port"`
	Environment string `json:"environment"`
}

Server encapsulates all server configs

Jump to

Keyboard shortcuts

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