Documentation ¶
Overview ¶
Package gen provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
Index ¶
- Constants
- func NewDeleteTaskIDRequest(server string, id uint64) (*http.Request, error)
- func NewGetNetworkDNSByInterfaceRequest(server string, interfaceName string) (*http.Request, error)
- func NewGetSystemHostnameRequest(server string) (*http.Request, error)
- func NewGetSystemStatusRequest(server string) (*http.Request, error)
- func NewGetTaskIDRequest(server string, id uint64) (*http.Request, error)
- func NewGetTaskRequest(server string) (*http.Request, error)
- func NewGetTaskStatusRequest(server string) (*http.Request, error)
- func NewGetVersionRequest(server string) (*http.Request, error)
- func NewPostNetworkPingRequest(server string, body PostNetworkPingJSONRequestBody) (*http.Request, error)
- func NewPostNetworkPingRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostTaskRequest(server string, body PostTaskJSONRequestBody) (*http.Request, error)
- func NewPostTaskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPutNetworkDNSRequest(server string, body PutNetworkDNSJSONRequestBody) (*http.Request, error)
- func NewPutNetworkDNSRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- func (c *Client) DeleteTaskID(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetNetworkDNSByInterface(ctx context.Context, interfaceName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSystemHostname(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSystemStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTask(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTaskID(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetTaskStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostNetworkPing(ctx context.Context, body PostNetworkPingJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostNetworkPingWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostTask(ctx context.Context, body PostTaskJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostTaskWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PutNetworkDNS(ctx context.Context, body PutNetworkDNSJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PutNetworkDNSWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) DeleteTaskIDWithResponse(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*DeleteTaskIDResponse, error)
- func (c *ClientWithResponses) GetNetworkDNSByInterfaceWithResponse(ctx context.Context, interfaceName string, reqEditors ...RequestEditorFn) (*GetNetworkDNSByInterfaceResponse, error)
- func (c *ClientWithResponses) GetSystemHostnameWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSystemHostnameResponse, error)
- func (c *ClientWithResponses) GetSystemStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSystemStatusResponse, error)
- func (c *ClientWithResponses) GetTaskIDWithResponse(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*GetTaskIDResponse, error)
- func (c *ClientWithResponses) GetTaskStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTaskStatusResponse, error)
- func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTaskResponse, error)
- func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
- func (c *ClientWithResponses) PostNetworkPingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostNetworkPingResponse, error)
- func (c *ClientWithResponses) PostNetworkPingWithResponse(ctx context.Context, body PostNetworkPingJSONRequestBody, ...) (*PostNetworkPingResponse, error)
- func (c *ClientWithResponses) PostTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostTaskResponse, error)
- func (c *ClientWithResponses) PostTaskWithResponse(ctx context.Context, body PostTaskJSONRequestBody, ...) (*PostTaskResponse, error)
- func (c *ClientWithResponses) PutNetworkDNSWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PutNetworkDNSResponse, error)
- func (c *ClientWithResponses) PutNetworkDNSWithResponse(ctx context.Context, body PutNetworkDNSJSONRequestBody, ...) (*PutNetworkDNSResponse, error)
- type ClientWithResponsesInterface
- type DNSConfigResponse
- type DNSConfigUpdateRequest
- type DeleteTaskIDResponse
- type DiskResponse
- type DisksResponse
- type ErrorResponse
- type GetNetworkDNSByInterfaceResponse
- type GetSystemHostnameResponse
- type GetSystemStatusResponse
- type GetTaskIDResponse
- type GetTaskResponse
- type GetTaskStatusResponse
- type GetVersionResponse
- type HostnameResponse
- type HttpRequestDoer
- type LoadAverageResponse
- type MemoryResponse
- type NetworkErrorResponse
- type OSInfoResponse
- type PingResponse
- type PostNetworkPingJSONBody
- type PostNetworkPingJSONRequestBody
- type PostNetworkPingResponse
- type PostTaskJSONBody
- type PostTaskJSONRequestBody
- type PostTaskResponse
- type PutNetworkDNSJSONRequestBody
- type PutNetworkDNSResponse
- type RequestEditorFn
- type SystemStatusResponse
- type TaskErrorResponse
- type TaskItemIdResponse
- type TaskItemResponse
- type TaskResponse
- type TaskStatusResponse
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewDeleteTaskIDRequest ¶
NewDeleteTaskIDRequest generates requests for DeleteTaskID
func NewGetNetworkDNSByInterfaceRequest ¶
NewGetNetworkDNSByInterfaceRequest generates requests for GetNetworkDNSByInterface
func NewGetSystemHostnameRequest ¶
NewGetSystemHostnameRequest generates requests for GetSystemHostname
func NewGetSystemStatusRequest ¶
NewGetSystemStatusRequest generates requests for GetSystemStatus
func NewGetTaskIDRequest ¶
NewGetTaskIDRequest generates requests for GetTaskID
func NewGetTaskRequest ¶
NewGetTaskRequest generates requests for GetTask
func NewGetTaskStatusRequest ¶
NewGetTaskStatusRequest generates requests for GetTaskStatus
func NewGetVersionRequest ¶
NewGetVersionRequest generates requests for GetVersion
func NewPostNetworkPingRequest ¶
func NewPostNetworkPingRequest(server string, body PostNetworkPingJSONRequestBody) (*http.Request, error)
NewPostNetworkPingRequest calls the generic PostNetworkPing builder with application/json body
func NewPostNetworkPingRequestWithBody ¶
func NewPostNetworkPingRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostNetworkPingRequestWithBody generates requests for PostNetworkPing with any type of body
func NewPostTaskRequest ¶
func NewPostTaskRequest(server string, body PostTaskJSONRequestBody) (*http.Request, error)
NewPostTaskRequest calls the generic PostTask builder with application/json body
func NewPostTaskRequestWithBody ¶
func NewPostTaskRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostTaskRequestWithBody generates requests for PostTask with any type of body
func NewPutNetworkDNSRequest ¶
func NewPutNetworkDNSRequest(server string, body PutNetworkDNSJSONRequestBody) (*http.Request, error)
NewPutNetworkDNSRequest calls the generic PutNetworkDNS builder with application/json body
Types ¶
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) DeleteTaskID ¶
func (*Client) GetNetworkDNSByInterface ¶
func (*Client) GetSystemHostname ¶
func (*Client) GetSystemStatus ¶
func (*Client) GetTaskStatus ¶
func (*Client) GetVersion ¶
func (*Client) PostNetworkPing ¶
func (c *Client) PostNetworkPing(ctx context.Context, body PostNetworkPingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostNetworkPingWithBody ¶
func (*Client) PostTask ¶
func (c *Client) PostTask(ctx context.Context, body PostTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostTaskWithBody ¶
func (*Client) PutNetworkDNS ¶
func (c *Client) PutNetworkDNS(ctx context.Context, body PutNetworkDNSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // PutNetworkDNSWithBody request with any body PutNetworkDNSWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PutNetworkDNS(ctx context.Context, body PutNetworkDNSJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetNetworkDNSByInterface request GetNetworkDNSByInterface(ctx context.Context, interfaceName string, reqEditors ...RequestEditorFn) (*http.Response, error) // PostNetworkPingWithBody request with any body PostNetworkPingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostNetworkPing(ctx context.Context, body PostNetworkPingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSystemHostname request GetSystemHostname(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSystemStatus request GetSystemStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTask request GetTask(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // PostTaskWithBody request with any body PostTaskWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostTask(ctx context.Context, body PostTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTaskStatus request GetTaskStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTaskID request DeleteTaskID(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTaskID request GetTaskID(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*http.Response, error) // GetVersion request GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) DeleteTaskIDWithResponse ¶
func (c *ClientWithResponses) DeleteTaskIDWithResponse(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*DeleteTaskIDResponse, error)
DeleteTaskIDWithResponse request returning *DeleteTaskIDResponse
func (*ClientWithResponses) GetNetworkDNSByInterfaceWithResponse ¶
func (c *ClientWithResponses) GetNetworkDNSByInterfaceWithResponse(ctx context.Context, interfaceName string, reqEditors ...RequestEditorFn) (*GetNetworkDNSByInterfaceResponse, error)
GetNetworkDNSByInterfaceWithResponse request returning *GetNetworkDNSByInterfaceResponse
func (*ClientWithResponses) GetSystemHostnameWithResponse ¶
func (c *ClientWithResponses) GetSystemHostnameWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSystemHostnameResponse, error)
GetSystemHostnameWithResponse request returning *GetSystemHostnameResponse
func (*ClientWithResponses) GetSystemStatusWithResponse ¶
func (c *ClientWithResponses) GetSystemStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSystemStatusResponse, error)
GetSystemStatusWithResponse request returning *GetSystemStatusResponse
func (*ClientWithResponses) GetTaskIDWithResponse ¶
func (c *ClientWithResponses) GetTaskIDWithResponse(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*GetTaskIDResponse, error)
GetTaskIDWithResponse request returning *GetTaskIDResponse
func (*ClientWithResponses) GetTaskStatusWithResponse ¶
func (c *ClientWithResponses) GetTaskStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTaskStatusResponse, error)
GetTaskStatusWithResponse request returning *GetTaskStatusResponse
func (*ClientWithResponses) GetTaskWithResponse ¶
func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTaskResponse, error)
GetTaskWithResponse request returning *GetTaskResponse
func (*ClientWithResponses) GetVersionWithResponse ¶
func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
GetVersionWithResponse request returning *GetVersionResponse
func (*ClientWithResponses) PostNetworkPingWithBodyWithResponse ¶
func (c *ClientWithResponses) PostNetworkPingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworkPingResponse, error)
PostNetworkPingWithBodyWithResponse request with arbitrary body returning *PostNetworkPingResponse
func (*ClientWithResponses) PostNetworkPingWithResponse ¶
func (c *ClientWithResponses) PostNetworkPingWithResponse(ctx context.Context, body PostNetworkPingJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworkPingResponse, error)
func (*ClientWithResponses) PostTaskWithBodyWithResponse ¶
func (c *ClientWithResponses) PostTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTaskResponse, error)
PostTaskWithBodyWithResponse request with arbitrary body returning *PostTaskResponse
func (*ClientWithResponses) PostTaskWithResponse ¶
func (c *ClientWithResponses) PostTaskWithResponse(ctx context.Context, body PostTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTaskResponse, error)
func (*ClientWithResponses) PutNetworkDNSWithBodyWithResponse ¶
func (c *ClientWithResponses) PutNetworkDNSWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutNetworkDNSResponse, error)
PutNetworkDNSWithBodyWithResponse request with arbitrary body returning *PutNetworkDNSResponse
func (*ClientWithResponses) PutNetworkDNSWithResponse ¶
func (c *ClientWithResponses) PutNetworkDNSWithResponse(ctx context.Context, body PutNetworkDNSJSONRequestBody, reqEditors ...RequestEditorFn) (*PutNetworkDNSResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // PutNetworkDNSWithBodyWithResponse request with any body PutNetworkDNSWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutNetworkDNSResponse, error) PutNetworkDNSWithResponse(ctx context.Context, body PutNetworkDNSJSONRequestBody, reqEditors ...RequestEditorFn) (*PutNetworkDNSResponse, error) // GetNetworkDNSByInterfaceWithResponse request GetNetworkDNSByInterfaceWithResponse(ctx context.Context, interfaceName string, reqEditors ...RequestEditorFn) (*GetNetworkDNSByInterfaceResponse, error) // PostNetworkPingWithBodyWithResponse request with any body PostNetworkPingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostNetworkPingResponse, error) PostNetworkPingWithResponse(ctx context.Context, body PostNetworkPingJSONRequestBody, reqEditors ...RequestEditorFn) (*PostNetworkPingResponse, error) // GetSystemHostnameWithResponse request GetSystemHostnameWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSystemHostnameResponse, error) // GetSystemStatusWithResponse request GetSystemStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSystemStatusResponse, error) // GetTaskWithResponse request GetTaskWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) // PostTaskWithBodyWithResponse request with any body PostTaskWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTaskResponse, error) PostTaskWithResponse(ctx context.Context, body PostTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTaskResponse, error) // GetTaskStatusWithResponse request GetTaskStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetTaskStatusResponse, error) // DeleteTaskIDWithResponse request DeleteTaskIDWithResponse(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*DeleteTaskIDResponse, error) // GetTaskIDWithResponse request GetTaskIDWithResponse(ctx context.Context, id uint64, reqEditors ...RequestEditorFn) (*GetTaskIDResponse, error) // GetVersionWithResponse request GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type DNSConfigResponse ¶
type DNSConfigResponse struct { // SearchDomains List of search domains. SearchDomains *[]string `json:"search_domains,omitempty"` // Servers List of configured DNS servers. Servers *[]string `json:"servers,omitempty"` }
DNSConfigResponse defines model for DNSConfigResponse.
type DNSConfigUpdateRequest ¶
type DNSConfigUpdateRequest struct { // InterfaceName The name of the network interface to apply DNS configuration to. Must only contain letters and numbers. InterfaceName *string `json:"interface_name,omitempty" validate:"required,alphanum"` // SearchDomains New list of search domains to configure. SearchDomains *[]string `json:"search_domains,omitempty" validate:"required_without=Servers,omitempty,dive,hostname,min=1"` // Servers New list of DNS servers to configure. Servers *[]string `json:"servers,omitempty" validate:"required_without=SearchDomains,omitempty,dive,ip,min=1"` }
DNSConfigUpdateRequest defines model for DNSConfigUpdateRequest.
type DeleteTaskIDResponse ¶
type DeleteTaskIDResponse struct { Body []byte HTTPResponse *http.Response JSON404 *TaskErrorResponse JSON500 *TaskErrorResponse }
func ParseDeleteTaskIDResponse ¶
func ParseDeleteTaskIDResponse(rsp *http.Response) (*DeleteTaskIDResponse, error)
ParseDeleteTaskIDResponse parses an HTTP response from a DeleteTaskIDWithResponse call
func (DeleteTaskIDResponse) Status ¶
func (r DeleteTaskIDResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteTaskIDResponse) StatusCode ¶
func (r DeleteTaskIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DiskResponse ¶
type DiskResponse struct { // Free Free disk space in bytes. Free int `json:"free"` // Name Disk identifier, e.g., "/dev/sda1". Name string `json:"name"` // Total Total disk space in bytes. Total int `json:"total"` // Used Used disk space in bytes. Used int `json:"used"` }
DiskResponse Local disk usage information.
type DisksResponse ¶
type DisksResponse = []DiskResponse
DisksResponse List of local disk usage information.
type ErrorResponse ¶
type ErrorResponse struct { // Code The error code. Code *int `json:"code,omitempty"` // Details Additional details about the error. Details *string `json:"details,omitempty"` // Error A description of the error that occurred. Error *string `json:"error,omitempty"` }
ErrorResponse defines model for ErrorResponse.
type GetNetworkDNSByInterfaceResponse ¶
type GetNetworkDNSByInterfaceResponse struct { Body []byte HTTPResponse *http.Response JSON200 *DNSConfigResponse JSON400 *NetworkErrorResponse JSON500 *NetworkErrorResponse }
func ParseGetNetworkDNSByInterfaceResponse ¶
func ParseGetNetworkDNSByInterfaceResponse(rsp *http.Response) (*GetNetworkDNSByInterfaceResponse, error)
ParseGetNetworkDNSByInterfaceResponse parses an HTTP response from a GetNetworkDNSByInterfaceWithResponse call
func (GetNetworkDNSByInterfaceResponse) Status ¶
func (r GetNetworkDNSByInterfaceResponse) Status() string
Status returns HTTPResponse.Status
func (GetNetworkDNSByInterfaceResponse) StatusCode ¶
func (r GetNetworkDNSByInterfaceResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSystemHostnameResponse ¶
type GetSystemHostnameResponse struct { Body []byte HTTPResponse *http.Response JSON200 *HostnameResponse JSON401 *ErrorResponse JSON403 *ErrorResponse JSON500 *ErrorResponse }
func ParseGetSystemHostnameResponse ¶
func ParseGetSystemHostnameResponse(rsp *http.Response) (*GetSystemHostnameResponse, error)
ParseGetSystemHostnameResponse parses an HTTP response from a GetSystemHostnameWithResponse call
func (GetSystemHostnameResponse) Status ¶
func (r GetSystemHostnameResponse) Status() string
Status returns HTTPResponse.Status
func (GetSystemHostnameResponse) StatusCode ¶
func (r GetSystemHostnameResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSystemStatusResponse ¶
type GetSystemStatusResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SystemStatusResponse JSON401 *ErrorResponse JSON403 *ErrorResponse JSON500 *ErrorResponse }
func ParseGetSystemStatusResponse ¶
func ParseGetSystemStatusResponse(rsp *http.Response) (*GetSystemStatusResponse, error)
ParseGetSystemStatusResponse parses an HTTP response from a GetSystemStatusWithResponse call
func (GetSystemStatusResponse) Status ¶
func (r GetSystemStatusResponse) Status() string
Status returns HTTPResponse.Status
func (GetSystemStatusResponse) StatusCode ¶
func (r GetSystemStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTaskIDResponse ¶
type GetTaskIDResponse struct { Body []byte HTTPResponse *http.Response JSON200 *TaskItemResponse JSON404 *TaskErrorResponse JSON500 *TaskErrorResponse }
func ParseGetTaskIDResponse ¶
func ParseGetTaskIDResponse(rsp *http.Response) (*GetTaskIDResponse, error)
ParseGetTaskIDResponse parses an HTTP response from a GetTaskIDWithResponse call
func (GetTaskIDResponse) Status ¶
func (r GetTaskIDResponse) Status() string
Status returns HTTPResponse.Status
func (GetTaskIDResponse) StatusCode ¶
func (r GetTaskIDResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTaskResponse ¶
type GetTaskResponse struct { Body []byte HTTPResponse *http.Response JSON200 *TaskResponse JSON500 *TaskErrorResponse }
func ParseGetTaskResponse ¶
func ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error)
ParseGetTaskResponse parses an HTTP response from a GetTaskWithResponse call
func (GetTaskResponse) Status ¶
func (r GetTaskResponse) Status() string
Status returns HTTPResponse.Status
func (GetTaskResponse) StatusCode ¶
func (r GetTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetTaskStatusResponse ¶
type GetTaskStatusResponse struct { Body []byte HTTPResponse *http.Response JSON200 *TaskStatusResponse JSON500 *TaskErrorResponse }
func ParseGetTaskStatusResponse ¶
func ParseGetTaskStatusResponse(rsp *http.Response) (*GetTaskStatusResponse, error)
ParseGetTaskStatusResponse parses an HTTP response from a GetTaskStatusWithResponse call
func (GetTaskStatusResponse) Status ¶
func (r GetTaskStatusResponse) Status() string
Status returns HTTPResponse.Status
func (GetTaskStatusResponse) StatusCode ¶
func (r GetTaskStatusResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetVersionResponse ¶
type GetVersionResponse struct { Body []byte HTTPResponse *http.Response JSON400 *ErrorResponse }
func ParseGetVersionResponse ¶
func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error)
ParseGetVersionResponse parses an HTTP response from a GetVersionWithResponse call
func (GetVersionResponse) Status ¶
func (r GetVersionResponse) Status() string
Status returns HTTPResponse.Status
func (GetVersionResponse) StatusCode ¶
func (r GetVersionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HostnameResponse ¶
type HostnameResponse struct { // Hostname The system's hostname. Hostname string `json:"hostname"` }
HostnameResponse The hostname of the system.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type LoadAverageResponse ¶
type LoadAverageResponse struct { // N15min Load average for the last 15 minutes. N15min float32 `json:"15min"` // N1min Load average for the last 1 minute. N1min float32 `json:"1min"` // N5min Load average for the last 5 minutes. N5min float32 `json:"5min"` }
LoadAverageResponse The system load averages for 1, 5, and 15 minutes.
type MemoryResponse ¶
type MemoryResponse struct { // Free Free memory in bytes. Free int `json:"free"` // Total Total memory in bytes. Total int `json:"total"` // Used Used memory in bytes. Used int `json:"used"` }
MemoryResponse Memory usage information.
type NetworkErrorResponse ¶
type NetworkErrorResponse struct { // Code The error code. Code int `json:"code"` // Details Additional details about the error, specifying which component failed. Details *string `json:"details,omitempty"` // Error A description of the error that occurred. Error string `json:"error"` }
NetworkErrorResponse defines model for network.ErrorResponse.
type OSInfoResponse ¶
type OSInfoResponse struct { // Distribution The name of the Linux distribution. Distribution string `json:"distribution"` // Version The version of the Linux distribution. Version string `json:"version"` }
OSInfoResponse Operating system information.
type PingResponse ¶
type PingResponse struct { // AvgRtt Average round-trip time as a string in Go's time.Duration format. AvgRtt *string `json:"avg_rtt,omitempty"` // MaxRtt Maximum round-trip time as a string in Go's time.Duration format. MaxRtt *string `json:"max_rtt,omitempty"` // MinRtt Minimum round-trip time as a string in Go's time.Duration format. MinRtt *string `json:"min_rtt,omitempty"` // PacketLoss Percentage of packet loss. PacketLoss *float64 `json:"packet_loss,omitempty"` // PacketsReceived Number of packets received. PacketsReceived *int `json:"packets_received,omitempty"` // PacketsSent Number of packets sent. PacketsSent *int `json:"packets_sent,omitempty"` }
PingResponse defines model for PingResponse.
type PostNetworkPingJSONBody ¶
type PostNetworkPingJSONBody struct { // Address The IP address of the server to ping. Supports both IPv4 and IPv6. Address string `json:"address" validate:"required,ip"` }
PostNetworkPingJSONBody defines parameters for PostNetworkPing.
type PostNetworkPingJSONRequestBody ¶
type PostNetworkPingJSONRequestBody PostNetworkPingJSONBody
PostNetworkPingJSONRequestBody defines body for PostNetworkPing for application/json ContentType.
type PostNetworkPingResponse ¶
type PostNetworkPingResponse struct { Body []byte HTTPResponse *http.Response JSON200 *PingResponse JSON400 *NetworkErrorResponse JSON500 *NetworkErrorResponse }
func ParsePostNetworkPingResponse ¶
func ParsePostNetworkPingResponse(rsp *http.Response) (*PostNetworkPingResponse, error)
ParsePostNetworkPingResponse parses an HTTP response from a PostNetworkPingWithResponse call
func (PostNetworkPingResponse) Status ¶
func (r PostNetworkPingResponse) Status() string
Status returns HTTPResponse.Status
func (PostNetworkPingResponse) StatusCode ¶
func (r PostNetworkPingResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostTaskJSONBody ¶
type PostTaskJSONBody struct { // Body Base64-encoded representation of the body of the task item. Body []byte `json:"body"` }
PostTaskJSONBody defines parameters for PostTask.
type PostTaskJSONRequestBody ¶
type PostTaskJSONRequestBody PostTaskJSONBody
PostTaskJSONRequestBody defines body for PostTask for application/json ContentType.
type PostTaskResponse ¶
type PostTaskResponse struct { Body []byte HTTPResponse *http.Response JSON201 *TaskItemIdResponse JSON400 *TaskErrorResponse JSON500 *TaskErrorResponse }
func ParsePostTaskResponse ¶
func ParsePostTaskResponse(rsp *http.Response) (*PostTaskResponse, error)
ParsePostTaskResponse parses an HTTP response from a PostTaskWithResponse call
func (PostTaskResponse) Status ¶
func (r PostTaskResponse) Status() string
Status returns HTTPResponse.Status
func (PostTaskResponse) StatusCode ¶
func (r PostTaskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PutNetworkDNSJSONRequestBody ¶
type PutNetworkDNSJSONRequestBody = DNSConfigUpdateRequest
PutNetworkDNSJSONRequestBody defines body for PutNetworkDNS for application/json ContentType.
type PutNetworkDNSResponse ¶
type PutNetworkDNSResponse struct { Body []byte HTTPResponse *http.Response JSON400 *NetworkErrorResponse JSON500 *NetworkErrorResponse }
func ParsePutNetworkDNSResponse ¶
func ParsePutNetworkDNSResponse(rsp *http.Response) (*PutNetworkDNSResponse, error)
ParsePutNetworkDNSResponse parses an HTTP response from a PutNetworkDNSWithResponse call
func (PutNetworkDNSResponse) Status ¶
func (r PutNetworkDNSResponse) Status() string
Status returns HTTPResponse.Status
func (PutNetworkDNSResponse) StatusCode ¶
func (r PutNetworkDNSResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SystemStatusResponse ¶
type SystemStatusResponse struct { // Disks List of local disk usage information. Disks DisksResponse `json:"disks"` // Hostname The hostname of the system. Hostname string `json:"hostname"` // LoadAverage The system load averages for 1, 5, and 15 minutes. LoadAverage LoadAverageResponse `json:"load_average"` // Memory Memory usage information. Memory MemoryResponse `json:"memory"` // OsInfo Operating system information. OsInfo OSInfoResponse `json:"os_info"` // Uptime The uptime of the system. Uptime string `json:"uptime"` }
SystemStatusResponse defines model for SystemStatusResponse.
type TaskErrorResponse ¶
type TaskErrorResponse struct { // Code The error code. Code int `json:"code"` // Details Additional details about the error, specifying which component failed. Details *string `json:"details,omitempty"` // Error A description of the error that occurred. Error string `json:"error"` }
TaskErrorResponse defines model for task.ErrorResponse.
type TaskItemIdResponse ¶
type TaskItemIdResponse struct { // Id Unique identifier of the task item. Id *uint64 `json:"id,omitempty"` }
TaskItemIdResponse defines model for TaskItemIdResponse.
type TaskItemResponse ¶
type TaskItemResponse struct { // Body Base64-encoded representation of the body of the task item. Body *[]byte `json:"body,omitempty"` // Created Creation timestamp of the task item. Created *time.Time `json:"created,omitempty"` // Id Unique identifier of the task item. Id *uint64 `json:"id,omitempty"` }
TaskItemResponse defines model for TaskItemResponse.
type TaskResponse ¶
type TaskResponse struct { Items *[]TaskItemResponse `json:"items,omitempty"` // TotalItems The total number of task items. TotalItems *int `json:"total_items,omitempty"` }
TaskResponse defines model for TaskResponse.
type TaskStatusResponse ¶
type TaskStatusResponse struct { // TotalItems The total number of task items. TotalItems *int `json:"total_items,omitempty"` }
TaskStatusResponse defines model for TaskStatusResponse.