blob: 854957ff98d501ee67d519f1646ca756cde099ef [file] [log] [blame]
Ash Wilson1cc96dc2014-09-04 10:53:22 -04001package endpoints
2
3import "fmt"
4
5func requiredAttribute(attribute string) error {
6 return fmt.Errorf("You must specify %s for this endpoint.", attribute)
7}
8
9var (
Ash Wilsonefac18b2014-09-10 14:44:42 -040010 // ErrAvailabilityRequired is reported if an Endpoint is created without an Availability.
11 ErrAvailabilityRequired = requiredAttribute("an availability")
Ash Wilson1cc96dc2014-09-04 10:53:22 -040012
13 // ErrNameRequired is reported if an Endpoint is created without a Name.
14 ErrNameRequired = requiredAttribute("a name")
15
16 // ErrURLRequired is reported if an Endpoint is created without a URL.
17 ErrURLRequired = requiredAttribute("a URL")
18
19 // ErrServiceIDRequired is reported if an Endpoint is created without a ServiceID.
20 ErrServiceIDRequired = requiredAttribute("a serviceID")
21)