Documentation
¶
Overview ¶
Package envd provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewGetEnvsRequest(server string) (*http.Request, error)
- func NewGetFilesRequest(server string, params *GetFilesParams) (*http.Request, error)
- func NewGetHealthRequest(server string) (*http.Request, error)
- func NewGetMetricsRequest(server string) (*http.Request, error)
- func NewPostCollapseRequest(server string) (*http.Request, error)
- func NewPostFilesComposeRequest(server string, body PostFilesComposeJSONRequestBody) (*http.Request, error)
- func NewPostFilesComposeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostFilesRequestWithBody(server string, params *PostFilesParams, contentType string, body io.Reader) (*http.Request, error)
- func NewPostFreezeRequest(server string) (*http.Request, error)
- func NewPostFsfreezeRequest(server string) (*http.Request, error)
- func NewPostFsthawRequest(server string) (*http.Request, error)
- func NewPostInitRequest(server string, body PostInitJSONRequestBody) (*http.Request, error)
- func NewPostInitRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewPostUnfreezeRequest(server string) (*http.Request, error)
- type Client
- func (c *Client) GetEnvs(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetFiles(ctx context.Context, params *GetFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetMetrics(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostCollapse(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostFilesCompose(ctx context.Context, body PostFilesComposeJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostFilesComposeWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostFilesWithBody(ctx context.Context, params *PostFilesParams, contentType string, ...) (*http.Response, error)
- func (c *Client) PostFreeze(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostFsfreeze(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostFsthaw(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) PostInit(ctx context.Context, body PostInitJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) PostInitWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) PostUnfreeze(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetEnvsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnvsResponse, error)
- func (c *ClientWithResponses) GetFilesWithResponse(ctx context.Context, params *GetFilesParams, reqEditors ...RequestEditorFn) (*GetFilesResponse, error)
- func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
- func (c *ClientWithResponses) GetMetricsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetricsResponse, error)
- func (c *ClientWithResponses) PostCollapseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostCollapseResponse, error)
- func (c *ClientWithResponses) PostFilesComposeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostFilesComposeResponse, error)
- func (c *ClientWithResponses) PostFilesComposeWithResponse(ctx context.Context, body PostFilesComposeJSONRequestBody, ...) (*PostFilesComposeResponse, error)
- func (c *ClientWithResponses) PostFilesWithBodyWithResponse(ctx context.Context, params *PostFilesParams, contentType string, ...) (*PostFilesResponse, error)
- func (c *ClientWithResponses) PostFreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFreezeResponse, error)
- func (c *ClientWithResponses) PostFsfreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFsfreezeResponse, error)
- func (c *ClientWithResponses) PostFsthawWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFsthawResponse, error)
- func (c *ClientWithResponses) PostInitWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostInitResponse, error)
- func (c *ClientWithResponses) PostInitWithResponse(ctx context.Context, body PostInitJSONRequestBody, ...) (*PostInitResponse, error)
- func (c *ClientWithResponses) PostUnfreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostUnfreezeResponse, error)
- type ClientWithResponsesInterface
- type CollapseResult
- type ComposeRequest
- type EntryInfo
- type EntryInfoType
- type EnvVars
- type Error
- type FileNotFound
- type FilePath
- type GetEnvsResponse
- type GetFilesParams
- type GetFilesResponse
- func (r GetFilesResponse) ContentType() string
- func (r GetFilesResponse) GetBody() []byte
- func (r GetFilesResponse) GetJSON400() *InvalidPath
- func (r GetFilesResponse) GetJSON401() *InvalidUser
- func (r GetFilesResponse) GetJSON404() *FileNotFound
- func (r GetFilesResponse) GetJSON406() *NotAcceptable
- func (r GetFilesResponse) GetJSON500() *InternalServerError
- func (r GetFilesResponse) Status() string
- func (r GetFilesResponse) StatusCode() int
- type GetHealthResponse
- type GetMetricsResponse
- type HttpRequestDoer
- type InternalServerError
- type InvalidPath
- type InvalidUser
- type Metrics
- type NotAcceptable
- type NotEnoughDiskSpace
- type PostCollapseResponse
- func (r PostCollapseResponse) ContentType() string
- func (r PostCollapseResponse) GetBody() []byte
- func (r PostCollapseResponse) GetJSON200() *CollapseResult
- func (r PostCollapseResponse) GetJSON500() *InternalServerError
- func (r PostCollapseResponse) Status() string
- func (r PostCollapseResponse) StatusCode() int
- type PostFilesComposeJSONRequestBody
- type PostFilesComposeResponse
- func (r PostFilesComposeResponse) ContentType() string
- func (r PostFilesComposeResponse) GetBody() []byte
- func (r PostFilesComposeResponse) GetJSON200() *EntryInfo
- func (r PostFilesComposeResponse) GetJSON400() *InvalidPath
- func (r PostFilesComposeResponse) GetJSON401() *InvalidUser
- func (r PostFilesComposeResponse) GetJSON404() *FileNotFound
- func (r PostFilesComposeResponse) GetJSON500() *InternalServerError
- func (r PostFilesComposeResponse) GetJSON507() *NotEnoughDiskSpace
- func (r PostFilesComposeResponse) Status() string
- func (r PostFilesComposeResponse) StatusCode() int
- type PostFilesMultipartBody
- type PostFilesMultipartRequestBody
- type PostFilesParams
- type PostFilesResponse
- func (r PostFilesResponse) ContentType() string
- func (r PostFilesResponse) GetBody() []byte
- func (r PostFilesResponse) GetJSON200() *UploadSuccess
- func (r PostFilesResponse) GetJSON400() *InvalidPath
- func (r PostFilesResponse) GetJSON401() *InvalidUser
- func (r PostFilesResponse) GetJSON500() *InternalServerError
- func (r PostFilesResponse) GetJSON507() *NotEnoughDiskSpace
- func (r PostFilesResponse) Status() string
- func (r PostFilesResponse) StatusCode() int
- type PostFreezeResponse
- type PostFsfreezeResponse
- type PostFsthawResponse
- type PostInitJSONBody
- type PostInitJSONRequestBody
- type PostInitResponse
- type PostUnfreezeResponse
- type RequestEditorFn
- type SecureToken
- type Signature
- type SignatureExpiration
- type UploadSuccess
- type User
- type VolumeMount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetEnvsRequest ¶
NewGetEnvsRequest constructs an http.Request for the GetEnvs method
func NewGetFilesRequest ¶
func NewGetFilesRequest(server string, params *GetFilesParams) (*http.Request, error)
NewGetFilesRequest constructs an http.Request for the GetFiles method
func NewGetHealthRequest ¶
NewGetHealthRequest constructs an http.Request for the GetHealth method
func NewGetMetricsRequest ¶
NewGetMetricsRequest constructs an http.Request for the GetMetrics method
func NewPostCollapseRequest ¶
NewPostCollapseRequest constructs an http.Request for the PostCollapse method
func NewPostFilesComposeRequest ¶
func NewPostFilesComposeRequest(server string, body PostFilesComposeJSONRequestBody) (*http.Request, error)
NewPostFilesComposeRequest calls the generic PostFilesCompose builder with application/json body
func NewPostFilesComposeRequestWithBody ¶
func NewPostFilesComposeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewPostFilesComposeRequestWithBody constructs an http.Request for the PostFilesCompose method, with any body, and a specified content type
func NewPostFilesRequestWithBody ¶
func NewPostFilesRequestWithBody(server string, params *PostFilesParams, contentType string, body io.Reader) (*http.Request, error)
NewPostFilesRequestWithBody constructs an http.Request for the PostFiles method, with any body, and a specified content type
func NewPostFreezeRequest ¶
NewPostFreezeRequest constructs an http.Request for the PostFreeze method
func NewPostFsfreezeRequest ¶
NewPostFsfreezeRequest constructs an http.Request for the PostFsfreeze method
func NewPostFsthawRequest ¶
NewPostFsthawRequest constructs an http.Request for the PostFsthaw method
func NewPostInitRequest ¶
func NewPostInitRequest(server string, body PostInitJSONRequestBody) (*http.Request, error)
NewPostInitRequest calls the generic PostInit 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) GetEnvs ¶
func (c *Client) GetEnvs(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetEnvs Environment variables
Corresponds with GET /envs (the `GetEnvs` operationId).
func (*Client) GetFiles ¶
func (c *Client) GetFiles(ctx context.Context, params *GetFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetFiles Download a file
Corresponds with GET /files (the `GetFiles` operationId).
func (*Client) GetHealth ¶
func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetHealth Check the health of the service
Corresponds with GET /health (the `GetHealth` operationId).
func (*Client) GetMetrics ¶
func (c *Client) GetMetrics(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
GetMetrics Service stats
Corresponds with GET /metrics (the `GetMetrics` operationId).
func (*Client) PostCollapse ¶
func (c *Client) PostCollapse(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
PostCollapse Collapse envd's own anonymous heap into 2 MiB transparent hugepages before pause, so on resume envd touches fewer distinct guest-physical frames (each a cold fault). Best-effort.
Corresponds with POST /collapse (the `PostCollapse` operationId).
func (*Client) PostFilesCompose ¶
func (c *Client) PostFilesCompose(ctx context.Context, body PostFilesComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostFilesCompose Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
Takes a body of the `application/json` content type.
Corresponds with POST /files/compose (the `PostFilesCompose` operationId).
func (*Client) PostFilesComposeWithBody ¶
func (c *Client) PostFilesComposeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostFilesComposeWithBody Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
Takes any type of body and a specified content type.
Corresponds with POST /files/compose (the `PostFilesCompose` operationId).
func (*Client) PostFilesWithBody ¶
func (c *Client) PostFilesWithBody(ctx context.Context, params *PostFilesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostFilesWithBody Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
Any request header of the form `X-Metadata-<key>: <value>` is persisted as a user-defined extended attribute on the uploaded file. The `X-Metadata-` prefix is stripped and the remaining header name is lowercased to form the metadata key; the resulting map is returned on `EntryInfo` lookups (e.g. `Stat`, `ListDir`).
Each upload replaces the file's metadata with the keys provided in that request: keys previously stored but absent from the new request are removed, and an upload that sends no `X-Metadata-*` header clears all existing metadata.
Both keys and values must be printable US-ASCII (bytes `0x20`-`0x7E`) and are rejected with HTTP 400 otherwise. Each key is capped at 246 bytes (the Linux VFS xattr-name limit minus the namespace prefix), and the combined size of all metadata on a file (keys plus values, with the namespace prefix counted per key) is capped at 4096 bytes to stay within the filesystem's per-inode xattr budget. Multiple files in a single multipart upload receive the same metadata. If the same `X-Metadata-<key>` header is sent more than once, only the first value is used.
Takes any type of body and a specified content type.
Corresponds with POST /files (the `PostFiles` operationId).
func (*Client) PostFreeze ¶
func (c *Client) PostFreeze(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
PostFreeze Freeze user/pty cgroups before pause. Written directly by envd to avoid Process.Start / shell overhead under load.
Corresponds with POST /freeze (the `PostFreeze` operationId).
func (*Client) PostFsfreeze ¶
func (c *Client) PostFsfreeze(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
PostFsfreeze Freeze the guest rootfs (FIFREEZE) before a filesystem-only pause so it is flushed to a consistent on-disk state, closing the sync->pause race. Idempotent. On a successful filesystem-only pause the VM is rebooted, so no thaw is needed; the orchestrator thaws only on the pause-failure path.
Corresponds with POST /fsfreeze (the `PostFsfreeze` operationId).
func (*Client) PostFsthaw ¶
func (c *Client) PostFsthaw(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
PostFsthaw Thaw the guest rootfs (FITHAW). Intended ONLY for the orchestrator's pause-failure rollback path, so a frozen filesystem cannot leave the live VM deadlocked. Idempotent.
Corresponds with POST /fsthaw (the `PostFsthaw` operationId).
func (*Client) PostInit ¶
func (c *Client) PostInit(ctx context.Context, body PostInitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
PostInit Set initial vars, ensure the time and metadata is synced with the host
Takes a body of the `application/json` content type.
Corresponds with POST /init (the `PostInit` operationId).
func (*Client) PostInitWithBody ¶
func (c *Client) PostInitWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostInitWithBody Set initial vars, ensure the time and metadata is synced with the host
Takes any type of body and a specified content type.
Corresponds with POST /init (the `PostInit` operationId).
func (*Client) PostUnfreeze ¶
func (c *Client) PostUnfreeze(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
PostUnfreeze Unfreeze user/pty cgroups. Intended ONLY for the orchestrator's pause-failure rollback path; the normal resume thaw happens via /init's deferred unfreeze, not here.
Corresponds with POST /unfreeze (the `PostUnfreeze` operationId).
type ClientInterface ¶
type ClientInterface interface {
// PostCollapse Collapse envd's own anonymous heap into 2 MiB transparent hugepages before pause, so on resume envd touches fewer distinct guest-physical frames (each a cold fault). Best-effort.
//
// Corresponds with POST /collapse (the `PostCollapse` operationId).
PostCollapse(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEnvs Environment variables
//
// Corresponds with GET /envs (the `GetEnvs` operationId).
GetEnvs(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetFiles Download a file
//
// Corresponds with GET /files (the `GetFiles` operationId).
GetFiles(ctx context.Context, params *GetFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostFilesWithBody Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
//
// Any request header of the form `X-Metadata-<key>: <value>` is persisted
// as a user-defined extended attribute on the uploaded file. The
// `X-Metadata-` prefix is stripped and the remaining header name is
// lowercased to form the metadata key; the resulting map is returned on
// `EntryInfo` lookups (e.g. `Stat`, `ListDir`).
//
// Each upload replaces the file's metadata with the keys provided in
// that request: keys previously stored but absent from the new request
// are removed, and an upload that sends no `X-Metadata-*` header clears
// all existing metadata.
//
// Both keys and values must be printable US-ASCII (bytes `0x20`-`0x7E`)
// and are rejected with HTTP 400 otherwise. Each key is capped at 246
// bytes (the Linux VFS xattr-name limit minus the namespace prefix), and
// the combined size of all metadata on a file (keys plus values, with the
// namespace prefix counted per key) is capped at 4096 bytes to stay within
// the filesystem's per-inode xattr budget. Multiple files in a single
// multipart upload receive the same metadata. If the same
// `X-Metadata-<key>` header is sent more than once, only the first
// value is used.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /files (the `PostFiles` operationId).
PostFilesWithBody(ctx context.Context, params *PostFilesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostFilesComposeWithBody Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /files/compose (the `PostFilesCompose` operationId).
PostFilesComposeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostFilesCompose Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /files/compose (the `PostFilesCompose` operationId).
PostFilesCompose(ctx context.Context, body PostFilesComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostFreeze Freeze user/pty cgroups before pause. Written directly by envd to avoid Process.Start / shell overhead under load.
//
// Corresponds with POST /freeze (the `PostFreeze` operationId).
PostFreeze(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostFsfreeze Freeze the guest rootfs (FIFREEZE) before a filesystem-only pause so it is flushed to a consistent on-disk state, closing the sync->pause race. Idempotent. On a successful filesystem-only pause the VM is rebooted, so no thaw is needed; the orchestrator thaws only on the pause-failure path.
//
// Corresponds with POST /fsfreeze (the `PostFsfreeze` operationId).
PostFsfreeze(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostFsthaw Thaw the guest rootfs (FITHAW). Intended ONLY for the orchestrator's pause-failure rollback path, so a frozen filesystem cannot leave the live VM deadlocked. Idempotent.
//
// Corresponds with POST /fsthaw (the `PostFsthaw` operationId).
PostFsthaw(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetHealth Check the health of the service
//
// Corresponds with GET /health (the `GetHealth` operationId).
GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostInitWithBody Set initial vars, ensure the time and metadata is synced with the host
//
// Takes any type of body and a specified content type.
//
// Corresponds with POST /init (the `PostInit` operationId).
PostInitWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostInit Set initial vars, ensure the time and metadata is synced with the host
//
// Takes a body of the `application/json` content type.
//
// Corresponds with POST /init (the `PostInit` operationId).
PostInit(ctx context.Context, body PostInitJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetMetrics Service stats
//
// Corresponds with GET /metrics (the `GetMetrics` operationId).
GetMetrics(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostUnfreeze Unfreeze user/pty cgroups. Intended ONLY for the orchestrator's pause-failure rollback path; the normal resume thaw happens via /init's deferred unfreeze, not here.
//
// Corresponds with POST /unfreeze (the `PostUnfreeze` operationId).
PostUnfreeze(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) GetEnvsWithResponse ¶
func (c *ClientWithResponses) GetEnvsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnvsResponse, error)
GetEnvsWithResponse Environment variables
Returns a wrapper object for the known response body format(s).
Corresponds with GET /envs (the `GetEnvs` operationId).
func (*ClientWithResponses) GetFilesWithResponse ¶
func (c *ClientWithResponses) GetFilesWithResponse(ctx context.Context, params *GetFilesParams, reqEditors ...RequestEditorFn) (*GetFilesResponse, error)
GetFilesWithResponse Download a file
Returns a wrapper object for the known response body format(s).
Corresponds with GET /files (the `GetFiles` operationId).
func (*ClientWithResponses) GetHealthWithResponse ¶
func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
GetHealthWithResponse Check the health of the service
Returns a wrapper object for the known response body format(s).
Corresponds with GET /health (the `GetHealth` operationId).
func (*ClientWithResponses) GetMetricsWithResponse ¶
func (c *ClientWithResponses) GetMetricsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetricsResponse, error)
GetMetricsWithResponse Service stats
Returns a wrapper object for the known response body format(s).
Corresponds with GET /metrics (the `GetMetrics` operationId).
func (*ClientWithResponses) PostCollapseWithResponse ¶
func (c *ClientWithResponses) PostCollapseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostCollapseResponse, error)
PostCollapseWithResponse Collapse envd's own anonymous heap into 2 MiB transparent hugepages before pause, so on resume envd touches fewer distinct guest-physical frames (each a cold fault). Best-effort.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /collapse (the `PostCollapse` operationId).
func (*ClientWithResponses) PostFilesComposeWithBodyWithResponse ¶
func (c *ClientWithResponses) PostFilesComposeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFilesComposeResponse, error)
PostFilesComposeWithBodyWithResponse Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /files/compose (the `PostFilesCompose` operationId).
func (*ClientWithResponses) PostFilesComposeWithResponse ¶
func (c *ClientWithResponses) PostFilesComposeWithResponse(ctx context.Context, body PostFilesComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostFilesComposeResponse, error)
PostFilesComposeWithResponse Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /files/compose (the `PostFilesCompose` operationId).
func (*ClientWithResponses) PostFilesWithBodyWithResponse ¶
func (c *ClientWithResponses) PostFilesWithBodyWithResponse(ctx context.Context, params *PostFilesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFilesResponse, error)
PostFilesWithBodyWithResponse Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
Any request header of the form `X-Metadata-<key>: <value>` is persisted as a user-defined extended attribute on the uploaded file. The `X-Metadata-` prefix is stripped and the remaining header name is lowercased to form the metadata key; the resulting map is returned on `EntryInfo` lookups (e.g. `Stat`, `ListDir`).
Each upload replaces the file's metadata with the keys provided in that request: keys previously stored but absent from the new request are removed, and an upload that sends no `X-Metadata-*` header clears all existing metadata.
Both keys and values must be printable US-ASCII (bytes `0x20`-`0x7E`) and are rejected with HTTP 400 otherwise. Each key is capped at 246 bytes (the Linux VFS xattr-name limit minus the namespace prefix), and the combined size of all metadata on a file (keys plus values, with the namespace prefix counted per key) is capped at 4096 bytes to stay within the filesystem's per-inode xattr budget. Multiple files in a single multipart upload receive the same metadata. If the same `X-Metadata-<key>` header is sent more than once, only the first value is used.
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /files (the `PostFiles` operationId).
func (*ClientWithResponses) PostFreezeWithResponse ¶
func (c *ClientWithResponses) PostFreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFreezeResponse, error)
PostFreezeWithResponse Freeze user/pty cgroups before pause. Written directly by envd to avoid Process.Start / shell overhead under load.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /freeze (the `PostFreeze` operationId).
func (*ClientWithResponses) PostFsfreezeWithResponse ¶
func (c *ClientWithResponses) PostFsfreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFsfreezeResponse, error)
PostFsfreezeWithResponse Freeze the guest rootfs (FIFREEZE) before a filesystem-only pause so it is flushed to a consistent on-disk state, closing the sync->pause race. Idempotent. On a successful filesystem-only pause the VM is rebooted, so no thaw is needed; the orchestrator thaws only on the pause-failure path.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /fsfreeze (the `PostFsfreeze` operationId).
func (*ClientWithResponses) PostFsthawWithResponse ¶
func (c *ClientWithResponses) PostFsthawWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFsthawResponse, error)
PostFsthawWithResponse Thaw the guest rootfs (FITHAW). Intended ONLY for the orchestrator's pause-failure rollback path, so a frozen filesystem cannot leave the live VM deadlocked. Idempotent.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /fsthaw (the `PostFsthaw` operationId).
func (*ClientWithResponses) PostInitWithBodyWithResponse ¶
func (c *ClientWithResponses) PostInitWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInitResponse, error)
PostInitWithBodyWithResponse Set initial vars, ensure the time and metadata is synced with the host
Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /init (the `PostInit` operationId).
func (*ClientWithResponses) PostInitWithResponse ¶
func (c *ClientWithResponses) PostInitWithResponse(ctx context.Context, body PostInitJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInitResponse, error)
PostInitWithResponse Set initial vars, ensure the time and metadata is synced with the host
Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
Corresponds with POST /init (the `PostInit` operationId).
func (*ClientWithResponses) PostUnfreezeWithResponse ¶
func (c *ClientWithResponses) PostUnfreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostUnfreezeResponse, error)
PostUnfreezeWithResponse Unfreeze user/pty cgroups. Intended ONLY for the orchestrator's pause-failure rollback path; the normal resume thaw happens via /init's deferred unfreeze, not here.
Returns a wrapper object for the known response body format(s).
Corresponds with POST /unfreeze (the `PostUnfreeze` operationId).
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostCollapseWithResponse Collapse envd's own anonymous heap into 2 MiB transparent hugepages before pause, so on resume envd touches fewer distinct guest-physical frames (each a cold fault). Best-effort.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /collapse (the `PostCollapse` operationId).
PostCollapseWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostCollapseResponse, error)
// GetEnvsWithResponse Environment variables
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /envs (the `GetEnvs` operationId).
GetEnvsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetEnvsResponse, error)
// GetFilesWithResponse Download a file
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /files (the `GetFiles` operationId).
GetFilesWithResponse(ctx context.Context, params *GetFilesParams, reqEditors ...RequestEditorFn) (*GetFilesResponse, error)
// PostFilesWithBodyWithResponse Upload a file and ensure the parent directories exist. If the file exists, it will be overwritten.
//
// Any request header of the form `X-Metadata-<key>: <value>` is persisted
// as a user-defined extended attribute on the uploaded file. The
// `X-Metadata-` prefix is stripped and the remaining header name is
// lowercased to form the metadata key; the resulting map is returned on
// `EntryInfo` lookups (e.g. `Stat`, `ListDir`).
//
// Each upload replaces the file's metadata with the keys provided in
// that request: keys previously stored but absent from the new request
// are removed, and an upload that sends no `X-Metadata-*` header clears
// all existing metadata.
//
// Both keys and values must be printable US-ASCII (bytes `0x20`-`0x7E`)
// and are rejected with HTTP 400 otherwise. Each key is capped at 246
// bytes (the Linux VFS xattr-name limit minus the namespace prefix), and
// the combined size of all metadata on a file (keys plus values, with the
// namespace prefix counted per key) is capped at 4096 bytes to stay within
// the filesystem's per-inode xattr budget. Multiple files in a single
// multipart upload receive the same metadata. If the same
// `X-Metadata-<key>` header is sent more than once, only the first
// value is used.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /files (the `PostFiles` operationId).
PostFilesWithBodyWithResponse(ctx context.Context, params *PostFilesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFilesResponse, error)
// PostFilesComposeWithBodyWithResponse Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /files/compose (the `PostFilesCompose` operationId).
PostFilesComposeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostFilesComposeResponse, error)
// PostFilesComposeWithResponse Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /files/compose (the `PostFilesCompose` operationId).
PostFilesComposeWithResponse(ctx context.Context, body PostFilesComposeJSONRequestBody, reqEditors ...RequestEditorFn) (*PostFilesComposeResponse, error)
// PostFreezeWithResponse Freeze user/pty cgroups before pause. Written directly by envd to avoid Process.Start / shell overhead under load.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /freeze (the `PostFreeze` operationId).
PostFreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFreezeResponse, error)
// PostFsfreezeWithResponse Freeze the guest rootfs (FIFREEZE) before a filesystem-only pause so it is flushed to a consistent on-disk state, closing the sync->pause race. Idempotent. On a successful filesystem-only pause the VM is rebooted, so no thaw is needed; the orchestrator thaws only on the pause-failure path.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /fsfreeze (the `PostFsfreeze` operationId).
PostFsfreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFsfreezeResponse, error)
// PostFsthawWithResponse Thaw the guest rootfs (FITHAW). Intended ONLY for the orchestrator's pause-failure rollback path, so a frozen filesystem cannot leave the live VM deadlocked. Idempotent.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /fsthaw (the `PostFsthaw` operationId).
PostFsthawWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostFsthawResponse, error)
// GetHealthWithResponse Check the health of the service
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /health (the `GetHealth` operationId).
GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)
// PostInitWithBodyWithResponse Set initial vars, ensure the time and metadata is synced with the host
//
// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /init (the `PostInit` operationId).
PostInitWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInitResponse, error)
// PostInitWithResponse Set initial vars, ensure the time and metadata is synced with the host
//
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /init (the `PostInit` operationId).
PostInitWithResponse(ctx context.Context, body PostInitJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInitResponse, error)
// GetMetricsWithResponse Service stats
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with GET /metrics (the `GetMetrics` operationId).
GetMetricsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetricsResponse, error)
// PostUnfreezeWithResponse Unfreeze user/pty cgroups. Intended ONLY for the orchestrator's pause-failure rollback path; the normal resume thaw happens via /init's deferred unfreeze, not here.
//
// Returns a wrapper object for the known response body format(s).
//
// Corresponds with POST /unfreeze (the `PostUnfreeze` operationId).
PostUnfreezeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*PostUnfreezeResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CollapseResult ¶
type CollapseResult struct {
// AlreadyHuge Chunks MADV_COLLAPSE accepted but were already hugepages (no work)
AlreadyHuge *int `json:"alreadyHuge,omitempty"`
// Chunks 2 MiB chunks attempted
Chunks *int `json:"chunks,omitempty"`
// Collapsed Chunks whose base pages were actually migrated into a new hugepage (real work)
Collapsed *int `json:"collapsed,omitempty"`
// ElapsedMs Wall-clock time spent collapsing, in milliseconds
ElapsedMs *int64 `json:"elapsedMs,omitempty"`
// Regions Anonymous read-write regions scanned
Regions *int `json:"regions,omitempty"`
// Skipped Chunks that could not be collapsed (empty or ineligible)
Skipped *int `json:"skipped,omitempty"`
}
CollapseResult Per-call statistics from a heap collapse
type ComposeRequest ¶
type ComposeRequest struct {
// Destination Destination file path for the composed file
Destination string `json:"destination"`
// SourcePaths Ordered list of source file paths to concatenate
SourcePaths []string `json:"source_paths"`
// Username User for setting ownership and resolving relative paths
Username *string `json:"username,omitempty"`
}
ComposeRequest defines model for ComposeRequest.
type EntryInfo ¶
type EntryInfo struct {
// Metadata User-defined metadata stored as extended attributes on the file.
Metadata *map[string]string `json:"metadata,omitempty"`
// Name Name of the file
Name string `json:"name"`
// Path Path to the file
Path string `json:"path"`
// Type Type of the file
Type EntryInfoType `json:"type"`
}
EntryInfo defines model for EntryInfo.
type EntryInfoType ¶
type EntryInfoType string
EntryInfoType Type of the file
const (
File EntryInfoType = "file"
)
Defines values for EntryInfoType.
func (EntryInfoType) Valid ¶
func (e EntryInfoType) Valid() bool
Valid indicates whether the value is a known member of the EntryInfoType enum.
type Error ¶
type Error struct {
// Code Error code
Code int `json:"code"`
// Message Error message
Message string `json:"message"`
}
Error defines model for Error.
type GetEnvsResponse ¶
type GetEnvsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *EnvVars
}
func ParseGetEnvsResponse ¶
func ParseGetEnvsResponse(rsp *http.Response) (*GetEnvsResponse, error)
ParseGetEnvsResponse parses an HTTP response from a GetEnvsWithResponse call
func (GetEnvsResponse) ContentType ¶
func (r GetEnvsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetEnvsResponse) GetBody ¶
func (r GetEnvsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetEnvsResponse) GetJSON200 ¶
func (r GetEnvsResponse) GetJSON200() *EnvVars
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetEnvsResponse) Status ¶
func (r GetEnvsResponse) Status() string
Status returns HTTPResponse.Status
func (GetEnvsResponse) StatusCode ¶
func (r GetEnvsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetFilesParams ¶
type GetFilesParams struct {
// Path Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt).
Path *FilePath `form:"path,omitempty" json:"path,omitempty"`
// Username User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user.
Username *User `form:"username,omitempty" json:"username,omitempty"`
// Signature Signature used for file access permission verification.
Signature *Signature `form:"signature,omitempty" json:"signature,omitempty"`
// SignatureExpiration Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter.
SignatureExpiration *SignatureExpiration `form:"signature_expiration,omitempty" json:"signature_expiration,omitempty"`
}
GetFilesParams defines parameters for GetFiles.
type GetFilesResponse ¶
type GetFilesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *InvalidPath
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *InvalidUser
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *FileNotFound
// JSON406 the response for an HTTP 406 `application/json` response
JSON406 *NotAcceptable
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParseGetFilesResponse ¶
func ParseGetFilesResponse(rsp *http.Response) (*GetFilesResponse, error)
ParseGetFilesResponse parses an HTTP response from a GetFilesWithResponse call
func (GetFilesResponse) ContentType ¶
func (r GetFilesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetFilesResponse) GetBody ¶
func (r GetFilesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetFilesResponse) GetJSON400 ¶
func (r GetFilesResponse) GetJSON400() *InvalidPath
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetFilesResponse) GetJSON401 ¶
func (r GetFilesResponse) GetJSON401() *InvalidUser
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetFilesResponse) GetJSON404 ¶
func (r GetFilesResponse) GetJSON404() *FileNotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetFilesResponse) GetJSON406 ¶
func (r GetFilesResponse) GetJSON406() *NotAcceptable
GetJSON406 returns the response for an HTTP 406 `application/json` response
func (GetFilesResponse) GetJSON500 ¶
func (r GetFilesResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (GetFilesResponse) Status ¶
func (r GetFilesResponse) Status() string
Status returns HTTPResponse.Status
func (GetFilesResponse) StatusCode ¶
func (r GetFilesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetHealthResponse ¶
func ParseGetHealthResponse ¶
func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)
ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call
func (GetHealthResponse) ContentType ¶
func (r GetHealthResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetHealthResponse) GetBody ¶
func (r GetHealthResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetHealthResponse) Status ¶
func (r GetHealthResponse) Status() string
Status returns HTTPResponse.Status
func (GetHealthResponse) StatusCode ¶
func (r GetHealthResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetMetricsResponse ¶
type GetMetricsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *Metrics
}
func ParseGetMetricsResponse ¶
func ParseGetMetricsResponse(rsp *http.Response) (*GetMetricsResponse, error)
ParseGetMetricsResponse parses an HTTP response from a GetMetricsWithResponse call
func (GetMetricsResponse) ContentType ¶
func (r GetMetricsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetMetricsResponse) GetBody ¶
func (r GetMetricsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetMetricsResponse) GetJSON200 ¶
func (r GetMetricsResponse) GetJSON200() *Metrics
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetMetricsResponse) Status ¶
func (r GetMetricsResponse) Status() string
Status returns HTTPResponse.Status
func (GetMetricsResponse) StatusCode ¶
func (r GetMetricsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InternalServerError ¶
type InternalServerError = Error
InternalServerError defines model for InternalServerError.
type Metrics ¶
type Metrics struct {
// CpuCount Number of CPU cores
CpuCount *int `json:"cpu_count,omitempty"`
// CpuUsedPct CPU usage percentage
CpuUsedPct *float32 `json:"cpu_used_pct,omitempty"`
// DiskTotal Total disk space in bytes
DiskTotal *int `json:"disk_total,omitempty"`
// DiskUsed Used disk space in bytes
DiskUsed *int `json:"disk_used,omitempty"`
// MemCache Cached memory (page cache) in bytes
MemCache *int `json:"mem_cache,omitempty"`
// MemTotal Total virtual memory in bytes
MemTotal *int `json:"mem_total,omitempty"`
// MemUsed Used virtual memory in bytes
MemUsed *int `json:"mem_used,omitempty"`
// Ts Unix timestamp in UTC for current sandbox time
Ts *int64 `json:"ts,omitempty"`
}
Metrics Resource usage metrics
type NotEnoughDiskSpace ¶
type NotEnoughDiskSpace = Error
NotEnoughDiskSpace defines model for NotEnoughDiskSpace.
type PostCollapseResponse ¶
type PostCollapseResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *CollapseResult
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParsePostCollapseResponse ¶
func ParsePostCollapseResponse(rsp *http.Response) (*PostCollapseResponse, error)
ParsePostCollapseResponse parses an HTTP response from a PostCollapseWithResponse call
func (PostCollapseResponse) ContentType ¶
func (r PostCollapseResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostCollapseResponse) GetBody ¶
func (r PostCollapseResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostCollapseResponse) GetJSON200 ¶
func (r PostCollapseResponse) GetJSON200() *CollapseResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PostCollapseResponse) GetJSON500 ¶
func (r PostCollapseResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostCollapseResponse) Status ¶
func (r PostCollapseResponse) Status() string
Status returns HTTPResponse.Status
func (PostCollapseResponse) StatusCode ¶
func (r PostCollapseResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostFilesComposeJSONRequestBody ¶
type PostFilesComposeJSONRequestBody = ComposeRequest
PostFilesComposeJSONRequestBody defines body for PostFilesCompose for application/json ContentType.
type PostFilesComposeResponse ¶
type PostFilesComposeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *EntryInfo
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *InvalidPath
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *InvalidUser
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *FileNotFound
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSON507 the response for an HTTP 507 `application/json` response
JSON507 *NotEnoughDiskSpace
}
func ParsePostFilesComposeResponse ¶
func ParsePostFilesComposeResponse(rsp *http.Response) (*PostFilesComposeResponse, error)
ParsePostFilesComposeResponse parses an HTTP response from a PostFilesComposeWithResponse call
func (PostFilesComposeResponse) ContentType ¶
func (r PostFilesComposeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostFilesComposeResponse) GetBody ¶
func (r PostFilesComposeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostFilesComposeResponse) GetJSON200 ¶
func (r PostFilesComposeResponse) GetJSON200() *EntryInfo
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PostFilesComposeResponse) GetJSON400 ¶
func (r PostFilesComposeResponse) GetJSON400() *InvalidPath
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (PostFilesComposeResponse) GetJSON401 ¶
func (r PostFilesComposeResponse) GetJSON401() *InvalidUser
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (PostFilesComposeResponse) GetJSON404 ¶
func (r PostFilesComposeResponse) GetJSON404() *FileNotFound
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (PostFilesComposeResponse) GetJSON500 ¶
func (r PostFilesComposeResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostFilesComposeResponse) GetJSON507 ¶
func (r PostFilesComposeResponse) GetJSON507() *NotEnoughDiskSpace
GetJSON507 returns the response for an HTTP 507 `application/json` response
func (PostFilesComposeResponse) Status ¶
func (r PostFilesComposeResponse) Status() string
Status returns HTTPResponse.Status
func (PostFilesComposeResponse) StatusCode ¶
func (r PostFilesComposeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostFilesMultipartBody ¶
type PostFilesMultipartBody struct {
File *openapi_types.File `json:"file,omitempty"`
}
PostFilesMultipartBody defines parameters for PostFiles.
type PostFilesMultipartRequestBody ¶
type PostFilesMultipartRequestBody PostFilesMultipartBody
PostFilesMultipartRequestBody defines body for PostFiles for multipart/form-data ContentType.
type PostFilesParams ¶
type PostFilesParams struct {
// Path Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt).
Path *FilePath `form:"path,omitempty" json:"path,omitempty"`
// Username User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user.
Username *User `form:"username,omitempty" json:"username,omitempty"`
// Signature Signature used for file access permission verification.
Signature *Signature `form:"signature,omitempty" json:"signature,omitempty"`
// SignatureExpiration Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter.
SignatureExpiration *SignatureExpiration `form:"signature_expiration,omitempty" json:"signature_expiration,omitempty"`
}
PostFilesParams defines parameters for PostFiles.
type PostFilesResponse ¶
type PostFilesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *UploadSuccess
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *InvalidPath
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *InvalidUser
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
// JSON507 the response for an HTTP 507 `application/json` response
JSON507 *NotEnoughDiskSpace
}
func ParsePostFilesResponse ¶
func ParsePostFilesResponse(rsp *http.Response) (*PostFilesResponse, error)
ParsePostFilesResponse parses an HTTP response from a PostFilesWithResponse call
func (PostFilesResponse) ContentType ¶
func (r PostFilesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostFilesResponse) GetBody ¶
func (r PostFilesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostFilesResponse) GetJSON200 ¶
func (r PostFilesResponse) GetJSON200() *UploadSuccess
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (PostFilesResponse) GetJSON400 ¶
func (r PostFilesResponse) GetJSON400() *InvalidPath
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (PostFilesResponse) GetJSON401 ¶
func (r PostFilesResponse) GetJSON401() *InvalidUser
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (PostFilesResponse) GetJSON500 ¶
func (r PostFilesResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostFilesResponse) GetJSON507 ¶
func (r PostFilesResponse) GetJSON507() *NotEnoughDiskSpace
GetJSON507 returns the response for an HTTP 507 `application/json` response
func (PostFilesResponse) Status ¶
func (r PostFilesResponse) Status() string
Status returns HTTPResponse.Status
func (PostFilesResponse) StatusCode ¶
func (r PostFilesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostFreezeResponse ¶
type PostFreezeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParsePostFreezeResponse ¶
func ParsePostFreezeResponse(rsp *http.Response) (*PostFreezeResponse, error)
ParsePostFreezeResponse parses an HTTP response from a PostFreezeWithResponse call
func (PostFreezeResponse) ContentType ¶
func (r PostFreezeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostFreezeResponse) GetBody ¶
func (r PostFreezeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostFreezeResponse) GetJSON500 ¶
func (r PostFreezeResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostFreezeResponse) Status ¶
func (r PostFreezeResponse) Status() string
Status returns HTTPResponse.Status
func (PostFreezeResponse) StatusCode ¶
func (r PostFreezeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostFsfreezeResponse ¶
type PostFsfreezeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParsePostFsfreezeResponse ¶
func ParsePostFsfreezeResponse(rsp *http.Response) (*PostFsfreezeResponse, error)
ParsePostFsfreezeResponse parses an HTTP response from a PostFsfreezeWithResponse call
func (PostFsfreezeResponse) ContentType ¶
func (r PostFsfreezeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostFsfreezeResponse) GetBody ¶
func (r PostFsfreezeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostFsfreezeResponse) GetJSON500 ¶
func (r PostFsfreezeResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostFsfreezeResponse) Status ¶
func (r PostFsfreezeResponse) Status() string
Status returns HTTPResponse.Status
func (PostFsfreezeResponse) StatusCode ¶
func (r PostFsfreezeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostFsthawResponse ¶
type PostFsthawResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParsePostFsthawResponse ¶
func ParsePostFsthawResponse(rsp *http.Response) (*PostFsthawResponse, error)
ParsePostFsthawResponse parses an HTTP response from a PostFsthawWithResponse call
func (PostFsthawResponse) ContentType ¶
func (r PostFsthawResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostFsthawResponse) GetBody ¶
func (r PostFsthawResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostFsthawResponse) GetJSON500 ¶
func (r PostFsthawResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostFsthawResponse) Status ¶
func (r PostFsthawResponse) Status() string
Status returns HTTPResponse.Status
func (PostFsthawResponse) StatusCode ¶
func (r PostFsthawResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostInitJSONBody ¶
type PostInitJSONBody struct {
// AccessToken Access token for secure access to envd service
AccessToken *SecureToken `json:"accessToken,omitempty"`
// CaBundle PEM-encoded CA certificates to install into the system trust store (may contain multiple concatenated PEM blocks)
CaBundle *string `json:"caBundle,omitempty"`
// DefaultUser The default user to use for operations
DefaultUser *string `json:"defaultUser,omitempty"`
// DefaultWorkdir The default working directory to use for operations
DefaultWorkdir *string `json:"defaultWorkdir,omitempty"`
// EnvVars Environment variables to set
EnvVars *EnvVars `json:"envVars,omitempty"`
// HyperloopIP IP address of the hyperloop server to connect to
HyperloopIP *string `json:"hyperloopIP,omitempty"`
// LifecycleID Lifecycle ID of the sandbox
LifecycleID *string `json:"lifecycleID,omitempty"`
// Timestamp The current timestamp in RFC3339 format
Timestamp *time.Time `json:"timestamp,omitempty"`
VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"`
}
PostInitJSONBody defines parameters for PostInit.
type PostInitJSONRequestBody ¶
type PostInitJSONRequestBody PostInitJSONBody
PostInitJSONRequestBody defines body for PostInit for application/json ContentType.
type PostInitResponse ¶
func ParsePostInitResponse ¶
func ParsePostInitResponse(rsp *http.Response) (*PostInitResponse, error)
ParsePostInitResponse parses an HTTP response from a PostInitWithResponse call
func (PostInitResponse) ContentType ¶
func (r PostInitResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostInitResponse) GetBody ¶
func (r PostInitResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostInitResponse) Status ¶
func (r PostInitResponse) Status() string
Status returns HTTPResponse.Status
func (PostInitResponse) StatusCode ¶
func (r PostInitResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PostUnfreezeResponse ¶
type PostUnfreezeResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON500 the response for an HTTP 500 `application/json` response
JSON500 *InternalServerError
}
func ParsePostUnfreezeResponse ¶
func ParsePostUnfreezeResponse(rsp *http.Response) (*PostUnfreezeResponse, error)
ParsePostUnfreezeResponse parses an HTTP response from a PostUnfreezeWithResponse call
func (PostUnfreezeResponse) ContentType ¶
func (r PostUnfreezeResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (PostUnfreezeResponse) GetBody ¶
func (r PostUnfreezeResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (PostUnfreezeResponse) GetJSON500 ¶
func (r PostUnfreezeResponse) GetJSON500() *InternalServerError
GetJSON500 returns the response for an HTTP 500 `application/json` response
func (PostUnfreezeResponse) Status ¶
func (r PostUnfreezeResponse) Status() string
Status returns HTTPResponse.Status
func (PostUnfreezeResponse) StatusCode ¶
func (r PostUnfreezeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SecureToken ¶
type SecureToken = string
SecureToken is a type alias for access tokens in the integration test client. The actual SecureToken with secure memory handling is only used in the envd service itself.
type SignatureExpiration ¶
type SignatureExpiration = int
SignatureExpiration defines model for SignatureExpiration.
type UploadSuccess ¶
type UploadSuccess = []EntryInfo
UploadSuccess defines model for UploadSuccess.
type VolumeMount ¶
type VolumeMount struct {
// NfsTarget Server target address
NfsTarget string `json:"nfs_target"`
// Path Mount path inside the sandbox
Path string `json:"path"`
}
VolumeMount Volume mount configuration