Documentation ¶
Overview ¶
Package config provides a configuration for the API
Index ¶
Constants ¶
View Source
const ( DatabaseDefaultTxTimeout = 15 * time.Second EnvironmentDevelopment = "development" EnvironmentKey = "API_ENVIRONMENT" EnvironmentProduction = "production" EnvironmentStaging = "staging" HealthRequestPath = "health" HTTPRequestReadTimeout = 15 * time.Second HTTPRequestWriteTimeout = 15 * time.Second ServiceModeAPI = "api" )
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
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()) (entryID cron.EntryID, err error)
AddJob adds a new cron job and returns the entry ID
func (SchedulerConfig) RemoveJob ¶ added in v0.1.3
func (s SchedulerConfig) RemoveJob(entryID cron.EntryID) (err error)
RemoveJob will remove a cron job by entryID (int)
Click to show internal directories.
Click to hide internal directories.