coderd
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
- func ActivateDormantUser(logger slog.Logger, auditor *atomic.Pointer[audit.Auditor], db database.Store) func(ctx context.Context, user database.User) (database.User, error)
- func AuthorizeFilter[O rbac.Objecter](h *HTTPAuthorizer, r *http.Request, action policy.Action, objects []O) ([]O, error)
- func ExternalAuthConfig(cfg *externalauth.Config) codersdk.ExternalAuthLinkProvider
- func ExternalAuthConfigs(auths []*externalauth.Config) []codersdk.ExternalAuthLinkProvider
- func LatencyCheck() http.HandlerFunc
- func NewUpdatesProvider(logger slog.Logger, ps pubsub.Pubsub, db UpdatesQuerier, auth rbac.Authorizer) tailnet.WorkspaceUpdatesProvider
- func ReadExperiments(log slog.Logger, raw []string) codersdk.Experiments
- type API
- func (api *API) AssignableSiteRoles(rw http.ResponseWriter, r *http.Request)
- func (api *API) Authorize(r *http.Request, action policy.Action, object rbac.Objecter) bool
- func (api *API) Close() error
- func (api *API) CreateInMemoryProvisionerDaemon(dialCtx context.Context, name string, ...) (client proto.DRPCProvisionerDaemonClient, err error)
- func (api *API) CreateInMemoryTaggedProvisionerDaemon(dialCtx context.Context, name string, ...) (client proto.DRPCProvisionerDaemonClient, err error)
- func (api *API) CreateUser(ctx context.Context, store database.Store, req CreateUserRequest) (database.User, error)
- func (api *API) DERPMap() *tailcfg.DERPMap
- func (api *API) GetUsers(rw http.ResponseWriter, r *http.Request) ([]database.User, int64, bool)
- func (api *API) PrimaryRegion(ctx context.Context) (codersdk.Region, error)
- func (api *API) PrimaryWorkspaceProxy(ctx context.Context) (database.WorkspaceProxy, error)
- func (api *API) ValidWorkspaceAppHostname(ctx context.Context, host string, opts ValidWorkspaceAppHostnameOpts) (string, error)
- type CreateUserRequest
- type GithubOAuth2Config
- type GithubOAuth2Team
- type HTTPAuthorizer
- type InmemTailnetDialer
- type LanguageModel
- type MemoryProvisionerDaemonOption
- type MergedClaimsSource
- type MultiAgentController
- type OAuthConvertStateClaims
- type OIDCConfig
- type Options
- type Pinger
- type ServerTailnet
- func (s *ServerTailnet) AgentConn(ctx context.Context, agentID uuid.UUID) (*workspacesdk.AgentConn, func(), error)
- func (s *ServerTailnet) Close() error
- func (s *ServerTailnet) Collect(metrics chan<- prometheus.Metric)
- func (s *ServerTailnet) Conn() *tailnet.Conn
- func (s *ServerTailnet) Describe(descs chan<- *prometheus.Desc)
- func (s *ServerTailnet) DialAgentNetConn(ctx context.Context, agentID uuid.UUID, network, addr string) (net.Conn, error)
- func (s *ServerTailnet) ReverseProxy(targetURL, dashboardURL *url.URL, agentID uuid.UUID, app appurl.ApplicationURL, ...) *httputil.ReverseProxy
- func (s *ServerTailnet) ServeHTTPDebug(w http.ResponseWriter, r *http.Request)
- type UpdatesQuerier
- type ValidWorkspaceAppHostnameOpts
Constants¶
const AgentAPIVersionREST = "1.0"
const (HTTPFileMaxBytes = 10 * (10 << 20))
const (OAuthConvertCookieValue = "coder_oauth_convert_jwt")
Variables¶
This section is empty.
Functions¶
funcActivateDormantUser¶added inv2.17.0
funcAuthorizeFilter¶
func AuthorizeFilter[Orbac.Objecter](h *HTTPAuthorizer, r *http.Request, actionpolicy.Action, objects []O) ([]O,error)
AuthorizeFilter takes a list of objects and returns the filtered list ofobjects that the user is authorized to perform the given action on.This is faster than calling Authorize() on each object.
funcExternalAuthConfig¶added inv2.5.0
func ExternalAuthConfig(cfg *externalauth.Config)codersdk.ExternalAuthLinkProvider
funcExternalAuthConfigs¶added inv2.5.0
func ExternalAuthConfigs(auths []*externalauth.Config) []codersdk.ExternalAuthLinkProvider
funcLatencyCheck¶
func LatencyCheck()http.HandlerFunc
LatencyCheck is an endpoint for the web ui to measure latency with.allowAll allows any Origin to get timing information. The allowAll shouldonly be set in dev modes.
funcNewUpdatesProvider¶added inv2.18.0
func NewUpdatesProvider(loggerslog.Logger,pspubsub.Pubsub,dbUpdatesQuerier,authrbac.Authorizer,)tailnet.WorkspaceUpdatesProvider
funcReadExperiments¶
func ReadExperiments(logslog.Logger, raw []string)codersdk.Experiments
nolint:revive
Types¶
typeAPI¶
type API struct {// DeploymentID is loaded from the database on startup.DeploymentIDstring*Options// ID is a uniquely generated ID on initialization.// This is used to associate objects with a specific// Coder API instance, like workspace agents to a// specific replica.IDuuid.UUIDAuditoratomic.Pointer[audit.Auditor]WorkspaceClientCoordinateOverrideatomic.Pointer[func(rwhttp.ResponseWriter)bool]TailnetCoordinatoratomic.Pointer[tailnet.Coordinator]NetworkTelemetryBatcher *tailnet.NetworkTelemetryBatcherTailnetClientService *tailnet.ClientService// WebpushDispatcher is a way to send notifications to users via Web Push.WebpushDispatcherwebpush.DispatcherQuotaCommitteratomic.Pointer[proto.QuotaCommitter]AppearanceFetcheratomic.Pointer[appearance.Fetcher]// WorkspaceProxyHostsFn returns the hosts of healthy workspace proxies// for header reasons.WorkspaceProxyHostsFnatomic.Pointer[func() []string]// TemplateScheduleStore is a pointer to an atomic pointer because this is// passed to another struct, and we want them all to be the same reference.TemplateScheduleStore *atomic.Pointer[schedule.TemplateScheduleStore]// UserQuietHoursScheduleStore is a pointer to an atomic pointer for the// same reason as TemplateScheduleStore.UserQuietHoursScheduleStore *atomic.Pointer[schedule.UserQuietHoursScheduleStore]// DERPMapper mutates the DERPMap to include workspace proxies.DERPMapperatomic.Pointer[func(derpMap *tailcfg.DERPMap) *tailcfg.DERPMap]// AccessControlStore is a pointer to an atomic pointer since it is// passed to dbauthz.AccessControlStore *atomic.Pointer[dbauthz.AccessControlStore]PortShareratomic.Pointer[portsharing.PortSharer]FileCache *files.CachePrebuildsClaimeratomic.Pointer[prebuilds.Claimer]PrebuildsReconcileratomic.Pointer[prebuilds.ReconciliationOrchestrator]UpdatesProvidertailnet.WorkspaceUpdatesProviderHTTPAuth *HTTPAuthorizer// APIHandler serves "/api/v2"APIHandler chi.Router// RootHandler serves "/"RootHandler chi.Router// SiteHandler serves static files for the dashboard.SiteHandler *site.HandlerWebsocketWaitMutexsync.MutexWebsocketWaitGroupsync.WaitGroupWorkspaceAppsProviderworkspaceapps.SignedTokenProvider// Experiments contains the list of experiments currently enabled.// This is used to gate features that are not yet ready for production.Experimentscodersdk.ExperimentsAcquirer *provisionerdserver.Acquirer// contains filtered or unexported fields}
funcNew¶
@securitydefinitions.apiKey CoderSessionToken@in header@name Coder-Session-TokenNew constructs a Coder API handler.
func (*API)AssignableSiteRoles¶added inv2.12.0
func (api *API) AssignableSiteRoles(rwhttp.ResponseWriter, r *http.Request)
AssignableSiteRoles returns all site wide roles that can be assigned.
@Summary Get site member roles@ID get-site-member-roles@Security CoderSessionToken@Produce json@Tags Members@Success 200 {array} codersdk.AssignableRoles@Router /users/roles [get]
func (*API)Authorize¶
Authorize will return false if the user is not authorized to do the action.This function will log appropriately, but the caller must return anerror to the api client.Eg:
if !api.Authorize(...) {httpapi.Forbidden(rw)return}
func (*API)CreateInMemoryProvisionerDaemon¶
func (api *API) CreateInMemoryProvisionerDaemon(dialCtxcontext.Context, namestring, provisionerTypes []codersdk.ProvisionerType) (clientproto.DRPCProvisionerDaemonClient, errerror)
CreateInMemoryProvisionerDaemon is an in-memory connection to a provisionerd.Useful when starting coderd and provisionerd in the same process.
func (*API)CreateInMemoryTaggedProvisionerDaemon¶added inv2.13.0
func (api *API) CreateInMemoryTaggedProvisionerDaemon(dialCtxcontext.Context, namestring, provisionerTypes []codersdk.ProvisionerType, provisionerTags map[string]string, opts ...MemoryProvisionerDaemonOption) (clientproto.DRPCProvisionerDaemonClient, errerror)
func (*API)CreateUser¶
func (*API)PrimaryRegion¶
PrimaryRegion exposes the user facing values of a workspace proxy tobe used by a user.
func (*API)PrimaryWorkspaceProxy¶
PrimaryWorkspaceProxy returns the primary workspace proxy for the site.
func (*API)ValidWorkspaceAppHostname¶
func (api *API) ValidWorkspaceAppHostname(ctxcontext.Context, hoststring, optsValidWorkspaceAppHostnameOpts) (string,error)
ValidWorkspaceAppHostname checks if the given host is a valid workspace apphostname based on the provided options. It returns a scheme to force onsuccess. If the hostname is not valid or doesn't match, an empty string isreturned. Any error returned is a 500 error.
For hosts that match a wildcard app hostname, the scheme is forced to be thecorresponding access URL scheme.
typeGithubOAuth2Config¶
type GithubOAuth2Config struct {promoauth.OAuth2ConfigAuthenticatedUser func(ctxcontext.Context, client *http.Client) (*github.User,error)ListEmails func(ctxcontext.Context, client *http.Client) ([]*github.UserEmail,error)ListOrganizationMemberships func(ctxcontext.Context, client *http.Client) ([]*github.Membership,error)TeamMembership func(ctxcontext.Context, client *http.Client, org, team, usernamestring) (*github.Membership,error)DeviceFlowEnabledboolExchangeDeviceCode func(ctxcontext.Context, deviceCodestring) (*oauth2.Token,error)AuthorizeDevice func(ctxcontext.Context) (*codersdk.ExternalAuthDevice,error)AllowSignupsboolAllowEveryoneboolAllowOrganizations []stringAllowTeams []GithubOAuth2TeamDefaultProviderConfiguredbool}
GithubOAuth2Provider exposes required functions for the Github authentication flow.
func (*GithubOAuth2Config)AuthCodeURL¶added inv2.20.0
func (c *GithubOAuth2Config) AuthCodeURL(statestring, opts ...oauth2.AuthCodeOption)string
typeGithubOAuth2Team¶
GithubOAuth2Team represents a team scoped to an organization.
typeHTTPAuthorizer¶
type HTTPAuthorizer struct {Authorizerrbac.AuthorizerLoggerslog.Logger}
func (*HTTPAuthorizer)Authorize¶
Authorize will return false if the user is not authorized to do the action.This function will log appropriately, but the caller must return anerror to the api client.Eg:
if !h.Authorize(...) {httpapi.Forbidden(rw)return}
func (*HTTPAuthorizer)AuthorizeSQLFilter¶
func (h *HTTPAuthorizer) AuthorizeSQLFilter(r *http.Request, actionpolicy.Action, objectTypestring) (rbac.PreparedAuthorized,error)
AuthorizeSQLFilter returns an authorization filter that can used in aSQL 'WHERE' clause. If the filter is used, the resulting rows returnedfrom postgres are already authorized, and the caller does not need tocall 'Authorize()' on the returned objects.Note the authorization is only for the given action and object type.
typeInmemTailnetDialer¶added inv2.18.0
type InmemTailnetDialer struct {CoordPtr *atomic.Pointer[tailnet.Coordinator]DERPFn func() *tailcfg.DERPMapLoggerslog.LoggerClientIDuuid.UUID// DatabaseHealthCheck is used to validate that the store is reachable.DatabaseHealthCheckPinger}
InmemTailnetDialer is a tailnet.ControlProtocolDialer that connects to a Coordinator and DERPMapservice running in the same memory space.
func (*InmemTailnetDialer)Dial¶added inv2.18.0
func (a *InmemTailnetDialer) Dial(ctxcontext.Context, _tailnet.ResumeTokenController) (tailnet.ControlProtocolClients,error)
typeLanguageModel¶added inv2.23.0
typeMemoryProvisionerDaemonOption¶added inv2.23.0
type MemoryProvisionerDaemonOption func(*memoryProvisionerDaemonOptions)
funcMemoryProvisionerWithVersionOverride¶added inv2.23.0
func MemoryProvisionerWithVersionOverride(versionstring)MemoryProvisionerDaemonOption
typeMergedClaimsSource¶added inv2.20.0
type MergedClaimsSourcestring
var (MergedClaimsSourceNoneMergedClaimsSource = "none"MergedClaimsSourceUserInfoMergedClaimsSource = "user_info"MergedClaimsSourceAccessTokenMergedClaimsSource = "access_token")
typeMultiAgentController¶added inv2.18.0
type MultiAgentController struct {*tailnet.BasicCoordinationController// contains filtered or unexported fields}
MultiAgentController is a tailnet.CoordinationController for connecting to multiple workspaceagents. It keeps track of connection times to the agents, and removes them on a timer if theyhave no active connections and haven't been used in a while.
funcNewMultiAgentController¶added inv2.18.0
func NewMultiAgentController(ctxcontext.Context, loggerslog.Logger, tracertrace.Tracer, coordinateetailnet.Coordinatee) *MultiAgentController
func (*MultiAgentController)Close¶added inv2.18.0
func (m *MultiAgentController) Close()
func (*MultiAgentController)New¶added inv2.18.0
func (m *MultiAgentController) New(clienttailnet.CoordinatorClient)tailnet.CloserWaiter
typeOAuthConvertStateClaims¶
typeOIDCConfig¶
type OIDCConfig struct {promoauth.OAuth2ConfigProvider *oidc.ProviderVerifier *oidc.IDTokenVerifier// EmailDomains are the domains to enforce when a user authenticates.EmailDomain []stringAllowSignupsbool// IgnoreEmailVerified allows ignoring the email_verified claim// from an upstream OIDC provider. See #5065 for context.IgnoreEmailVerifiedbool// UsernameField selects the claim field to be used as the created user's// username.UsernameFieldstring// EmailField selects the claim field to be used as the created user's// email.EmailFieldstring// NameField selects the claim field to be used as the created user's// full / given name.NameFieldstring// AuthURLParams are additional parameters to be passed to the OIDC provider// when requesting an access token.AuthURLParams map[string]string// SecondaryClaims indicates where to source additional claim information from.// The standard is either 'MergedClaimsSourceNone' or 'MergedClaimsSourceUserInfo'.//// The OIDC compliant way is to use the userinfo endpoint. This option// is useful when the userinfo endpoint does not exist or causes undesirable// behavior.SecondaryClaimsMergedClaimsSource// SignInText is the text to display on the OIDC login buttonSignInTextstring// IconURL points to the URL of an icon to display on the OIDC login buttonIconURLstring// SignupsDisabledText is the text do display on the static error page.SignupsDisabledTextstring}
typeOptions¶
type Options struct {AccessURL *url.URL// AppHostname should be the wildcard hostname to use for workspace// applications INCLUDING the asterisk, (optional) suffix and leading dot.// It will use the same scheme and port number as the access URL.// E.g. "*.apps.coder.com" or "*-apps.coder.com" or "*.apps.coder.com:8080".AppHostnamestring// AppHostnameRegex contains the regex version of options.AppHostname as// generated by appurl.CompileHostnamePattern(). It MUST be set if// options.AppHostname is set.AppHostnameRegex *regexp.RegexpLoggerslog.LoggerDatabasedatabase.StorePubsubpubsub.PubsubRuntimeConfig *runtimeconfig.Manager// CacheDir is used for caching files served by the API.CacheDirstringAuditoraudit.AuditorAgentConnectionUpdateFrequencytime.DurationAgentInactiveDisconnectTimeouttime.DurationAWSCertificatesawsidentity.CertificatesAuthorizerrbac.AuthorizerAzureCertificatesx509.VerifyOptionsGoogleTokenValidator *idtoken.ValidatorLanguageModelsai.LanguageModelsGithubOAuth2Config *GithubOAuth2ConfigOIDCConfig *OIDCConfigPrometheusRegistry *prometheus.RegistryStrictTransportSecurityCfghttpmw.HSTSConfigSSHKeygenAlgorithmgitsshkey.AlgorithmTelemetrytelemetry.ReporterTracerProvidertrace.TracerProviderExternalAuthConfigs []*externalauth.ConfigRealIPConfig *httpmw.RealIPConfigTrialGenerator func(ctxcontext.Context, bodycodersdk.LicensorTrialRequest)error// RefreshEntitlements is used to set correct entitlements after creating first user and generating trial license.RefreshEntitlements func(ctxcontext.Context)error// Entitlements can come from the enterprise caller if enterprise code is// included.Entitlements *entitlements.Set// PostAuthAdditionalHeadersFunc is used to add additional headers to the response// after a successful authentication.// This is somewhat janky, but seemingly the only reasonable way to add a header// for all authenticated users under a condition, only in Enterprise.PostAuthAdditionalHeadersFunc func(authrbac.Subject, headerhttp.Header)// TLSCertificates is used to mesh DERP servers securely.TLSCertificates []tls.CertificateTailnetCoordinatortailnet.CoordinatorDERPServer *derp.Server// BaseDERPMap is used as the base DERP map for all clients and agents.// Proxies are added to this list.BaseDERPMap *tailcfg.DERPMapDERPMapUpdateFrequencytime.DurationNetworkTelemetryBatchFrequencytime.DurationNetworkTelemetryBatchMaxSizeintSwaggerEndpointboolTemplateScheduleStore *atomic.Pointer[schedule.TemplateScheduleStore]UserQuietHoursScheduleStore *atomic.Pointer[schedule.UserQuietHoursScheduleStore]AccessControlStore *atomic.Pointer[dbauthz.AccessControlStore]// CoordinatorResumeTokenProvider is used to provide and validate resume// tokens issued by and passed to the coordinator DRPC API.CoordinatorResumeTokenProvidertailnet.ResumeTokenProviderHealthcheckFunc func(ctxcontext.Context, apiKeystring) *healthsdk.HealthcheckReportHealthcheckTimeouttime.DurationHealthcheckRefreshtime.DurationWorkspaceProxiesFetchUpdater *atomic.Pointer[healthcheck.WorkspaceProxiesFetchUpdater]// OAuthSigningKey is the crypto key used to sign and encrypt state strings// related to OAuth. This is a symmetric secret key using hmac to sign payloads.// So this secret should **never** be exposed to the client.OAuthSigningKey [32]byte// APIRateLimit is the minutely throughput rate limit per user or ip.// Setting a rate limit <0 will disable the rate limiter across the entire// app. Some specific routes have their own configurable rate limits.APIRateLimitintLoginRateLimitintFilesRateLimitintMetricsCacheRefreshIntervaltime.DurationAgentStatsRefreshIntervaltime.DurationDeploymentValues *codersdk.DeploymentValues// DeploymentOptions do contain the copy of DeploymentValues, and contain// contextual information about how the values were set.// Do not use DeploymentOptions to retrieve values, use DeploymentValues instead.// All secrets values are stripped.DeploymentOptionsserpent.OptionSetUpdateCheckOptions *updatecheck.Options// Set non-nil to enable update checking.// SSHConfig is the response clients use to configure config-ssh locally.SSHConfigcodersdk.SSHConfigResponseHTTPClient *http.ClientUpdateAgentMetrics func(ctxcontext.Context, labelsprometheusmetrics.AgentMetricLabels, metrics []*agentproto.Stats_Metric)StatsBatcherworkspacestats.Batcher// WorkspaceAppAuditSessionTimeout allows changing the timeout for audit// sessions. Raising or lowering this value will directly affect the write// load of the audit log table. This is used for testing. Default 1 hour.WorkspaceAppAuditSessionTimeouttime.DurationWorkspaceAppsStatsCollectorOptionsworkspaceapps.StatsCollectorOptions// This janky function is used in telemetry to parse fields out of the raw// JWT. It needs to be passed through like this because license parsing is// under the enterprise license, and can't be imported into AGPL.ParseLicenseClaims func(rawJWTstring) (emailstring, trialbool, errerror)AllowWorkspaceRenamesbool// NewTicker is used for unit tests to replace "time.NewTicker".NewTicker func(durationtime.Duration) (tick <-chantime.Time, done func())// DatabaseRolluper rolls up template usage stats from raw agent and app// stats. This is used to provide insights in the WebUI.DatabaseRolluper *dbrollup.Rolluper// WorkspaceUsageTracker tracks workspace usage by the CLI.WorkspaceUsageTracker *workspacestats.UsageTracker// NotificationsEnqueuer handles enqueueing notifications for delivery by SMTP, webhook, etc.NotificationsEnqueuernotifications.Enqueuer// IDPSync holds all configured values for syncing external IDP users into Coder.IDPSyncidpsync.IDPSync// OneTimePasscodeValidityPeriod specifies how long a one time passcode should be valid for.OneTimePasscodeValidityPeriodtime.Duration// KeycachesAppSigningKeyCachecryptokeys.SigningKeycacheAppEncryptionKeyCachecryptokeys.EncryptionKeycacheOIDCConvertKeyCachecryptokeys.SigningKeycacheClockquartz.Clock// WebPushDispatcher is a way to send notifications over Web Push.WebPushDispatcherwebpush.Dispatcher}
Options are requires parameters for Coder to start.
typeServerTailnet¶
type ServerTailnet struct {// contains filtered or unexported fields}
funcNewServerTailnet¶
func NewServerTailnet(ctxcontext.Context,loggerslog.Logger,derpServer *derp.Server,dialertailnet.ControlProtocolDialer,derpForceWebSocketsbool,blockEndpointsbool,traceProvidertrace.TracerProvider,) (*ServerTailnet,error)
NewServerTailnet creates a new tailnet intended for use by coderd.
func (*ServerTailnet)AgentConn¶
func (s *ServerTailnet) AgentConn(ctxcontext.Context, agentIDuuid.UUID) (*workspacesdk.AgentConn, func(),error)
func (*ServerTailnet)Close¶
func (s *ServerTailnet) Close()error
func (*ServerTailnet)Collect¶added inv2.8.0
func (s *ServerTailnet) Collect(metrics chan<-prometheus.Metric)
func (*ServerTailnet)Conn¶added inv2.9.0
func (s *ServerTailnet) Conn() *tailnet.Conn
Conn is used to access the underlying tailnet conn of the ServerTailnet. Itshould only be used for read-only purposes.
func (*ServerTailnet)Describe¶added inv2.8.0
func (s *ServerTailnet) Describe(descs chan<- *prometheus.Desc)
func (*ServerTailnet)DialAgentNetConn¶
func (*ServerTailnet)ReverseProxy¶
func (s *ServerTailnet) ReverseProxy(targetURL, dashboardURL *url.URL, agentIDuuid.UUID, appappurl.ApplicationURL, wildcardHostnamestring) *httputil.ReverseProxy
func (*ServerTailnet)ServeHTTPDebug¶added inv2.4.0
func (s *ServerTailnet) ServeHTTPDebug(whttp.ResponseWriter, r *http.Request)
typeUpdatesQuerier¶added inv2.18.0
type UpdatesQuerier interface {// GetAuthorizedWorkspacesAndAgentsByOwnerID requires a context with an actor setGetWorkspacesAndAgentsByOwnerID(ctxcontext.Context, ownerIDuuid.UUID) ([]database.GetWorkspacesAndAgentsByOwnerIDRow,error)GetWorkspaceByAgentID(ctxcontext.Context, agentIDuuid.UUID) (database.Workspace,error)}
Source Files¶
- apikey.go
- apiroot.go
- audit.go
- authorize.go
- chat.go
- coderd.go
- csp.go
- debug.go
- deployment.go
- deprecated.go
- experiments.go
- externalauth.go
- files.go
- gitsshkey.go
- inboxnotifications.go
- insights.go
- latencycheck.go
- members.go
- notifications.go
- oauth2.go
- organizations.go
- pagination.go
- parameters.go
- presets.go
- provisionerdaemons.go
- provisionerjobs.go
- roles.go
- tailnet.go
- templates.go
- templateversions.go
- updatecheck.go
- userauth.go
- users.go
- webpush.go
- workspaceagentportshare.go
- workspaceagents.go
- workspaceagentsrpc.go
- workspaceapps.go
- workspacebuilds.go
- workspaceproxies.go
- workspaceresourceauth.go
- workspaces.go
- workspaceupdates.go
Directories¶
Path | Synopsis |
---|---|
Package apidoc GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag | Package apidoc GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag |
Package autobuild contains logic for scheduling workspace builds in the background. | Package autobuild contains logic for scheduling workspace builds in the background. |
promhelp Package promhelp provides helper functions for asserting Prometheus metric values in unit tests. | Package promhelp provides helper functions for asserting Prometheus metric values in unit tests. |
Package cryptokeys provides an abstraction for fetching internally used cryptographic keys mainly for JWT signing and verification. | Package cryptokeys provides an abstraction for fetching internally used cryptographic keys mainly for JWT signing and verification. |
Package database connects to external services for stateful storage. | Package database connects to external services for stateful storage. |
db2sdk Package db2sdk provides common conversion routines from database types to codersdk types | Package db2sdk provides common conversion routines from database types to codersdk types |
dbauthz Package dbauthz provides an authorization layer on top of the database. | Package dbauthz provides an authorization layer on top of the database. |
dbmetrics Code generated by coderd/database/gen/metrics. | Code generated by coderd/database/gen/metrics. |
dbmock Package dbmock is a generated GoMock package. | Package dbmock is a generated GoMock package. |
gentest Package gentest contains tests that are run at db generate time. | Package gentest contains tests that are run at db generate time. |
pubsub/psmock package psmock contains a mocked implementation of the pubsub.Pubsub interface for use in tests | package psmock contains a mocked implementation of the pubsub.Pubsub interface for use in tests |
httpapiconstraints Package httpapiconstraints contain types that can be used and implemented across the application to return specific HTTP status codes without pulling in large dependency trees. | Package httpapiconstraints contain types that can be used and implemented across the application to return specific HTTP status codes without pulling in large dependency trees. |
loggermw/loggermock Package loggermock is a generated GoMock package. | Package loggermock is a generated GoMock package. |
Package promoauth is for instrumenting oauth2 flows with prometheus metrics. | Package promoauth is for instrumenting oauth2 flows with prometheus metrics. |
Code generated by typegen/main.go. | Code generated by typegen/main.go. |
regosql Package regosql converts rego queries into SQL WHERE clauses. | Package regosql converts rego queries into SQL WHERE clauses. |
regosql/sqltypes Package sqltypes contains the types used to convert rego queries into SQL. | Package sqltypes contains the types used to convert rego queries into SQL. |
Package runtimeconfig contains logic for managing runtime configuration values stored in the database. | Package runtimeconfig contains logic for managing runtime configuration values stored in the database. |
cron package schedule provides utilities for managing template and workspace autostart and autostop schedules. | package schedule provides utilities for managing template and workspace autostart and autostop schedules. |
Package updatecheck provides a mechanism for periodically checking for updates to Coder. | Package updatecheck provides a mechanism for periodically checking for updates to Coder. |
util | |
lazy Package lazy provides a lazy value implementation. | Package lazy provides a lazy value implementation. |
ptr Package ptr contains some utility methods related to pointers. | Package ptr contains some utility methods related to pointers. |
tz Package tz includes utilities for cross-platform timezone/location detection. | Package tz includes utilities for cross-platform timezone/location detection. |
appurl Package appurl handles all parsing/validation/etc around application URLs. | Package appurl handles all parsing/validation/etc around application URLs. |
Package wsbuilder provides the Builder object, which encapsulates the common business logic of inserting a new workspace build into the database. | Package wsbuilder provides the Builder object, which encapsulates the common business logic of inserting a new workspace build into the database. |