summaryrefslogtreecommitdiffstats
path: root/models/error.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-05 17:13:13 -0500
committerUnknwon <u@gogs.io>2015-12-05 17:13:13 -0500
commit978dc00305f1af705ae8900977529bac6fa4c72b (patch)
tree67587da091f590282fd2c120197249fd9b07b98f /models/error.go
parentbf26808fb3fd55d74089e4f758aaac77be56f7ea (diff)
downloadgitea-978dc00305f1af705ae8900977529bac6fa4c72b.tar.gz
gitea-978dc00305f1af705ae8900977529bac6fa4c72b.zip
APIs: admin users
Diffstat (limited to 'models/error.go')
-rw-r--r--models/error.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/models/error.go b/models/error.go
index 561252e84a..54d32d1546 100644
--- a/models/error.go
+++ b/models/error.go
@@ -528,3 +528,23 @@ func IsErrAttachmentNotExist(err error) bool {
func (err ErrAttachmentNotExist) Error() string {
return fmt.Sprintf("attachment does not exist [id: %d, uuid: %s]", err.ID, err.UUID)
}
+
+// _____ __ .__ __ .__ __ .__
+// / _ \ __ ___/ |_| |__ ____ _____/ |_|__| ____ _____ _/ |_|__| ____ ____
+// / /_\ \| | \ __\ | \_/ __ \ / \ __\ |/ ___\\__ \\ __\ |/ _ \ / \
+// / | \ | /| | | Y \ ___/| | \ | | \ \___ / __ \| | | ( <_> ) | \
+// \____|__ /____/ |__| |___| /\___ >___| /__| |__|\___ >____ /__| |__|\____/|___| /
+// \/ \/ \/ \/ \/ \/ \/
+
+type ErrAuthenticationNotExist struct {
+ ID int64
+}
+
+func IsErrAuthenticationNotExist(err error) bool {
+ _, ok := err.(ErrAuthenticationNotExist)
+ return ok
+}
+
+func (err ErrAuthenticationNotExist) Error() string {
+ return fmt.Sprintf("Authentication does not exist [id: %d]", err.ID)
+}