-
Notifications
You must be signed in to change notification settings - Fork 1
/
errors.go
19 lines (17 loc) · 863 Bytes
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package websitepoller
import "errors"
var (
// ErrUnrecognizedHTTPMethod means that the http method is not recognized
ErrUnrecognizedHTTPMethod = errors.New("unrecognized http method")
// ErrURLNoScheme means that the url has no http:// or https://
ErrURLNoScheme = errors.New("url does not have a scheme")
// ErrInvalidFrequency means that the polling frequency is invalid, i.e.
// if it could not be parsed by time.ParseDuration
ErrInvalidFrequency = errors.New("invalid polling frequency")
// ErrUnsupportedFrequency means that the polling frequency is lower
// than five second
ErrUnsupportedFrequency = errors.New("frequency cannot be lower than five second")
// ErrInvalidRandRange is thrown when the range could not be parsed by
// time.ParseDuration or is greater or equal than frequency
ErrInvalidRandRange = errors.New("invalid range")
)