1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/server/router
Brian Goff 87a12421a9 Add helpers to create errdef errors
Instead of having to create a bunch of custom error types that are doing
nothing but wrapping another error in sub-packages, use a common helper
to create errors of the requested type.

e.g. instead of re-implementing this over and over:

```go
type notFoundError struct {
  cause error
}

func(e notFoundError) Error() string {
  return e.cause.Error()
}

func(e notFoundError) NotFound() {}

func(e notFoundError) Cause() error {
  return e.cause
}
```

Packages can instead just do:

```
  errdefs.NotFound(err)
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-01-11 21:21:43 -05:00
..
build Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
checkpoint Use function arguments for route setup. 2017-04-12 08:43:51 -04:00
container Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
debug Enable pprof/debug endpoints by default 2017-07-17 15:01:30 -04:00
distribution api: Only return a Platform when relevant information is available 2017-05-17 18:42:16 -07:00
image Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
network Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
plugin Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 2017-09-26 13:59:45 +02:00
session Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
swarm Add helpers to create errdef errors 2018-01-11 21:21:43 -05:00
system api: generalize version information to any platform component 2017-12-06 23:23:55 +01:00
volume Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON() 2017-09-26 13:59:45 +02:00
experimental.go Remove string checking in API error handling 2017-08-15 16:01:11 -04:00
local.go Use function arguments for route setup. 2017-04-12 08:43:51 -04:00
router.go Decouple the "container" router from the actual daemon implementation. 2016-02-08 11:30:57 -05:00