Files
threshold/internal/errors/kind.go
T
dd0f34bc35 Add new OIDC auth method. (#1090)
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-04-08 20:54:32 -04:00

33 lines
646 B
Go

package errors
// Kind specifies the kind of error (unknown, parameter, integrity, etc).
type Kind uint32
const (
Other Kind = iota
Parameter
Integrity
Search
Password
Transaction
Encryption
Encoding
State
External
)
func (e Kind) String() string {
return map[Kind]string{
Other: "unknown",
Parameter: "parameter violation",
Integrity: "integrity violation",
Search: "search issue",
Password: "password violation",
Transaction: "db transaction issue",
Encryption: "encryption issue",
Encoding: "encoding issue",
State: "state violation",
External: "external system issue",
}[e]
}