config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package config provides a configuration for the API

Index

Constants

View Source
const (
	ApplicationModeAPI       = "api"
	DatabaseDefaultTxTimeout = 15 * time.Second
	EnvironmentDevelopment   = "development"
	EnvironmentKey           = "API_ENVIRONMENT"
	EnvironmentProduction    = "production"
	EnvironmentStaging       = "staging"
	HealthRequestPath        = "health"
)

Config constants used for optimization and value testing

Variables

View Source
var Values appConfig

Values global configuration (config.Values)

Functions

func GetCurrentDir added in v0.0.3

func GetCurrentDir() string

GetCurrentDir gets the current directory for all operating systems

func Load

func Load() (err error)

Load all environment variables

Types

type SchedulerConfig

type SchedulerConfig struct {
	CronApp *cron.Cron
}

SchedulerConfig is our cron task wrapper

func (SchedulerConfig) AddJob

func (s SchedulerConfig) AddJob(name, spec string, cmd func()) (err error)

AddJob adds a new cron job

Source Files

  • config.go

Jump to

Keyboard shortcuts

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