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 (24 lines) | stat: -rw-r--r-- 590 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
23
24
package papi

import "errors"

// Error constants
const (
	ErrInvalidPath = iota
	ErrCriteriaNotFound
	ErrBehaviorNotFound
	ErrVariableNotFound
	ErrRuleNotFound
	ErrInvalidRules
)

var (
	ErrorMap = map[int]error{
		ErrInvalidPath:      errors.New("Invalid Path"),
		ErrCriteriaNotFound: errors.New("Criteria not found"),
		ErrBehaviorNotFound: errors.New("Behavior not found"),
		ErrVariableNotFound: errors.New("Variable not found"),
		ErrRuleNotFound:     errors.New("Rule not found"),
		ErrInvalidRules:     errors.New("Rule validation failed. See papi.Rules.Errors for details"),
	}
)