2018-05-04 16:53:21 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
type SetupAlreadyErr interface {
|
|
|
|
SetupAlready() bool
|
|
|
|
Error() string
|
|
|
|
}
|
|
|
|
|
|
|
|
type setupAlreadyErr struct {
|
|
|
|
reason string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e setupAlreadyErr) Error() string {
|
2018-05-04 21:55:57 +00:00
|
|
|
return "Kolide Fleet has already been setup"
|
2018-05-04 16:53:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e setupAlreadyErr) SetupAlready() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
type InvalidLoginErr interface {
|
|
|
|
InvalidLogin() bool
|
|
|
|
Error() string
|
|
|
|
}
|
|
|
|
|
|
|
|
type invalidLoginErr struct {
|
|
|
|
reason string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e invalidLoginErr) Error() string {
|
2018-05-04 21:55:57 +00:00
|
|
|
return "The credentials supplied were invalid"
|
2018-05-04 16:53:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e invalidLoginErr) InvalidLogin() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
type NotSetupErr interface {
|
|
|
|
NotSetup() bool
|
|
|
|
Error() string
|
|
|
|
}
|
|
|
|
|
|
|
|
type notSetupErr struct {
|
|
|
|
reason string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (e notSetupErr) Error() string {
|
2018-05-04 21:55:57 +00:00
|
|
|
return "The Kolide Fleet instance is not set up yet"
|
2018-05-04 16:53:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e notSetupErr) NotSetup() bool {
|
|
|
|
return true
|
|
|
|
}
|