-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patherrors.go
13 lines (11 loc) · 1.01 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
package db
import "errors"
var (
ErrMissingAutoGeneratedKey = errors.New("Cannot reconstruct auto generated key. Make sure you set the entity's key before applying any of the following operations: Update, Delete or Load")
ErrMultipleIdFields = errors.New(`Model marked with multiple db:"id" tags. Make sure you have either a int field or a string field tagged with db:"id"`)
ErrMissingParentKey = errors.New(`Model marked with db:",has_parent" is missing parent key. Make sure you set it before attempting any datastore operation on the entity`)
ErrMissingStringId = errors.New(`Model is missing StringId. String field tagged with db:"id" cannot be empty`)
ErrMissingIntId = errors.New(`Model is missing IntId. Integer field tagged with db:"id" cannot be zero`)
ErrMissingCacheStringId = errors.New(`Model missing cache string id. String fields tagged with cache:"id" cannot be empty`)
ErrInvalidType = errors.New("Invalid Type. Expected either a slice or a pointer to a slice")
)