File: errors.go

package info (click to toggle)
golang-github-akamai-akamaiopen-edgegrid-golang 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,408 kB
  • sloc: sh: 532; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package edgegrid

// Error constants
const (
	ErrUUIDGenerateFailed   = 500
	ErrHomeDirNotFound      = 501
	ErrConfigFile           = 502
	ErrConfigFileSection    = 503
	ErrConfigMissingOptions = 504
	ErrMissingEnvVariables  = 505
)

var (
	errorMap = map[int]string{
		ErrUUIDGenerateFailed:   "Generate UUID failed: %s",
		ErrHomeDirNotFound:      "Fatal could not find home dir from user: %s",
		ErrConfigFile:           "Fatal error edgegrid file: %s",
		ErrConfigFileSection:    "Could not map section: %s",
		ErrConfigMissingOptions: "Fatal missing required options: %s",
		ErrMissingEnvVariables:  "Fatal missing required environment variables: %s",
	}
)