Errors package

This commit is contained in:
Matthew Dillon 2015-10-01 14:45:36 -07:00
parent 0eec85ed08
commit a880fdea82
24 changed files with 215 additions and 169 deletions

7
errors/auth.go Normal file
View file

@ -0,0 +1,7 @@
package errors
import "errors"
var (
ExpiredToken = errors.New("this token has expired")
)

View file

@ -0,0 +1,8 @@
package errors
import "errors"
var (
CharacteristicNotFound = errors.New("Characteristic not found")
CharacteristicNotUpdated = errors.New("Characteristic not updated")
)

7
errors/helpers.go Normal file
View file

@ -0,0 +1,7 @@
package errors
import "errors"
var (
MustProvideOptions = errors.New("Must provide necessary options")
)

7
errors/measurements.go Normal file
View file

@ -0,0 +1,7 @@
package errors
import "errors"
var (
MeasurementNotFound = errors.New("Measurement not found")
)

8
errors/species.go Normal file
View file

@ -0,0 +1,8 @@
package errors
import "errors"
var (
SpeciesNotFound = errors.New("Species not found")
SpeciesNotUpdated = errors.New("Species not updated")
)

8
errors/strains.go Normal file
View file

@ -0,0 +1,8 @@
package errors
import "errors"
var (
StrainNotFound = errors.New("Strain not found")
StrainNotUpdated = errors.New("Strain not updated")
)

7
errors/types.go Normal file
View file

@ -0,0 +1,7 @@
package errors
import "errors"
var (
SourceNotByteSlice = errors.New("Scan source was not []byte")
)

11
errors/users.go Normal file
View file

@ -0,0 +1,11 @@
package errors
import "errors"
var (
UserNotFound = errors.New("No user found")
UserNotUpdated = errors.New("Count 0")
UserMissingEmail = errors.New("Missing email")
InvalidEmailOrPassword = errors.New("Invalid email or password")
EmailAddressTaken = errors.New("Email address is already registered")
)