Documentation
¶
Overview ¶
Package sifi implements the go language bindings for the HyperCloud SIFI API. The bindings will support exactly one version of the API at a time, even though the data types for all currently supported versions can be found in the v* directories.
Index ¶
Constants ¶
View Source
const ( APIPrefix = "/hypercloud-api" // APIPrefix is the prefix for all API paths. APIVersion = "v3-preview" // APIVersion is the prefix for all API paths (without the leading slash). PortNumber = 7434 // PortNumber is the default port for `sifid` (sifi on a keypad). ServiceName = "sifid" // ServiceName is the public name of the SIFI service. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Cloud *cloud.Service
Metal *metal.Service
Snapshot *snapshot.Service
*client.Client
}
Client is a connection to the SIFI service.
type ResponseError ¶ added in v0.16.0
type ResponseError struct {
Code int `json:"code"`
Text string `json:"error"`
Detail []string `json:"detail"`
}
ResponseError is the response body for all error responses.
func NewErrorResponse ¶ added in v0.16.0
func NewErrorResponse(code int, err error, detail ...string) *ResponseError
NewErrorResponse returns a new ErrorResponse.
func (ResponseError) Error ¶ added in v0.16.0
func (e ResponseError) Error() string
Error implements the error interface for e.
func (ResponseError) StatusCode ¶ added in v0.16.0
func (e ResponseError) StatusCode() int
StatusCode returns the status code for e.
Click to show internal directories.
Click to hide internal directories.