eia-api-go/cmd/eia-client/internal/util/util.go

31 lines
609 B
Go
Raw Permalink Normal View History

2024-11-16 19:02:46 +00:00
package util
// These constants contain typed values
// for safely setting and retrieving flags
// from the cobra command
const (
FLAG_APIKEY = "apiKey"
ENV_API = "EIA_API_KEY"
FLAG_TMOUT = "timeout"
ENV_TMOUT = "EIA_API_TMOUT"
FLAG_API_LOG_LEVEL = "apiLogLevel"
ENV_API_LOG_LEVEL = "EIA_API_LOG_LEVEL"
FLAG_LOG_LEVEL = "logLevel"
ENV_LOG_LEVEL = "LOG_LEVEL"
2024-12-17 22:24:48 +00:00
FLAG_OUTPUT_DIR = "outdir"
2024-11-16 19:02:46 +00:00
)
// Type for context data
type eiaCtxField uint8
// These constants contain fields to safely set
// or get fields from the command context
const (
CTX_EIA_CLIENT eiaCtxField = iota
CTX_EIA_TMOUT
)