codersdk
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Constants
- Variables
- func BitmapToWeekdays(bitmap uint8) []string
- func DefaultCacheDir() string
- func IsConnectionError(err error) bool
- func IsSecretDeploymentOption(opt clibase.Option) bool
- func IsWorkspaceProxies(opt clibase.Option) bool
- func ParseSSHConfigOption(opt string) (key string, value string, err error)
- func ReadBodyAsError(res *http.Response) error
- func ServerSentEventReader(ctx context.Context, rc io.ReadCloser) func() (*ServerSentEvent, error)
- func TimezoneOffsetHour(loc *time.Location) int
- func ValidateNewWorkspaceParameters(richParameters []TemplateVersionParameter, ...) error
- func ValidateWorkspaceBuildParameter(richParameter TemplateVersionParameter, ...) error
- func ValidateWorkspaceBuildParameters(richParameters []TemplateVersionParameter, ...) error
- func WeekdaysToBitmap(days []string) (uint8, error)
- func WorkspaceDisplayStatus(jobStatus ProvisionerJobStatus, transition WorkspaceTransition) string
- func WorkspaceNotifyChannel(id uuid.UUID) string
- type APIKey
- type APIKeyScope
- type APIKeyWithOwner
- type AddLicenseRequest
- type AgentStatsReportRequest
- type AgentStatsReportResponse
- type AgentSubsystem
- type AppHostResponse
- type AppearanceConfig
- type AssignableRoles
- type AuditAction
- type AuditDiff
- type AuditDiffField
- type AuditLog
- type AuditLogResponse
- type AuditLogsRequest
- type AuthMethod
- type AuthMethods
- type AuthorizationCheck
- type AuthorizationObject
- type AuthorizationRequest
- type AuthorizationResponse
- type BuildInfoResponse
- type BuildReason
- type Client
- func (c *Client) APIKeyByID(ctx context.Context, userID string, id string) (*APIKey, error)
- func (c *Client) APIKeyByName(ctx context.Context, userID string, name string) (*APIKey, error)
- func (c *Client) AddLicense(ctx context.Context, r AddLicenseRequest) (License, error)
- func (c *Client) AppHost(ctx context.Context) (AppHostResponse, error)
- func (c *Client) Appearance(ctx context.Context) (AppearanceConfig, error)
- func (c *Client) AuditLogs(ctx context.Context, req AuditLogsRequest) (AuditLogResponse, error)
- func (c *Client) AuthCheck(ctx context.Context, req AuthorizationRequest) (AuthorizationResponse, error)
- func (c *Client) AuthMethods(ctx context.Context) (AuthMethods, error)
- func (c *Client) BuildInfo(ctx context.Context) (BuildInfoResponse, error)
- func (c *Client) CancelTemplateVersion(ctx context.Context, version uuid.UUID) error
- func (c *Client) CancelTemplateVersionDryRun(ctx context.Context, version, job uuid.UUID) error
- func (c *Client) CancelWorkspaceBuild(ctx context.Context, id uuid.UUID) error
- func (c *Client) ConvertLoginType(ctx context.Context, req ConvertLoginRequest) (OAuthConversionResponse, error)
- func (c *Client) CreateAPIKey(ctx context.Context, user string) (GenerateAPIKeyResponse, error)
- func (c *Client) CreateFirstUser(ctx context.Context, req CreateFirstUserRequest) (CreateFirstUserResponse, error)
- func (c *Client) CreateGroup(ctx context.Context, orgID uuid.UUID, req CreateGroupRequest) (Group, error)
- func (c *Client) CreateOrganization(ctx context.Context, req CreateOrganizationRequest) (Organization, error)
- func (c *Client) CreateTemplate(ctx context.Context, organizationID uuid.UUID, request CreateTemplateRequest) (Template, error)
- func (c *Client) CreateTemplateVersion(ctx context.Context, organizationID uuid.UUID, ...) (TemplateVersion, error)
- func (c *Client) CreateTemplateVersionDryRun(ctx context.Context, version uuid.UUID, req CreateTemplateVersionDryRunRequest) (ProvisionerJob, error)
- func (c *Client) CreateTestAuditLog(ctx context.Context, req CreateTestAuditLogRequest) error
- func (c *Client) CreateToken(ctx context.Context, userID string, req CreateTokenRequest) (GenerateAPIKeyResponse, error)
- func (c *Client) CreateUser(ctx context.Context, req CreateUserRequest) (User, error)
- func (c *Client) CreateWorkspace(ctx context.Context, organizationID uuid.UUID, user string, ...) (Workspace, error)
- func (c *Client) CreateWorkspaceBuild(ctx context.Context, workspace uuid.UUID, request CreateWorkspaceBuildRequest) (WorkspaceBuild, error)
- func (c *Client) CreateWorkspaceProxy(ctx context.Context, req CreateWorkspaceProxyRequest) (UpdateWorkspaceProxyResponse, error)
- func (c *Client) DeleteAPIKey(ctx context.Context, userID string, id string) error
- func (c *Client) DeleteGroup(ctx context.Context, group uuid.UUID) error
- func (c *Client) DeleteLicense(ctx context.Context, id int32) error
- func (c *Client) DeleteTemplate(ctx context.Context, template uuid.UUID) error
- func (c *Client) DeleteUser(ctx context.Context, id uuid.UUID) error
- func (c *Client) DeleteWorkspaceProxyByID(ctx context.Context, id uuid.UUID) error
- func (c *Client) DeleteWorkspaceProxyByName(ctx context.Context, name string) error
- func (c *Client) DeletedWorkspace(ctx context.Context, id uuid.UUID) (Workspace, error)
- func (c *Client) DeploymentConfig(ctx context.Context) (*DeploymentConfig, error)
- func (c *Client) DeploymentDAUs(ctx context.Context, tzOffset int) (*DAUsResponse, error)
- func (c *Client) DeploymentDAUsLocalTZ(ctx context.Context) (*DAUsResponse, error)
- func (c *Client) DeploymentStats(ctx context.Context) (DeploymentStats, error)
- func (c *Client) DialWorkspaceAgent(ctx context.Context, agentID uuid.UUID, options *DialWorkspaceAgentOptions) (agentConn *WorkspaceAgentConn, err error)
- func (c *Client) Download(ctx context.Context, id uuid.UUID) ([]byte, string, error)
- func (c *Client) Entitlements(ctx context.Context) (Entitlements, error)
- func (c *Client) Experiments(ctx context.Context) (Experiments, error)
- func (c *Client) GetTokenConfig(ctx context.Context, userID string) (TokenConfig, error)
- func (c *Client) GitAuthByID(ctx context.Context, provider string) (GitAuth, error)
- func (c *Client) GitAuthDeviceByID(ctx context.Context, provider string) (GitAuthDevice, error)
- func (c *Client) GitAuthDeviceExchange(ctx context.Context, provider string, req GitAuthDeviceExchange) error
- func (c *Client) GitSSHKey(ctx context.Context, user string) (GitSSHKey, error)
- func (c *Client) Group(ctx context.Context, group uuid.UUID) (Group, error)
- func (c *Client) GroupByOrgAndName(ctx context.Context, orgID uuid.UUID, name string) (Group, error)
- func (c *Client) GroupsByOrganization(ctx context.Context, orgID uuid.UUID) ([]Group, error)
- func (c *Client) HasFirstUser(ctx context.Context) (bool, error)
- func (c *Client) IssueReconnectingPTYSignedToken(ctx context.Context, req IssueReconnectingPTYSignedTokenRequest) (IssueReconnectingPTYSignedTokenResponse, error)
- func (c *Client) Licenses(ctx context.Context) ([]License, error)
- func (c *Client) ListOrganizationRoles(ctx context.Context, org uuid.UUID) ([]AssignableRoles, error)
- func (c *Client) ListSiteRoles(ctx context.Context) ([]AssignableRoles, error)
- func (c *Client) LogBodies() bool
- func (c *Client) Logger() slog.Logger
- func (c *Client) LoginWithPassword(ctx context.Context, req LoginWithPasswordRequest) (LoginWithPasswordResponse, error)
- func (c *Client) Logout(ctx context.Context) error
- func (c *Client) Organization(ctx context.Context, id uuid.UUID) (Organization, error)
- func (c *Client) OrganizationByName(ctx context.Context, user string, name string) (Organization, error)
- func (c *Client) OrganizationsByUser(ctx context.Context, user string) ([]Organization, error)
- func (c *Client) PatchGroup(ctx context.Context, group uuid.UUID, req PatchGroupRequest) (Group, error)
- func (c *Client) PatchWorkspaceProxy(ctx context.Context, req PatchWorkspaceProxy) (UpdateWorkspaceProxyResponse, error)
- func (c *Client) PreviousTemplateVersion(ctx context.Context, organization uuid.UUID, templateName, versionName string) (TemplateVersion, error)
- func (c *Client) ProvisionerDaemons(ctx context.Context) ([]ProvisionerDaemon, error)
- func (c *Client) PutExtendWorkspace(ctx context.Context, id uuid.UUID, req PutExtendWorkspaceRequest) error
- func (c *Client) RegenerateGitSSHKey(ctx context.Context, user string) (GitSSHKey, error)
- func (c *Client) Regions(ctx context.Context) ([]Region, error)
- func (c *Client) Replicas(ctx context.Context) ([]Replica, error)
- func (c *Client) Request(ctx context.Context, method, path string, body interface{}, ...) (*http.Response, error)
- func (c *Client) SSHConfiguration(ctx context.Context) (SSHConfigResponse, error)
- func (c *Client) ServeProvisionerDaemon(ctx context.Context, organization uuid.UUID, provisioners []ProvisionerType, ...) (proto.DRPCProvisionerDaemonClient, error)
- func (c *Client) SessionToken() string
- func (c *Client) SetLogBodies(logBodies bool)
- func (c *Client) SetLogger(logger slog.Logger)
- func (c *Client) SetSessionToken(token string)
- func (c *Client) Template(ctx context.Context, template uuid.UUID) (Template, error)
- func (c *Client) TemplateACL(ctx context.Context, templateID uuid.UUID) (TemplateACL, error)
- func (c *Client) TemplateByName(ctx context.Context, organizationID uuid.UUID, name string) (Template, error)
- func (c *Client) TemplateDAUs(ctx context.Context, templateID uuid.UUID, tzOffset int) (*DAUsResponse, error)
- func (c *Client) TemplateDAUsLocalTZ(ctx context.Context, templateID uuid.UUID) (*DAUsResponse, error)
- func (c *Client) TemplateExamples(ctx context.Context, organizationID uuid.UUID) ([]TemplateExample, error)
- func (c *Client) TemplateInsights(ctx context.Context, req TemplateInsightsRequest) (TemplateInsightsResponse, error)
- func (c *Client) TemplateVersion(ctx context.Context, id uuid.UUID) (TemplateVersion, error)
- func (c *Client) TemplateVersionByName(ctx context.Context, template uuid.UUID, name string) (TemplateVersion, error)
- func (c *Client) TemplateVersionByOrganizationAndName(ctx context.Context, organizationID uuid.UUID, ...) (TemplateVersion, error)
- func (c *Client) TemplateVersionDryRun(ctx context.Context, version, job uuid.UUID) (ProvisionerJob, error)
- func (c *Client) TemplateVersionDryRunLogsAfter(ctx context.Context, version, job uuid.UUID, after int64) (<-chan ProvisionerJobLog, io.Closer, error)
- func (c *Client) TemplateVersionDryRunResources(ctx context.Context, version, job uuid.UUID) ([]WorkspaceResource, error)
- func (c *Client) TemplateVersionGitAuth(ctx context.Context, version uuid.UUID) ([]TemplateVersionGitAuth, error)
- func (c *Client) TemplateVersionLogsAfter(ctx context.Context, version uuid.UUID, after int64) (<-chan ProvisionerJobLog, io.Closer, error)
- func (c *Client) TemplateVersionResources(ctx context.Context, version uuid.UUID) ([]WorkspaceResource, error)
- func (c *Client) TemplateVersionRichParameters(ctx context.Context, version uuid.UUID) ([]TemplateVersionParameter, error)
- func (c *Client) TemplateVersionVariables(ctx context.Context, version uuid.UUID) ([]TemplateVersionVariable, error)
- func (c *Client) TemplateVersionsByTemplate(ctx context.Context, req TemplateVersionsByTemplateRequest) ([]TemplateVersion, error)
- func (c *Client) TemplatesByOrganization(ctx context.Context, organizationID uuid.UUID) ([]Template, error)
- func (c *Client) Tokens(ctx context.Context, userID string, filter TokensFilter) ([]APIKeyWithOwner, error)
- func (c *Client) UpdateActiveTemplateVersion(ctx context.Context, template uuid.UUID, req UpdateActiveTemplateVersion) error
- func (c *Client) UpdateAppearance(ctx context.Context, appearance UpdateAppearanceConfig) error
- func (c *Client) UpdateCheck(ctx context.Context) (UpdateCheckResponse, error)
- func (c *Client) UpdateOrganizationMemberRoles(ctx context.Context, organizationID uuid.UUID, user string, req UpdateRoles) (OrganizationMember, error)
- func (c *Client) UpdateTemplateACL(ctx context.Context, templateID uuid.UUID, req UpdateTemplateACL) error
- func (c *Client) UpdateTemplateMeta(ctx context.Context, templateID uuid.UUID, req UpdateTemplateMeta) (Template, error)
- func (c *Client) UpdateTemplateVersion(ctx context.Context, versionID uuid.UUID, req PatchTemplateVersionRequest) (TemplateVersion, error)
- func (c *Client) UpdateUserPassword(ctx context.Context, user string, req UpdateUserPasswordRequest) error
- func (c *Client) UpdateUserProfile(ctx context.Context, user string, req UpdateUserProfileRequest) (User, error)
- func (c *Client) UpdateUserQuietHoursSchedule(ctx context.Context, userIdent string, req UpdateUserQuietHoursScheduleRequest) (UserQuietHoursScheduleResponse, error)
- func (c *Client) UpdateUserRoles(ctx context.Context, user string, req UpdateRoles) (User, error)
- func (c *Client) UpdateUserStatus(ctx context.Context, user string, status UserStatus) (User, error)
- func (c *Client) UpdateWorkspace(ctx context.Context, id uuid.UUID, req UpdateWorkspaceRequest) error
- func (c *Client) UpdateWorkspaceAutostart(ctx context.Context, id uuid.UUID, req UpdateWorkspaceAutostartRequest) error
- func (c *Client) UpdateWorkspaceLock(ctx context.Context, id uuid.UUID, req UpdateWorkspaceLock) error
- func (c *Client) UpdateWorkspaceTTL(ctx context.Context, id uuid.UUID, req UpdateWorkspaceTTLRequest) error
- func (c *Client) Upload(ctx context.Context, contentType string, rd io.Reader) (UploadResponse, error)
- func (c *Client) User(ctx context.Context, userIdent string) (User, error)
- func (c *Client) UserLatencyInsights(ctx context.Context, req UserLatencyInsightsRequest) (UserLatencyInsightsResponse, error)
- func (c *Client) UserQuietHoursSchedule(ctx context.Context, userIdent string) (UserQuietHoursScheduleResponse, error)
- func (c *Client) UserRoles(ctx context.Context, user string) (UserRoles, error)
- func (c *Client) Users(ctx context.Context, req UsersRequest) (GetUsersResponse, error)
- func (c *Client) WatchWorkspace(ctx context.Context, id uuid.UUID) (<-chan Workspace, error)
- func (c *Client) WatchWorkspaceAgentMetadata(ctx context.Context, id uuid.UUID) (<-chan []WorkspaceAgentMetadata, <-chan error)
- func (c *Client) Workspace(ctx context.Context, id uuid.UUID) (Workspace, error)
- func (c *Client) WorkspaceAgent(ctx context.Context, id uuid.UUID) (WorkspaceAgent, error)
- func (c *Client) WorkspaceAgentConnectionInfo(ctx context.Context) (*WorkspaceAgentConnectionInfo, error)
- func (c *Client) WorkspaceAgentListeningPorts(ctx context.Context, agentID uuid.UUID) (WorkspaceAgentListeningPortsResponse, error)
- func (c *Client) WorkspaceAgentReconnectingPTY(ctx context.Context, opts WorkspaceAgentReconnectingPTYOpts) (net.Conn, error)
- func (c *Client) WorkspaceAgentStartupLogsAfter(ctx context.Context, agentID uuid.UUID, after int64, follow bool) (<-chan []WorkspaceAgentStartupLog, io.Closer, error)
- func (c *Client) WorkspaceBuild(ctx context.Context, id uuid.UUID) (WorkspaceBuild, error)
- func (c *Client) WorkspaceBuildByUsernameAndWorkspaceNameAndBuildNumber(ctx context.Context, username string, workspaceName string, buildNumber string) (WorkspaceBuild, error)
- func (c *Client) WorkspaceBuildLogsAfter(ctx context.Context, build uuid.UUID, after int64) (<-chan ProvisionerJobLog, io.Closer, error)
- func (c *Client) WorkspaceBuildParameters(ctx context.Context, build uuid.UUID) ([]WorkspaceBuildParameter, error)
- func (c *Client) WorkspaceBuildState(ctx context.Context, build uuid.UUID) ([]byte, error)
- func (c *Client) WorkspaceBuilds(ctx context.Context, req WorkspaceBuildsRequest) ([]WorkspaceBuild, error)
- func (c *Client) WorkspaceByOwnerAndName(ctx context.Context, owner string, name string, params WorkspaceOptions) (Workspace, error)
- func (c *Client) WorkspaceProxies(ctx context.Context) (RegionsResponse[WorkspaceProxy], error)
- func (c *Client) WorkspaceProxyByID(ctx context.Context, id uuid.UUID) (WorkspaceProxy, error)
- func (c *Client) WorkspaceProxyByName(ctx context.Context, name string) (WorkspaceProxy, error)
- func (c *Client) WorkspaceQuota(ctx context.Context, userID string) (WorkspaceQuota, error)
- func (c *Client) Workspaces(ctx context.Context, filter WorkspaceFilter) (WorkspacesResponse, error)
- type ConnectionLatency
- type ConvertLoginRequest
- type CreateFirstUserRequest
- type CreateFirstUserResponse
- type CreateGroupRequest
- type CreateOrganizationRequest
- type CreateTemplateRequest
- type CreateTemplateVersionDryRunRequest
- type CreateTemplateVersionRequest
- type CreateTestAuditLogRequest
- type CreateTokenRequest
- type CreateUserRequest
- type CreateWorkspaceBuildRequest
- type CreateWorkspaceProxyRequest
- type CreateWorkspaceRequest
- type DAUEntry
- type DAURequest
- type DAUsResponse
- type DERP
- type DERPConfig
- type DERPRegion
- type DERPServerConfig
- type DangerousConfig
- type DeploymentConfig
- type DeploymentStats
- type DeploymentValues
- type DialWorkspaceAgentOptions
- type Entitlement
- type Entitlements
- type Error
- type Experiment
- type Experiments
- type Feature
- type FeatureName
- type GenerateAPIKeyResponse
- type GetUsersResponse
- type GitAuth
- type GitAuthAppInstallation
- type GitAuthConfig
- type GitAuthDevice
- type GitAuthDeviceExchange
- type GitAuthUser
- type GitProvider
- type GitSSHKey
- type Group
- type Healthcheck
- type InsightsReportInterval
- type IssueReconnectingPTYSignedTokenRequest
- type IssueReconnectingPTYSignedTokenResponse
- type JobErrorCode
- type License
- type LinkConfig
- type LogLevel
- type LogSource
- type LoggingConfig
- type LoginType
- type LoginWithPasswordRequest
- type LoginWithPasswordResponse
- type NullTime
- type OAuth2Config
- type OAuth2GithubConfig
- type OAuthConversionResponse
- type OIDCAuthMethod
- type OIDCConfig
- type Organization
- type OrganizationMember
- type Pagination
- type ParameterResolver
- type PatchGroupRequest
- type PatchTemplateVersionRequest
- type PatchWorkspaceProxy
- type PprofConfig
- type PrometheusConfig
- type ProvisionerConfig
- type ProvisionerDaemon
- type ProvisionerJob
- type ProvisionerJobLog
- type ProvisionerJobStatus
- type ProvisionerLogLevel
- type ProvisionerStorageMethod
- type ProvisionerType
- type ProxyHealthReport
- type ProxyHealthStatus
- type PutExtendWorkspaceRequest
- type RBACResource
- type RateLimitConfig
- type ReconnectingPTYRequest
- type Region
- type RegionTypes
- type RegionsResponse
- type Replica
- type RequestOption
- type ResourceType
- type Response
- type Role
- type SSHConfig
- type SSHConfigResponse
- type ServerSentEvent
- type ServerSentEventType
- type ServiceBannerConfig
- type SessionCountDeploymentStats
- type SupportConfig
- type SwaggerConfig
- type TLSConfig
- type TelemetryConfig
- type Template
- type TemplateACL
- type TemplateAppUsage
- type TemplateAppsType
- type TemplateBuildTimeStats
- type TemplateExample
- type TemplateGroup
- type TemplateInsightsIntervalReport
- type TemplateInsightsReport
- type TemplateInsightsRequest
- type TemplateInsightsResponse
- type TemplateRestartRequirement
- type TemplateRole
- type TemplateUser
- type TemplateVersion
- type TemplateVersionGitAuth
- type TemplateVersionParameter
- type TemplateVersionParameterOption
- type TemplateVersionVariable
- type TemplateVersionWarning
- type TemplateVersionsByTemplateRequest
- type TokenConfig
- type TokensFilter
- type TraceConfig
- type TransitionStats
- type UpdateActiveTemplateVersion
- type UpdateAppearanceConfig
- type UpdateCheckResponse
- type UpdateRoles
- type UpdateTemplateACL
- type UpdateTemplateMeta
- type UpdateUserPasswordRequest
- type UpdateUserProfileRequest
- type UpdateUserQuietHoursScheduleRequest
- type UpdateWorkspaceAutostartRequest
- type UpdateWorkspaceLock
- type UpdateWorkspaceProxyResponse
- type UpdateWorkspaceRequest
- type UpdateWorkspaceTTLRequest
- type UploadResponse
- type User
- type UserLatency
- type UserLatencyInsightsReport
- type UserLatencyInsightsRequest
- type UserLatencyInsightsResponse
- type UserLoginType
- type UserQuietHoursScheduleConfig
- type UserQuietHoursScheduleResponse
- type UserRoles
- type UserStatus
- type UsersRequest
- type ValidationError
- type ValidationMonotonicOrder
- type VariableValue
- type Workspace
- type WorkspaceAgent
- type WorkspaceAgentConn
- func (c *WorkspaceAgentConn) AwaitReachable(ctx context.Context) bool
- func (c *WorkspaceAgentConn) Close() error
- func (c *WorkspaceAgentConn) DialContext(ctx context.Context, network string, addr string) (net.Conn, error)
- func (c *WorkspaceAgentConn) ListeningPorts(ctx context.Context) (WorkspaceAgentListeningPortsResponse, error)
- func (c *WorkspaceAgentConn) Ping(ctx context.Context) (time.Duration, bool, *ipnstate.PingResult, error)
- func (c *WorkspaceAgentConn) ReconnectingPTY(ctx context.Context, id uuid.UUID, height, width uint16, command string) (net.Conn, error)
- func (c *WorkspaceAgentConn) SSH(ctx context.Context) (net.Conn, error)
- func (c *WorkspaceAgentConn) SSHClient(ctx context.Context) (*ssh.Client, error)
- func (c *WorkspaceAgentConn) Speedtest(ctx context.Context, direction speedtest.Direction, duration time.Duration) ([]speedtest.Result, error)
- type WorkspaceAgentConnOptions
- type WorkspaceAgentConnectionInfo
- type WorkspaceAgentHealth
- type WorkspaceAgentLifecycle
- type WorkspaceAgentListeningPort
- type WorkspaceAgentListeningPortsResponse
- type WorkspaceAgentMetadata
- type WorkspaceAgentMetadataDescription
- type WorkspaceAgentMetadataResult
- type WorkspaceAgentReconnectingPTYInit
- type WorkspaceAgentReconnectingPTYOpts
- type WorkspaceAgentStartupLog
- type WorkspaceAgentStartupScriptBehavior
- type WorkspaceAgentStatus
- type WorkspaceApp
- type WorkspaceAppHealth
- type WorkspaceAppSharingLevel
- type WorkspaceBuild
- type WorkspaceBuildParameter
- type WorkspaceBuildsRequest
- type WorkspaceConnectionLatencyMS
- type WorkspaceDeploymentStats
- type WorkspaceFilter
- type WorkspaceHealth
- type WorkspaceOptions
- type WorkspaceProxy
- type WorkspaceProxyBuildInfo
- type WorkspaceProxyStatus
- type WorkspaceQuota
- type WorkspaceResource
- type WorkspaceResourceMetadata
- type WorkspaceStatus
- type WorkspaceTransition
- type WorkspacesRequest
- type WorkspacesResponse
Constants¶
const (// SessionTokenCookie represents the name of the cookie or query parameter the API key is stored in.SessionTokenCookie = "coder_session_token"// SessionTokenHeader is the custom header to use for authentication.SessionTokenHeader = "Coder-Session-Token"// OAuth2StateCookie is the name of the cookie that stores the oauth2 state.OAuth2StateCookie = "oauth_state"// OAuth2RedirectCookie is the name of the cookie that stores the oauth2 redirect.OAuth2RedirectCookie = "oauth_redirect"// DevURLSessionTokenCookie is the name of the cookie that stores a devurl// token on app domains.//nolint:gosecDevURLSessionTokenCookie = "coder_devurl_session_token"// DevURLSignedAppTokenCookie is the name of the cookie that stores a// temporary JWT that can be used to authenticate instead of the session// token.//nolint:gosecDevURLSignedAppTokenCookie = "coder_devurl_signed_app_token"// SignedAppTokenQueryParameter is the name of the query parameter that// stores a temporary JWT that can be used to authenticate instead of the// session token. This is only acceptable on reconnecting-pty requests, not// apps.//// It has a random suffix to avoid conflict with user query parameters on// apps.//nolint:gosecSignedAppTokenQueryParameter = "coder_signed_app_token_23db1dde"// BypassRatelimitHeader is the custom header to use to bypass ratelimits.// Only owners can bypass rate limits. This is typically used for scale testing.// nolint: gosecBypassRatelimitHeader = "X-Coder-Bypass-Ratelimit"// CLITelemetryHeader contains a base64-encoded representation of the CLI// command that was invoked to produce the request. It is for internal use// only.CLITelemetryHeader = "Coder-CLI-Telemetry")
These cookies are Coder-specific. If a new one is added or changed, the nameshouldn't be likely to conflict with any user-application set cookies.Be sure to strip additional cookies in httpapi.StripCoderCookies!
const (LogSourceProvisionerDaemonLogSource = "provisioner_daemon"LogSourceProvisionerLogSource = "provisioner"LogLevelTraceLogLevel = "trace"LogLevelDebugLogLevel = "debug"LogLevelInfoLogLevel = "info"LogLevelWarnLogLevel = "warn"LogLevelErrorLogLevel = "error")
const (WorkspaceAgentSSHPort =tailnet.WorkspaceAgentSSHPortWorkspaceAgentReconnectingPTYPort =tailnet.WorkspaceAgentReconnectingPTYPortWorkspaceAgentSpeedtestPort =tailnet.WorkspaceAgentSpeedtestPort// WorkspaceAgentHTTPAPIServerPort serves a HTTP server with endpoints for e.g.// gathering agent statistics.WorkspaceAgentHTTPAPIServerPort = 4// WorkspaceAgentMinimumListeningPort is the minimum port that the listening-ports// endpoint will return to the client, and the minimum port that is accepted// by the proxy applications endpoint. Coder consumes ports 1-4 at the// moment, and we reserve some extra ports for future use. Port 9 and up are// available for the user.//// This is not enforced in the CLI intentionally as we don't really care// *that* much. The user could bypass this in the CLI by using SSH instead// anyways.WorkspaceAgentMinimumListeningPort = 9)
const (ContentTypeTar = "application/x-tar")
const (LicenseExpiryClaim = "license_expires")
Variables¶
var ErrSkipClose =xerrors.New("skip tailnet close")
var ExperimentsAll =Experiments{}
ExperimentsAll should include all experiments that are safe forusers to opt-in to via --experimental='*'.Experiments that are not ready for consumption by all users shouldnot be included here and will be essentially hidden.
var FeatureNames = []FeatureName{FeatureUserLimit,FeatureAuditLog,FeatureBrowserOnly,FeatureSCIM,FeatureTemplateRBAC,FeatureHighAvailability,FeatureMultipleGitAuth,FeatureExternalProvisionerDaemons,FeatureAppearance,FeatureAdvancedTemplateScheduling,FeatureWorkspaceProxy,}
FeatureNames must be kept in-sync with the Feature enum above.
var Me = "me"
Me is used as a replacement for your own ID.
var WorkspaceAgentIP =netip.MustParseAddr("fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4")
WorkspaceAgentIP is a static IPv6 address with the Tailscale prefix that is used to routeconnections from clients to this node. A dynamic address is not required because a Tailnetclient only dials a single agent at a time.
Deprecated: use tailnet.IP() instead. This is kept for backwardscompatibility with wsconncache.See:https://github.com/coder/coder/issues/8218
var WorkspaceAgentIgnoredListeningPorts = map[uint16]struct{}{0: {},1: {},2: {},3: {},4: {},5: {},6: {},7: {},8: {},20: {},21: {},22: {},23: {},25: {},53: {},110: {},143: {},179: {},389: {},636: {},465: {},587: {},989: {},990: {},993: {},995: {},3306: {},3389: {},5432: {},27017: {},27018: {},27019: {},28017: {},}
WorkspaceAgentIgnoredListeningPorts contains a list of ports to ignore when looking forrunning applications inside a workspace. We want to ignore non-HTTP servers,so we pre-populate this list with common ports that are not HTTP servers.
This is implemented as a map for fast lookup.
var WorkspaceAgentLifecycleOrder = []WorkspaceAgentLifecycle{WorkspaceAgentLifecycleCreated,WorkspaceAgentLifecycleStarting,WorkspaceAgentLifecycleStartTimeout,WorkspaceAgentLifecycleStartError,WorkspaceAgentLifecycleReady,WorkspaceAgentLifecycleShuttingDown,WorkspaceAgentLifecycleShutdownTimeout,WorkspaceAgentLifecycleShutdownError,WorkspaceAgentLifecycleOff,}
WorkspaceAgentLifecycleOrder is the order in which workspace agentlifecycle states are expected to be reported during the lifetime ofthe agent process. For instance, the agent can go from starting toready without reporting timeout or error, but it should not go fromready to starting. This is merely a hint for the agent process, andis not enforced by the server.
Functions¶
funcBitmapToWeekdays¶added inv0.26.2
BitmapToWeekdays converts a bitmap to a list of weekdays in accordance withthe schedule package's rules (see above).
funcDefaultCacheDir¶added inv0.19.0
func DefaultCacheDir()string
funcIsConnectionError¶added inv0.16.0
IsConnectionError is a convenience function for checking if the source of anerror is due to a 'connection refused', 'no such host', etc.
funcIsSecretDeploymentOption¶added inv0.19.0
funcIsWorkspaceProxies¶added inv0.23.0
IsWorkspaceProxies returns true if the cli option is used by workspace proxies.
funcParseSSHConfigOption¶added inv0.20.0
ParseSSHConfigOption parses a single ssh config option into it's key/value pair.
funcReadBodyAsError¶added inv0.16.0
ReadBodyAsError reads the response as a codersdk.Response, andwraps it in a codersdk.Error type for easy marshaling.
funcServerSentEventReader¶added inv0.9.0
func ServerSentEventReader(ctxcontext.Context, rcio.ReadCloser) func() (*ServerSentEvent,error)
funcTimezoneOffsetHour¶added inv0.24.0
funcValidateNewWorkspaceParameters¶added inv0.17.0
func ValidateNewWorkspaceParameters(richParameters []TemplateVersionParameter, buildParameters []WorkspaceBuildParameter)error
funcValidateWorkspaceBuildParameter¶added inv0.15.3
func ValidateWorkspaceBuildParameter(richParameterTemplateVersionParameter, buildParameter *WorkspaceBuildParameter, lastBuildParameter *WorkspaceBuildParameter)error
funcValidateWorkspaceBuildParameters¶added inv0.15.3
func ValidateWorkspaceBuildParameters(richParameters []TemplateVersionParameter, buildParameters, lastBuildParameters []WorkspaceBuildParameter)error
funcWeekdaysToBitmap¶added inv0.26.2
WeekdaysToBitmap converts a list of weekdays to a bitmap in accordance withthe schedule package's rules. The 0th bit is Monday, ..., the 6th bit isSunday. The 7th bit is unused.
funcWorkspaceDisplayStatus¶added inv0.7.7
func WorkspaceDisplayStatus(jobStatusProvisionerJobStatus, transitionWorkspaceTransition)string
WorkspaceDisplayStatus computes a status to display on CLI/UI based onthe workspace transition and the status of the provisioner job.This code is in sync with how we compute the status on frontend.Ref: site/src/util/workspace.ts (getWorkspaceStatus)
funcWorkspaceNotifyChannel¶added inv0.12.6
WorkspaceNotifyChannel is the PostgreSQL NOTIFYchannel to listen for updates on. The payload is empty,because the size of a workspace payload can be very large.
Types¶
typeAPIKey¶added inv0.7.6
type APIKey struct {IDstring `json:"id" validate:"required"`UserIDuuid.UUID `json:"user_id" validate:"required" format:"uuid"`LastUsedtime.Time `json:"last_used" validate:"required" format:"date-time"`ExpiresAttime.Time `json:"expires_at" validate:"required" format:"date-time"`CreatedAttime.Time `json:"created_at" validate:"required" format:"date-time"`UpdatedAttime.Time `json:"updated_at" validate:"required" format:"date-time"`LoginTypeLoginType `json:"login_type" validate:"required" enums:"password,github,oidc,token"`ScopeAPIKeyScope `json:"scope" validate:"required" enums:"all,application_connect"`TokenNamestring `json:"token_name" validate:"required"`LifetimeSecondsint64 `json:"lifetime_seconds" validate:"required"`}
APIKey: do not ever return the HashedSecret
typeAPIKeyScope¶added inv0.10.0
type APIKeyScopestring
const (// APIKeyScopeAll is a scope that allows the user to do everything.APIKeyScopeAllAPIKeyScope = "all"// APIKeyScopeApplicationConnect is a scope that allows the user// to connect to applications in a workspace.APIKeyScopeApplicationConnectAPIKeyScope = "application_connect")
typeAPIKeyWithOwner¶added inv0.18.0
typeAddLicenseRequest¶added inv0.8.7
type AddLicenseRequest struct {Licensestring `json:"license" validate:"required"`}
typeAgentStatsReportRequest¶added inv0.8.12
type AgentStatsReportRequest struct{}
AgentStatsReportRequest is a WebSocket request by coderdto the agent for stats.@typescript-ignore AgentStatsReportRequest
typeAgentStatsReportResponse¶added inv0.8.12
type AgentStatsReportResponse struct {NumConnsint64 `json:"num_comms"`// RxBytes is the number of received bytes.RxBytesint64 `json:"rx_bytes"`// TxBytes is the number of transmitted bytes.TxBytesint64 `json:"tx_bytes"`}
AgentStatsReportResponse is returned for each reportrequest by the agent.
typeAgentSubsystem¶added inv0.23.5
type AgentSubsystemstring
const (AgentSubsystemEnvboxAgentSubsystem = "envbox")
typeAppHostResponse¶added inv0.16.0
type AppHostResponse struct {// Host is the externally accessible URL for the Coder instance.Hoststring `json:"host"`}
typeAppearanceConfig¶added inv0.14.0
type AppearanceConfig struct {LogoURLstring `json:"logo_url"`ServiceBannerServiceBannerConfig `json:"service_banner"`SupportLinks []LinkConfig `json:"support_links,omitempty"`}
typeAssignableRoles¶added inv0.8.6
typeAuditAction¶added inv0.8.11
type AuditActionstring
const (AuditActionCreateAuditAction = "create"AuditActionWriteAuditAction = "write"AuditActionDeleteAuditAction = "delete"AuditActionStartAuditAction = "start"AuditActionStopAuditAction = "stop"AuditActionLoginAuditAction = "login"AuditActionLogoutAuditAction = "logout"AuditActionRegisterAuditAction = "register")
func (AuditAction)Friendly¶added inv0.16.0
func (aAuditAction) Friendly()string
typeAuditDiff¶added inv0.8.11
type AuditDiff map[string]AuditDiffField
typeAuditDiffField¶added inv0.8.11
typeAuditLog¶added inv0.8.11
type AuditLog struct {IDuuid.UUID `json:"id" format:"uuid"`RequestIDuuid.UUID `json:"request_id" format:"uuid"`Timetime.Time `json:"time" format:"date-time"`OrganizationIDuuid.UUID `json:"organization_id" format:"uuid"`IPnetip.Addr `json:"ip"`UserAgentstring `json:"user_agent"`ResourceTypeResourceType `json:"resource_type"`ResourceIDuuid.UUID `json:"resource_id" format:"uuid"`// ResourceTarget is the name of the resource.ResourceTargetstring `json:"resource_target"`ResourceIconstring `json:"resource_icon"`ActionAuditAction `json:"action"`DiffAuditDiff `json:"diff"`StatusCodeint32 `json:"status_code"`AdditionalFieldsjson.RawMessage `json:"additional_fields"`Descriptionstring `json:"description"`ResourceLinkstring `json:"resource_link"`IsDeletedbool `json:"is_deleted"`User *User `json:"user"`}
typeAuditLogResponse¶added inv0.8.14
typeAuditLogsRequest¶added inv0.9.0
type AuditLogsRequest struct {SearchQuerystring `json:"q,omitempty"`Pagination}
typeAuthMethod¶added inv0.16.0
type AuthMethod struct {Enabledbool `json:"enabled"`}
typeAuthMethods¶added inv0.4.4
type AuthMethods struct {ConvertToOIDCEnabledbool `json:"convert_to_oidc_enabled"`PasswordAuthMethod `json:"password"`GithubAuthMethod `json:"github"`OIDCOIDCAuthMethod `json:"oidc"`}
AuthMethods contains authentication method information like whether they are enabled or not or custom text, etc.
typeAuthorizationCheck¶added inv0.9.0
type AuthorizationCheck struct {// Object can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me, and all workspaces across the entire product.// When defining an object, use the most specific language when possible to// produce the smallest set. Meaning to set as many fields on 'Object' as// you can. Example, if you want to check if you can update all workspaces// owned by 'me', try to also add an 'OrganizationID' to the settings.// Omitting the 'OrganizationID' could produce the incorrect value, as// workspaces have both `user` and `organization` owners.ObjectAuthorizationObject `json:"object"`Actionstring `json:"action" enums:"create,read,update,delete"`}
AuthorizationCheck is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects.
@Description AuthorizationCheck is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects.
typeAuthorizationObject¶added inv0.9.0
type AuthorizationObject struct {// ResourceType is the name of the resource.// `./coderd/rbac/object.go` has the list of valid resource types.ResourceTypeRBACResource `json:"resource_type"`// OwnerID (optional) adds the set constraint to all resources owned by a given user.OwnerIDstring `json:"owner_id,omitempty"`// OrganizationID (optional) adds the set constraint to all resources owned by a given organization.OrganizationIDstring `json:"organization_id,omitempty"`// ResourceID (optional) reduces the set to a singular resource. This assigns// a resource ID to the resource type, eg: a single workspace.// The rbac library will not fetch the resource from the database, so if you// are using this option, you should also set the owner ID and organization ID// if possible. Be as specific as possible using all the fields relevant.ResourceIDstring `json:"resource_id,omitempty"`}
AuthorizationObject can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me,all workspaces across the entire product.
@Description AuthorizationObject can represent a "set" of objects, such as: all workspaces in an organization, all workspaces owned by me,@Description all workspaces across the entire product.
typeAuthorizationRequest¶added inv0.9.0
type AuthorizationRequest struct {// Checks is a map keyed with an arbitrary string to a permission check.// The key can be any string that is helpful to the caller, and allows// multiple permission checks to be run in a single request.// The key ensures that each permission check has the same key in the// response.Checks map[string]AuthorizationCheck `json:"checks"`}
AuthorizationRequest is a structure instead of a map becausego-playground/validate can only validate structs. If you attempt to passa map into `httpapi.Read`, you will get an invalid type error.
typeAuthorizationResponse¶added inv0.9.0
typeBuildInfoResponse¶added inv0.4.1
type BuildInfoResponse struct {// ExternalURL references the current Coder version.// For production builds, this will link directly to a release. For development builds, this will link to a commit.ExternalURLstring `json:"external_url"`// Version returns the semantic version of the build.Versionstring `json:"version"`// DashboardURL is the URL to hit the deployment's dashboard.// For external workspace proxies, this is the coderd they are connected// to.DashboardURLstring `json:"dashboard_url"`WorkspaceProxybool `json:"workspace_proxy"`}
BuildInfoResponse contains build information for this instance of Coder.
func (BuildInfoResponse)CanonicalVersion¶added inv0.7.7
func (bBuildInfoResponse) CanonicalVersion()string
CanonicalVersion trims build information from the version.E.g. 'v0.7.4-devel+11573034' -> 'v0.7.4'.
typeBuildReason¶added inv0.7.2
type BuildReasonstring
const (// "initiator" is used when a workspace build is triggered by a user.// Combined with the initiator id/username, it indicates which user initiated the build.BuildReasonInitiatorBuildReason = "initiator"// "autostart" is used when a build to start a workspace is triggered by Autostart.// The initiator id/username in this case is the workspace owner and can be ignored.BuildReasonAutostartBuildReason = "autostart"// "autostop" is used when a build to stop a workspace is triggered by Autostop.// The initiator id/username in this case is the workspace owner and can be ignored.BuildReasonAutostopBuildReason = "autostop")
typeClient¶
type Client struct {HTTPClient *http.ClientURL *url.URL// SessionTokenHeader is an optional custom header to use for setting tokens. By// default 'Coder-Session-Token' is used.SessionTokenHeaderstring// PlainLogger may be set to log HTTP traffic in a human-readable form.// It uses the LogBodies option.PlainLoggerio.Writer// Trace can be enabled to propagate tracing spans to the Coder API.// This is useful for tracking a request end-to-end.Tracebool// DisableDirectConnections forces any connections to workspaces to go// through DERP, regardless of the BlockEndpoints setting on each// connection.DisableDirectConnectionsbool// contains filtered or unexported fields}
Client is an HTTP caller for methods to the Coder API.@typescript-ignore Client
func (*Client)APIKeyByID¶added inv0.19.0
APIKeyByID returns the api key by id.
func (*Client)APIKeyByName¶added inv0.19.0
APIKeyByName returns the api key by name.
func (*Client)AddLicense¶added inv0.8.7
func (*Client)AppHost¶added inv0.16.0
func (c *Client) AppHost(ctxcontext.Context) (AppHostResponse,error)
AppHost returns the site-wide application wildcard hostname without theleading "*.", e.g. "apps.coder.com". Apps are accessible at:"<app-name>--<agent-name>--<workspace-name>--<username>.<app-host>", e.g."my-app--agent--workspace--username.apps.coder.com".
If the app host is not set, the response will contain an empty string.
func (*Client)Appearance¶added inv0.14.0
func (c *Client) Appearance(ctxcontext.Context) (AppearanceConfig,error)
Appearance returns the configuration that modifies the visualdisplay of the dashboard.
func (*Client)AuditLogs¶added inv0.8.14
func (c *Client) AuditLogs(ctxcontext.Context, reqAuditLogsRequest) (AuditLogResponse,error)
AuditLogs retrieves audit logs from the given page.
func (*Client)AuthCheck¶added inv0.16.0
func (c *Client) AuthCheck(ctxcontext.Context, reqAuthorizationRequest) (AuthorizationResponse,error)
AuthCheck allows the authenticated user to check if they have the given permissionsto a set of resources.
func (*Client)AuthMethods¶added inv0.4.4
func (c *Client) AuthMethods(ctxcontext.Context) (AuthMethods,error)
AuthMethods returns types of authentication available to the user.
func (*Client)BuildInfo¶added inv0.4.1
func (c *Client) BuildInfo(ctxcontext.Context) (BuildInfoResponse,error)
BuildInfo returns build information for this instance of Coder.
func (*Client)CancelTemplateVersion¶added inv0.4.0
CancelTemplateVersion marks a template version job as canceled.
func (*Client)CancelTemplateVersionDryRun¶added inv0.6.1
CancelTemplateVersionDryRun marks a template version dry-run job as canceled.
func (*Client)CancelWorkspaceBuild¶
CancelWorkspaceBuild marks a workspace build job as canceled.
func (*Client)ConvertLoginType¶added inv0.25.0
func (c *Client) ConvertLoginType(ctxcontext.Context, reqConvertLoginRequest) (OAuthConversionResponse,error)
ConvertLoginType will send a request to convert the user from passwordbased authentication to oauth based. The response has the oauth state codeto use in the oauth flow.
func (*Client)CreateAPIKey¶
CreateAPIKey generates an API key for the user ID provided.CreateToken should be used over CreateAPIKey. CreateToken allows bettertracking of the token's usage and allows for custom expiration.Only use CreateAPIKey if you want to emulate the session created fora browser like login.
func (*Client)CreateFirstUser¶
func (c *Client) CreateFirstUser(ctxcontext.Context, reqCreateFirstUserRequest) (CreateFirstUserResponse,error)
CreateFirstUser attempts to create the first user on a Coder deployment.This initial user has superadmin privileges. If >0 users exist, this request will fail.
func (*Client)CreateGroup¶added inv0.9.9
func (*Client)CreateOrganization¶
func (c *Client) CreateOrganization(ctxcontext.Context, reqCreateOrganizationRequest) (Organization,error)
CreateOrganization creates an organization and adds the provided user as an admin.
func (*Client)CreateTemplate¶added inv0.4.0
func (c *Client) CreateTemplate(ctxcontext.Context, organizationIDuuid.UUID, requestCreateTemplateRequest) (Template,error)
CreateTemplate creates a new template inside an organization.
func (*Client)CreateTemplateVersion¶added inv0.4.0
func (c *Client) CreateTemplateVersion(ctxcontext.Context, organizationIDuuid.UUID, reqCreateTemplateVersionRequest) (TemplateVersion,error)
CreateTemplateVersion processes source-code and optionally associates the version with a template.Executing without a template is useful for validating source-code.
func (*Client)CreateTemplateVersionDryRun¶added inv0.6.1
func (c *Client) CreateTemplateVersionDryRun(ctxcontext.Context, versionuuid.UUID, reqCreateTemplateVersionDryRunRequest) (ProvisionerJob,error)
CreateTemplateVersionDryRun begins a dry-run provisioner job against thegiven template version with the given parameter values.
func (*Client)CreateTestAuditLog¶added inv0.8.14
func (c *Client) CreateTestAuditLog(ctxcontext.Context, reqCreateTestAuditLogRequest)error
CreateTestAuditLog creates a fake audit log. Only owners of the organizationcan perform this action. It's used for testing purposes.
func (*Client)CreateToken¶added inv0.9.7
func (c *Client) CreateToken(ctxcontext.Context, userIDstring, reqCreateTokenRequest) (GenerateAPIKeyResponse,error)
CreateToken generates an API key for the user ID provided withcustom expiration. These tokens can be used for long-lived access,like for use with CI.
func (*Client)CreateUser¶
CreateUser creates a new user.
func (*Client)CreateWorkspace¶
func (c *Client) CreateWorkspace(ctxcontext.Context, organizationIDuuid.UUID, userstring, requestCreateWorkspaceRequest) (Workspace,error)
CreateWorkspace creates a new workspace for the template specified.
func (*Client)CreateWorkspaceBuild¶
func (c *Client) CreateWorkspaceBuild(ctxcontext.Context, workspaceuuid.UUID, requestCreateWorkspaceBuildRequest) (WorkspaceBuild,error)
CreateWorkspaceBuild queues a new build to occur for a workspace.
func (*Client)CreateWorkspaceProxy¶added inv0.22.0
func (c *Client) CreateWorkspaceProxy(ctxcontext.Context, reqCreateWorkspaceProxyRequest) (UpdateWorkspaceProxyResponse,error)
func (*Client)DeleteAPIKey¶added inv0.9.7
DeleteAPIKey deletes API key by id.
func (*Client)DeleteGroup¶added inv0.9.9
func (*Client)DeleteLicense¶added inv0.8.7
func (*Client)DeleteTemplate¶added inv0.4.0
func (*Client)DeleteUser¶added inv0.8.15
DeleteUser deletes a user.
func (*Client)DeleteWorkspaceProxyByID¶added inv0.23.0
func (*Client)DeleteWorkspaceProxyByName¶added inv0.23.0
func (*Client)DeletedWorkspace¶added inv0.6.0
DeletedWorkspace returns a single workspace that was deleted.
func (*Client)DeploymentConfig¶added inv0.11.0
func (c *Client) DeploymentConfig(ctxcontext.Context) (*DeploymentConfig,error)
DeploymentConfig returns the deployment config for the coder server.
func (*Client)DeploymentDAUs¶added inv0.15.3
DeploymentDAUs requires a tzOffset in hours. Use 0 for UTC, and TimezoneOffsetHour(time.Local) for thelocal timezone.
func (*Client)DeploymentDAUsLocalTZ¶added inv0.24.0
func (c *Client) DeploymentDAUsLocalTZ(ctxcontext.Context) (*DAUsResponse,error)
func (*Client)DeploymentStats¶added inv0.19.0
func (c *Client) DeploymentStats(ctxcontext.Context) (DeploymentStats,error)
func (*Client)DialWorkspaceAgent¶
func (c *Client) DialWorkspaceAgent(ctxcontext.Context, agentIDuuid.UUID, options *DialWorkspaceAgentOptions) (agentConn *WorkspaceAgentConn, errerror)
func (*Client)Entitlements¶added inv0.8.6
func (c *Client) Entitlements(ctxcontext.Context) (Entitlements,error)
func (*Client)Experiments¶added inv0.15.0
func (c *Client) Experiments(ctxcontext.Context) (Experiments,error)
func (*Client)GetTokenConfig¶added inv0.20.0
GetTokenConfig returns deployment options related to token management
func (*Client)GitAuthByID¶added inv0.25.0
GitAuthByID returns the git auth for the given provider by ID.
func (*Client)GitAuthDeviceByID¶added inv0.25.0
func (*Client)GitAuthDeviceExchange¶added inv0.25.0
func (c *Client) GitAuthDeviceExchange(ctxcontext.Context, providerstring, reqGitAuthDeviceExchange)error
ExchangeGitAuth exchanges a device code for a git auth token.
func (*Client)GroupByOrgAndName¶added inv0.12.0
func (*Client)GroupsByOrganization¶added inv0.9.9
func (*Client)HasFirstUser¶
HasFirstUser returns whether the first user has been created.
func (*Client)IssueReconnectingPTYSignedToken¶added inv0.23.0
func (c *Client) IssueReconnectingPTYSignedToken(ctxcontext.Context, reqIssueReconnectingPTYSignedTokenRequest) (IssueReconnectingPTYSignedTokenResponse,error)
func (*Client)ListOrganizationRoles¶added inv0.5.4
ListOrganizationRoles lists all assignable roles for a given organization.
func (*Client)ListSiteRoles¶added inv0.5.4
func (c *Client) ListSiteRoles(ctxcontext.Context) ([]AssignableRoles,error)
ListSiteRoles lists all assignable site wide roles.
func (*Client)LogBodies¶added inv0.12.6
LogBodies returns whether requests and response bodies are logged.
func (*Client)LoginWithPassword¶
func (c *Client) LoginWithPassword(ctxcontext.Context, reqLoginWithPasswordRequest) (LoginWithPasswordResponse,error)
LoginWithPassword creates a session token authenticating with an email and password.Call `SetSessionToken()` to apply the newly acquired token to the client.
func (*Client)Logout¶
Logout calls the /logout APICall `ClearSessionToken()` to clear the session token of the client.
func (*Client)Organization¶
func (*Client)OrganizationByName¶
func (*Client)OrganizationsByUser¶
OrganizationsByUser returns all organizations the user is a member of.
func (*Client)PatchGroup¶added inv0.9.9
func (*Client)PatchWorkspaceProxy¶added inv0.23.3
func (c *Client) PatchWorkspaceProxy(ctxcontext.Context, reqPatchWorkspaceProxy) (UpdateWorkspaceProxyResponse,error)
func (*Client)PreviousTemplateVersion¶added inv0.13.2
func (*Client)ProvisionerDaemons¶added inv0.6.1
func (c *Client) ProvisionerDaemons(ctxcontext.Context) ([]ProvisionerDaemon,error)
ProvisionerDaemonsByOrganization returns provisioner daemons available for an organization.
func (*Client)PutExtendWorkspace¶added inv0.6.1
func (c *Client) PutExtendWorkspace(ctxcontext.Context, iduuid.UUID, reqPutExtendWorkspaceRequest)error
PutExtendWorkspace updates the deadline for resources of the latest workspace build.
func (*Client)RegenerateGitSSHKey¶added inv0.4.0
RegenerateGitSSHKey will create a new SSH key pair for the user and return it.
func (*Client)Request¶added inv0.5.10
func (c *Client) Request(ctxcontext.Context, method, pathstring, body interface{}, opts ...RequestOption) (*http.Response,error)
Request performs a HTTP request with the body provided. The caller isresponsible for closing the response body.
func (*Client)SSHConfiguration¶added inv0.20.0
func (c *Client) SSHConfiguration(ctxcontext.Context) (SSHConfigResponse,error)
SSHConfiguration returns information about the SSH configuration for theCoder instance.
func (*Client)ServeProvisionerDaemon¶added inv0.12.8
func (c *Client) ServeProvisionerDaemon(ctxcontext.Context, organizationuuid.UUID, provisioners []ProvisionerType, tags map[string]string) (proto.DRPCProvisionerDaemonClient,error)
ListenProvisionerDaemon returns the gRPC service for a provisioner daemonimplementation. The context is during dial, not during the lifetime of theclient. Client should be closed after use.
func (*Client)SessionToken¶
SessionToken returns the currently set token for the client.
func (*Client)SetLogBodies¶added inv0.26.0
SetLogBodies sets whether to log request and response bodies.
func (*Client)SetSessionToken¶added inv0.12.6
SetSessionToken returns the currently set token for the client.
func (*Client)TemplateACL¶added inv0.9.9
func (*Client)TemplateByName¶added inv0.4.0
func (c *Client) TemplateByName(ctxcontext.Context, organizationIDuuid.UUID, namestring) (Template,error)
TemplateByName finds a template inside the organization provided with a case-insensitive name.
func (*Client)TemplateDAUs¶added inv0.8.12
func (c *Client) TemplateDAUs(ctxcontext.Context, templateIDuuid.UUID, tzOffsetint) (*DAUsResponse,error)
TemplateDAUs requires a tzOffset in hours. Use 0 for UTC, and TimezoneOffsetHour(time.Local) for thelocal timezone.
func (*Client)TemplateDAUsLocalTZ¶added inv0.24.0
func (*Client)TemplateExamples¶added inv0.13.2
func (c *Client) TemplateExamples(ctxcontext.Context, organizationIDuuid.UUID) ([]TemplateExample,error)
TemplateExamples lists example templates embedded in coder.
func (*Client)TemplateInsights¶added inv0.27.1
func (c *Client) TemplateInsights(ctxcontext.Context, reqTemplateInsightsRequest) (TemplateInsightsResponse,error)
func (*Client)TemplateVersion¶added inv0.4.0
TemplateVersion returns a template version by ID.
func (*Client)TemplateVersionByName¶added inv0.4.0
func (c *Client) TemplateVersionByName(ctxcontext.Context, templateuuid.UUID, namestring) (TemplateVersion,error)
TemplateVersionByName returns a template version by it's friendly name.This is used for path-based routing. Like: /templates/example/versions/helloworld
func (*Client)TemplateVersionByOrganizationAndName¶added inv0.12.8
func (*Client)TemplateVersionDryRun¶added inv0.6.1
func (c *Client) TemplateVersionDryRun(ctxcontext.Context, version, jobuuid.UUID) (ProvisionerJob,error)
TemplateVersionDryRun returns the current state of a template version dry-runjob.
func (*Client)TemplateVersionDryRunLogsAfter¶added inv0.6.1
func (c *Client) TemplateVersionDryRunLogsAfter(ctxcontext.Context, version, jobuuid.UUID, afterint64) (<-chanProvisionerJobLog,io.Closer,error)
TemplateVersionDryRunLogsAfter streams logs for a template version dry-runthat occurred after a specific log ID.
func (*Client)TemplateVersionDryRunResources¶added inv0.6.1
func (c *Client) TemplateVersionDryRunResources(ctxcontext.Context, version, jobuuid.UUID) ([]WorkspaceResource,error)
TemplateVersionDryRunResources returns the resources of a finished templateversion dry-run job.
func (*Client)TemplateVersionGitAuth¶added inv0.18.0
func (c *Client) TemplateVersionGitAuth(ctxcontext.Context, versionuuid.UUID) ([]TemplateVersionGitAuth,error)
TemplateVersionGitAuth returns git authentication for the requested template version.
func (*Client)TemplateVersionLogsAfter¶added inv0.4.0
func (c *Client) TemplateVersionLogsAfter(ctxcontext.Context, versionuuid.UUID, afterint64) (<-chanProvisionerJobLog,io.Closer,error)
TemplateVersionLogsAfter streams logs for a template version that occurred after a specific log ID.
func (*Client)TemplateVersionResources¶added inv0.4.0
func (c *Client) TemplateVersionResources(ctxcontext.Context, versionuuid.UUID) ([]WorkspaceResource,error)
TemplateVersionResources returns resources a template version declares.
func (*Client)TemplateVersionRichParameters¶added inv0.15.0
func (c *Client) TemplateVersionRichParameters(ctxcontext.Context, versionuuid.UUID) ([]TemplateVersionParameter,error)
TemplateVersionParameters returns parameters a template version exposes.
func (*Client)TemplateVersionVariables¶added inv0.17.4
func (c *Client) TemplateVersionVariables(ctxcontext.Context, versionuuid.UUID) ([]TemplateVersionVariable,error)
TemplateVersionVariables returns resources a template version variables.
func (*Client)TemplateVersionsByTemplate¶added inv0.4.0
func (c *Client) TemplateVersionsByTemplate(ctxcontext.Context, reqTemplateVersionsByTemplateRequest) ([]TemplateVersion,error)
TemplateVersionsByTemplate lists versions associated with a template.
func (*Client)TemplatesByOrganization¶added inv0.4.0
func (c *Client) TemplatesByOrganization(ctxcontext.Context, organizationIDuuid.UUID) ([]Template,error)
TemplatesByOrganization lists all templates inside of an organization.
func (*Client)Tokens¶added inv0.16.0
func (c *Client) Tokens(ctxcontext.Context, userIDstring, filterTokensFilter) ([]APIKeyWithOwner,error)
Tokens list machine API keys.
func (*Client)UpdateActiveTemplateVersion¶added inv0.4.0
func (c *Client) UpdateActiveTemplateVersion(ctxcontext.Context, templateuuid.UUID, reqUpdateActiveTemplateVersion)error
UpdateActiveTemplateVersion updates the active template version to the ID provided.The template version must be attached to the template.
func (*Client)UpdateAppearance¶added inv0.14.0
func (c *Client) UpdateAppearance(ctxcontext.Context, appearanceUpdateAppearanceConfig)error
func (*Client)UpdateCheck¶added inv0.13.0
func (c *Client) UpdateCheck(ctxcontext.Context) (UpdateCheckResponse,error)
UpdateCheck returns information about the latest release version ofCoder and whether or not the server is running the latest release.
func (*Client)UpdateOrganizationMemberRoles¶added inv0.5.2
func (c *Client) UpdateOrganizationMemberRoles(ctxcontext.Context, organizationIDuuid.UUID, userstring, reqUpdateRoles) (OrganizationMember,error)
UpdateOrganizationMemberRoles grants the userID the specified roles in an org.Include ALL roles the user has.
func (*Client)UpdateTemplateACL¶added inv0.9.9
func (*Client)UpdateTemplateMeta¶added inv0.6.3
func (*Client)UpdateTemplateVersion¶added inv0.21.0
func (c *Client) UpdateTemplateVersion(ctxcontext.Context, versionIDuuid.UUID, reqPatchTemplateVersionRequest) (TemplateVersion,error)
func (*Client)UpdateUserPassword¶added inv0.5.5
func (c *Client) UpdateUserPassword(ctxcontext.Context, userstring, reqUpdateUserPasswordRequest)error
UpdateUserPassword updates a user password.It calls PUT /users/{user}/password
func (*Client)UpdateUserProfile¶added inv0.4.2
func (c *Client) UpdateUserProfile(ctxcontext.Context, userstring, reqUpdateUserProfileRequest) (User,error)
UpdateUserProfile enables callers to update profile information
func (*Client)UpdateUserQuietHoursSchedule¶added inv0.26.2
func (c *Client) UpdateUserQuietHoursSchedule(ctxcontext.Context, userIdentstring, reqUpdateUserQuietHoursScheduleRequest) (UserQuietHoursScheduleResponse,error)
UpdateUserQuietHoursSchedule updates the quiet hours settings for the user.This endpoint only exists in enterprise editions.
func (*Client)UpdateUserRoles¶added inv0.5.2
UpdateUserRoles grants the userID the specified roles.Include ALL roles the user has.
func (*Client)UpdateUserStatus¶added inv0.5.8
UpdateUserStatus sets the user status to the given status
func (*Client)UpdateWorkspace¶added inv0.8.7
func (*Client)UpdateWorkspaceAutostart¶added inv0.4.1
func (c *Client) UpdateWorkspaceAutostart(ctxcontext.Context, iduuid.UUID, reqUpdateWorkspaceAutostartRequest)error
UpdateWorkspaceAutostart sets the autostart schedule for workspace by id.If the provided schedule is empty, autostart is disabled for the workspace.
func (*Client)UpdateWorkspaceLock¶added inv0.25.0
UpdateWorkspaceLock locks or unlocks a workspace.
func (*Client)UpdateWorkspaceTTL¶added inv0.6.0
func (c *Client) UpdateWorkspaceTTL(ctxcontext.Context, iduuid.UUID, reqUpdateWorkspaceTTLRequest)error
UpdateWorkspaceTTL sets the ttl for workspace by id.If the provided duration is nil, autostop is disabled for the workspace.
func (*Client)Upload¶
Upload uploads an arbitrary file with the content type provided.This is used to upload a source-code archive.
func (*Client)UserLatencyInsights¶added inv0.27.1
func (c *Client) UserLatencyInsights(ctxcontext.Context, reqUserLatencyInsightsRequest) (UserLatencyInsightsResponse,error)
func (*Client)UserQuietHoursSchedule¶added inv0.26.2
func (c *Client) UserQuietHoursSchedule(ctxcontext.Context, userIdentstring) (UserQuietHoursScheduleResponse,error)
UserQuietHoursSchedule returns the quiet hours settings for the user. Thisendpoint only exists in enterprise editions.
func (*Client)Users¶added inv0.4.4
func (c *Client) Users(ctxcontext.Context, reqUsersRequest) (GetUsersResponse,error)
Users returns all users according to the request parameters. If no parameters are set,the default behavior is to return all users in a single page.
func (*Client)WatchWorkspace¶added inv0.6.0
func (*Client)WatchWorkspaceAgentMetadata¶added inv0.21.3
func (c *Client) WatchWorkspaceAgentMetadata(ctxcontext.Context, iduuid.UUID) (<-chan []WorkspaceAgentMetadata, <-chanerror)
WatchWorkspaceAgentMetadata watches the metadata of a workspace agent.The returned channel will be closed when the context is canceled. Exactlyone error will be sent on the error channel. The metadata channel is never closed.
func (*Client)WorkspaceAgent¶added inv0.4.1
WorkspaceAgent returns an agent by ID.
func (*Client)WorkspaceAgentConnectionInfo¶added inv0.25.0
func (c *Client) WorkspaceAgentConnectionInfo(ctxcontext.Context) (*WorkspaceAgentConnectionInfo,error)
func (*Client)WorkspaceAgentListeningPorts¶added inv0.9.5
func (c *Client) WorkspaceAgentListeningPorts(ctxcontext.Context, agentIDuuid.UUID) (WorkspaceAgentListeningPortsResponse,error)
WorkspaceAgentListeningPorts returns a list of ports that are currently beinglistened on inside the workspace agent's network namespace.
func (*Client)WorkspaceAgentReconnectingPTY¶added inv0.5.2
func (c *Client) WorkspaceAgentReconnectingPTY(ctxcontext.Context, optsWorkspaceAgentReconnectingPTYOpts) (net.Conn,error)
WorkspaceAgentReconnectingPTY spawns a PTY that reconnects using the token provided.It communicates using `agent.ReconnectingPTYRequest` marshaled as JSON.Responses are PTY output that can be rendered.
func (*Client)WorkspaceAgentStartupLogsAfter¶added inv0.21.0
func (*Client)WorkspaceBuild¶
WorkspaceBuild returns a single workspace build for a workspace.If history is "", the latest version is returned.
func (*Client)WorkspaceBuildByUsernameAndWorkspaceNameAndBuildNumber¶added inv0.6.6
func (*Client)WorkspaceBuildLogsAfter¶
func (c *Client) WorkspaceBuildLogsAfter(ctxcontext.Context, builduuid.UUID, afterint64) (<-chanProvisionerJobLog,io.Closer,error)
WorkspaceBuildLogsAfter streams logs for a workspace build that occurred after a specific log ID.
func (*Client)WorkspaceBuildParameters¶added inv0.15.0
func (*Client)WorkspaceBuildState¶added inv0.5.3
WorkspaceBuildState returns the provisioner state of the build.
func (*Client)WorkspaceBuilds¶
func (c *Client) WorkspaceBuilds(ctxcontext.Context, reqWorkspaceBuildsRequest) ([]WorkspaceBuild,error)
func (*Client)WorkspaceByOwnerAndName¶added inv0.5.0
func (c *Client) WorkspaceByOwnerAndName(ctxcontext.Context, ownerstring, namestring, paramsWorkspaceOptions) (Workspace,error)
WorkspaceByOwnerAndName returns a workspace by the owner's UUID and the workspace's name.
func (*Client)WorkspaceProxies¶added inv0.23.0
func (c *Client) WorkspaceProxies(ctxcontext.Context) (RegionsResponse[WorkspaceProxy],error)
func (*Client)WorkspaceProxyByID¶added inv0.23.3
func (*Client)WorkspaceProxyByName¶added inv0.23.3
func (*Client)WorkspaceQuota¶added inv0.9.2
func (*Client)Workspaces¶added inv0.6.0
func (c *Client) Workspaces(ctxcontext.Context, filterWorkspaceFilter) (WorkspacesResponse,error)
Workspaces returns all workspaces the authenticated user has access to.
typeConnectionLatency¶added inv0.27.1
type ConnectionLatency struct {P50float64 `json:"p50" example:"31.312"`P95float64 `json:"p95" example:"119.832"`}
ConnectionLatency shows the latency for a connection.
typeConvertLoginRequest¶added inv0.25.0
typeCreateFirstUserResponse¶
type CreateFirstUserResponse struct {UserIDuuid.UUID `json:"user_id" format:"uuid"`OrganizationIDuuid.UUID `json:"organization_id" format:"uuid"`}
CreateFirstUserResponse contains IDs for newly created user info.
typeCreateGroupRequest¶added inv0.9.9
typeCreateOrganizationRequest¶
type CreateOrganizationRequest struct {Namestring `json:"name" validate:"required,username"`}
typeCreateTemplateRequest¶added inv0.4.0
type CreateTemplateRequest struct {// Name is the name of the template.Namestring `json:"name" validate:"template_name,required"`// DisplayName is the displayed name of the template.DisplayNamestring `json:"display_name,omitempty" validate:"template_display_name"`// Description is a description of what the template contains. It must be// less than 128 bytes.Descriptionstring `json:"description,omitempty" validate:"lt=128"`// Icon is a relative path or external URL that specifies// an icon to be displayed in the dashboard.Iconstring `json:"icon,omitempty"`// VersionID is an in-progress or completed job to use as an initial version// of the template.//// This is required on creation to enable a user-flow of validating a// template works. There is no reason the data-model cannot support empty// templates, but it doesn't make sense for users.VersionIDuuid.UUID `json:"template_version_id" validate:"required" format:"uuid"`// DefaultTTLMillis allows optionally specifying the default TTL// for all workspaces created from this template.DefaultTTLMillis *int64 `json:"default_ttl_ms,omitempty"`// TODO(@dean): remove max_ttl once restart_requirement is maturedMaxTTLMillis *int64 `json:"max_ttl_ms,omitempty"`// RestartRequirement allows optionally specifying the restart requirement// for workspaces created from this template. This is an enterprise feature.RestartRequirement *TemplateRestartRequirement `json:"restart_requirement,omitempty"`// Allow users to cancel in-progress workspace jobs.// *bool as the default value is "true".AllowUserCancelWorkspaceJobs *bool `json:"allow_user_cancel_workspace_jobs"`// AllowUserAutostart allows users to set a schedule for autostarting their// workspace. By default this is true. This can only be disabled when using// an enterprise license.AllowUserAutostart *bool `json:"allow_user_autostart"`// AllowUserAutostop allows users to set a custom workspace TTL to use in// place of the template's DefaultTTL field. By default this is true. If// false, the DefaultTTL will always be used. This can only be disabled when// using an enterprise license.AllowUserAutostop *bool `json:"allow_user_autostop"`// FailureTTLMillis allows optionally specifying the max lifetime before Coder// stops all resources for failed workspaces created from this template.FailureTTLMillis *int64 `json:"failure_ttl_ms,omitempty"`// InactivityTTLMillis allows optionally specifying the max lifetime before Coder// locks inactive workspaces created from this template.InactivityTTLMillis *int64 `json:"inactivity_ttl_ms,omitempty"`// LockedTTLMillis allows optionally specifying the max lifetime before Coder// permanently deletes locked workspaces created from this template.LockedTTLMillis *int64 `json:"locked_ttl_ms,omitempty"`// DisableEveryoneGroupAccess allows optionally disabling the default// behavior of granting the 'everyone' group access to use the template.// If this is set to true, the template will not be available to all users,// and must be explicitly granted to users or groups in the permissions settings// of the template.DisableEveryoneGroupAccessbool `json:"disable_everyone_group_access"`}
CreateTemplateRequest provides options when creating a template.
typeCreateTemplateVersionDryRunRequest¶added inv0.6.1
type CreateTemplateVersionDryRunRequest struct {WorkspaceNamestring `json:"workspace_name"`RichParameterValues []WorkspaceBuildParameter `json:"rich_parameter_values"`UserVariableValues []VariableValue `json:"user_variable_values,omitempty"`}
CreateTemplateVersionDryRunRequest defines the request parameters forCreateTemplateVersionDryRun.
typeCreateTemplateVersionRequest¶added inv0.4.0
type CreateTemplateVersionRequest struct {Namestring `json:"name,omitempty" validate:"omitempty,template_version_name"`Messagestring `json:"message,omitempty" validate:"lt=1048577"`// TemplateID optionally associates a version with a template.TemplateIDuuid.UUID `json:"template_id,omitempty" format:"uuid"`StorageMethodProvisionerStorageMethod `json:"storage_method" validate:"oneof=file,required" enums:"file"`FileIDuuid.UUID `json:"file_id,omitempty" validate:"required_without=ExampleID" format:"uuid"`ExampleIDstring `json:"example_id,omitempty" validate:"required_without=FileID"`ProvisionerProvisionerType `json:"provisioner" validate:"oneof=terraform echo,required"`ProvisionerTags map[string]string `json:"tags"`UserVariableValues []VariableValue `json:"user_variable_values,omitempty"`}
CreateTemplateVersionRequest enables callers to create a new Template Version.
typeCreateTestAuditLogRequest¶added inv0.9.0
type CreateTestAuditLogRequest struct {ActionAuditAction `json:"action,omitempty" enums:"create,write,delete,start,stop"`ResourceTypeResourceType `json:"resource_type,omitempty" enums:"template,template_version,user,workspace,workspace_build,git_ssh_key,auditable_group"`ResourceIDuuid.UUID `json:"resource_id,omitempty" format:"uuid"`AdditionalFieldsjson.RawMessage `json:"additional_fields,omitempty"`Timetime.Time `json:"time,omitempty" format:"date-time"`BuildReasonBuildReason `json:"build_reason,omitempty" enums:"autostart,autostop,initiator"`}
typeCreateTokenRequest¶added inv0.10.0
type CreateTokenRequest struct {Lifetimetime.Duration `json:"lifetime"`ScopeAPIKeyScope `json:"scope" enums:"all,application_connect"`TokenNamestring `json:"token_name"`}
typeCreateUserRequest¶
type CreateUserRequest struct {Emailstring `json:"email" validate:"required,email" format:"email"`Usernamestring `json:"username" validate:"required,username"`Passwordstring `json:"password" validate:"required_if=DisableLogin false"`// DisableLogin sets the user's login type to 'none'. This prevents the user// from being able to use a password or any other authentication method to login.DisableLoginbool `json:"disable_login"`OrganizationIDuuid.UUID `json:"organization_id" validate:"" format:"uuid"`}
typeCreateWorkspaceBuildRequest¶
type CreateWorkspaceBuildRequest struct {TemplateVersionIDuuid.UUID `json:"template_version_id,omitempty" format:"uuid"`TransitionWorkspaceTransition `json:"transition" validate:"oneof=create start stop delete,required"`DryRunbool `json:"dry_run,omitempty"`ProvisionerState []byte `json:"state,omitempty"`// Orphan may be set for the Destroy transition.Orphanbool `json:"orphan,omitempty"`// ParameterValues are optional. It will write params to the 'workspace' scope.// This will overwrite any existing parameters with the same name.// This will not delete old params not included in this list.RichParameterValues []WorkspaceBuildParameter `json:"rich_parameter_values,omitempty"`// Log level changes the default logging verbosity of a provider ("info" if empty).LogLevelProvisionerLogLevel `json:"log_level,omitempty" validate:"omitempty,oneof=debug"`}
CreateWorkspaceBuildRequest provides options to update the latest workspace build.
typeCreateWorkspaceProxyRequest¶added inv0.22.0
typeCreateWorkspaceRequest¶
type CreateWorkspaceRequest struct {TemplateIDuuid.UUID `json:"template_id" validate:"required" format:"uuid"`Namestring `json:"name" validate:"workspace_name,required"`AutostartSchedule *string `json:"autostart_schedule"`TTLMillis *int64 `json:"ttl_ms,omitempty"`// ParameterValues allows for additional parameters to be provided// during the initial provision.RichParameterValues []WorkspaceBuildParameter `json:"rich_parameter_values,omitempty"`}
CreateWorkspaceRequest provides options for creating a new workspace.
typeDAURequest¶added inv0.24.0
type DAURequest struct {TZHourOffsetint}
typeDAUsResponse¶added inv0.24.0
typeDERP¶added inv0.11.0
type DERP struct {ServerDERPServerConfig `json:"server" typescript:",notnull"`ConfigDERPConfig `json:"config" typescript:",notnull"`}
typeDERPConfig¶added inv0.11.0
typeDERPRegion¶added inv0.8.11
typeDERPServerConfig¶added inv0.11.0
type DERPServerConfig struct {Enableclibase.Bool `json:"enable" typescript:",notnull"`RegionIDclibase.Int64 `json:"region_id" typescript:",notnull"`RegionCodeclibase.String `json:"region_code" typescript:",notnull"`RegionNameclibase.String `json:"region_name" typescript:",notnull"`STUNAddressesclibase.StringArray `json:"stun_addresses" typescript:",notnull"`RelayURLclibase.URL `json:"relay_url" typescript:",notnull"`}
typeDangerousConfig¶added inv0.15.0
typeDeploymentConfig¶added inv0.11.0
type DeploymentConfig struct {Values *DeploymentValues `json:"config,omitempty"`Optionsclibase.OptionSet `json:"options,omitempty"`}
DeploymentConfig contains both the deployment values and how they're set.
@typescript-ignore DeploymentConfigapitypings doesn't know how to generate the OptionSet... yet.
typeDeploymentStats¶added inv0.19.0
type DeploymentStats struct {// AggregatedFrom is the time in which stats are aggregated from.// This might be back in time a specific duration or interval.AggregatedFromtime.Time `json:"aggregated_from" format:"date-time"`// CollectedAt is the time in which stats are collected at.CollectedAttime.Time `json:"collected_at" format:"date-time"`// NextUpdateAt is the time when the next batch of stats will// be updated.NextUpdateAttime.Time `json:"next_update_at" format:"date-time"`WorkspacesWorkspaceDeploymentStats `json:"workspaces"`SessionCountSessionCountDeploymentStats `json:"session_count"`}
typeDeploymentValues¶added inv0.19.0
type DeploymentValues struct {Verboseclibase.Bool `json:"verbose,omitempty"`AccessURLclibase.URL `json:"access_url,omitempty"`WildcardAccessURLclibase.URL `json:"wildcard_access_url,omitempty"`DocsURLclibase.URL `json:"docs_url,omitempty"`RedirectToAccessURLclibase.Bool `json:"redirect_to_access_url,omitempty"`// HTTPAddress is a string because it may be set to zero to disable.HTTPAddressclibase.String `json:"http_address,omitempty" typescript:",notnull"`AutobuildPollIntervalclibase.Duration `json:"autobuild_poll_interval,omitempty"`JobHangDetectorIntervalclibase.Duration `json:"job_hang_detector_interval,omitempty"`DERPDERP `json:"derp,omitempty" typescript:",notnull"`PrometheusPrometheusConfig `json:"prometheus,omitempty" typescript:",notnull"`PprofPprofConfig `json:"pprof,omitempty" typescript:",notnull"`ProxyTrustedHeadersclibase.StringArray `json:"proxy_trusted_headers,omitempty" typescript:",notnull"`ProxyTrustedOriginsclibase.StringArray `json:"proxy_trusted_origins,omitempty" typescript:",notnull"`CacheDirclibase.String `json:"cache_directory,omitempty" typescript:",notnull"`InMemoryDatabaseclibase.Bool `json:"in_memory_database,omitempty" typescript:",notnull"`PostgresURLclibase.String `json:"pg_connection_url,omitempty" typescript:",notnull"`OAuth2OAuth2Config `json:"oauth2,omitempty" typescript:",notnull"`OIDCOIDCConfig `json:"oidc,omitempty" typescript:",notnull"`TelemetryTelemetryConfig `json:"telemetry,omitempty" typescript:",notnull"`TLSTLSConfig `json:"tls,omitempty" typescript:",notnull"`TraceTraceConfig `json:"trace,omitempty" typescript:",notnull"`SecureAuthCookieclibase.Bool `json:"secure_auth_cookie,omitempty" typescript:",notnull"`StrictTransportSecurityclibase.Int64 `json:"strict_transport_security,omitempty" typescript:",notnull"`StrictTransportSecurityOptionsclibase.StringArray `json:"strict_transport_security_options,omitempty" typescript:",notnull"`SSHKeygenAlgorithmclibase.String `json:"ssh_keygen_algorithm,omitempty" typescript:",notnull"`MetricsCacheRefreshIntervalclibase.Duration `json:"metrics_cache_refresh_interval,omitempty" typescript:",notnull"`AgentStatRefreshIntervalclibase.Duration `json:"agent_stat_refresh_interval,omitempty" typescript:",notnull"`AgentFallbackTroubleshootingURLclibase.URL `json:"agent_fallback_troubleshooting_url,omitempty" typescript:",notnull"`BrowserOnlyclibase.Bool `json:"browser_only,omitempty" typescript:",notnull"`SCIMAPIKeyclibase.String `json:"scim_api_key,omitempty" typescript:",notnull"`ProvisionerProvisionerConfig `json:"provisioner,omitempty" typescript:",notnull"`RateLimitRateLimitConfig `json:"rate_limit,omitempty" typescript:",notnull"`Experimentsclibase.StringArray `json:"experiments,omitempty" typescript:",notnull"`UpdateCheckclibase.Bool `json:"update_check,omitempty" typescript:",notnull"`MaxTokenLifetimeclibase.Duration `json:"max_token_lifetime,omitempty" typescript:",notnull"`SwaggerSwaggerConfig `json:"swagger,omitempty" typescript:",notnull"`LoggingLoggingConfig `json:"logging,omitempty" typescript:",notnull"`DangerousDangerousConfig `json:"dangerous,omitempty" typescript:",notnull"`DisablePathAppsclibase.Bool `json:"disable_path_apps,omitempty" typescript:",notnull"`SessionDurationclibase.Duration `json:"max_session_expiry,omitempty" typescript:",notnull"`DisableSessionExpiryRefreshclibase.Bool `json:"disable_session_expiry_refresh,omitempty" typescript:",notnull"`DisablePasswordAuthclibase.Bool `json:"disable_password_auth,omitempty" typescript:",notnull"`SupportSupportConfig `json:"support,omitempty" typescript:",notnull"`GitAuthProvidersclibase.Struct[[]GitAuthConfig] `json:"git_auth,omitempty" typescript:",notnull"`SSHConfigSSHConfig `json:"config_ssh,omitempty" typescript:",notnull"`WgtunnelHostclibase.String `json:"wgtunnel_host,omitempty" typescript:",notnull"`DisableOwnerWorkspaceExecclibase.Bool `json:"disable_owner_workspace_exec,omitempty" typescript:",notnull"`ProxyHealthStatusIntervalclibase.Duration `json:"proxy_health_status_interval,omitempty" typescript:",notnull"`EnableTerraformDebugModeclibase.Bool `json:"enable_terraform_debug_mode,omitempty" typescript:",notnull"`UserQuietHoursScheduleUserQuietHoursScheduleConfig `json:"user_quiet_hours_schedule,omitempty" typescript:",notnull"`Configclibase.YAMLConfigPath `json:"config,omitempty" typescript:",notnull"`WriteConfigclibase.Bool `json:"write_config,omitempty" typescript:",notnull"`// DEPRECATED: Use HTTPAddress or TLS.Address instead.Addressclibase.HostPort `json:"address,omitempty" typescript:",notnull"`}
DeploymentValues is the central configuration values the coder server.
func (*DeploymentValues)Options¶added inv0.19.0
func (c *DeploymentValues) Options()clibase.OptionSet
func (*DeploymentValues)WithoutSecrets¶added inv0.19.0
func (c *DeploymentValues) WithoutSecrets() (*DeploymentValues,error)
WithoutSecrets returns a copy of the config without secret values.
typeDialWorkspaceAgentOptions¶added inv0.10.0
type DialWorkspaceAgentOptions struct {Loggerslog.Logger// BlockEndpoints forced a direct connection through DERP. The Client may// have DisableDirect set which will override this value.BlockEndpointsbool}
@typescript-ignore DialWorkspaceAgentOptions
typeEntitlement¶added inv0.8.6
type Entitlementstring
Entitlement represents whether a feature is licensed.
const (EntitlementEntitledEntitlement = "entitled"EntitlementGracePeriodEntitlement = "grace_period"EntitlementNotEntitledEntitlement = "not_entitled")
typeEntitlements¶added inv0.8.6
typeError¶
Error represents an unaccepted or invalid request to the API.@typescript-ignore Error
func (*Error)StatusCode¶
typeExperiment¶added inv0.15.0
type Experimentstring
const (// ExperimentMoons enabled the workspace proxy endpoints and CRUD. This// feature is not yet complete in functionality.ExperimentMoonsExperiment = "moons"//https://github.com/coder/coder/milestone/19ExperimentWorkspaceActionsExperiment = "workspace_actions"// ExperimentTailnetHACoordinator downgrades to the haCoordinator instead// of PGCoord. Should only be used if we see issues in prod with PGCoord// which is now the default.ExperimentTailnetHACoordinatorExperiment = "tailnet_ha_coordinator"// ExperimentConvertToOIDC enables users to convert from password to// oidc.ExperimentConvertToOIDCExperiment = "convert-to-oidc"// ExperimentSingleTailnet replaces workspace connections inside coderd to// all use a single tailnet, instead of the previous behavior of creating a// single tailnet for each agent.// WARNING: This cannot be enabled when using HA.ExperimentSingleTailnetExperiment = "single_tailnet"// ExperimentTemplateRestartRequirement allows template admins to have more// control over when workspaces created on a template are required to// restart, and allows users to ensure these restarts never happen during// their business hours.//// Enables:// - User quiet hours schedule settings// - Template restart requirement settings// - Changes the max_deadline algorithm to use restart requirement and user// quiet hours instead of max_ttl.ExperimentTemplateRestartRequirementExperiment = "template_restart_requirement")
typeExperiments¶added inv0.15.0
type Experiments []Experiment
Experiments is a list of experiments that are enabled for the deployment.Multiple experiments may be enabled at the same time.Experiments are not safe for production use, and are not guaranteed tobe backwards compatible. They may be removed or renamed at any time.
func (Experiments)Enabled¶added inv0.15.0
func (eExperiments) Enabled(exExperiment)bool
typeFeature¶added inv0.8.6
type Feature struct {EntitlementEntitlement `json:"entitlement"`Enabledbool `json:"enabled"`Limit *int64 `json:"limit,omitempty"`Actual *int64 `json:"actual,omitempty"`}
typeFeatureName¶added inv0.15.0
type FeatureNamestring
FeatureName represents the internal name of a feature.To add a new feature, add it to this set of enums as well as the FeatureNamesarray below.
const (FeatureUserLimitFeatureName = "user_limit"FeatureAuditLogFeatureName = "audit_log"FeatureBrowserOnlyFeatureName = "browser_only"FeatureSCIMFeatureName = "scim"FeatureTemplateRBACFeatureName = "template_rbac"FeatureHighAvailabilityFeatureName = "high_availability"FeatureMultipleGitAuthFeatureName = "multiple_git_auth"FeatureExternalProvisionerDaemonsFeatureName = "external_provisioner_daemons"FeatureAppearanceFeatureName = "appearance"FeatureAdvancedTemplateSchedulingFeatureName = "advanced_template_scheduling"FeatureTemplateRestartRequirementFeatureName = "template_restart_requirement"FeatureWorkspaceProxyFeatureName = "workspace_proxy")
func (FeatureName)AlwaysEnable¶added inv0.15.0
func (nFeatureName) AlwaysEnable()bool
AlwaysEnable returns if the feature is always enabled if entitled.Warning: We don't know if we need this functionality.This method may disappear at any time.
func (FeatureName)Humanize¶added inv0.15.0
func (nFeatureName) Humanize()string
Humanize returns the feature name in a human-readable format.
typeGenerateAPIKeyResponse¶
type GenerateAPIKeyResponse struct {Keystring `json:"key"`}
GenerateAPIKeyResponse contains an API key for a user.
typeGetUsersResponse¶added inv0.12.8
typeGitAuth¶added inv0.25.0
type GitAuth struct {Authenticatedbool `json:"authenticated"`Devicebool `json:"device"`Typestring `json:"type"`// User is the user that authenticated with the provider.User *GitAuthUser `json:"user"`// AppInstallable is true if the request for app installs was successful.AppInstallablebool `json:"app_installable"`// AppInstallations are the installations that the user has access to.AppInstallations []GitAuthAppInstallation `json:"installations"`// AppInstallURL is the URL to install the app.AppInstallURLstring `json:"app_install_url"`}
typeGitAuthAppInstallation¶added inv0.25.0
type GitAuthAppInstallation struct {IDint `json:"id"`AccountGitAuthUser `json:"account"`ConfigureURLstring `json:"configure_url"`}
typeGitAuthConfig¶added inv0.11.0
type GitAuthConfig struct {IDstring `json:"id"`Typestring `json:"type"`ClientIDstring `json:"client_id"`ClientSecretstring `json:"-" yaml:"client_secret"`AuthURLstring `json:"auth_url"`TokenURLstring `json:"token_url"`ValidateURLstring `json:"validate_url"`AppInstallURLstring `json:"app_install_url"`AppInstallationsURLstring `json:"app_installations_url"`Regexstring `json:"regex"`NoRefreshbool `json:"no_refresh"`Scopes []string `json:"scopes"`DeviceFlowbool `json:"device_flow"`DeviceCodeURLstring `json:"device_code_url"`}
typeGitAuthDevice¶added inv0.25.0
type GitAuthDevice struct {DeviceCodestring `json:"device_code"`UserCodestring `json:"user_code"`VerificationURIstring `json:"verification_uri"`ExpiresInint `json:"expires_in"`Intervalint `json:"interval"`}
GitAuthDevice is the response from the device authorization endpoint.See:https://tools.ietf.org/html/rfc8628#section-3.2
typeGitAuthDeviceExchange¶added inv0.25.0
type GitAuthDeviceExchange struct {DeviceCodestring `json:"device_code"`}
typeGitAuthUser¶added inv0.25.0
typeGitProvider¶added inv0.11.0
type GitProviderstring
GitProvider is a constant that represents thetype of providers that are supported within Coder.
const (GitProviderAzureDevopsGitProvider = "azure-devops"GitProviderGitHubGitProvider = "github"GitProviderGitLabGitProvider = "gitlab"GitProviderBitBucketGitProvider = "bitbucket")
func (GitProvider)Pretty¶added inv0.18.0
func (gGitProvider) Pretty()string
typeHealthcheck¶added inv0.9.0
type Healthcheck struct {// URL specifies the endpoint to check for the app health.URLstring `json:"url"`// Interval specifies the seconds between each health check.Intervalint32 `json:"interval"`// Threshold specifies the number of consecutive failed health checks before returning "unhealthy".Thresholdint32 `json:"threshold"`}
typeInsightsReportInterval¶added inv0.27.1
type InsightsReportIntervalstring
InsightsReportInterval is the interval of time over which to generate asmaller insights report within a time range.
const (InsightsReportIntervalDayInsightsReportInterval = "day")
InsightsReportInterval enums.
typeIssueReconnectingPTYSignedTokenRequest¶added inv0.23.0
typeIssueReconnectingPTYSignedTokenResponse¶added inv0.23.0
type IssueReconnectingPTYSignedTokenResponse struct {SignedTokenstring `json:"signed_token"`}
typeJobErrorCode¶added inv0.19.0
type JobErrorCodestring
JobErrorCode defines the error code returned by job runner.
const (MissingTemplateParameterJobErrorCode = "MISSING_TEMPLATE_PARAMETER"RequiredTemplateVariablesJobErrorCode = "REQUIRED_TEMPLATE_VARIABLES")
typeLicense¶added inv0.8.7
type License struct {IDint32 `json:"id"`UUIDuuid.UUID `json:"uuid" format:"uuid"`UploadedAttime.Time `json:"uploaded_at" format:"date-time"`// Claims are the JWT claims asserted by the license. Here we use// a generic string map to ensure that all data from the server is// parsed verbatim, not just the fields this version of Coder// understands.Claims map[string]interface{} `json:"claims" table:"claims"`}
func (*License)AllFeaturesClaim¶added inv0.26.1
func (*License)ExpiresAt¶added inv0.26.1
ExpiresAt returns the expiration time of the license.If the claim is missing or has an unexpected type, an error is returned.
func (*License)FeaturesClaims¶added inv0.26.1
func (l *License) FeaturesClaims() (map[FeatureName]int64,error)
FeaturesClaims provides the feature claims in license.This only returns the explicit claims. If checking for actual usage,also check `AllFeaturesClaim`.
typeLinkConfig¶added inv0.18.0
typeLoggingConfig¶added inv0.15.0
typeLoginType¶added inv0.7.6
type LoginTypestring
LoginType is the type of login used to create the API key.
const (LoginTypePasswordLoginType = "password"LoginTypeGithubLoginType = "github"LoginTypeOIDCLoginType = "oidc"LoginTypeTokenLoginType = "token"// LoginTypeNone is used if no login method is available for this user.// If this is set, the user has no method of logging in.// API keys can still be created by an owner and used by the user.// These keys would use the `LoginTypeToken` type.LoginTypeNoneLoginType = "none")
typeLoginWithPasswordRequest¶
type LoginWithPasswordRequest struct {Emailstring `json:"email" validate:"required,email" format:"email"`Passwordstring `json:"password" validate:"required"`}
LoginWithPasswordRequest enables callers to authenticate with email and password.
typeLoginWithPasswordResponse¶
type LoginWithPasswordResponse struct {SessionTokenstring `json:"session_token" validate:"required"`}
LoginWithPasswordResponse contains a session token for the newly authenticated user.
typeNullTime¶added inv0.8.7
NullTime represents a nullable time.Time.@typescript-ignore NullTime
funcNewNullTime¶added inv0.8.7
NewNullTime returns a new NullTime with the given time.Time.
func (NullTime)MarshalJSON¶added inv0.8.7
MarshalJSON implements json.Marshaler.
func (*NullTime)UnmarshalJSON¶added inv0.8.7
UnmarshalJSON implements json.Unmarshaler.
typeOAuth2Config¶added inv0.11.0
type OAuth2Config struct {GithubOAuth2GithubConfig `json:"github" typescript:",notnull"`}
typeOAuth2GithubConfig¶added inv0.11.0
type OAuth2GithubConfig struct {ClientIDclibase.String `json:"client_id" typescript:",notnull"`ClientSecretclibase.String `json:"client_secret" typescript:",notnull"`AllowedOrgsclibase.StringArray `json:"allowed_orgs" typescript:",notnull"`AllowedTeamsclibase.StringArray `json:"allowed_teams" typescript:",notnull"`AllowSignupsclibase.Bool `json:"allow_signups" typescript:",notnull"`AllowEveryoneclibase.Bool `json:"allow_everyone" typescript:",notnull"`EnterpriseBaseURLclibase.String `json:"enterprise_base_url" typescript:",notnull"`}
typeOAuthConversionResponse¶added inv0.25.0
typeOIDCAuthMethod¶added inv0.16.0
type OIDCAuthMethod struct {AuthMethodSignInTextstring `json:"signInText"`IconURLstring `json:"iconUrl"`}
typeOIDCConfig¶added inv0.11.0
type OIDCConfig struct {AllowSignupsclibase.Bool `json:"allow_signups" typescript:",notnull"`ClientIDclibase.String `json:"client_id" typescript:",notnull"`ClientSecretclibase.String `json:"client_secret" typescript:",notnull"`EmailDomainclibase.StringArray `json:"email_domain" typescript:",notnull"`IssuerURLclibase.String `json:"issuer_url" typescript:",notnull"`Scopesclibase.StringArray `json:"scopes" typescript:",notnull"`IgnoreEmailVerifiedclibase.Bool `json:"ignore_email_verified" typescript:",notnull"`UsernameFieldclibase.String `json:"username_field" typescript:",notnull"`EmailFieldclibase.String `json:"email_field" typescript:",notnull"`AuthURLParamsclibase.Struct[map[string]string] `json:"auth_url_params" typescript:",notnull"`IgnoreUserInfoclibase.Bool `json:"ignore_user_info" typescript:",notnull"`GroupFieldclibase.String `json:"groups_field" typescript:",notnull"`GroupMappingclibase.Struct[map[string]string] `json:"group_mapping" typescript:",notnull"`SignInTextclibase.String `json:"sign_in_text" typescript:",notnull"`IconURLclibase.URL `json:"icon_url" typescript:",notnull"`}
typeOrganization¶
type Organization struct {IDuuid.UUID `json:"id" validate:"required" format:"uuid"`Namestring `json:"name" validate:"required"`CreatedAttime.Time `json:"created_at" validate:"required" format:"date-time"`UpdatedAttime.Time `json:"updated_at" validate:"required" format:"date-time"`}
Organization is the JSON representation of a Coder organization.
typeOrganizationMember¶added inv0.5.2
type OrganizationMember struct {UserIDuuid.UUID `db:"user_id" json:"user_id" format:"uuid"`OrganizationIDuuid.UUID `db:"organization_id" json:"organization_id" format:"uuid"`CreatedAttime.Time `db:"created_at" json:"created_at" format:"date-time"`UpdatedAttime.Time `db:"updated_at" json:"updated_at" format:"date-time"`Roles []Role `db:"roles" json:"roles"`}
typePagination¶added inv0.5.6
type Pagination struct {// AfterID returns all or up to Limit results after the given// UUID. This option can be used with or as an alternative to// Offset for better performance. To use it as an alternative,// set AfterID to the last UUID returned by the previous// request.AfterIDuuid.UUID `json:"after_id,omitempty" format:"uuid"`// Limit sets the maximum number of users to be returned// in a single page. If the limit is <= 0, there is no limit// and all users are returned.Limitint `json:"limit,omitempty"`// Offset is used to indicate which page to return. An offset of 0// returns the first 'limit' number of users.// To get the next page, use offset=<limit>*<page_number>.// Offset is 0 indexed, so the first record sits at offset 0.Offsetint `json:"offset,omitempty"`}
Pagination sets pagination options for the endpoints that support it.
typeParameterResolver¶added inv0.23.6
type ParameterResolver struct {Rich []WorkspaceBuildParameter}
ParameterResolver should be populated with legacy workload and rich parameter values from the previous build. It thensupports queries against a current TemplateVersionParameter to determine whether a new value is required, or a valuecorrectly validates.@typescript-ignore ParameterResolver
func (*ParameterResolver)ValidateResolve¶added inv0.23.6
func (r *ParameterResolver) ValidateResolve(pTemplateVersionParameter, v *WorkspaceBuildParameter) (valuestring, errerror)
ValidateResolve checks the provided value, v, against the parameter, p, and the previous build. If v is nil, it alsoresolves the correct value. It returns the value of the parameter, if valid, and an error if invalid.
typePatchGroupRequest¶added inv0.9.9
typePatchTemplateVersionRequest¶added inv0.21.0
typePatchWorkspaceProxy¶added inv0.23.3
typePprofConfig¶added inv0.11.0
typePrometheusConfig¶added inv0.11.0
type PrometheusConfig struct {Enableclibase.Bool `json:"enable" typescript:",notnull"`Addressclibase.HostPort `json:"address" typescript:",notnull"`CollectAgentStatsclibase.Bool `json:"collect_agent_stats" typescript:",notnull"`CollectDBMetricsclibase.Bool `json:"collect_db_metrics" typescript:",notnull"`}
typeProvisionerConfig¶added inv0.12.6
type ProvisionerConfig struct {Daemonsclibase.Int64 `json:"daemons" typescript:",notnull"`DaemonsEchoclibase.Bool `json:"daemons_echo" typescript:",notnull"`DaemonPollIntervalclibase.Duration `json:"daemon_poll_interval" typescript:",notnull"`DaemonPollJitterclibase.Duration `json:"daemon_poll_jitter" typescript:",notnull"`ForceCancelIntervalclibase.Duration `json:"force_cancel_interval" typescript:",notnull"`}
typeProvisionerJob¶
type ProvisionerJob struct {IDuuid.UUID `json:"id" format:"uuid"`CreatedAttime.Time `json:"created_at" format:"date-time"`StartedAt *time.Time `json:"started_at,omitempty" format:"date-time"`CompletedAt *time.Time `json:"completed_at,omitempty" format:"date-time"`CanceledAt *time.Time `json:"canceled_at,omitempty" format:"date-time"`Errorstring `json:"error,omitempty"`ErrorCodeJobErrorCode `json:"error_code,omitempty" enums:"MISSING_TEMPLATE_PARAMETER,REQUIRED_TEMPLATE_VARIABLES"`StatusProvisionerJobStatus `json:"status" enums:"pending,running,succeeded,canceling,canceled,failed"`WorkerID *uuid.UUID `json:"worker_id,omitempty" format:"uuid"`FileIDuuid.UUID `json:"file_id" format:"uuid"`Tags map[string]string `json:"tags"`QueuePositionint `json:"queue_position"`QueueSizeint `json:"queue_size"`}
ProvisionerJob describes the job executed by the provisioning daemon.
typeProvisionerJobLog¶
type ProvisionerJobLog struct {IDint64 `json:"id"`CreatedAttime.Time `json:"created_at" format:"date-time"`SourceLogSource `json:"log_source"`LevelLogLevel `json:"log_level" enums:"trace,debug,info,warn,error"`Stagestring `json:"stage"`Outputstring `json:"output"`}
ProvisionerJobLog represents the provisioner log entry annotated with source and level.
typeProvisionerJobStatus¶
type ProvisionerJobStatusstring
ProvisionerJobStatus represents the at-time state of a job.
const (ProvisionerJobPendingProvisionerJobStatus = "pending"ProvisionerJobRunningProvisionerJobStatus = "running"ProvisionerJobSucceededProvisionerJobStatus = "succeeded"ProvisionerJobCancelingProvisionerJobStatus = "canceling"ProvisionerJobCanceledProvisionerJobStatus = "canceled"ProvisionerJobFailedProvisionerJobStatus = "failed")
func (ProvisionerJobStatus)Active¶added inv0.4.4
func (pProvisionerJobStatus) Active()bool
Active returns whether the job is still active or not.It returns true if canceling as well, since the job isn'tin an entirely inactive state yet.
typeProvisionerLogLevel¶added inv0.21.3
type ProvisionerLogLevelstring
const (ProvisionerLogLevelDebugProvisionerLogLevel = "debug")
typeProvisionerStorageMethod¶added inv0.6.0
type ProvisionerStorageMethodstring
const (ProvisionerStorageMethodFileProvisionerStorageMethod = "file")
typeProvisionerType¶added inv0.6.0
type ProvisionerTypestring
const (ProvisionerTypeEchoProvisionerType = "echo"ProvisionerTypeTerraformProvisionerType = "terraform")
typeProxyHealthReport¶added inv0.23.0
type ProxyHealthReport struct {// Errors are problems that prevent the workspace proxy from being healthyErrors []string `json:"errors"`// Warnings do not prevent the workspace proxy from being healthy, but// should be addressed.Warnings []string `json:"warnings"`}
ProxyHealthReport is a report of the health of the workspace proxy.A healthy report will have no errors. Warnings are not fatal.
typeProxyHealthStatus¶added inv0.23.0
type ProxyHealthStatusstring
const (// ProxyHealthy means the proxy access url is reachable and returns a healthy// status code.ProxyHealthyProxyHealthStatus = "ok"// ProxyUnreachable means the proxy access url is not responding.ProxyUnreachableProxyHealthStatus = "unreachable"// ProxyUnhealthy means the proxy access url is responding, but there is some// problem with the proxy. This problem may or may not be preventing functionality.ProxyUnhealthyProxyHealthStatus = "unhealthy"// ProxyUnregistered means the proxy has not registered a url yet. This means// the proxy was created with the cli, but has not yet been started.ProxyUnregisteredProxyHealthStatus = "unregistered")
typePutExtendWorkspaceRequest¶added inv0.6.1
type PutExtendWorkspaceRequest struct {Deadlinetime.Time `json:"deadline" validate:"required" format:"date-time"`}
PutExtendWorkspaceRequest is a request to extend the deadline ofthe active workspace build.
typeRBACResource¶added inv0.22.1
type RBACResourcestring
const (ResourceWorkspaceRBACResource = "workspace"ResourceWorkspaceProxyRBACResource = "workspace_proxy"ResourceWorkspaceExecutionRBACResource = "workspace_execution"ResourceWorkspaceApplicationConnectRBACResource = "application_connect"ResourceAuditLogRBACResource = "audit_log"ResourceTemplateRBACResource = "template"ResourceGroupRBACResource = "group"ResourceFileRBACResource = "file"ResourceProvisionerDaemonRBACResource = "provisioner_daemon"ResourceOrganizationRBACResource = "organization"ResourceRoleAssignmentRBACResource = "assign_role"ResourceOrgRoleAssignmentRBACResource = "assign_org_role"ResourceAPIKeyRBACResource = "api_key"ResourceUserRBACResource = "user"ResourceUserDataRBACResource = "user_data"ResourceOrganizationMemberRBACResource = "organization_member"ResourceLicenseRBACResource = "license"ResourceDeploymentValuesRBACResource = "deployment_config"ResourceDeploymentStatsRBACResource = "deployment_stats"ResourceReplicasRBACResource = "replicas"ResourceDebugInfoRBACResource = "debug_info"ResourceSystemRBACResource = "system")
func (RBACResource)String¶added inv0.22.1
func (rRBACResource) String()string
typeRateLimitConfig¶added inv0.14.0
typeReconnectingPTYRequest¶added inv0.9.0
type ReconnectingPTYRequest struct {Datastring `json:"data,omitempty"`Heightuint16 `json:"height,omitempty"`Widthuint16 `json:"width,omitempty"`}
ReconnectingPTYRequest is sent from the client to the serverto pipe data to a PTY.@typescript-ignore ReconnectingPTYRequest
typeRegion¶added inv0.23.1
type Region struct {IDuuid.UUID `json:"id" format:"uuid" table:"id"`Namestring `json:"name" table:"name,default_sort"`DisplayNamestring `json:"display_name" table:"display_name"`IconURLstring `json:"icon_url" table:"icon_url"`Healthybool `json:"healthy" table:"healthy"`// PathAppURL is the URL to the base path for path apps. Optional// unless wildcard_hostname is set.// E.g.https://us.example.comPathAppURLstring `json:"path_app_url" table:"url"`// WildcardHostname is the wildcard hostname for subdomain apps.// E.g. *.us.example.com// E.g. *--suffix.au.example.com// Optional. Does not need to be on the same domain as PathAppURL.WildcardHostnamestring `json:"wildcard_hostname" table:"wildcard_hostname"`}
typeRegionTypes¶added inv0.25.0
type RegionTypes interface {Region |WorkspaceProxy}
typeRegionsResponse¶added inv0.23.1
type RegionsResponse[RRegionTypes] struct {Regions []R `json:"regions"`}
typeReplica¶added inv0.10.0
type Replica struct {// ID is the unique identifier for the replica.IDuuid.UUID `json:"id" format:"uuid"`// Hostname is the hostname of the replica.Hostnamestring `json:"hostname"`// CreatedAt is the timestamp when the replica was first seen.CreatedAttime.Time `json:"created_at" format:"date-time"`// RelayAddress is the accessible address to relay DERP connections.RelayAddressstring `json:"relay_address"`// RegionID is the region of the replica.RegionIDint32 `json:"region_id"`// Error is the replica error.Errorstring `json:"error"`// DatabaseLatency is the latency in microseconds to the database.DatabaseLatencyint32 `json:"database_latency"`}
typeRequestOption¶added inv0.9.0
RequestOption is a function that can be used to modify an http.Request.
funcWithQueryParam¶added inv0.9.8
func WithQueryParam(key, valuestring)RequestOption
WithQueryParam adds a query parameter to the request.
typeResourceType¶added inv0.8.11
type ResourceTypestring
const (ResourceTypeTemplateResourceType = "template"ResourceTypeTemplateVersionResourceType = "template_version"ResourceTypeUserResourceType = "user"ResourceTypeWorkspaceResourceType = "workspace"ResourceTypeWorkspaceBuildResourceType = "workspace_build"ResourceTypeGitSSHKeyResourceType = "git_ssh_key"ResourceTypeAPIKeyResourceType = "api_key"ResourceTypeGroupResourceType = "group"ResourceTypeLicenseResourceType = "license"ResourceTypeConvertLoginResourceType = "convert_login")
func (ResourceType)FriendlyString¶added inv0.8.15
func (rResourceType) FriendlyString()string
typeResponse¶added inv0.7.12
type Response struct {// Message is an actionable message that depicts actions the request took.// These messages should be fully formed sentences with proper punctuation.// Examples:// - "A user has been created."// - "Failed to create a user."Messagestring `json:"message"`// Detail is a debug message that provides further insight into why the// action failed. This information can be technical and a regular golang// err.Error() text.// - "database: too many open connections"// - "stat: too many open files"Detailstring `json:"detail,omitempty"`// Validations are form field-specific friendly error messages. They will be// shown on a form field in the UI. These can also be used to add additional// context if there is a set of errors in the primary 'Message'.Validations []ValidationError `json:"validations,omitempty"`}
Response represents a generic HTTP response.
typeSSHConfig¶added inv0.20.0
type SSHConfig struct {// DeploymentName is the config-ssh Hostname prefixDeploymentNameclibase.String// SSHConfigOptions are additional options to add to the ssh config file.// This will override defaults.SSHConfigOptionsclibase.StringArray}
SSHConfig is configuration the cli & vscode extension use for configuringssh connections.
typeSSHConfigResponse¶added inv0.20.0
typeServerSentEvent¶added inv0.9.0
type ServerSentEvent struct {TypeServerSentEventType `json:"type"`Data interface{} `json:"data"`}
typeServerSentEventType¶added inv0.9.0
type ServerSentEventTypestring
const (ServerSentEventTypePingServerSentEventType = "ping"ServerSentEventTypeDataServerSentEventType = "data"ServerSentEventTypeErrorServerSentEventType = "error")
typeServiceBannerConfig¶added inv0.14.0
typeSessionCountDeploymentStats¶added inv0.19.0
typeSupportConfig¶added inv0.18.0
type SupportConfig struct {Linksclibase.Struct[[]LinkConfig] `json:"links" typescript:",notnull"`}
typeSwaggerConfig¶added inv0.13.5
typeTLSConfig¶added inv0.11.0
type TLSConfig struct {Enableclibase.Bool `json:"enable" typescript:",notnull"`Addressclibase.HostPort `json:"address" typescript:",notnull"`RedirectHTTPclibase.Bool `json:"redirect_http" typescript:",notnull"`CertFilesclibase.StringArray `json:"cert_file" typescript:",notnull"`ClientAuthclibase.String `json:"client_auth" typescript:",notnull"`ClientCAFileclibase.String `json:"client_ca_file" typescript:",notnull"`KeyFilesclibase.StringArray `json:"key_file" typescript:",notnull"`MinVersionclibase.String `json:"min_version" typescript:",notnull"`ClientCertFileclibase.String `json:"client_cert_file" typescript:",notnull"`ClientKeyFileclibase.String `json:"client_key_file" typescript:",notnull"`}
typeTelemetryConfig¶added inv0.11.0
typeTemplate¶added inv0.4.0
type Template struct {IDuuid.UUID `json:"id" format:"uuid"`CreatedAttime.Time `json:"created_at" format:"date-time"`UpdatedAttime.Time `json:"updated_at" format:"date-time"`OrganizationIDuuid.UUID `json:"organization_id" format:"uuid"`Namestring `json:"name"`DisplayNamestring `json:"display_name"`ProvisionerProvisionerType `json:"provisioner" enums:"terraform"`ActiveVersionIDuuid.UUID `json:"active_version_id" format:"uuid"`// ActiveUserCount is set to -1 when loading.ActiveUserCountint `json:"active_user_count"`BuildTimeStatsTemplateBuildTimeStats `json:"build_time_stats"`Descriptionstring `json:"description"`Iconstring `json:"icon"`DefaultTTLMillisint64 `json:"default_ttl_ms"`// TODO(@dean): remove max_ttl once restart_requirement is maturedMaxTTLMillisint64 `json:"max_ttl_ms"`// RestartRequirement is an enterprise feature. Its value is only used if// your license is entitled to use the advanced template scheduling feature.RestartRequirementTemplateRestartRequirement `json:"restart_requirement"`CreatedByIDuuid.UUID `json:"created_by_id" format:"uuid"`CreatedByNamestring `json:"created_by_name"`// AllowUserAutostart and AllowUserAutostop are enterprise-only. Their// values are only used if your license is entitled to use the advanced// template scheduling feature.AllowUserAutostartbool `json:"allow_user_autostart"`AllowUserAutostopbool `json:"allow_user_autostop"`AllowUserCancelWorkspaceJobsbool `json:"allow_user_cancel_workspace_jobs"`// FailureTTLMillis, InactivityTTLMillis, and LockedTTLMillis are enterprise-only. Their// values are used if your license is entitled to use the advanced// template scheduling feature.FailureTTLMillisint64 `json:"failure_ttl_ms"`InactivityTTLMillisint64 `json:"inactivity_ttl_ms"`LockedTTLMillisint64 `json:"locked_ttl_ms"`}
Template is the JSON representation of a Coder template. This type matches thedatabase object for now, but is abstracted for ease of change later on.
typeTemplateACL¶added inv0.9.9
type TemplateACL struct {Users []TemplateUser `json:"users"`Groups []TemplateGroup `json:"group"`}
typeTemplateAppUsage¶added inv0.27.1
type TemplateAppUsage struct {TemplateIDs []uuid.UUID `json:"template_ids" format:"uuid"`TypeTemplateAppsType `json:"type" example:"builtin"`DisplayNamestring `json:"display_name" example:"Visual Studio Code"`Slugstring `json:"slug" example:"vscode"`Iconstring `json:"icon"`Secondsint64 `json:"seconds" example:"80500"`}
TemplateAppUsage shows the usage of an app for one or more templates.
typeTemplateAppsType¶added inv0.27.1
type TemplateAppsTypestring
TemplateAppsType defines the type of app reported.
const (TemplateAppsTypeBuiltinTemplateAppsType = "builtin")
TemplateAppsType enums.
typeTemplateBuildTimeStats¶added inv0.10.0
type TemplateBuildTimeStats map[WorkspaceTransition]TransitionStats
typeTemplateExample¶added inv0.13.2
typeTemplateGroup¶added inv0.9.9
type TemplateGroup struct {GroupRoleTemplateRole `json:"role" enums:"admin,use"`}
typeTemplateInsightsIntervalReport¶added inv0.27.1
type TemplateInsightsIntervalReport struct {StartTimetime.Time `json:"start_time" format:"date-time"`EndTimetime.Time `json:"end_time" format:"date-time"`TemplateIDs []uuid.UUID `json:"template_ids" format:"uuid"`IntervalInsightsReportInterval `json:"interval"`ActiveUsersint64 `json:"active_users" example:"14"`}
TemplateInsightsIntervalReport is the report from the template insightsendpoint for a specific interval.
typeTemplateInsightsReport¶added inv0.27.1
type TemplateInsightsReport struct {StartTimetime.Time `json:"start_time" format:"date-time"`EndTimetime.Time `json:"end_time" format:"date-time"`TemplateIDs []uuid.UUID `json:"template_ids" format:"uuid"`ActiveUsersint64 `json:"active_users" example:"22"`AppsUsage []TemplateAppUsage `json:"apps_usage"`}
TemplateInsightsReport is the report from the template insights endpoint.
typeTemplateInsightsRequest¶added inv0.27.1
typeTemplateInsightsResponse¶added inv0.27.1
type TemplateInsightsResponse struct {ReportTemplateInsightsReport `json:"report"`IntervalReports []TemplateInsightsIntervalReport `json:"interval_reports"`}
TemplateInsightsResponse is the response from the template insights endpoint.
typeTemplateRestartRequirement¶added inv0.26.2
type TemplateRestartRequirement struct {// DaysOfWeek is a list of days of the week on which restarts are required.// Restarts happen within the user's quiet hours (in their configured// timezone). If no days are specified, restarts are not required. Weekdays// cannot be specified twice.//// Restarts will only happen on weekdays in this list on weeks which line up// with Weeks.DaysOfWeek []string `json:"days_of_week" enums:"monday,tuesday,wednesday,thursday,friday,saturday,sunday"`// Weeks is the number of weeks between required restarts. Weeks are synced// across all workspaces (and Coder deployments) using modulo math on a// hardcoded epoch week of January 2nd, 2023 (the first Monday of 2023).// Values of 0 or 1 indicate weekly restarts. Values of 2 indicate// fortnightly restarts, etc.Weeksint64 `json:"weeks"`}
typeTemplateRole¶added inv0.9.9
type TemplateRolestring
const (TemplateRoleAdminTemplateRole = "admin"TemplateRoleUseTemplateRole = "use"TemplateRoleDeletedTemplateRole = "")
typeTemplateUser¶added inv0.9.9
type TemplateUser struct {UserRoleTemplateRole `json:"role" enums:"admin,use"`}
typeTemplateVersion¶added inv0.4.0
type TemplateVersion struct {IDuuid.UUID `json:"id" format:"uuid"`TemplateID *uuid.UUID `json:"template_id,omitempty" format:"uuid"`OrganizationIDuuid.UUID `json:"organization_id,omitempty" format:"uuid"`CreatedAttime.Time `json:"created_at" format:"date-time"`UpdatedAttime.Time `json:"updated_at" format:"date-time"`Namestring `json:"name"`Messagestring `json:"message"`JobProvisionerJob `json:"job"`Readmestring `json:"readme"`CreatedByUser `json:"created_by"`Warnings []TemplateVersionWarning `json:"warnings,omitempty" enums:"DEPRECATED_PARAMETERS"`}
TemplateVersion represents a single version of a template.
typeTemplateVersionGitAuth¶added inv0.18.0
type TemplateVersionGitAuth struct {IDstring `json:"id"`TypeGitProvider `json:"type"`AuthenticateURLstring `json:"authenticate_url"`Authenticatedbool `json:"authenticated"`}
typeTemplateVersionParameter¶added inv0.4.0
type TemplateVersionParameter struct {Namestring `json:"name"`DisplayNamestring `json:"display_name,omitempty"`Descriptionstring `json:"description"`DescriptionPlaintextstring `json:"description_plaintext"`Typestring `json:"type" enums:"string,number,bool,list(string)"`Mutablebool `json:"mutable"`DefaultValuestring `json:"default_value"`Iconstring `json:"icon"`Options []TemplateVersionParameterOption `json:"options"`ValidationErrorstring `json:"validation_error,omitempty"`ValidationRegexstring `json:"validation_regex,omitempty"`ValidationMin *int32 `json:"validation_min,omitempty"`ValidationMax *int32 `json:"validation_max,omitempty"`ValidationMonotonicValidationMonotonicOrder `json:"validation_monotonic,omitempty" enums:"increasing,decreasing"`Requiredbool `json:"required"`Ephemeralbool `json:"ephemeral"`}
TemplateVersionParameter represents a parameter for a template version.
typeTemplateVersionParameterOption¶added inv0.15.0
type TemplateVersionParameterOption struct {Namestring `json:"name"`Descriptionstring `json:"description"`Valuestring `json:"value"`Iconstring `json:"icon"`}
TemplateVersionParameterOption represents a selectable option for a template parameter.
typeTemplateVersionVariable¶added inv0.17.4
type TemplateVersionVariable struct {Namestring `json:"name"`Descriptionstring `json:"description"`Typestring `json:"type" enums:"string,number,bool"`Valuestring `json:"value"`DefaultValuestring `json:"default_value"`Requiredbool `json:"required"`Sensitivebool `json:"sensitive"`}
TemplateVersionVariable represents a managed template variable.
typeTemplateVersionWarning¶added inv0.23.3
type TemplateVersionWarningstring
const (TemplateVersionWarningUnsupportedWorkspacesTemplateVersionWarning = "UNSUPPORTED_WORKSPACES")
typeTemplateVersionsByTemplateRequest¶added inv0.5.6
type TemplateVersionsByTemplateRequest struct {TemplateIDuuid.UUID `json:"template_id" validate:"required" format:"uuid"`Pagination}
TemplateVersionsByTemplateRequest defines the request parameters forTemplateVersionsByTemplate.
typeTokenConfig¶added inv0.20.0
typeTokensFilter¶added inv0.18.0
type TokensFilter struct {IncludeAllbool `json:"include_all"`}
typeTraceConfig¶added inv0.12.0
typeTransitionStats¶added inv0.12.9
typeUpdateActiveTemplateVersion¶added inv0.4.0
typeUpdateAppearanceConfig¶added inv0.18.0
type UpdateAppearanceConfig struct {LogoURLstring `json:"logo_url"`ServiceBannerServiceBannerConfig `json:"service_banner"`}
typeUpdateCheckResponse¶added inv0.13.0
type UpdateCheckResponse struct {// Current indicates whether the server version is the same as the latest.Currentbool `json:"current"`// Version is the semantic version for the latest release of Coder.Versionstring `json:"version"`// URL to download the latest release of Coder.URLstring `json:"url"`}
UpdateCheckResponse contains information on the latest release of Coder.
typeUpdateRoles¶added inv0.5.2
type UpdateRoles struct {Roles []string `json:"roles" validate:""`}
typeUpdateTemplateACL¶added inv0.9.9
type UpdateTemplateACL struct {// UserPerms should be a mapping of user id to role. The user id must be the// uuid of the user, not a username or email address.UserPerms map[string]TemplateRole `json:"user_perms,omitempty" example:"<group_id>:admin,4df59e74-c027-470b-ab4d-cbba8963a5e9:use"`// GroupPerms should be a mapping of group id to role.GroupPerms map[string]TemplateRole `json:"group_perms,omitempty" example:"<user_id>>:admin,8bd26b20-f3e8-48be-a903-46bb920cf671:use"`}
typeUpdateTemplateMeta¶added inv0.6.3
type UpdateTemplateMeta struct {Namestring `json:"name,omitempty" validate:"omitempty,template_name"`DisplayNamestring `json:"display_name,omitempty" validate:"omitempty,template_display_name"`Descriptionstring `json:"description,omitempty"`Iconstring `json:"icon,omitempty"`DefaultTTLMillisint64 `json:"default_ttl_ms,omitempty"`// TODO(@dean): remove max_ttl once restart_requirement is maturedMaxTTLMillisint64 `json:"max_ttl_ms,omitempty"`// RestartRequirement can only be set if your license includes the advanced// template scheduling feature. If you attempt to set this value while// unlicensed, it will be ignored.RestartRequirement *TemplateRestartRequirement `json:"restart_requirement,omitempty"`AllowUserAutostartbool `json:"allow_user_autostart,omitempty"`AllowUserAutostopbool `json:"allow_user_autostop,omitempty"`AllowUserCancelWorkspaceJobsbool `json:"allow_user_cancel_workspace_jobs,omitempty"`FailureTTLMillisint64 `json:"failure_ttl_ms,omitempty"`InactivityTTLMillisint64 `json:"inactivity_ttl_ms,omitempty"`LockedTTLMillisint64 `json:"locked_ttl_ms,omitempty"`}
typeUpdateUserPasswordRequest¶added inv0.5.5
typeUpdateUserProfileRequest¶added inv0.4.2
type UpdateUserProfileRequest struct {Usernamestring `json:"username" validate:"required,username"`}
typeUpdateUserQuietHoursScheduleRequest¶added inv0.26.2
type UpdateUserQuietHoursScheduleRequest struct {// Schedule is a cron expression that defines when the user's quiet hours// window is. Schedule must not be empty. For new users, the schedule is set// to 2am in their browser or computer's timezone. The schedule denotes the// beginning of a 4 hour window where the workspace is allowed to// automatically stop or restart due to maintenance or template max TTL.//// The schedule must be daily with a single time, and should have a timezone// specified via a CRON_TZ prefix (otherwise UTC will be used).//// If the schedule is empty, the user will be updated to use the default// schedule.Schedulestring `json:"schedule" validate:"required"`}
typeUpdateWorkspaceAutostartRequest¶added inv0.4.1
type UpdateWorkspaceAutostartRequest struct {Schedule *string `json:"schedule"`}
UpdateWorkspaceAutostartRequest is a request to update a workspace's autostart schedule.
typeUpdateWorkspaceLock¶added inv0.25.0
type UpdateWorkspaceLock struct {Lockbool `json:"lock"`}
UpdateWorkspaceLock is a request to lock or unlock a workspace.
typeUpdateWorkspaceProxyResponse¶added inv0.23.3
type UpdateWorkspaceProxyResponse struct {ProxyWorkspaceProxy `json:"proxy" table:"proxy,recursive"`// The recursive table sort is not working very well.ProxyTokenstring `json:"proxy_token" table:"proxy token,default_sort"`}
typeUpdateWorkspaceRequest¶added inv0.8.7
type UpdateWorkspaceRequest struct {Namestring `json:"name,omitempty" validate:"username"`}
typeUpdateWorkspaceTTLRequest¶added inv0.6.0
type UpdateWorkspaceTTLRequest struct {TTLMillis *int64 `json:"ttl_ms"`}
UpdateWorkspaceTTLRequest is a request to update a workspace's TTL.
typeUploadResponse¶
UploadResponse contains the hash to reference the uploaded file.
typeUser¶
type User struct {IDuuid.UUID `json:"id" validate:"required" table:"id" format:"uuid"`Usernamestring `json:"username" validate:"required" table:"username,default_sort"`Emailstring `json:"email" validate:"required" table:"email" format:"email"`CreatedAttime.Time `json:"created_at" validate:"required" table:"created at" format:"date-time"`LastSeenAttime.Time `json:"last_seen_at" format:"date-time"`StatusUserStatus `json:"status" table:"status" enums:"active,suspended"`OrganizationIDs []uuid.UUID `json:"organization_ids" format:"uuid"`Roles []Role `json:"roles"`AvatarURLstring `json:"avatar_url" format:"uri"`}
User represents a user in Coder.
typeUserLatency¶added inv0.27.1
type UserLatency struct {TemplateIDs []uuid.UUID `json:"template_ids" format:"uuid"`UserIDuuid.UUID `json:"user_id" format:"uuid"`Usernamestring `json:"username"`LatencyMSConnectionLatency `json:"latency_ms"`}
UserLatency shows the connection latency for a user.
typeUserLatencyInsightsReport¶added inv0.27.1
type UserLatencyInsightsReport struct {StartTimetime.Time `json:"start_time" format:"date-time"`EndTimetime.Time `json:"end_time" format:"date-time"`TemplateIDs []uuid.UUID `json:"template_ids" format:"uuid"`Users []UserLatency `json:"users"`}
UserLatencyInsightsReport is the report from the user latency insightsendpoint.
typeUserLatencyInsightsRequest¶added inv0.27.1
typeUserLatencyInsightsResponse¶added inv0.27.1
type UserLatencyInsightsResponse struct {ReportUserLatencyInsightsReport `json:"report"`}
UserLatencyInsightsResponse is the response from the user latency insightsendpoint.
typeUserLoginType¶added inv0.25.0
type UserLoginType struct {LoginTypeLoginType `json:"login_type"`}
typeUserQuietHoursScheduleConfig¶added inv0.26.2
typeUserQuietHoursScheduleResponse¶added inv0.26.2
type UserQuietHoursScheduleResponse struct {RawSchedulestring `json:"raw_schedule"`// UserSet is true if the user has set their own quiet hours schedule. If// false, the user is using the default schedule.UserSetbool `json:"user_set"`// Time is the time of day that the quiet hours window starts in the given// Timezone each day.Timestring `json:"time"`// HH:mm (24-hour)Timezonestring `json:"timezone"`// raw format from the cron expression, UTC if unspecified// Next is the next time that the quiet hours window will start.Nexttime.Time `json:"next" format:"date-time"`}
typeUserStatus¶added inv0.5.1
type UserStatusstring
const (UserStatusActiveUserStatus = "active"UserStatusSuspendedUserStatus = "suspended")
typeUsersRequest¶added inv0.4.4
type UsersRequest struct {Searchstring `json:"search,omitempty" typescript:"-"`// Filter users by status.StatusUserStatus `json:"status,omitempty" typescript:"-"`// Filter users that have the given role.Rolestring `json:"role,omitempty" typescript:"-"`SearchQuerystring `json:"q,omitempty"`Pagination}
typeValidationError¶added inv0.7.12
type ValidationError struct {Fieldstring `json:"field" validate:"required"`Detailstring `json:"detail" validate:"required"`}
ValidationError represents a scoped error to a user input.
func (ValidationError)Error¶added inv0.8.2
func (eValidationError) Error()string
typeValidationMonotonicOrder¶added inv0.17.0
type ValidationMonotonicOrderstring
const (MonotonicOrderIncreasingValidationMonotonicOrder = "increasing"MonotonicOrderDecreasingValidationMonotonicOrder = "decreasing")
typeVariableValue¶added inv0.17.4
typeWorkspace¶
type Workspace struct {IDuuid.UUID `json:"id" format:"uuid"`CreatedAttime.Time `json:"created_at" format:"date-time"`UpdatedAttime.Time `json:"updated_at" format:"date-time"`OwnerIDuuid.UUID `json:"owner_id" format:"uuid"`OwnerNamestring `json:"owner_name"`OrganizationIDuuid.UUID `json:"organization_id" format:"uuid"`TemplateIDuuid.UUID `json:"template_id" format:"uuid"`TemplateNamestring `json:"template_name"`TemplateDisplayNamestring `json:"template_display_name"`TemplateIconstring `json:"template_icon"`TemplateAllowUserCancelWorkspaceJobsbool `json:"template_allow_user_cancel_workspace_jobs"`LatestBuildWorkspaceBuild `json:"latest_build"`Outdatedbool `json:"outdated"`Namestring `json:"name"`AutostartSchedule *string `json:"autostart_schedule,omitempty"`TTLMillis *int64 `json:"ttl_ms,omitempty"`LastUsedAttime.Time `json:"last_used_at" format:"date-time"`// DeletingAt indicates the time of the upcoming workspace deletion, if applicable; otherwise it is nil.// Workspaces may have impending deletions if Template.InactivityTTL feature is turned on and the workspace is inactive.DeletingAt *time.Time `json:"deleting_at" format:"date-time"`// LockedAt being non-nil indicates a workspace that has been locked.// A locked workspace is no longer accessible by a user and must be// unlocked by an admin. It is subject to deletion if it breaches// the duration of the locked_ttl field on its template.LockedAt *time.Time `json:"locked_at" format:"date-time"`// Health shows the health of the workspace and information about// what is causing an unhealthy status.HealthWorkspaceHealth `json:"health"`}
Workspace is a deployment of a template. It references a specificversion and can be updated.
typeWorkspaceAgent¶
type WorkspaceAgent struct {IDuuid.UUID `json:"id" format:"uuid"`CreatedAttime.Time `json:"created_at" format:"date-time"`UpdatedAttime.Time `json:"updated_at" format:"date-time"`FirstConnectedAt *time.Time `json:"first_connected_at,omitempty" format:"date-time"`LastConnectedAt *time.Time `json:"last_connected_at,omitempty" format:"date-time"`DisconnectedAt *time.Time `json:"disconnected_at,omitempty" format:"date-time"`StartedAt *time.Time `json:"started_at,omitempty" format:"date-time"`ReadyAt *time.Time `json:"ready_at,omitempty" format:"date-time"`StatusWorkspaceAgentStatus `json:"status"`LifecycleStateWorkspaceAgentLifecycle `json:"lifecycle_state"`Namestring `json:"name"`ResourceIDuuid.UUID `json:"resource_id" format:"uuid"`InstanceIDstring `json:"instance_id,omitempty"`Architecturestring `json:"architecture"`EnvironmentVariables map[string]string `json:"environment_variables"`OperatingSystemstring `json:"operating_system"`StartupScriptstring `json:"startup_script,omitempty"`StartupScriptBehaviorWorkspaceAgentStartupScriptBehavior `json:"startup_script_behavior"`StartupScriptTimeoutSecondsint32 `json:"startup_script_timeout_seconds"`// StartupScriptTimeoutSeconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout.StartupLogsLengthint32 `json:"startup_logs_length"`StartupLogsOverflowedbool `json:"startup_logs_overflowed"`Directorystring `json:"directory,omitempty"`ExpandedDirectorystring `json:"expanded_directory,omitempty"`Versionstring `json:"version"`Apps []WorkspaceApp `json:"apps"`// DERPLatency is mapped by region name (e.g. "New York City", "Seattle").DERPLatency map[string]DERPRegion `json:"latency,omitempty"`ConnectionTimeoutSecondsint32 `json:"connection_timeout_seconds"`TroubleshootingURLstring `json:"troubleshooting_url"`// Deprecated: Use StartupScriptBehavior instead.LoginBeforeReadybool `json:"login_before_ready"`ShutdownScriptstring `json:"shutdown_script,omitempty"`ShutdownScriptTimeoutSecondsint32 `json:"shutdown_script_timeout_seconds"`SubsystemAgentSubsystem `json:"subsystem"`HealthWorkspaceAgentHealth `json:"health"`// Health reports the health of the agent.}
typeWorkspaceAgentConn¶added inv0.16.0
WorkspaceAgentConn represents a connection to a workspace agent.@typescript-ignore WorkspaceAgentConn
funcNewWorkspaceAgentConn¶added inv0.26.2
func NewWorkspaceAgentConn(conn *tailnet.Conn, optsWorkspaceAgentConnOptions) *WorkspaceAgentConn
NewWorkspaceAgentConn creates a new WorkspaceAgentConn. `conn` may be uniqueto the WorkspaceAgentConn, or it may be shared in the case of coderd. If theconn is shared and closing it is undesirable, you may return ErrNoClose fromopts.CloseFunc. This will ensure the underlying conn is not closed.
func (*WorkspaceAgentConn)AwaitReachable¶added inv0.16.0
func (c *WorkspaceAgentConn) AwaitReachable(ctxcontext.Context)bool
AwaitReachable waits for the agent to be reachable.
func (*WorkspaceAgentConn)Close¶added inv0.16.0
func (c *WorkspaceAgentConn) Close()error
Close ends the connection to the workspace agent.
func (*WorkspaceAgentConn)DialContext¶added inv0.16.0
func (c *WorkspaceAgentConn) DialContext(ctxcontext.Context, networkstring, addrstring) (net.Conn,error)
DialContext dials the address provided in the workspace agent.The network must be "tcp" or "udp".
func (*WorkspaceAgentConn)ListeningPorts¶added inv0.16.0
func (c *WorkspaceAgentConn) ListeningPorts(ctxcontext.Context) (WorkspaceAgentListeningPortsResponse,error)
ListeningPorts lists the ports that are currently in use by the workspace.
func (*WorkspaceAgentConn)Ping¶added inv0.16.0
func (c *WorkspaceAgentConn) Ping(ctxcontext.Context) (time.Duration,bool, *ipnstate.PingResult,error)
Ping pings the agent and returns the round-trip time.The bool returns true if the ping was made P2P.
func (*WorkspaceAgentConn)ReconnectingPTY¶added inv0.16.0
func (c *WorkspaceAgentConn) ReconnectingPTY(ctxcontext.Context, iduuid.UUID, height, widthuint16, commandstring) (net.Conn,error)
ReconnectingPTY spawns a new reconnecting terminal session.`ReconnectingPTYRequest` should be JSON marshaled and written to the returned net.Conn.Raw terminal output will be read from the returned net.Conn.
func (*WorkspaceAgentConn)SSH¶added inv0.16.0
SSH pipes the SSH protocol over the returned net.Conn.This connects to the built-in SSH server in the workspace agent.
typeWorkspaceAgentConnOptions¶added inv0.26.2
@typescript-ignore WorkspaceAgentConnOptions
typeWorkspaceAgentConnectionInfo¶added inv0.8.11
type WorkspaceAgentConnectionInfo struct {DERPMap *tailcfg.DERPMap `json:"derp_map"`DisableDirectConnectionsbool `json:"disable_direct_connections"`}
WorkspaceAgentConnectionInfo returns required information for establishinga connection with a workspace.@typescript-ignore WorkspaceAgentConnectionInfo
typeWorkspaceAgentHealth¶added inv0.26.0
typeWorkspaceAgentLifecycle¶added inv0.15.3
type WorkspaceAgentLifecyclestring
WorkspaceAgentLifecycle represents the lifecycle state of a workspace agent.
The agent lifecycle starts in the "created" state, and transitions to"starting" when the agent reports it has begun preparing (e.g. startedexecuting the startup script).
const (WorkspaceAgentLifecycleCreatedWorkspaceAgentLifecycle = "created"WorkspaceAgentLifecycleStartingWorkspaceAgentLifecycle = "starting"WorkspaceAgentLifecycleStartTimeoutWorkspaceAgentLifecycle = "start_timeout"WorkspaceAgentLifecycleStartErrorWorkspaceAgentLifecycle = "start_error"WorkspaceAgentLifecycleReadyWorkspaceAgentLifecycle = "ready"WorkspaceAgentLifecycleShuttingDownWorkspaceAgentLifecycle = "shutting_down"WorkspaceAgentLifecycleShutdownTimeoutWorkspaceAgentLifecycle = "shutdown_timeout"WorkspaceAgentLifecycleShutdownErrorWorkspaceAgentLifecycle = "shutdown_error"WorkspaceAgentLifecycleOffWorkspaceAgentLifecycle = "off")
WorkspaceAgentLifecycle enums.
func (WorkspaceAgentLifecycle)ShuttingDown¶added inv0.25.0
func (lWorkspaceAgentLifecycle) ShuttingDown()bool
ShuttingDown returns true if the agent is in the process of shuttingdown or has shut down.
func (WorkspaceAgentLifecycle)Starting¶added inv0.25.0
func (lWorkspaceAgentLifecycle) Starting()bool
Starting returns true if the agent is in the process of starting.
typeWorkspaceAgentListeningPort¶added inv0.16.0
typeWorkspaceAgentListeningPortsResponse¶added inv0.16.0
type WorkspaceAgentListeningPortsResponse struct {// If there are no ports in the list, nothing should be displayed in the UI.// There must not be a "no ports available" message or anything similar, as// there will always be no ports displayed on platforms where our port// detection logic is unsupported.Ports []WorkspaceAgentListeningPort `json:"ports"`}
typeWorkspaceAgentMetadata¶added inv0.9.0
type WorkspaceAgentMetadata struct {ResultWorkspaceAgentMetadataResult `json:"result"`DescriptionWorkspaceAgentMetadataDescription `json:"description"`}
typeWorkspaceAgentMetadataDescription¶added inv0.21.3
type WorkspaceAgentMetadataDescription struct {DisplayNamestring `json:"display_name"`Keystring `json:"key"`Scriptstring `json:"script"`Intervalint64 `json:"interval"`Timeoutint64 `json:"timeout"`}
WorkspaceAgentMetadataDescription is a description of dynamic metadata the agent should reportback to coderd. It is provided via the `metadata` list in the `coder_agent`block.
typeWorkspaceAgentMetadataResult¶added inv0.21.3
type WorkspaceAgentMetadataResult struct {CollectedAttime.Time `json:"collected_at" format:"date-time"`// Age is the number of seconds since the metadata was collected.// It is provided in addition to CollectedAt to protect against clock skew.Ageint64 `json:"age"`Valuestring `json:"value"`Errorstring `json:"error"`}
typeWorkspaceAgentReconnectingPTYInit¶added inv0.16.0
WorkspaceAgentReconnectingPTYInit initializes a new reconnecting PTY session.@typescript-ignore WorkspaceAgentReconnectingPTYInit
typeWorkspaceAgentReconnectingPTYOpts¶added inv0.23.1
type WorkspaceAgentReconnectingPTYOpts struct {AgentIDuuid.UUIDReconnectuuid.UUIDWidthuint16Heightuint16Commandstring// SignedToken is an optional signed token from the// issue-reconnecting-pty-signed-token endpoint. If set, the session token// on the client will not be sent.SignedTokenstring}
@typescript-ignore:WorkspaceAgentReconnectingPTYOpts
typeWorkspaceAgentStartupLog¶added inv0.21.0
typeWorkspaceAgentStartupScriptBehavior¶added inv0.24.0
type WorkspaceAgentStartupScriptBehaviorstring
WorkspaceAgentStartupScriptBehavior defines whether or not the startup scriptshould be considered blocking or non-blocking. The blocking behavior meansthat the agent will not be considered ready until the startup script hascompleted and, for example, SSH connections will wait for the agent to beready (can be overridden).
Presently, non-blocking is the default, but this may change in the future.
const (WorkspaceAgentStartupScriptBehaviorBlockingWorkspaceAgentStartupScriptBehavior = "blocking"WorkspaceAgentStartupScriptBehaviorNonBlockingWorkspaceAgentStartupScriptBehavior = "non-blocking")
typeWorkspaceAgentStatus¶
type WorkspaceAgentStatusstring
const (WorkspaceAgentConnectingWorkspaceAgentStatus = "connecting"WorkspaceAgentConnectedWorkspaceAgentStatus = "connected"WorkspaceAgentDisconnectedWorkspaceAgentStatus = "disconnected"WorkspaceAgentTimeoutWorkspaceAgentStatus = "timeout")
This is also in database/modelmethods.go and should be kept in sync.
typeWorkspaceApp¶added inv0.6.2
type WorkspaceApp struct {IDuuid.UUID `json:"id" format:"uuid"`// URL is the address being proxied to inside the workspace.// If external is specified, this will be opened on the client.URLstring `json:"url"`// External specifies whether the URL should be opened externally on// the client or not.Externalbool `json:"external"`// Slug is a unique identifier within the agent.Slugstring `json:"slug"`// DisplayName is a friendly name for the app.DisplayNamestring `json:"display_name"`Commandstring `json:"command,omitempty"`// Icon is a relative path or external URL that specifies// an icon to be displayed in the dashboard.Iconstring `json:"icon,omitempty"`// Subdomain denotes whether the app should be accessed via a path on the// `coder server` or via a hostname-based dev URL. If this is set to true// and there is no app wildcard configured on the server, the app will not// be accessible in the UI.Subdomainbool `json:"subdomain"`SharingLevelWorkspaceAppSharingLevel `json:"sharing_level" enums:"owner,authenticated,public"`// Healthcheck specifies the configuration for checking app health.HealthcheckHealthcheck `json:"healthcheck"`HealthWorkspaceAppHealth `json:"health"`}
typeWorkspaceAppHealth¶added inv0.9.0
type WorkspaceAppHealthstring
const (WorkspaceAppHealthDisabledWorkspaceAppHealth = "disabled"WorkspaceAppHealthInitializingWorkspaceAppHealth = "initializing"WorkspaceAppHealthHealthyWorkspaceAppHealth = "healthy"WorkspaceAppHealthUnhealthyWorkspaceAppHealth = "unhealthy")
typeWorkspaceAppSharingLevel¶added inv0.10.0
type WorkspaceAppSharingLevelstring
const (WorkspaceAppSharingLevelOwnerWorkspaceAppSharingLevel = "owner"WorkspaceAppSharingLevelAuthenticatedWorkspaceAppSharingLevel = "authenticated"WorkspaceAppSharingLevelPublicWorkspaceAppSharingLevel = "public")
typeWorkspaceBuild¶
type WorkspaceBuild struct {IDuuid.UUID `json:"id" format:"uuid"`CreatedAttime.Time `json:"created_at" format:"date-time"`UpdatedAttime.Time `json:"updated_at" format:"date-time"`WorkspaceIDuuid.UUID `json:"workspace_id" format:"uuid"`WorkspaceNamestring `json:"workspace_name"`WorkspaceOwnerIDuuid.UUID `json:"workspace_owner_id" format:"uuid"`WorkspaceOwnerNamestring `json:"workspace_owner_name"`TemplateVersionIDuuid.UUID `json:"template_version_id" format:"uuid"`TemplateVersionNamestring `json:"template_version_name"`BuildNumberint32 `json:"build_number"`TransitionWorkspaceTransition `json:"transition" enums:"start,stop,delete"`InitiatorIDuuid.UUID `json:"initiator_id" format:"uuid"`InitiatorUsernamestring `json:"initiator_name"`JobProvisionerJob `json:"job"`ReasonBuildReason `db:"reason" json:"reason" enums:"initiator,autostart,autostop"`Resources []WorkspaceResource `json:"resources"`DeadlineNullTime `json:"deadline,omitempty" format:"date-time"`MaxDeadlineNullTime `json:"max_deadline,omitempty" format:"date-time"`StatusWorkspaceStatus `json:"status" enums:"pending,starting,running,stopping,stopped,failed,canceling,canceled,deleting,deleted"`DailyCostint32 `json:"daily_cost"`}
WorkspaceBuild is an at-point representation of a workspace state.BuildNumbers start at 1 and increase by 1 for each subsequent build
typeWorkspaceBuildParameter¶added inv0.15.0
WorkspaceBuildParameter represents a parameter specific for a workspace build.
typeWorkspaceBuildsRequest¶added inv0.6.0
type WorkspaceBuildsRequest struct {WorkspaceIDuuid.UUIDPaginationSincetime.Time}
typeWorkspaceConnectionLatencyMS¶added inv0.19.0
typeWorkspaceDeploymentStats¶added inv0.19.0
type WorkspaceDeploymentStats struct {Pendingint64 `json:"pending"`Buildingint64 `json:"building"`Runningint64 `json:"running"`Failedint64 `json:"failed"`Stoppedint64 `json:"stopped"`ConnectionLatencyMSWorkspaceConnectionLatencyMS `json:"connection_latency_ms"`RxBytesint64 `json:"rx_bytes"`TxBytesint64 `json:"tx_bytes"`}
typeWorkspaceFilter¶added inv0.6.0
type WorkspaceFilter struct {// Owner can be "me" or a usernameOwnerstring `json:"owner,omitempty" typescript:"-"`// Template is a template nameTemplatestring `json:"template,omitempty" typescript:"-"`// Name will return partial matchesNamestring `json:"name,omitempty" typescript:"-"`// Status is a workspace status, which is really the status of the latest buildStatusstring `json:"status,omitempty" typescript:"-"`// Offset is the number of workspaces to skip before returning results.Offsetint `json:"offset,omitempty" typescript:"-"`// Limit is a limit on the number of workspaces returned.Limitint `json:"limit,omitempty" typescript:"-"`// FilterQuery supports a raw filter query stringFilterQuerystring `json:"q,omitempty"`}
typeWorkspaceHealth¶added inv0.26.0
typeWorkspaceOptions¶added inv0.6.3
type WorkspaceOptions struct {IncludeDeletedbool `json:"include_deleted,omitempty"`}
typeWorkspaceProxy¶added inv0.22.0
type WorkspaceProxy struct {// Extends Region with extra informationRegion `table:"region,recursive_inline"`// Status is the latest status check of the proxy. This will be empty for deleted// proxies. This value can be used to determine if a workspace proxy is healthy// and ready to use.StatusWorkspaceProxyStatus `json:"status,omitempty" table:"proxy,recursive"`CreatedAttime.Time `json:"created_at" format:"date-time" table:"created_at,default_sort"`UpdatedAttime.Time `json:"updated_at" format:"date-time" table:"updated_at"`Deletedbool `json:"deleted" table:"deleted"`}
typeWorkspaceProxyBuildInfo¶added inv0.23.0
typeWorkspaceProxyStatus¶added inv0.23.0
type WorkspaceProxyStatus struct {StatusProxyHealthStatus `json:"status" table:"status,default_sort"`// Report provides more information about the health of the workspace proxy.ReportProxyHealthReport `json:"report,omitempty" table:"report"`CheckedAttime.Time `json:"checked_at" table:"checked_at" format:"date-time"`}
typeWorkspaceQuota¶added inv0.9.2
typeWorkspaceResource¶
type WorkspaceResource struct {IDuuid.UUID `json:"id" format:"uuid"`CreatedAttime.Time `json:"created_at" format:"date-time"`JobIDuuid.UUID `json:"job_id" format:"uuid"`TransitionWorkspaceTransition `json:"workspace_transition" enums:"start,stop,delete"`Typestring `json:"type"`Namestring `json:"name"`Hidebool `json:"hide"`Iconstring `json:"icon"`Agents []WorkspaceAgent `json:"agents,omitempty"`Metadata []WorkspaceResourceMetadata `json:"metadata,omitempty"`DailyCostint32 `json:"daily_cost"`}
WorkspaceResource describes resources used to create a workspace, for instance:containers, images, volumes.
typeWorkspaceResourceMetadata¶added inv0.8.3
type WorkspaceResourceMetadata struct {Keystring `json:"key"`Valuestring `json:"value"`Sensitivebool `json:"sensitive"`}
WorkspaceResourceMetadata annotates the workspace resource with custom key-value pairs.
typeWorkspaceStatus¶added inv0.9.2
type WorkspaceStatusstring
const (WorkspaceStatusPendingWorkspaceStatus = "pending"WorkspaceStatusStartingWorkspaceStatus = "starting"WorkspaceStatusRunningWorkspaceStatus = "running"WorkspaceStatusStoppingWorkspaceStatus = "stopping"WorkspaceStatusStoppedWorkspaceStatus = "stopped"WorkspaceStatusFailedWorkspaceStatus = "failed"WorkspaceStatusCancelingWorkspaceStatus = "canceling"WorkspaceStatusCanceledWorkspaceStatus = "canceled"WorkspaceStatusDeletingWorkspaceStatus = "deleting"WorkspaceStatusDeletedWorkspaceStatus = "deleted")
typeWorkspaceTransition¶added inv0.6.0
type WorkspaceTransitionstring
const (WorkspaceTransitionStartWorkspaceTransition = "start"WorkspaceTransitionStopWorkspaceTransition = "stop"WorkspaceTransitionDeleteWorkspaceTransition = "delete")
typeWorkspacesRequest¶added inv0.11.0
type WorkspacesRequest struct {SearchQuerystring `json:"q,omitempty"`Pagination}
typeWorkspacesResponse¶added inv0.12.6
Source Files¶
- apikey.go
- audit.go
- authorization.go
- client.go
- deployment.go
- files.go
- gitauth.go
- gitsshkey.go
- groups.go
- insights.go
- licenses.go
- organizations.go
- pagination.go
- provisionerdaemons.go
- rbacresources.go
- replicas.go
- richparameters.go
- roles.go
- serversentevents.go
- templates.go
- templateversions.go
- time.go
- updatecheck.go
- users.go
- workspaceagentconn.go
- workspaceagents.go
- workspaceapps.go
- workspacebuilds.go
- workspacedisplaystatus.go
- workspaceproxy.go
- workspaces.go