Documentation
¶
Index ¶
- func CreateImagesPath() string
- func DecodeCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*images.CreateImagePayload, error)
- func EncodeCreateError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func ListImagesPath() string
- func Mount(mux goahttp.Muxer, h *Server)
- func MountCreateHandler(mux goahttp.Muxer, h http.Handler)
- func MountListHandler(mux goahttp.Muxer, h http.Handler)
- func NewCreateHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewCreateImagePayload(body *CreateRequestBody) *images.CreateImagePayload
- func NewListHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func ValidateCreateRequestBody(body *CreateRequestBody) (err error)
- func ValidateImageEnvVarRequestBody(body *ImageEnvVarRequestBody) (err error)
- func ValidateImageLinkRequestBody(body *ImageLinkRequestBody) (err error)
- func ValidateImageRemoteDesktopRequestBody(body *ImageRemoteDesktopRequestBody) (err error)
- type CreateRequestBody
- type CreateResponseBody
- type ImageCredentialsRequestBody
- type ImageCredentialsResponse
- type ImageCredentialsResponseBody
- type ImageEnvVarRequestBody
- type ImageEnvVarResponse
- type ImageEnvVarResponseBody
- type ImageLinkRequestBody
- type ImageLinkResponse
- type ImageLinkResponseBody
- type ImageProxyConfigRequestBody
- type ImageProxyConfigResponse
- type ImageProxyConfigResponseBody
- type ImageRemoteDesktopRequestBody
- type ImageRemoteDesktopResponse
- type ImageRemoteDesktopResponseBody
- type ImageResponse
- type ListResponseBody
- type MountPoint
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateImagesPath ¶
func CreateImagesPath() string
CreateImagesPath returns the URL path to the images service create HTTP endpoint.
func DecodeCreateRequest ¶
func DecodeCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*images.CreateImagePayload, error)
DecodeCreateRequest returns a decoder for requests sent to the images create endpoint.
func EncodeCreateError ¶
func EncodeCreateError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeCreateError returns an encoder for errors returned by the create images endpoint.
func EncodeCreateResponse ¶
func EncodeCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeCreateResponse returns an encoder for responses returned by the images create endpoint.
func EncodeListResponse ¶
func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeListResponse returns an encoder for responses returned by the images list endpoint.
func ListImagesPath ¶
func ListImagesPath() string
ListImagesPath returns the URL path to the images service list HTTP endpoint.
func MountCreateHandler ¶
MountCreateHandler configures the mux to serve the "images" service "create" endpoint.
func MountListHandler ¶
MountListHandler configures the mux to serve the "images" service "list" endpoint.
func NewCreateHandler ¶
func NewCreateHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler
NewCreateHandler creates a HTTP handler which loads the HTTP request and calls the "images" service "create" endpoint.
func NewCreateImagePayload ¶
func NewCreateImagePayload(body *CreateRequestBody) *images.CreateImagePayload
NewCreateImagePayload builds a images service create endpoint payload.
func NewListHandler ¶
func NewListHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler
NewListHandler creates a HTTP handler which loads the HTTP request and calls the "images" service "list" endpoint.
func ValidateCreateRequestBody ¶
func ValidateCreateRequestBody(body *CreateRequestBody) (err error)
ValidateCreateRequestBody runs the validations defined on CreateRequestBody
func ValidateImageEnvVarRequestBody ¶
func ValidateImageEnvVarRequestBody(body *ImageEnvVarRequestBody) (err error)
ValidateImageEnvVarRequestBody runs the validations defined on ImageEnvVarRequestBody
func ValidateImageLinkRequestBody ¶
func ValidateImageLinkRequestBody(body *ImageLinkRequestBody) (err error)
ValidateImageLinkRequestBody runs the validations defined on ImageLinkRequestBody
func ValidateImageRemoteDesktopRequestBody ¶ added in v0.5.0
func ValidateImageRemoteDesktopRequestBody(body *ImageRemoteDesktopRequestBody) (err error)
ValidateImageRemoteDesktopRequestBody runs the validations defined on ImageRemoteDesktopRequestBody
Types ¶
type CreateRequestBody ¶
type CreateRequestBody struct {
// Display name
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Container image reference
Image *string `form:"image,omitempty" json:"image,omitempty" xml:"image,omitempty"`
// Description of the image
Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"`
// Category for grouping (e.g. Desktop, IDE, Tool, Game)
Category *string `form:"category,omitempty" json:"category,omitempty" xml:"category,omitempty"`
// Tags for filtering/searching images
Tags []string `form:"tags,omitempty" json:"tags,omitempty" xml:"tags,omitempty"`
// Default container port
DefaultPort *int `form:"default_port,omitempty" json:"default_port,omitempty" xml:"default_port,omitempty"`
// Default URL path for connecting
DefaultPath *string `form:"default_path,omitempty" json:"default_path,omitempty" xml:"default_path,omitempty"`
// Icon identifier
Icon *string `form:"icon,omitempty" json:"icon,omitempty" xml:"icon,omitempty"`
// Default command-line args
DefaultArgs []string `form:"default_args,omitempty" json:"default_args,omitempty" xml:"default_args,omitempty"`
// Default environment variables
DefaultEnv []*ImageEnvVarRequestBody `form:"default_env,omitempty" json:"default_env,omitempty" xml:"default_env,omitempty"`
// Run container in privileged mode
Privileged *bool `form:"privileged,omitempty" json:"privileged,omitempty" xml:"privileged,omitempty"`
// Project homepage or documentation URL
HomepageURL *string `form:"homepage_url,omitempty" json:"homepage_url,omitempty" xml:"homepage_url,omitempty"`
// Source code repository URL
SourceURL *string `form:"source_url,omitempty" json:"source_url,omitempty" xml:"source_url,omitempty"`
// Container image registry page (e.g. Docker Hub)
ImageHomepageURL *string `form:"image_homepage_url,omitempty" json:"image_homepage_url,omitempty" xml:"image_homepage_url,omitempty"`
// Default user for this image
DefaultUser *string `form:"default_user,omitempty" json:"default_user,omitempty" xml:"default_user,omitempty"`
// Known default password for DefaultUser. Only set when the image has a known
// default password; leave unset when the guest uses no password
DefaultPassword *string `form:"default_password,omitempty" json:"default_password,omitempty" xml:"default_password,omitempty"`
// Set to true when the image has cloud-init baked in, allowing user-data (e.g.
// a user/password) to be seeded into the guest at first boot
DefaultCloudInit *bool `form:"default_cloud_init,omitempty" json:"default_cloud_init,omitempty" xml:"default_cloud_init,omitempty"`
// Reserved user-data for the guest (cloud-init). Empty by default; later used
// to seed first-boot configuration when cloud-init is supported. Not yet
// consumed
DefaultUserData *string `form:"default_user_data,omitempty" json:"default_user_data,omitempty" xml:"default_user_data,omitempty"`
// Default home directory for the default user
DefaultHomedir *string `form:"default_homedir,omitempty" json:"default_homedir,omitempty" xml:"default_homedir,omitempty"`
// Default shell for exec/console sessions (e.g. /bin/bash)
DefaultShell *string `form:"default_shell,omitempty" json:"default_shell,omitempty" xml:"default_shell,omitempty"`
// Additional relevant URLs for this image
Links []*ImageLinkRequestBody `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
// Default login credentials for this image
DefaultCredentials *ImageCredentialsRequestBody `form:"default_credentials,omitempty" json:"default_credentials,omitempty" xml:"default_credentials,omitempty"`
// Proxy behavior configuration
ProxyConfig *ImageProxyConfigRequestBody `form:"proxy_config,omitempty" json:"proxy_config,omitempty" xml:"proxy_config,omitempty"`
// Remote desktop agent configuration (Tier 1)
RemoteDesktop *ImageRemoteDesktopRequestBody `form:"remote_desktop,omitempty" json:"remote_desktop,omitempty" xml:"remote_desktop,omitempty"`
// UID that the main container runs as (sets runAsUser and fsGroup)
DefaultUID *int64 `form:"default_uid,omitempty" json:"default_uid,omitempty" xml:"default_uid,omitempty"`
// Selkies streaming, Chrome, ML frameworks)
DefaultSharedMemory *bool `form:"default_shared_memory,omitempty" json:"default_shared_memory,omitempty" xml:"default_shared_memory,omitempty"`
// Workspace types this image supports (container, vm, scratch). Empty means
// container-only
WorkspaceTypes []string `form:"workspace_types,omitempty" json:"workspace_types,omitempty" xml:"workspace_types,omitempty"`
}
CreateRequestBody is the type of the "images" service "create" endpoint HTTP request body.
type CreateResponseBody ¶
type CreateResponseBody struct {
// Kubernetes resource name (metadata.name)
CrName string `form:"cr_name" json:"cr_name" xml:"cr_name"`
// Display name
Name string `form:"name" json:"name" xml:"name"`
// Full image reference
Image string `form:"image" json:"image" xml:"image"`
// Description of the image
Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"`
// Category for grouping (e.g. Desktop, IDE, Tool, Game)
Category *string `form:"category,omitempty" json:"category,omitempty" xml:"category,omitempty"`
// Tags for filtering/searching images
Tags []string `form:"tags,omitempty" json:"tags,omitempty" xml:"tags,omitempty"`
// Default container port
DefaultPort int `form:"default_port" json:"default_port" xml:"default_port"`
// Default URL path for connecting (e.g. /vnc.html?resize=remote)
DefaultPath *string `form:"default_path,omitempty" json:"default_path,omitempty" xml:"default_path,omitempty"`
// Proxy behavior configuration for this image
ProxyConfig *ImageProxyConfigResponseBody `form:"proxy_config,omitempty" json:"proxy_config,omitempty" xml:"proxy_config,omitempty"`
// Icon identifier
Icon *string `form:"icon,omitempty" json:"icon,omitempty" xml:"icon,omitempty"`
// Default command-line args injected at workspace creation
DefaultArgs []string `form:"default_args,omitempty" json:"default_args,omitempty" xml:"default_args,omitempty"`
// Default environment variables injected at workspace creation
DefaultEnv []*ImageEnvVarResponseBody `form:"default_env,omitempty" json:"default_env,omitempty" xml:"default_env,omitempty"`
// UID that the main container runs as (sets runAsUser and fsGroup)
DefaultUID *int64 `form:"default_uid,omitempty" json:"default_uid,omitempty" xml:"default_uid,omitempty"`
// Selkies streaming, Chrome, ML frameworks)
DefaultSharedMemory *bool `form:"default_shared_memory,omitempty" json:"default_shared_memory,omitempty" xml:"default_shared_memory,omitempty"`
// Run container in privileged mode
Privileged *bool `form:"privileged,omitempty" json:"privileged,omitempty" xml:"privileged,omitempty"`
// Project homepage or documentation URL
HomepageURL *string `form:"homepage_url,omitempty" json:"homepage_url,omitempty" xml:"homepage_url,omitempty"`
// Source code repository URL
SourceURL *string `form:"source_url,omitempty" json:"source_url,omitempty" xml:"source_url,omitempty"`
// Container image registry page (e.g. Docker Hub)
ImageHomepageURL *string `form:"image_homepage_url,omitempty" json:"image_homepage_url,omitempty" xml:"image_homepage_url,omitempty"`
// Default user for this image
DefaultUser *string `form:"default_user,omitempty" json:"default_user,omitempty" xml:"default_user,omitempty"`
// Known default password for DefaultUser. Only set when the image has a known
// default password; leave unset when the guest uses no password
DefaultPassword *string `form:"default_password,omitempty" json:"default_password,omitempty" xml:"default_password,omitempty"`
// Set to true when the image has cloud-init baked in, allowing user-data (e.g.
// a user/password) to be seeded into the guest at first boot
DefaultCloudInit *bool `form:"default_cloud_init,omitempty" json:"default_cloud_init,omitempty" xml:"default_cloud_init,omitempty"`
// Reserved user-data for the guest (cloud-init). Empty by default; later used
// to seed first-boot configuration when cloud-init is supported. Not yet
// consumed
DefaultUserData *string `form:"default_user_data,omitempty" json:"default_user_data,omitempty" xml:"default_user_data,omitempty"`
// Default home directory for the default user
DefaultHomedir *string `form:"default_homedir,omitempty" json:"default_homedir,omitempty" xml:"default_homedir,omitempty"`
// Default shell for exec/console sessions (e.g. /bin/bash)
DefaultShell *string `form:"default_shell,omitempty" json:"default_shell,omitempty" xml:"default_shell,omitempty"`
// Additional relevant URLs for this image
Links []*ImageLinkResponseBody `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
// Default login credentials for this image
DefaultCredentials *ImageCredentialsResponseBody `form:"default_credentials,omitempty" json:"default_credentials,omitempty" xml:"default_credentials,omitempty"`
// Remote desktop agent configuration (Tier 1)
RemoteDesktop *ImageRemoteDesktopResponseBody `form:"remote_desktop,omitempty" json:"remote_desktop,omitempty" xml:"remote_desktop,omitempty"`
// Workspace types this image supports (container, vm, scratch). Empty means
// container-only
WorkspaceTypes []string `form:"workspace_types,omitempty" json:"workspace_types,omitempty" xml:"workspace_types,omitempty"`
}
CreateResponseBody is the type of the "images" service "create" endpoint HTTP response body.
func NewCreateResponseBody ¶
func NewCreateResponseBody(res *imagesviews.ImageView) *CreateResponseBody
NewCreateResponseBody builds the HTTP response body from the result of the "create" endpoint of the "images" service.
type ImageCredentialsRequestBody ¶
type ImageCredentialsRequestBody struct {
// Default username
Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"`
// Default password
Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"`
}
ImageCredentialsRequestBody is used to define fields on request body types.
type ImageCredentialsResponse ¶
type ImageCredentialsResponse struct {
// Default username
Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"`
// Default password
Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"`
}
ImageCredentialsResponse is used to define fields on response body types.
type ImageCredentialsResponseBody ¶
type ImageCredentialsResponseBody struct {
// Default username
Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"`
// Default password
Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"`
}
ImageCredentialsResponseBody is used to define fields on response body types.
type ImageEnvVarRequestBody ¶
type ImageEnvVarRequestBody struct {
// Name of the environment variable
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Value (supports {{namespace}} and {{name}} placeholders)
Value *string `form:"value,omitempty" json:"value,omitempty" xml:"value,omitempty"`
}
ImageEnvVarRequestBody is used to define fields on request body types.
type ImageEnvVarResponse ¶
type ImageEnvVarResponse struct {
// Name of the environment variable
Name string `form:"name" json:"name" xml:"name"`
// Value (supports {{namespace}} and {{name}} placeholders)
Value string `form:"value" json:"value" xml:"value"`
}
ImageEnvVarResponse is used to define fields on response body types.
type ImageEnvVarResponseBody ¶
type ImageEnvVarResponseBody struct {
// Name of the environment variable
Name string `form:"name" json:"name" xml:"name"`
// Value (supports {{namespace}} and {{name}} placeholders)
Value string `form:"value" json:"value" xml:"value"`
}
ImageEnvVarResponseBody is used to define fields on response body types.
type ImageLinkRequestBody ¶
type ImageLinkRequestBody struct {
// Display label for the link
Title *string `form:"title,omitempty" json:"title,omitempty" xml:"title,omitempty"`
// Link target URL
URL *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"`
}
ImageLinkRequestBody is used to define fields on request body types.
type ImageLinkResponse ¶
type ImageLinkResponse struct {
// Display label for the link
Title string `form:"title" json:"title" xml:"title"`
// Link target URL
URL string `form:"url" json:"url" xml:"url"`
}
ImageLinkResponse is used to define fields on response body types.
type ImageLinkResponseBody ¶
type ImageLinkResponseBody struct {
// Display label for the link
Title string `form:"title" json:"title" xml:"title"`
// Link target URL
URL string `form:"url" json:"url" xml:"url"`
}
ImageLinkResponseBody is used to define fields on response body types.
type ImageProxyConfigRequestBody ¶
type ImageProxyConfigRequestBody struct {
// Serve a no-op ServiceWorker at /sw.js to prevent SW registration errors
NeedsNoopSw *bool `form:"needs_noop_sw,omitempty" json:"needs_noop_sw,omitempty" xml:"needs_noop_sw,omitempty"`
// Paths that use WebSocket (informational, all paths support WS transparently)
WebsocketPaths []string `form:"websocket_paths,omitempty" json:"websocket_paths,omitempty" xml:"websocket_paths,omitempty"`
// Rewrite requests with absolute paths that escape the proxy prefix using
// Referer header
RewriteHostAbsolutePaths *bool `` /* 133-byte string literal not displayed */
// Additional headers to inject into proxied requests
CustomRequestHeaders map[string]string `form:"custom_request_headers,omitempty" json:"custom_request_headers,omitempty" xml:"custom_request_headers,omitempty"`
// Inject a <base> tag into HTML responses to fix relative path resolution
InjectBaseTag *bool `form:"inject_base_tag,omitempty" json:"inject_base_tag,omitempty" xml:"inject_base_tag,omitempty"`
// Connect to backend over HTTPS with skip-verify (for self-signed certs)
TLSInsecure *bool `form:"tls_insecure,omitempty" json:"tls_insecure,omitempty" xml:"tls_insecure,omitempty"`
// Forward the full proxy path (including /proxy/{ns}/{name}) to the pod
// instead of stripping it. Required for apps configured with a base URL
// matching the proxy prefix.
PreservePathPrefix *bool `form:"preserve_path_prefix,omitempty" json:"preserve_path_prefix,omitempty" xml:"preserve_path_prefix,omitempty"`
}
ImageProxyConfigRequestBody is used to define fields on request body types.
type ImageProxyConfigResponse ¶
type ImageProxyConfigResponse struct {
// Serve a no-op ServiceWorker at /sw.js to prevent SW registration errors
NeedsNoopSw bool `form:"needs_noop_sw" json:"needs_noop_sw" xml:"needs_noop_sw"`
// Paths that use WebSocket (informational, all paths support WS transparently)
WebsocketPaths []string `form:"websocket_paths,omitempty" json:"websocket_paths,omitempty" xml:"websocket_paths,omitempty"`
// Rewrite requests with absolute paths that escape the proxy prefix using
// Referer header
RewriteHostAbsolutePaths bool `form:"rewrite_host_absolute_paths" json:"rewrite_host_absolute_paths" xml:"rewrite_host_absolute_paths"`
// Additional headers to inject into proxied requests
CustomRequestHeaders map[string]string `form:"custom_request_headers,omitempty" json:"custom_request_headers,omitempty" xml:"custom_request_headers,omitempty"`
// Inject a <base> tag into HTML responses to fix relative path resolution
InjectBaseTag bool `form:"inject_base_tag" json:"inject_base_tag" xml:"inject_base_tag"`
// Connect to backend over HTTPS with skip-verify (for self-signed certs)
TLSInsecure bool `form:"tls_insecure" json:"tls_insecure" xml:"tls_insecure"`
// Forward the full proxy path (including /proxy/{ns}/{name}) to the pod
// instead of stripping it. Required for apps configured with a base URL
// matching the proxy prefix.
PreservePathPrefix bool `form:"preserve_path_prefix" json:"preserve_path_prefix" xml:"preserve_path_prefix"`
}
ImageProxyConfigResponse is used to define fields on response body types.
type ImageProxyConfigResponseBody ¶
type ImageProxyConfigResponseBody struct {
// Serve a no-op ServiceWorker at /sw.js to prevent SW registration errors
NeedsNoopSw bool `form:"needs_noop_sw" json:"needs_noop_sw" xml:"needs_noop_sw"`
// Paths that use WebSocket (informational, all paths support WS transparently)
WebsocketPaths []string `form:"websocket_paths,omitempty" json:"websocket_paths,omitempty" xml:"websocket_paths,omitempty"`
// Rewrite requests with absolute paths that escape the proxy prefix using
// Referer header
RewriteHostAbsolutePaths bool `form:"rewrite_host_absolute_paths" json:"rewrite_host_absolute_paths" xml:"rewrite_host_absolute_paths"`
// Additional headers to inject into proxied requests
CustomRequestHeaders map[string]string `form:"custom_request_headers,omitempty" json:"custom_request_headers,omitempty" xml:"custom_request_headers,omitempty"`
// Inject a <base> tag into HTML responses to fix relative path resolution
InjectBaseTag bool `form:"inject_base_tag" json:"inject_base_tag" xml:"inject_base_tag"`
// Connect to backend over HTTPS with skip-verify (for self-signed certs)
TLSInsecure bool `form:"tls_insecure" json:"tls_insecure" xml:"tls_insecure"`
// Forward the full proxy path (including /proxy/{ns}/{name}) to the pod
// instead of stripping it. Required for apps configured with a base URL
// matching the proxy prefix.
PreservePathPrefix bool `form:"preserve_path_prefix" json:"preserve_path_prefix" xml:"preserve_path_prefix"`
}
ImageProxyConfigResponseBody is used to define fields on response body types.
type ImageRemoteDesktopRequestBody ¶ added in v0.5.0
type ImageRemoteDesktopRequestBody struct {
// Protocol name (e.g. "selkies")
Protocol *string `form:"protocol,omitempty" json:"protocol,omitempty" xml:"protocol,omitempty"`
// Guest port the agent listens on
Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"`
// Path relative to the agent's base URL
Path *string `form:"path,omitempty" json:"path,omitempty" xml:"path,omitempty"`
}
ImageRemoteDesktopRequestBody is used to define fields on request body types.
type ImageRemoteDesktopResponse ¶ added in v0.5.0
type ImageRemoteDesktopResponse struct {
// Protocol name (e.g. "selkies")
Protocol string `form:"protocol" json:"protocol" xml:"protocol"`
// Guest port the agent listens on
Port int `form:"port" json:"port" xml:"port"`
// Path relative to the agent's base URL
Path string `form:"path" json:"path" xml:"path"`
}
ImageRemoteDesktopResponse is used to define fields on response body types.
type ImageRemoteDesktopResponseBody ¶ added in v0.5.0
type ImageRemoteDesktopResponseBody struct {
// Protocol name (e.g. "selkies")
Protocol string `form:"protocol" json:"protocol" xml:"protocol"`
// Guest port the agent listens on
Port int `form:"port" json:"port" xml:"port"`
// Path relative to the agent's base URL
Path string `form:"path" json:"path" xml:"path"`
}
ImageRemoteDesktopResponseBody is used to define fields on response body types.
type ImageResponse ¶
type ImageResponse struct {
// Kubernetes resource name (metadata.name)
CrName string `form:"cr_name" json:"cr_name" xml:"cr_name"`
// Display name
Name string `form:"name" json:"name" xml:"name"`
// Full image reference
Image string `form:"image" json:"image" xml:"image"`
// Description of the image
Description *string `form:"description,omitempty" json:"description,omitempty" xml:"description,omitempty"`
// Category for grouping (e.g. Desktop, IDE, Tool, Game)
Category *string `form:"category,omitempty" json:"category,omitempty" xml:"category,omitempty"`
// Tags for filtering/searching images
Tags []string `form:"tags,omitempty" json:"tags,omitempty" xml:"tags,omitempty"`
// Default container port
DefaultPort int `form:"default_port" json:"default_port" xml:"default_port"`
// Default URL path for connecting (e.g. /vnc.html?resize=remote)
DefaultPath *string `form:"default_path,omitempty" json:"default_path,omitempty" xml:"default_path,omitempty"`
// Proxy behavior configuration for this image
ProxyConfig *ImageProxyConfigResponse `form:"proxy_config,omitempty" json:"proxy_config,omitempty" xml:"proxy_config,omitempty"`
// Icon identifier
Icon *string `form:"icon,omitempty" json:"icon,omitempty" xml:"icon,omitempty"`
// Default command-line args injected at workspace creation
DefaultArgs []string `form:"default_args,omitempty" json:"default_args,omitempty" xml:"default_args,omitempty"`
// Default environment variables injected at workspace creation
DefaultEnv []*ImageEnvVarResponse `form:"default_env,omitempty" json:"default_env,omitempty" xml:"default_env,omitempty"`
// UID that the main container runs as (sets runAsUser and fsGroup)
DefaultUID *int64 `form:"default_uid,omitempty" json:"default_uid,omitempty" xml:"default_uid,omitempty"`
// Selkies streaming, Chrome, ML frameworks)
DefaultSharedMemory *bool `form:"default_shared_memory,omitempty" json:"default_shared_memory,omitempty" xml:"default_shared_memory,omitempty"`
// Run container in privileged mode
Privileged *bool `form:"privileged,omitempty" json:"privileged,omitempty" xml:"privileged,omitempty"`
// Project homepage or documentation URL
HomepageURL *string `form:"homepage_url,omitempty" json:"homepage_url,omitempty" xml:"homepage_url,omitempty"`
// Source code repository URL
SourceURL *string `form:"source_url,omitempty" json:"source_url,omitempty" xml:"source_url,omitempty"`
// Container image registry page (e.g. Docker Hub)
ImageHomepageURL *string `form:"image_homepage_url,omitempty" json:"image_homepage_url,omitempty" xml:"image_homepage_url,omitempty"`
// Default user for this image
DefaultUser *string `form:"default_user,omitempty" json:"default_user,omitempty" xml:"default_user,omitempty"`
// Known default password for DefaultUser. Only set when the image has a known
// default password; leave unset when the guest uses no password
DefaultPassword *string `form:"default_password,omitempty" json:"default_password,omitempty" xml:"default_password,omitempty"`
// Set to true when the image has cloud-init baked in, allowing user-data (e.g.
// a user/password) to be seeded into the guest at first boot
DefaultCloudInit *bool `form:"default_cloud_init,omitempty" json:"default_cloud_init,omitempty" xml:"default_cloud_init,omitempty"`
// Reserved user-data for the guest (cloud-init). Empty by default; later used
// to seed first-boot configuration when cloud-init is supported. Not yet
// consumed
DefaultUserData *string `form:"default_user_data,omitempty" json:"default_user_data,omitempty" xml:"default_user_data,omitempty"`
// Default home directory for the default user
DefaultHomedir *string `form:"default_homedir,omitempty" json:"default_homedir,omitempty" xml:"default_homedir,omitempty"`
// Default shell for exec/console sessions (e.g. /bin/bash)
DefaultShell *string `form:"default_shell,omitempty" json:"default_shell,omitempty" xml:"default_shell,omitempty"`
// Additional relevant URLs for this image
Links []*ImageLinkResponse `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`
// Default login credentials for this image
DefaultCredentials *ImageCredentialsResponse `form:"default_credentials,omitempty" json:"default_credentials,omitempty" xml:"default_credentials,omitempty"`
// Remote desktop agent configuration (Tier 1)
RemoteDesktop *ImageRemoteDesktopResponse `form:"remote_desktop,omitempty" json:"remote_desktop,omitempty" xml:"remote_desktop,omitempty"`
// Workspace types this image supports (container, vm, scratch). Empty means
// container-only
WorkspaceTypes []string `form:"workspace_types,omitempty" json:"workspace_types,omitempty" xml:"workspace_types,omitempty"`
}
ImageResponse is used to define fields on response body types.
type ListResponseBody ¶
type ListResponseBody []*ImageResponse
ListResponseBody is the type of the "images" service "list" endpoint HTTP response body.
func NewListResponseBody ¶
func NewListResponseBody(res []*images.Image) ListResponseBody
NewListResponseBody builds the HTTP response body from the result of the "list" endpoint of the "images" service.
type MountPoint ¶
type MountPoint struct {
// Method is the name of the service method served by the mounted HTTP handler.
Method string
// Verb is the HTTP method used to match requests to the mounted handler.
Verb string
// Pattern is the HTTP request path pattern used to match requests to the
// mounted handler.
Pattern string
}
MountPoint holds information about the mounted endpoints.
type Server ¶
type Server struct {
Mounts []*MountPoint
List http.Handler
Create http.Handler
}
Server lists the images service endpoint HTTP handlers.
func New ¶
func New( e *images.Endpoints, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(ctx context.Context, err error) goahttp.Statuser, ) *Server
New instantiates HTTP handlers for all the images service endpoints using the provided encoder and decoder. The handlers are mounted on the given mux using the HTTP verb and path defined in the design. errhandler is called whenever a response fails to be encoded. formatter is used to format errors returned by the service methods prior to encoding. Both errhandler and formatter are optional and can be nil.
func (*Server) MethodNames ¶
MethodNames returns the methods served.