types

package
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2022 License: MPL-2.0 Imports: 0 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthNRequest added in v0.0.13

type AuthNRequest struct {
	// LoginName is used to authenticate the user and get
	// an access token for the registry.
	LoginName string `json:"login_name,omitempty" example:"alice"`

	// Password stores the hashed password.
	Password string `json:"password,omitempty"`
}

AuthNRequest contains authorization information for connecting to a envd server.

type AuthNResponse added in v0.0.13

type AuthNResponse struct {
	// LoginName is used to authenticate the user and get
	// an access token for the registry.
	LoginName string `json:"login_name,omitempty" example:"alice"`
	// An opaque token used to authenticate a user after a successful login
	// Required: true
	IdentityToken string `json:"identity_token" example:"a332139d39b89a241400013700e665a3"`
	// The status of the authentication
	// Required: true
	Status AuthStatus `json:"status" example:"Login successfully"`
}

type AuthStatus added in v0.0.15

type AuthStatus string
const (
	AuthSuccess AuthStatus = "Login succeeded"
	AuthFail    AuthStatus = "Login Fail"
	Error       AuthStatus = "Internal_Error"
)

type EnvVar added in v0.0.15

type EnvVar struct {
	// Name of the environment variable. Must be a C_IDENTIFIER.
	Name string `json:"name"`

	// Variable references $(VAR_NAME) are expanded
	// using the previously defined environment variables in the container and
	// any service environment variables. If a variable cannot be resolved,
	// the reference in the input string will be unchanged. Double $$ are reduced
	// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
	// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
	// Escaped references will never be expanded, regardless of whether the variable
	// exists or not.
	// Defaults to "".
	// +optional
	Value string `json:"value,omitempty"`
}

type Environment added in v0.0.4

type Environment struct {
	ObjectMeta `json:",inline"`
	Spec       EnvironmentSpec   `json:"spec,omitempty"`
	Status     EnvironmentStatus `json:"status,omitempty"`
	Resources  ResourceSpec      `json:"resource,omitempty"`
	CreatedAt  int64             `json:"created_at,omitempty"`
}

type EnvironmentCreateRequest

type EnvironmentCreateRequest struct {
	Environment `json:",inline,omitempty"`
}

type EnvironmentCreateResponse

type EnvironmentCreateResponse struct {
	Created Environment `json:"environment,omitempty"`

	// Warnings encountered when creating the pod
	// Required: true
	Warnings []string `json:"warnings,omitempty"`
}

type EnvironmentGetRequest added in v0.0.5

type EnvironmentGetRequest struct {
	Name string `uri:"name" example:"pytorch-example"`
}

type EnvironmentGetResponse added in v0.0.5

type EnvironmentGetResponse struct {
	Environment `json:",inline"`
}

type EnvironmentListRequest added in v0.0.3

type EnvironmentListRequest struct {
}

type EnvironmentListResponse added in v0.0.3

type EnvironmentListResponse struct {
	Items []Environment `json:"items,omitempty"`
}

type EnvironmentPort added in v0.0.4

type EnvironmentPort struct {
	Name string `json:"name,omitempty"`
	Port int32  `json:"port,omitempty"`
}

type EnvironmentRemoveRequest added in v0.0.4

type EnvironmentRemoveRequest struct {
	Name string `uri:"name" example:"pytorch-example"`
}

type EnvironmentRemoveResponse added in v0.0.4

type EnvironmentRemoveResponse struct {
}

type EnvironmentRepoInfo added in v0.0.7

type EnvironmentRepoInfo struct {
	URL         string `json:"url,omitempty"`
	Description string `json:"description,omitempty"`
}

type EnvironmentSpec added in v0.0.4

type EnvironmentSpec struct {
	Owner          string            `json:"owner,omitempty"`
	Image          string            `json:"image,omitempty"`
	Env            []EnvVar          `json:"env,omitempty"`
	Cmd            []string          `json:"cmd,omitempty"`
	Ports          []EnvironmentPort `json:"ports,omitempty"`
	APTPackages    []string          `json:"apt_packages,omitempty"`
	PythonCommands []string          `json:"pypi_commands,omitempty"`
}

type EnvironmentStatus added in v0.0.4

type EnvironmentStatus struct {
	Phase             string  `json:"phase,omitempty"`
	JupyterAddr       *string `json:"jupyter_addr,omitempty"`
	RStudioServerAddr *string `json:"rstudio_server_addr,omitempty"`
}

type ImageGetRequest added in v0.0.7

type ImageGetRequest struct {
	Name string `uri:"name" example:"pytorch-example"`
}

type ImageGetResponse added in v0.0.7

type ImageGetResponse struct {
	ImageMeta `json:",inline"`
}

type ImageInfo added in v0.0.7

type ImageInfo struct {
	OwnerToken string
	ImageMeta
}

type ImageListRequest added in v0.0.7

type ImageListRequest struct {
}

type ImageListResponse added in v0.0.7

type ImageListResponse struct {
	Items []ImageMeta `json:"items,omitempty"`
}

type ImageMeta added in v0.0.7

type ImageMeta struct {
	Name           string            `json:"name,omitempty" example:"pytorch-cuda:dev"`
	Digest         string            `json:"digest,omitempty"`
	Created        int64             `json:"created,omitempty"`
	Size           int64             `json:"size,omitempty"`
	Labels         map[string]string `json:"labels,omitempty"`
	APTPackages    []string          `json:"apt_packages,omitempty"`
	PythonCommands []string          `json:"python_commands,omitempty"`
	Ports          []EnvironmentPort `json:"ports,omitempty"`
}

type KeyCreateRequest added in v0.0.19

type KeyCreateRequest struct {
	// Name is the key name.
	Name string `json:"name,omitempty" example:"mykey"`
	// PublicKey is the ssh public key
	PublicKey string `json:"public_key,omitempty"`
}

type KeyCreateResponse added in v0.0.19

type KeyCreateResponse struct {
	// Name is the key name.
	Name string `json:"name,omitempty" example:"mykey"`
	// PublicKey is the ssh public key
	PublicKey string `json:"public_key,omitempty"`
	// LoginName is used to authenticate the user and get
	// an access token for the registry.
	LoginName string `json:"login_name,omitempty" example:"alice"`
}

type ObjectMeta added in v0.0.5

type ObjectMeta struct {
	Name string `json:"name,omitempty"`

	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

type ResourceSpec added in v0.0.14

type ResourceSpec struct {
	CPU    string `json:"cpu,omitempty"`
	Memory string `json:"memory,omitempty"`
	GPU    string `json:"gpu,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL