package client
import "github.com/rootless-containers/rootlesskit/pkg/api/client"
Index ¶
Constants ¶
const HTTPStatusErrorBodyMaxLength = 64 * 1024
HTTPStatusErrorBodyMaxLength specifies the maximum length of HTTPStatusError.Body
Types ¶
type Client ¶
func New ¶
New creates a client. socketPath is a path to the UNIX socket, without unix:// prefix.
func NewWithHTTPClient ¶
type HTTPStatusError ¶
type HTTPStatusError struct { // StatusCode is non-2XX status code StatusCode int // Body is at most HTTPStatusErrorBodyMaxLength Body string }
HTTPStatusError is created from non-2XX HTTP response
func (*HTTPStatusError) Error ¶
func (e *HTTPStatusError) Error() string
Error implements error. If e.Body is a marshalled string of api.ErrorJSON, Error returns ErrorJSON.Message . Otherwise Error returns a human-readable string that contains e.StatusCode and e.Body.
Source Files ¶
- Version
- v0.9.5
- Published
- May 11, 2020
- Platform
- windows/amd64
- Imports
- 12 packages
- Last checked
- 2 hours ago –
Tools for package owners.