github.com/cookieai-jar/moby@v17.12.1-ce-rc2+incompatible/api/errdefs/defs.go (about) 1 package errdefs 2 3 // ErrNotFound signals that the requested object doesn't exist 4 type ErrNotFound interface { 5 NotFound() 6 } 7 8 // ErrInvalidParameter signals that the user input is invalid 9 type ErrInvalidParameter interface { 10 InvalidParameter() 11 } 12 13 // ErrConflict signals that some internal state conflicts with the requested action and can't be performed. 14 // A change in state should be able to clear this error. 15 type ErrConflict interface { 16 Conflict() 17 } 18 19 // ErrUnauthorized is used to signify that the user is not authorized to perform a specific action 20 type ErrUnauthorized interface { 21 Unauthorized() 22 } 23 24 // ErrUnavailable signals that the requested action/subsystem is not available. 25 type ErrUnavailable interface { 26 Unavailable() 27 } 28 29 // ErrForbidden signals that the requested action cannot be performed under any circumstances. 30 // When a ErrForbidden is returned, the caller should never retry the action. 31 type ErrForbidden interface { 32 Forbidden() 33 } 34 35 // ErrSystem signals that some internal error occurred. 36 // An example of this would be a failed mount request. 37 type ErrSystem interface { 38 ErrSystem() 39 } 40 41 // ErrNotModified signals that an action can't be performed because it's already in the desired state 42 type ErrNotModified interface { 43 NotModified() 44 } 45 46 // ErrNotImplemented signals that the requested action/feature is not implemented on the system as configured. 47 type ErrNotImplemented interface { 48 NotImplemented() 49 } 50 51 // ErrUnknown signals that the kind of error that occurred is not known. 52 type ErrUnknown interface { 53 Unknown() 54 }