mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
22 lines
447 B
Go
22 lines
447 B
Go
package mock
|
|
|
|
import "github.com/fleetdm/fleet/server/kolide"
|
|
|
|
func UserByEmailWithUser(u *kolide.User) UserByEmailFunc {
|
|
return func(email string) (*kolide.User, error) {
|
|
return u, nil
|
|
}
|
|
}
|
|
|
|
func UserWithEmailNotFound() UserByEmailFunc {
|
|
return func(email string) (*kolide.User, error) {
|
|
return nil, &Error{"not found"}
|
|
}
|
|
}
|
|
|
|
func UserWithID(u *kolide.User) UserByIDFunc {
|
|
return func(id uint) (*kolide.User, error) {
|
|
return u, nil
|
|
}
|
|
}
|