Errors package
This commit is contained in:
parent
0eec85ed08
commit
a880fdea82
24 changed files with 215 additions and 169 deletions
7
errors/auth.go
Normal file
7
errors/auth.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package errors
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
ExpiredToken = errors.New("this token has expired")
|
||||
)
|
8
errors/characteristics.go
Normal file
8
errors/characteristics.go
Normal 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
7
errors/helpers.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package errors
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
MustProvideOptions = errors.New("Must provide necessary options")
|
||||
)
|
7
errors/measurements.go
Normal file
7
errors/measurements.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package errors
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
MeasurementNotFound = errors.New("Measurement not found")
|
||||
)
|
8
errors/species.go
Normal file
8
errors/species.go
Normal 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
8
errors/strains.go
Normal 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
7
errors/types.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package errors
|
||||
|
||||
import "errors"
|
||||
|
||||
var (
|
||||
SourceNotByteSlice = errors.New("Scan source was not []byte")
|
||||
)
|
11
errors/users.go
Normal file
11
errors/users.go
Normal 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")
|
||||
)
|
Reference in a new issue