2022-01-05 15:20:56 +00:00
|
|
|
// Code generated by sqlc. DO NOT EDIT.
|
2022-05-02 19:30:46 +00:00
|
|
|
// versions:
|
2024-01-10 06:19:41 +00:00
|
|
|
// sqlc v1.25.0
|
2022-01-05 15:20:56 +00:00
|
|
|
|
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2022-06-17 05:26:40 +00:00
|
|
|
"time"
|
2022-01-24 17:07:42 +00:00
|
|
|
|
|
|
|
"github.com/google/uuid"
|
2022-01-05 15:20:56 +00:00
|
|
|
)
|
|
|
|
|
2022-10-10 20:37:06 +00:00
|
|
|
type sqlcQuerier interface {
|
2023-03-07 19:38:11 +00:00
|
|
|
// Blocks until the lock is acquired.
|
|
|
|
//
|
|
|
|
// This must be called from within a transaction. The lock will be automatically
|
|
|
|
// released when the transaction ends.
|
|
|
|
AcquireLock(ctx context.Context, pgAdvisoryXactLock int64) error
|
2022-05-02 19:30:46 +00:00
|
|
|
// Acquires the lock for a single job that isn't started, completed,
|
|
|
|
// canceled, and that matches an array of provisioner types.
|
|
|
|
//
|
|
|
|
// SKIP LOCKED is used to jump over locked rows. This prevents
|
|
|
|
// multiple provisioners from acquiring the same jobs. See:
|
|
|
|
// https://www.postgresql.org/docs/9.5/sql-select.html#SQL-FOR-UPDATE-SHARE
|
2022-01-29 23:38:32 +00:00
|
|
|
AcquireProvisionerJob(ctx context.Context, arg AcquireProvisionerJobParams) (ProvisionerJob, error)
|
2024-02-13 07:00:35 +00:00
|
|
|
// Bumps the workspace deadline by the template's configured "activity_bump"
|
|
|
|
// duration (default 1h). If the workspace bump will cross an autostart
|
|
|
|
// threshold, then the bump is autostart + TTL. This is the deadline behavior if
|
|
|
|
// the workspace was to autostart from a stopped state.
|
|
|
|
//
|
|
|
|
// Max deadline is respected, and the deadline will never be bumped past it.
|
2023-11-15 15:42:27 +00:00
|
|
|
// The deadline will never decrease.
|
2024-02-13 07:00:35 +00:00
|
|
|
// We only bump if the template has an activity bump duration set.
|
2023-10-13 12:53:02 +00:00
|
|
|
// We only bump if the raw interval is positive and non-zero.
|
2023-09-14 08:09:51 +00:00
|
|
|
// We only bump if workspace shutdown is manual.
|
|
|
|
// We only bump when 5% of the deadline has elapsed.
|
2023-11-15 15:42:27 +00:00
|
|
|
ActivityBumpWorkspace(ctx context.Context, arg ActivityBumpWorkspaceParams) error
|
2023-09-15 14:09:40 +00:00
|
|
|
// AllUserIDs returns all UserIDs regardless of user status or deletion.
|
|
|
|
AllUserIDs(ctx context.Context) ([]uuid.UUID, error)
|
2023-10-10 15:52:42 +00:00
|
|
|
// Archiving templates is a soft delete action, so is reversible.
|
|
|
|
// Archiving prevents the version from being used and discovered
|
|
|
|
// by listing.
|
|
|
|
// Only unused template versions will be archived, which are any versions not
|
|
|
|
// referenced by the latest build of a workspace.
|
|
|
|
ArchiveUnusedTemplateVersions(ctx context.Context, arg ArchiveUnusedTemplateVersionsParams) ([]uuid.UUID, error)
|
2024-01-16 14:06:39 +00:00
|
|
|
BatchUpdateWorkspaceLastUsedAt(ctx context.Context, arg BatchUpdateWorkspaceLastUsedAtParams) error
|
2023-06-23 09:23:28 +00:00
|
|
|
CleanTailnetCoordinators(ctx context.Context) error
|
2023-12-01 06:02:30 +00:00
|
|
|
CleanTailnetLostPeers(ctx context.Context) error
|
|
|
|
CleanTailnetTunnels(ctx context.Context) error
|
2022-05-27 20:47:03 +00:00
|
|
|
DeleteAPIKeyByID(ctx context.Context, id string) error
|
2022-10-20 02:12:03 +00:00
|
|
|
DeleteAPIKeysByUserID(ctx context.Context, userID uuid.UUID) error
|
2023-09-21 19:30:48 +00:00
|
|
|
DeleteAllTailnetClientSubscriptions(ctx context.Context, arg DeleteAllTailnetClientSubscriptionsParams) error
|
2023-11-15 06:13:27 +00:00
|
|
|
DeleteAllTailnetTunnels(ctx context.Context, arg DeleteAllTailnetTunnelsParams) error
|
2023-04-05 18:41:55 +00:00
|
|
|
DeleteApplicationConnectAPIKeysByUserID(ctx context.Context, userID uuid.UUID) error
|
2023-06-21 12:20:58 +00:00
|
|
|
DeleteCoordinator(ctx context.Context, id uuid.UUID) error
|
2023-12-05 20:03:44 +00:00
|
|
|
DeleteExternalAuthLink(ctx context.Context, arg DeleteExternalAuthLinkParams) error
|
2022-04-06 00:18:26 +00:00
|
|
|
DeleteGitSSHKey(ctx context.Context, userID uuid.UUID) error
|
2022-10-10 20:37:06 +00:00
|
|
|
DeleteGroupByID(ctx context.Context, id uuid.UUID) error
|
2023-02-02 15:46:42 +00:00
|
|
|
DeleteGroupMemberFromGroup(ctx context.Context, arg DeleteGroupMemberFromGroupParams) error
|
2023-02-02 19:53:48 +00:00
|
|
|
DeleteGroupMembersByOrgAndUser(ctx context.Context, arg DeleteGroupMembersByOrgAndUserParams) error
|
2022-08-25 21:04:31 +00:00
|
|
|
DeleteLicense(ctx context.Context, id int32) (int32, error)
|
2023-12-21 21:38:42 +00:00
|
|
|
DeleteOAuth2ProviderAppByID(ctx context.Context, id uuid.UUID) error
|
|
|
|
DeleteOAuth2ProviderAppSecretByID(ctx context.Context, id uuid.UUID) error
|
2023-12-01 12:43:05 +00:00
|
|
|
// Delete provisioner daemons that have been created at least a week ago
|
|
|
|
// and have not connected to coderd since a week.
|
2023-12-12 11:19:28 +00:00
|
|
|
// A provisioner daemon with "zeroed" last_seen_at column indicates possible
|
2023-12-01 12:43:05 +00:00
|
|
|
// connectivity issues (no provisioner daemon activity since registration).
|
|
|
|
DeleteOldProvisionerDaemons(ctx context.Context) error
|
2023-03-23 19:09:13 +00:00
|
|
|
// If an agent hasn't connected in the last 7 days, we purge it's logs.
|
|
|
|
// Logs can take up a lot of space, so it's important we clean up frequently.
|
2023-07-28 15:57:23 +00:00
|
|
|
DeleteOldWorkspaceAgentLogs(ctx context.Context) error
|
2023-02-28 19:33:33 +00:00
|
|
|
DeleteOldWorkspaceAgentStats(ctx context.Context) error
|
2022-10-17 13:43:30 +00:00
|
|
|
DeleteReplicasUpdatedBefore(ctx context.Context, updatedAt time.Time) error
|
2023-06-21 12:20:58 +00:00
|
|
|
DeleteTailnetAgent(ctx context.Context, arg DeleteTailnetAgentParams) (DeleteTailnetAgentRow, error)
|
|
|
|
DeleteTailnetClient(ctx context.Context, arg DeleteTailnetClientParams) (DeleteTailnetClientRow, error)
|
2023-09-21 19:30:48 +00:00
|
|
|
DeleteTailnetClientSubscription(ctx context.Context, arg DeleteTailnetClientSubscriptionParams) error
|
2023-11-15 06:13:27 +00:00
|
|
|
DeleteTailnetPeer(ctx context.Context, arg DeleteTailnetPeerParams) (DeleteTailnetPeerRow, error)
|
|
|
|
DeleteTailnetTunnel(ctx context.Context, arg DeleteTailnetTunnelParams) (DeleteTailnetTunnelRow, error)
|
2024-02-13 14:31:20 +00:00
|
|
|
DeleteWorkspaceAgentPortShare(ctx context.Context, arg DeleteWorkspaceAgentPortShareParams) error
|
2024-01-24 13:39:19 +00:00
|
|
|
FavoriteWorkspace(ctx context.Context, id uuid.UUID) error
|
2022-01-20 13:46:51 +00:00
|
|
|
GetAPIKeyByID(ctx context.Context, id string) (APIKey, error)
|
2023-03-02 17:39:38 +00:00
|
|
|
// there is no unique constraint on empty token names
|
|
|
|
GetAPIKeyByName(ctx context.Context, arg GetAPIKeyByNameParams) (APIKey, error)
|
2022-10-06 19:02:27 +00:00
|
|
|
GetAPIKeysByLoginType(ctx context.Context, loginType LoginType) ([]APIKey, error)
|
2023-02-23 15:00:27 +00:00
|
|
|
GetAPIKeysByUserID(ctx context.Context, arg GetAPIKeysByUserIDParams) ([]APIKey, error)
|
2022-06-17 05:26:40 +00:00
|
|
|
GetAPIKeysLastUsedAfter(ctx context.Context, lastUsed time.Time) ([]APIKey, error)
|
2022-08-29 23:45:40 +00:00
|
|
|
GetActiveUserCount(ctx context.Context) (int64, error)
|
2023-08-14 21:16:47 +00:00
|
|
|
GetActiveWorkspaceBuildsByTemplateID(ctx context.Context, templateID uuid.UUID) ([]WorkspaceBuild, error)
|
2023-07-28 22:59:31 +00:00
|
|
|
GetAllTailnetAgents(ctx context.Context) ([]TailnetAgent, error)
|
2023-11-28 16:19:32 +00:00
|
|
|
// For PG Coordinator HTMLDebug
|
|
|
|
GetAllTailnetCoordinators(ctx context.Context) ([]TailnetCoordinator, error)
|
|
|
|
GetAllTailnetPeers(ctx context.Context) ([]TailnetPeer, error)
|
|
|
|
GetAllTailnetTunnels(ctx context.Context) ([]TailnetTunnel, error)
|
2023-04-05 18:41:55 +00:00
|
|
|
GetAppSecurityKey(ctx context.Context) (string, error)
|
2023-09-27 15:02:18 +00:00
|
|
|
GetApplicationName(ctx context.Context) (string, error)
|
2022-09-07 16:38:19 +00:00
|
|
|
// GetAuditLogsBefore retrieves `row_limit` number of audit logs before the provided
|
2022-05-02 19:30:46 +00:00
|
|
|
// ID.
|
2022-09-07 16:38:19 +00:00
|
|
|
GetAuditLogsOffset(ctx context.Context, arg GetAuditLogsOffsetParams) ([]GetAuditLogsOffsetRow, error)
|
2022-06-01 14:07:50 +00:00
|
|
|
// This function returns roles for authorization purposes. Implied member roles
|
|
|
|
// are included.
|
|
|
|
GetAuthorizationUserRoles(ctx context.Context, userID uuid.UUID) (GetAuthorizationUserRolesRow, error)
|
2023-09-06 11:06:26 +00:00
|
|
|
GetDBCryptKeys(ctx context.Context) ([]DBCryptKey, error)
|
2022-10-17 13:43:30 +00:00
|
|
|
GetDERPMeshKey(ctx context.Context) (string, error)
|
2023-06-08 15:30:15 +00:00
|
|
|
GetDefaultProxyConfig(ctx context.Context) (GetDefaultProxyConfigRow, error)
|
2023-05-30 17:18:27 +00:00
|
|
|
GetDeploymentDAUs(ctx context.Context, tzOffset int32) ([]GetDeploymentDAUsRow, error)
|
2022-06-17 05:26:40 +00:00
|
|
|
GetDeploymentID(ctx context.Context) (string, error)
|
2023-03-09 03:05:45 +00:00
|
|
|
GetDeploymentWorkspaceAgentStats(ctx context.Context, createdAt time.Time) (GetDeploymentWorkspaceAgentStatsRow, error)
|
|
|
|
GetDeploymentWorkspaceStats(ctx context.Context) (GetDeploymentWorkspaceStatsRow, error)
|
2023-09-29 19:13:20 +00:00
|
|
|
GetExternalAuthLink(ctx context.Context, arg GetExternalAuthLinkParams) (ExternalAuthLink, error)
|
|
|
|
GetExternalAuthLinksByUserID(ctx context.Context, userID uuid.UUID) ([]ExternalAuthLink, error)
|
2022-10-13 23:02:52 +00:00
|
|
|
GetFileByHashAndCreator(ctx context.Context, arg GetFileByHashAndCreatorParams) (File, error)
|
|
|
|
GetFileByID(ctx context.Context, id uuid.UUID) (File, error)
|
2023-03-27 14:21:41 +00:00
|
|
|
// Get all templates that use a file.
|
|
|
|
GetFileTemplates(ctx context.Context, fileID uuid.UUID) ([]GetFileTemplatesRow, error)
|
2022-04-06 00:18:26 +00:00
|
|
|
GetGitSSHKey(ctx context.Context, userID uuid.UUID) (GitSSHKey, error)
|
2022-10-10 20:37:06 +00:00
|
|
|
GetGroupByID(ctx context.Context, id uuid.UUID) (Group, error)
|
|
|
|
GetGroupByOrgAndName(ctx context.Context, arg GetGroupByOrgAndNameParams) (Group, error)
|
2023-08-17 18:25:16 +00:00
|
|
|
// If the group is a user made group, then we need to check the group_members table.
|
|
|
|
// If it is the "Everyone" group, then we need to check the organization_members table.
|
2022-10-10 20:37:06 +00:00
|
|
|
GetGroupMembers(ctx context.Context, groupID uuid.UUID) ([]User, error)
|
|
|
|
GetGroupsByOrganizationID(ctx context.Context, organizationID uuid.UUID) ([]Group, error)
|
2023-11-23 16:18:12 +00:00
|
|
|
GetHealthSettings(ctx context.Context) (string, error)
|
2023-06-25 13:17:00 +00:00
|
|
|
GetHungProvisionerJobs(ctx context.Context, updatedAt time.Time) ([]ProvisionerJob, error)
|
2024-01-30 01:30:02 +00:00
|
|
|
GetJFrogXrayScanByWorkspaceAndAgentID(ctx context.Context, arg GetJFrogXrayScanByWorkspaceAndAgentIDParams) (JfrogXrayScan, error)
|
2022-12-01 17:43:28 +00:00
|
|
|
GetLastUpdateCheck(ctx context.Context) (string, error)
|
2023-03-10 16:39:02 +00:00
|
|
|
GetLatestWorkspaceBuildByWorkspaceID(ctx context.Context, workspaceID uuid.UUID) (WorkspaceBuild, error)
|
|
|
|
GetLatestWorkspaceBuilds(ctx context.Context) ([]WorkspaceBuild, error)
|
|
|
|
GetLatestWorkspaceBuildsByWorkspaceIDs(ctx context.Context, ids []uuid.UUID) ([]WorkspaceBuild, error)
|
2023-02-14 14:27:06 +00:00
|
|
|
GetLicenseByID(ctx context.Context, id int32) (License, error)
|
2022-08-24 18:44:22 +00:00
|
|
|
GetLicenses(ctx context.Context) ([]License, error)
|
2023-01-04 21:31:45 +00:00
|
|
|
GetLogoURL(ctx context.Context) (string, error)
|
2023-12-21 21:38:42 +00:00
|
|
|
GetOAuth2ProviderAppByID(ctx context.Context, id uuid.UUID) (OAuth2ProviderApp, error)
|
|
|
|
GetOAuth2ProviderAppSecretByID(ctx context.Context, id uuid.UUID) (OAuth2ProviderAppSecret, error)
|
|
|
|
GetOAuth2ProviderAppSecretsByAppID(ctx context.Context, appID uuid.UUID) ([]OAuth2ProviderAppSecret, error)
|
|
|
|
GetOAuth2ProviderApps(ctx context.Context) ([]OAuth2ProviderApp, error)
|
2023-06-30 12:38:48 +00:00
|
|
|
GetOAuthSigningKey(ctx context.Context) (string, error)
|
2022-04-01 19:42:36 +00:00
|
|
|
GetOrganizationByID(ctx context.Context, id uuid.UUID) (Organization, error)
|
2022-01-23 05:58:10 +00:00
|
|
|
GetOrganizationByName(ctx context.Context, name string) (Organization, error)
|
2022-04-28 14:10:17 +00:00
|
|
|
GetOrganizationIDsByMemberIDs(ctx context.Context, ids []uuid.UUID) ([]GetOrganizationIDsByMemberIDsRow, error)
|
2022-01-24 17:07:42 +00:00
|
|
|
GetOrganizationMemberByUserID(ctx context.Context, arg GetOrganizationMemberByUserIDParams) (OrganizationMember, error)
|
2022-04-29 14:04:19 +00:00
|
|
|
GetOrganizationMembershipsByUserID(ctx context.Context, userID uuid.UUID) ([]OrganizationMember, error)
|
2022-04-23 22:58:57 +00:00
|
|
|
GetOrganizations(ctx context.Context) ([]Organization, error)
|
2022-04-01 19:42:36 +00:00
|
|
|
GetOrganizationsByUserID(ctx context.Context, userID uuid.UUID) ([]Organization, error)
|
2022-02-08 18:00:44 +00:00
|
|
|
GetParameterSchemasByJobID(ctx context.Context, jobID uuid.UUID) ([]ParameterSchema, error)
|
2022-12-06 14:15:03 +00:00
|
|
|
GetPreviousTemplateVersion(ctx context.Context, arg GetPreviousTemplateVersionParams) (TemplateVersion, error)
|
2022-02-01 05:36:15 +00:00
|
|
|
GetProvisionerDaemons(ctx context.Context) ([]ProvisionerDaemon, error)
|
2022-01-29 23:38:32 +00:00
|
|
|
GetProvisionerJobByID(ctx context.Context, id uuid.UUID) (ProvisionerJob, error)
|
2022-03-07 17:40:54 +00:00
|
|
|
GetProvisionerJobsByIDs(ctx context.Context, ids []uuid.UUID) ([]ProvisionerJob, error)
|
2023-06-20 20:07:18 +00:00
|
|
|
GetProvisionerJobsByIDsWithQueuePosition(ctx context.Context, ids []uuid.UUID) ([]GetProvisionerJobsByIDsWithQueuePositionRow, error)
|
2022-06-17 05:26:40 +00:00
|
|
|
GetProvisionerJobsCreatedAfter(ctx context.Context, createdAt time.Time) ([]ProvisionerJob, error)
|
2023-03-23 19:09:13 +00:00
|
|
|
GetProvisionerLogsAfterID(ctx context.Context, arg GetProvisionerLogsAfterIDParams) ([]ProvisionerJobLog, error)
|
2022-11-14 17:57:33 +00:00
|
|
|
GetQuotaAllowanceForUser(ctx context.Context, userID uuid.UUID) (int64, error)
|
|
|
|
GetQuotaConsumedForUser(ctx context.Context, ownerID uuid.UUID) (int64, error)
|
2023-07-26 16:21:04 +00:00
|
|
|
GetReplicaByID(ctx context.Context, id uuid.UUID) (Replica, error)
|
2022-10-17 13:43:30 +00:00
|
|
|
GetReplicasUpdatedAfter(ctx context.Context, updatedAt time.Time) ([]Replica, error)
|
2022-12-06 18:38:38 +00:00
|
|
|
GetServiceBanner(ctx context.Context) (string, error)
|
2023-06-21 12:20:58 +00:00
|
|
|
GetTailnetAgents(ctx context.Context, id uuid.UUID) ([]TailnetAgent, error)
|
|
|
|
GetTailnetClientsForAgent(ctx context.Context, agentID uuid.UUID) ([]TailnetClient, error)
|
2023-11-15 06:13:27 +00:00
|
|
|
GetTailnetPeers(ctx context.Context, id uuid.UUID) ([]TailnetPeer, error)
|
|
|
|
GetTailnetTunnelPeerBindings(ctx context.Context, srcID uuid.UUID) ([]GetTailnetTunnelPeerBindingsRow, error)
|
|
|
|
GetTailnetTunnelPeerIDs(ctx context.Context, srcID uuid.UUID) ([]GetTailnetTunnelPeerIDsRow, error)
|
2023-08-21 12:08:58 +00:00
|
|
|
// GetTemplateAppInsights returns the aggregate usage of each app in a given
|
|
|
|
// timeframe. The result can be filtered on template_ids, meaning only user data
|
|
|
|
// from workspaces based on those templates will be included.
|
|
|
|
GetTemplateAppInsights(ctx context.Context, arg GetTemplateAppInsightsParams) ([]GetTemplateAppInsightsRow, error)
|
2023-11-07 16:14:59 +00:00
|
|
|
GetTemplateAppInsightsByTemplate(ctx context.Context, arg GetTemplateAppInsightsByTemplateParams) ([]GetTemplateAppInsightsByTemplateRow, error)
|
2022-10-17 04:34:03 +00:00
|
|
|
GetTemplateAverageBuildTime(ctx context.Context, arg GetTemplateAverageBuildTimeParams) (GetTemplateAverageBuildTimeRow, error)
|
2022-04-06 17:42:40 +00:00
|
|
|
GetTemplateByID(ctx context.Context, id uuid.UUID) (Template, error)
|
|
|
|
GetTemplateByOrganizationAndName(ctx context.Context, arg GetTemplateByOrganizationAndNameParams) (Template, error)
|
2023-05-30 17:18:27 +00:00
|
|
|
GetTemplateDAUs(ctx context.Context, arg GetTemplateDAUsParams) ([]GetTemplateDAUsRow, error)
|
2023-07-21 18:00:19 +00:00
|
|
|
// GetTemplateInsights has a granularity of 5 minutes where if a session/app was
|
2023-08-21 12:08:58 +00:00
|
|
|
// in use during a minute, we will add 5 minutes to the total usage for that
|
|
|
|
// session/app (per user).
|
2023-07-21 18:00:19 +00:00
|
|
|
GetTemplateInsights(ctx context.Context, arg GetTemplateInsightsParams) (GetTemplateInsightsRow, error)
|
2023-09-15 12:01:00 +00:00
|
|
|
// GetTemplateInsightsByInterval returns all intervals between start and end
|
|
|
|
// time, if end time is a partial interval, it will be included in the results and
|
|
|
|
// that interval will be shorter than a full one. If there is no data for a selected
|
|
|
|
// interval/template, it will be included in the results with 0 active users.
|
|
|
|
GetTemplateInsightsByInterval(ctx context.Context, arg GetTemplateInsightsByIntervalParams) ([]GetTemplateInsightsByIntervalRow, error)
|
2023-10-19 08:45:12 +00:00
|
|
|
GetTemplateInsightsByTemplate(ctx context.Context, arg GetTemplateInsightsByTemplateParams) ([]GetTemplateInsightsByTemplateRow, error)
|
2023-08-03 14:43:23 +00:00
|
|
|
// GetTemplateParameterInsights does for each template in a given timeframe,
|
|
|
|
// look for the latest workspace build (for every workspace) that has been
|
|
|
|
// created in the timeframe and return the aggregate usage counts of parameter
|
|
|
|
// values.
|
|
|
|
GetTemplateParameterInsights(ctx context.Context, arg GetTemplateParameterInsightsParams) ([]GetTemplateParameterInsightsRow, error)
|
2022-04-06 17:42:40 +00:00
|
|
|
GetTemplateVersionByID(ctx context.Context, id uuid.UUID) (TemplateVersion, error)
|
|
|
|
GetTemplateVersionByJobID(ctx context.Context, jobID uuid.UUID) (TemplateVersion, error)
|
|
|
|
GetTemplateVersionByTemplateIDAndName(ctx context.Context, arg GetTemplateVersionByTemplateIDAndNameParams) (TemplateVersion, error)
|
2023-01-17 10:22:11 +00:00
|
|
|
GetTemplateVersionParameters(ctx context.Context, templateVersionID uuid.UUID) ([]TemplateVersionParameter, error)
|
2023-02-15 17:24:15 +00:00
|
|
|
GetTemplateVersionVariables(ctx context.Context, templateVersionID uuid.UUID) ([]TemplateVersionVariable, error)
|
2022-11-28 19:53:56 +00:00
|
|
|
GetTemplateVersionsByIDs(ctx context.Context, ids []uuid.UUID) ([]TemplateVersion, error)
|
2022-05-10 07:44:09 +00:00
|
|
|
GetTemplateVersionsByTemplateID(ctx context.Context, arg GetTemplateVersionsByTemplateIDParams) ([]TemplateVersion, error)
|
2022-06-17 05:26:40 +00:00
|
|
|
GetTemplateVersionsCreatedAfter(ctx context.Context, createdAt time.Time) ([]TemplateVersion, error)
|
|
|
|
GetTemplates(ctx context.Context) ([]Template, error)
|
2022-06-14 13:46:33 +00:00
|
|
|
GetTemplatesWithFilter(ctx context.Context, arg GetTemplatesWithFilterParams) ([]Template, error)
|
2022-08-29 23:45:40 +00:00
|
|
|
GetUnexpiredLicenses(ctx context.Context) ([]License, error)
|
2023-09-26 16:42:16 +00:00
|
|
|
// GetUserActivityInsights returns the ranking with top active users.
|
|
|
|
// The result can be filtered on template_ids, meaning only user data from workspaces
|
|
|
|
// based on those templates will be included.
|
|
|
|
// Note: When selecting data from multiple templates or the entire deployment,
|
|
|
|
// be aware that it may lead to an increase in "usage" numbers (cumulative). In such cases,
|
|
|
|
// users may be counted multiple times for the same time interval if they have used multiple templates
|
|
|
|
// simultaneously.
|
|
|
|
GetUserActivityInsights(ctx context.Context, arg GetUserActivityInsightsParams) ([]GetUserActivityInsightsRow, error)
|
2022-01-20 13:46:51 +00:00
|
|
|
GetUserByEmailOrUsername(ctx context.Context, arg GetUserByEmailOrUsernameParams) (User, error)
|
2022-04-01 19:42:36 +00:00
|
|
|
GetUserByID(ctx context.Context, id uuid.UUID) (User, error)
|
2022-01-20 13:46:51 +00:00
|
|
|
GetUserCount(ctx context.Context) (int64, error)
|
2023-07-21 18:00:19 +00:00
|
|
|
// GetUserLatencyInsights returns the median and 95th percentile connection
|
|
|
|
// latency that users have experienced. The result can be filtered on
|
|
|
|
// template_ids, meaning only user data from workspaces based on those templates
|
|
|
|
// will be included.
|
|
|
|
GetUserLatencyInsights(ctx context.Context, arg GetUserLatencyInsightsParams) ([]GetUserLatencyInsightsRow, error)
|
2022-08-17 23:00:53 +00:00
|
|
|
GetUserLinkByLinkedID(ctx context.Context, linkedID string) (UserLink, error)
|
|
|
|
GetUserLinkByUserIDLoginType(ctx context.Context, arg GetUserLinkByUserIDLoginTypeParams) (UserLink, error)
|
2023-09-06 11:06:26 +00:00
|
|
|
GetUserLinksByUserID(ctx context.Context, userID uuid.UUID) ([]UserLink, error)
|
2024-01-30 22:02:21 +00:00
|
|
|
GetUserWorkspaceBuildParameters(ctx context.Context, arg GetUserWorkspaceBuildParametersParams) ([]GetUserWorkspaceBuildParametersRow, error)
|
2022-12-15 15:04:24 +00:00
|
|
|
// This will never return deleted users.
|
2022-11-14 22:22:57 +00:00
|
|
|
GetUsers(ctx context.Context, arg GetUsersParams) ([]GetUsersRow, error)
|
2022-10-10 18:03:54 +00:00
|
|
|
// This shouldn't check for deleted, because it's frequently used
|
|
|
|
// to look up references to actions. eg. a user could build a workspace
|
|
|
|
// for another user, then be deleted... we still want them to appear!
|
|
|
|
GetUsersByIDs(ctx context.Context, ids []uuid.UUID) ([]User, error)
|
2023-08-21 14:49:26 +00:00
|
|
|
GetWorkspaceAgentAndOwnerByAuthToken(ctx context.Context, authToken uuid.UUID) (GetWorkspaceAgentAndOwnerByAuthTokenRow, error)
|
2022-04-11 21:06:15 +00:00
|
|
|
GetWorkspaceAgentByID(ctx context.Context, id uuid.UUID) (WorkspaceAgent, error)
|
2022-03-07 17:40:54 +00:00
|
|
|
GetWorkspaceAgentByInstanceID(ctx context.Context, authInstanceID string) (WorkspaceAgent, error)
|
2023-06-20 11:41:55 +00:00
|
|
|
GetWorkspaceAgentLifecycleStateByID(ctx context.Context, id uuid.UUID) (GetWorkspaceAgentLifecycleStateByIDRow, error)
|
2023-09-25 21:47:17 +00:00
|
|
|
GetWorkspaceAgentLogSourcesByAgentIDs(ctx context.Context, ids []uuid.UUID) ([]WorkspaceAgentLogSource, error)
|
2023-07-28 15:57:23 +00:00
|
|
|
GetWorkspaceAgentLogsAfter(ctx context.Context, arg GetWorkspaceAgentLogsAfterParams) ([]WorkspaceAgentLog, error)
|
2023-10-13 13:37:55 +00:00
|
|
|
GetWorkspaceAgentMetadata(ctx context.Context, arg GetWorkspaceAgentMetadataParams) ([]WorkspaceAgentMetadatum, error)
|
2024-02-13 14:31:20 +00:00
|
|
|
GetWorkspaceAgentPortShare(ctx context.Context, arg GetWorkspaceAgentPortShareParams) (WorkspaceAgentPortShare, error)
|
2023-09-25 21:47:17 +00:00
|
|
|
GetWorkspaceAgentScriptsByAgentIDs(ctx context.Context, ids []uuid.UUID) ([]WorkspaceAgentScript, error)
|
2023-03-13 19:16:54 +00:00
|
|
|
GetWorkspaceAgentStats(ctx context.Context, createdAt time.Time) ([]GetWorkspaceAgentStatsRow, error)
|
2023-04-14 14:14:52 +00:00
|
|
|
GetWorkspaceAgentStatsAndLabels(ctx context.Context, createdAt time.Time) ([]GetWorkspaceAgentStatsAndLabelsRow, error)
|
2022-04-11 21:06:15 +00:00
|
|
|
GetWorkspaceAgentsByResourceIDs(ctx context.Context, ids []uuid.UUID) ([]WorkspaceAgent, error)
|
2022-06-17 05:26:40 +00:00
|
|
|
GetWorkspaceAgentsCreatedAfter(ctx context.Context, createdAt time.Time) ([]WorkspaceAgent, error)
|
2023-03-30 13:24:51 +00:00
|
|
|
GetWorkspaceAgentsInLatestBuildByWorkspaceID(ctx context.Context, workspaceID uuid.UUID) ([]WorkspaceAgent, error)
|
2022-10-28 17:41:31 +00:00
|
|
|
GetWorkspaceAppByAgentIDAndSlug(ctx context.Context, arg GetWorkspaceAppByAgentIDAndSlugParams) (WorkspaceApp, error)
|
2022-06-04 20:13:37 +00:00
|
|
|
GetWorkspaceAppsByAgentID(ctx context.Context, agentID uuid.UUID) ([]WorkspaceApp, error)
|
|
|
|
GetWorkspaceAppsByAgentIDs(ctx context.Context, ids []uuid.UUID) ([]WorkspaceApp, error)
|
2022-06-17 05:26:40 +00:00
|
|
|
GetWorkspaceAppsCreatedAfter(ctx context.Context, createdAt time.Time) ([]WorkspaceApp, error)
|
2023-03-10 16:39:02 +00:00
|
|
|
GetWorkspaceBuildByID(ctx context.Context, id uuid.UUID) (WorkspaceBuild, error)
|
|
|
|
GetWorkspaceBuildByJobID(ctx context.Context, jobID uuid.UUID) (WorkspaceBuild, error)
|
|
|
|
GetWorkspaceBuildByWorkspaceIDAndBuildNumber(ctx context.Context, arg GetWorkspaceBuildByWorkspaceIDAndBuildNumberParams) (WorkspaceBuild, error)
|
2023-01-17 10:22:11 +00:00
|
|
|
GetWorkspaceBuildParameters(ctx context.Context, workspaceBuildID uuid.UUID) ([]WorkspaceBuildParameter, error)
|
2023-03-10 16:39:02 +00:00
|
|
|
GetWorkspaceBuildsByWorkspaceID(ctx context.Context, arg GetWorkspaceBuildsByWorkspaceIDParams) ([]WorkspaceBuild, error)
|
|
|
|
GetWorkspaceBuildsCreatedAfter(ctx context.Context, createdAt time.Time) ([]WorkspaceBuild, error)
|
2023-12-13 17:45:43 +00:00
|
|
|
GetWorkspaceByAgentID(ctx context.Context, agentID uuid.UUID) (GetWorkspaceByAgentIDRow, error)
|
2022-01-29 23:38:32 +00:00
|
|
|
GetWorkspaceByID(ctx context.Context, id uuid.UUID) (Workspace, error)
|
2022-04-25 21:11:03 +00:00
|
|
|
GetWorkspaceByOwnerIDAndName(ctx context.Context, arg GetWorkspaceByOwnerIDAndNameParams) (Workspace, error)
|
2023-02-14 14:27:06 +00:00
|
|
|
GetWorkspaceByWorkspaceAppID(ctx context.Context, workspaceAppID uuid.UUID) (Workspace, error)
|
2023-04-04 20:07:29 +00:00
|
|
|
GetWorkspaceProxies(ctx context.Context) ([]WorkspaceProxy, error)
|
2023-04-17 19:57:21 +00:00
|
|
|
// Finds a workspace proxy that has an access URL or app hostname that matches
|
|
|
|
// the provided hostname. This is to check if a hostname matches any workspace
|
|
|
|
// proxy.
|
|
|
|
//
|
|
|
|
// The hostname must be sanitized to only contain [a-zA-Z0-9.-] before calling
|
|
|
|
// this query. The scheme, port and path should be stripped.
|
|
|
|
//
|
2023-04-20 23:59:45 +00:00
|
|
|
GetWorkspaceProxyByHostname(ctx context.Context, arg GetWorkspaceProxyByHostnameParams) (WorkspaceProxy, error)
|
2023-04-04 20:07:29 +00:00
|
|
|
GetWorkspaceProxyByID(ctx context.Context, id uuid.UUID) (WorkspaceProxy, error)
|
2023-04-20 14:48:47 +00:00
|
|
|
GetWorkspaceProxyByName(ctx context.Context, name string) (WorkspaceProxy, error)
|
2022-03-07 17:40:54 +00:00
|
|
|
GetWorkspaceResourceByID(ctx context.Context, id uuid.UUID) (WorkspaceResource, error)
|
2022-08-01 21:53:05 +00:00
|
|
|
GetWorkspaceResourceMetadataByResourceIDs(ctx context.Context, ids []uuid.UUID) ([]WorkspaceResourceMetadatum, error)
|
2022-08-18 15:57:46 +00:00
|
|
|
GetWorkspaceResourceMetadataCreatedAfter(ctx context.Context, createdAt time.Time) ([]WorkspaceResourceMetadatum, error)
|
2022-03-07 17:40:54 +00:00
|
|
|
GetWorkspaceResourcesByJobID(ctx context.Context, jobID uuid.UUID) ([]WorkspaceResource, error)
|
2022-09-16 18:54:23 +00:00
|
|
|
GetWorkspaceResourcesByJobIDs(ctx context.Context, ids []uuid.UUID) ([]WorkspaceResource, error)
|
2022-06-17 05:26:40 +00:00
|
|
|
GetWorkspaceResourcesCreatedAfter(ctx context.Context, createdAt time.Time) ([]WorkspaceResource, error)
|
2023-12-07 15:53:15 +00:00
|
|
|
GetWorkspaceUniqueOwnerCountByTemplateIDs(ctx context.Context, templateIds []uuid.UUID) ([]GetWorkspaceUniqueOwnerCountByTemplateIDsRow, error)
|
2022-11-16 15:16:37 +00:00
|
|
|
GetWorkspaces(ctx context.Context, arg GetWorkspacesParams) ([]GetWorkspacesRow, error)
|
2023-06-22 04:33:22 +00:00
|
|
|
GetWorkspacesEligibleForTransition(ctx context.Context, now time.Time) ([]Workspace, error)
|
2022-01-20 13:46:51 +00:00
|
|
|
InsertAPIKey(ctx context.Context, arg InsertAPIKeyParams) (APIKey, error)
|
2022-10-10 20:37:06 +00:00
|
|
|
// We use the organization_id as the id
|
|
|
|
// for simplicity since all users is
|
|
|
|
// every member of the org.
|
|
|
|
InsertAllUsersGroup(ctx context.Context, organizationID uuid.UUID) (Group, error)
|
2022-05-02 19:30:46 +00:00
|
|
|
InsertAuditLog(ctx context.Context, arg InsertAuditLogParams) (AuditLog, error)
|
2023-09-06 11:06:26 +00:00
|
|
|
InsertDBCryptKey(ctx context.Context, arg InsertDBCryptKeyParams) error
|
2022-10-17 13:43:30 +00:00
|
|
|
InsertDERPMeshKey(ctx context.Context, value string) error
|
2022-06-17 05:26:40 +00:00
|
|
|
InsertDeploymentID(ctx context.Context, value string) error
|
2023-09-29 19:13:20 +00:00
|
|
|
InsertExternalAuthLink(ctx context.Context, arg InsertExternalAuthLinkParams) (ExternalAuthLink, error)
|
2022-02-07 21:32:37 +00:00
|
|
|
InsertFile(ctx context.Context, arg InsertFileParams) (File, error)
|
2022-04-06 00:18:26 +00:00
|
|
|
InsertGitSSHKey(ctx context.Context, arg InsertGitSSHKeyParams) (GitSSHKey, error)
|
2022-10-10 20:37:06 +00:00
|
|
|
InsertGroup(ctx context.Context, arg InsertGroupParams) (Group, error)
|
|
|
|
InsertGroupMember(ctx context.Context, arg InsertGroupMemberParams) error
|
2022-08-22 22:02:50 +00:00
|
|
|
InsertLicense(ctx context.Context, arg InsertLicenseParams) (License, error)
|
2023-08-08 16:37:49 +00:00
|
|
|
// Inserts any group by name that does not exist. All new groups are given
|
|
|
|
// a random uuid, are inserted into the same organization. They have the default
|
|
|
|
// values for avatar, display name, and quota allowance (all zero values).
|
|
|
|
// If the name conflicts, do nothing.
|
|
|
|
InsertMissingGroups(ctx context.Context, arg InsertMissingGroupsParams) ([]Group, error)
|
2023-12-21 21:38:42 +00:00
|
|
|
InsertOAuth2ProviderApp(ctx context.Context, arg InsertOAuth2ProviderAppParams) (OAuth2ProviderApp, error)
|
|
|
|
InsertOAuth2ProviderAppSecret(ctx context.Context, arg InsertOAuth2ProviderAppSecretParams) (OAuth2ProviderAppSecret, error)
|
2022-01-23 05:58:10 +00:00
|
|
|
InsertOrganization(ctx context.Context, arg InsertOrganizationParams) (Organization, error)
|
|
|
|
InsertOrganizationMember(ctx context.Context, arg InsertOrganizationMemberParams) (OrganizationMember, error)
|
2022-01-29 23:38:32 +00:00
|
|
|
InsertProvisionerJob(ctx context.Context, arg InsertProvisionerJobParams) (ProvisionerJob, error)
|
2022-02-07 21:32:37 +00:00
|
|
|
InsertProvisionerJobLogs(ctx context.Context, arg InsertProvisionerJobLogsParams) ([]ProvisionerJobLog, error)
|
2022-10-17 13:43:30 +00:00
|
|
|
InsertReplica(ctx context.Context, arg InsertReplicaParams) (Replica, error)
|
2023-07-19 20:07:33 +00:00
|
|
|
InsertTemplate(ctx context.Context, arg InsertTemplateParams) error
|
2023-07-25 13:14:38 +00:00
|
|
|
InsertTemplateVersion(ctx context.Context, arg InsertTemplateVersionParams) error
|
2023-01-17 10:22:11 +00:00
|
|
|
InsertTemplateVersionParameter(ctx context.Context, arg InsertTemplateVersionParameterParams) (TemplateVersionParameter, error)
|
2023-02-15 17:24:15 +00:00
|
|
|
InsertTemplateVersionVariable(ctx context.Context, arg InsertTemplateVersionVariableParams) (TemplateVersionVariable, error)
|
2022-01-20 13:46:51 +00:00
|
|
|
InsertUser(ctx context.Context, arg InsertUserParams) (User, error)
|
2023-02-02 19:53:48 +00:00
|
|
|
// InsertUserGroupsByName adds a user to all provided groups, if they exist.
|
|
|
|
InsertUserGroupsByName(ctx context.Context, arg InsertUserGroupsByNameParams) error
|
2022-08-17 23:00:53 +00:00
|
|
|
InsertUserLink(ctx context.Context, arg InsertUserLinkParams) (UserLink, error)
|
2022-01-25 19:52:58 +00:00
|
|
|
InsertWorkspace(ctx context.Context, arg InsertWorkspaceParams) (Workspace, error)
|
2022-03-07 17:40:54 +00:00
|
|
|
InsertWorkspaceAgent(ctx context.Context, arg InsertWorkspaceAgentParams) (WorkspaceAgent, error)
|
2023-09-25 21:47:17 +00:00
|
|
|
InsertWorkspaceAgentLogSources(ctx context.Context, arg InsertWorkspaceAgentLogSourcesParams) ([]WorkspaceAgentLogSource, error)
|
2023-07-28 15:57:23 +00:00
|
|
|
InsertWorkspaceAgentLogs(ctx context.Context, arg InsertWorkspaceAgentLogsParams) ([]WorkspaceAgentLog, error)
|
2023-03-31 20:26:19 +00:00
|
|
|
InsertWorkspaceAgentMetadata(ctx context.Context, arg InsertWorkspaceAgentMetadataParams) error
|
2023-09-25 21:47:17 +00:00
|
|
|
InsertWorkspaceAgentScripts(ctx context.Context, arg InsertWorkspaceAgentScriptsParams) ([]WorkspaceAgentScript, error)
|
2023-02-28 19:33:33 +00:00
|
|
|
InsertWorkspaceAgentStat(ctx context.Context, arg InsertWorkspaceAgentStatParams) (WorkspaceAgentStat, error)
|
2023-08-04 16:00:42 +00:00
|
|
|
InsertWorkspaceAgentStats(ctx context.Context, arg InsertWorkspaceAgentStatsParams) error
|
2022-06-04 20:13:37 +00:00
|
|
|
InsertWorkspaceApp(ctx context.Context, arg InsertWorkspaceAppParams) (WorkspaceApp, error)
|
2023-08-16 12:22:00 +00:00
|
|
|
InsertWorkspaceAppStats(ctx context.Context, arg InsertWorkspaceAppStatsParams) error
|
2023-07-25 13:14:38 +00:00
|
|
|
InsertWorkspaceBuild(ctx context.Context, arg InsertWorkspaceBuildParams) error
|
2023-01-17 10:22:11 +00:00
|
|
|
InsertWorkspaceBuildParameters(ctx context.Context, arg InsertWorkspaceBuildParametersParams) error
|
2023-04-04 20:07:29 +00:00
|
|
|
InsertWorkspaceProxy(ctx context.Context, arg InsertWorkspaceProxyParams) (WorkspaceProxy, error)
|
2022-03-07 17:40:54 +00:00
|
|
|
InsertWorkspaceResource(ctx context.Context, arg InsertWorkspaceResourceParams) (WorkspaceResource, error)
|
2022-12-14 19:08:22 +00:00
|
|
|
InsertWorkspaceResourceMetadata(ctx context.Context, arg InsertWorkspaceResourceMetadataParams) ([]WorkspaceResourceMetadatum, error)
|
2024-02-13 14:31:20 +00:00
|
|
|
ListWorkspaceAgentPortShares(ctx context.Context, workspaceID uuid.UUID) ([]WorkspaceAgentPortShare, error)
|
2023-04-20 14:48:47 +00:00
|
|
|
RegisterWorkspaceProxy(ctx context.Context, arg RegisterWorkspaceProxyParams) (WorkspaceProxy, error)
|
2023-09-06 11:06:26 +00:00
|
|
|
RevokeDBCryptKey(ctx context.Context, activeKeyDigest string) error
|
2023-03-07 19:38:11 +00:00
|
|
|
// Non blocking lock. Returns true if the lock was acquired, false otherwise.
|
|
|
|
//
|
|
|
|
// This must be called from within a transaction. The lock will be automatically
|
|
|
|
// released when the transaction ends.
|
|
|
|
TryAcquireLock(ctx context.Context, pgTryAdvisoryXactLock int64) (bool, error)
|
2023-10-10 15:52:42 +00:00
|
|
|
// This will always work regardless of the current state of the template version.
|
|
|
|
UnarchiveTemplateVersion(ctx context.Context, arg UnarchiveTemplateVersionParams) error
|
2024-01-24 13:39:19 +00:00
|
|
|
UnfavoriteWorkspace(ctx context.Context, id uuid.UUID) error
|
2022-01-20 13:46:51 +00:00
|
|
|
UpdateAPIKeyByID(ctx context.Context, arg UpdateAPIKeyByIDParams) error
|
2023-09-29 19:13:20 +00:00
|
|
|
UpdateExternalAuthLink(ctx context.Context, arg UpdateExternalAuthLinkParams) (ExternalAuthLink, error)
|
2022-10-14 21:25:46 +00:00
|
|
|
UpdateGitSSHKey(ctx context.Context, arg UpdateGitSSHKeyParams) (GitSSHKey, error)
|
2022-10-10 20:37:06 +00:00
|
|
|
UpdateGroupByID(ctx context.Context, arg UpdateGroupByIDParams) (Group, error)
|
2023-08-02 14:31:25 +00:00
|
|
|
UpdateInactiveUsersToDormant(ctx context.Context, arg UpdateInactiveUsersToDormantParams) ([]UpdateInactiveUsersToDormantRow, error)
|
2022-04-29 14:04:19 +00:00
|
|
|
UpdateMemberRoles(ctx context.Context, arg UpdateMemberRolesParams) (OrganizationMember, error)
|
2023-12-21 21:38:42 +00:00
|
|
|
UpdateOAuth2ProviderAppByID(ctx context.Context, arg UpdateOAuth2ProviderAppByIDParams) (OAuth2ProviderApp, error)
|
|
|
|
UpdateOAuth2ProviderAppSecretByID(ctx context.Context, arg UpdateOAuth2ProviderAppSecretByIDParams) (OAuth2ProviderAppSecret, error)
|
2023-12-18 16:44:52 +00:00
|
|
|
UpdateProvisionerDaemonLastSeenAt(ctx context.Context, arg UpdateProvisionerDaemonLastSeenAtParams) error
|
2022-01-29 23:38:32 +00:00
|
|
|
UpdateProvisionerJobByID(ctx context.Context, arg UpdateProvisionerJobByIDParams) error
|
2022-03-22 19:17:50 +00:00
|
|
|
UpdateProvisionerJobWithCancelByID(ctx context.Context, arg UpdateProvisionerJobWithCancelByIDParams) error
|
2022-02-04 01:13:22 +00:00
|
|
|
UpdateProvisionerJobWithCompleteByID(ctx context.Context, arg UpdateProvisionerJobWithCompleteByIDParams) error
|
2022-10-17 13:43:30 +00:00
|
|
|
UpdateReplica(ctx context.Context, arg UpdateReplicaParams) (Replica, error)
|
2023-07-19 20:07:33 +00:00
|
|
|
UpdateTemplateACLByID(ctx context.Context, arg UpdateTemplateACLByIDParams) error
|
2023-10-18 22:07:21 +00:00
|
|
|
UpdateTemplateAccessControlByID(ctx context.Context, arg UpdateTemplateAccessControlByIDParams) error
|
2022-04-06 17:42:40 +00:00
|
|
|
UpdateTemplateActiveVersionByID(ctx context.Context, arg UpdateTemplateActiveVersionByIDParams) error
|
|
|
|
UpdateTemplateDeletedByID(ctx context.Context, arg UpdateTemplateDeletedByIDParams) error
|
2023-07-19 20:07:33 +00:00
|
|
|
UpdateTemplateMetaByID(ctx context.Context, arg UpdateTemplateMetaByIDParams) error
|
|
|
|
UpdateTemplateScheduleByID(ctx context.Context, arg UpdateTemplateScheduleByIDParams) error
|
2023-07-25 13:14:38 +00:00
|
|
|
UpdateTemplateVersionByID(ctx context.Context, arg UpdateTemplateVersionByIDParams) error
|
2022-05-17 20:00:48 +00:00
|
|
|
UpdateTemplateVersionDescriptionByJobID(ctx context.Context, arg UpdateTemplateVersionDescriptionByJobIDParams) error
|
2023-09-29 19:13:20 +00:00
|
|
|
UpdateTemplateVersionExternalAuthProvidersByJobID(ctx context.Context, arg UpdateTemplateVersionExternalAuthProvidersByJobIDParams) error
|
2023-08-22 20:15:13 +00:00
|
|
|
UpdateTemplateWorkspacesLastUsedAt(ctx context.Context, arg UpdateTemplateWorkspacesLastUsedAtParams) error
|
2023-12-14 17:38:44 +00:00
|
|
|
UpdateUserAppearanceSettings(ctx context.Context, arg UpdateUserAppearanceSettingsParams) (User, error)
|
2022-09-12 23:24:20 +00:00
|
|
|
UpdateUserDeletedByID(ctx context.Context, arg UpdateUserDeletedByIDParams) error
|
2022-05-06 14:20:08 +00:00
|
|
|
UpdateUserHashedPassword(ctx context.Context, arg UpdateUserHashedPasswordParams) error
|
2022-09-26 15:31:03 +00:00
|
|
|
UpdateUserLastSeenAt(ctx context.Context, arg UpdateUserLastSeenAtParams) (User, error)
|
2022-08-17 23:00:53 +00:00
|
|
|
UpdateUserLink(ctx context.Context, arg UpdateUserLinkParams) (UserLink, error)
|
|
|
|
UpdateUserLinkedID(ctx context.Context, arg UpdateUserLinkedIDParams) (UserLink, error)
|
2023-06-30 12:38:48 +00:00
|
|
|
UpdateUserLoginType(ctx context.Context, arg UpdateUserLoginTypeParams) (User, error)
|
2022-04-12 14:05:21 +00:00
|
|
|
UpdateUserProfile(ctx context.Context, arg UpdateUserProfileParams) (User, error)
|
2023-07-20 13:35:41 +00:00
|
|
|
UpdateUserQuietHoursSchedule(ctx context.Context, arg UpdateUserQuietHoursScheduleParams) (User, error)
|
2022-04-29 14:04:19 +00:00
|
|
|
UpdateUserRoles(ctx context.Context, arg UpdateUserRolesParams) (User, error)
|
2022-04-26 14:00:07 +00:00
|
|
|
UpdateUserStatus(ctx context.Context, arg UpdateUserStatusParams) (User, error)
|
2022-08-26 09:28:38 +00:00
|
|
|
UpdateWorkspace(ctx context.Context, arg UpdateWorkspaceParams) (Workspace, error)
|
2022-03-22 19:17:50 +00:00
|
|
|
UpdateWorkspaceAgentConnectionByID(ctx context.Context, arg UpdateWorkspaceAgentConnectionByIDParams) error
|
2023-01-24 12:24:27 +00:00
|
|
|
UpdateWorkspaceAgentLifecycleStateByID(ctx context.Context, arg UpdateWorkspaceAgentLifecycleStateByIDParams) error
|
2023-07-28 15:57:23 +00:00
|
|
|
UpdateWorkspaceAgentLogOverflowByID(ctx context.Context, arg UpdateWorkspaceAgentLogOverflowByIDParams) error
|
2023-03-31 20:26:19 +00:00
|
|
|
UpdateWorkspaceAgentMetadata(ctx context.Context, arg UpdateWorkspaceAgentMetadataParams) error
|
2023-02-07 21:35:09 +00:00
|
|
|
UpdateWorkspaceAgentStartupByID(ctx context.Context, arg UpdateWorkspaceAgentStartupByIDParams) error
|
2022-09-23 19:51:04 +00:00
|
|
|
UpdateWorkspaceAppHealthByID(ctx context.Context, arg UpdateWorkspaceAppHealthByIDParams) error
|
2023-10-06 09:27:12 +00:00
|
|
|
UpdateWorkspaceAutomaticUpdates(ctx context.Context, arg UpdateWorkspaceAutomaticUpdatesParams) error
|
2022-04-07 09:03:35 +00:00
|
|
|
UpdateWorkspaceAutostart(ctx context.Context, arg UpdateWorkspaceAutostartParams) error
|
2023-07-25 13:14:38 +00:00
|
|
|
UpdateWorkspaceBuildCostByID(ctx context.Context, arg UpdateWorkspaceBuildCostByIDParams) error
|
2023-09-22 15:22:07 +00:00
|
|
|
UpdateWorkspaceBuildDeadlineByID(ctx context.Context, arg UpdateWorkspaceBuildDeadlineByIDParams) error
|
|
|
|
UpdateWorkspaceBuildProvisionerStateByID(ctx context.Context, arg UpdateWorkspaceBuildProvisionerStateByIDParams) error
|
2022-03-22 19:17:50 +00:00
|
|
|
UpdateWorkspaceDeletedByID(ctx context.Context, arg UpdateWorkspaceDeletedByIDParams) error
|
2023-08-24 18:25:54 +00:00
|
|
|
UpdateWorkspaceDormantDeletingAt(ctx context.Context, arg UpdateWorkspaceDormantDeletingAtParams) (Workspace, error)
|
2022-09-02 00:08:51 +00:00
|
|
|
UpdateWorkspaceLastUsedAt(ctx context.Context, arg UpdateWorkspaceLastUsedAtParams) error
|
2023-05-09 18:46:50 +00:00
|
|
|
// This allows editing the properties of a workspace proxy.
|
|
|
|
UpdateWorkspaceProxy(ctx context.Context, arg UpdateWorkspaceProxyParams) (WorkspaceProxy, error)
|
2023-04-04 20:07:29 +00:00
|
|
|
UpdateWorkspaceProxyDeleted(ctx context.Context, arg UpdateWorkspaceProxyDeletedParams) error
|
2022-05-19 19:09:27 +00:00
|
|
|
UpdateWorkspaceTTL(ctx context.Context, arg UpdateWorkspaceTTLParams) error
|
2023-08-24 18:25:54 +00:00
|
|
|
UpdateWorkspacesDormantDeletingAtByTemplateID(ctx context.Context, arg UpdateWorkspacesDormantDeletingAtByTemplateIDParams) error
|
2023-04-05 18:41:55 +00:00
|
|
|
UpsertAppSecurityKey(ctx context.Context, value string) error
|
2023-09-27 15:02:18 +00:00
|
|
|
UpsertApplicationName(ctx context.Context, value string) error
|
2023-06-08 15:30:15 +00:00
|
|
|
// The default proxy is implied and not actually stored in the database.
|
|
|
|
// So we need to store it's configuration here for display purposes.
|
|
|
|
// The functional values are immutable and controlled implicitly.
|
|
|
|
UpsertDefaultProxy(ctx context.Context, arg UpsertDefaultProxyParams) error
|
2023-11-23 16:18:12 +00:00
|
|
|
UpsertHealthSettings(ctx context.Context, value string) error
|
2024-01-30 01:30:02 +00:00
|
|
|
UpsertJFrogXrayScanByWorkspaceAndAgentID(ctx context.Context, arg UpsertJFrogXrayScanByWorkspaceAndAgentIDParams) error
|
2023-03-28 00:55:10 +00:00
|
|
|
UpsertLastUpdateCheck(ctx context.Context, value string) error
|
|
|
|
UpsertLogoURL(ctx context.Context, value string) error
|
2023-06-30 12:38:48 +00:00
|
|
|
UpsertOAuthSigningKey(ctx context.Context, value string) error
|
2023-12-13 12:31:40 +00:00
|
|
|
UpsertProvisionerDaemon(ctx context.Context, arg UpsertProvisionerDaemonParams) (ProvisionerDaemon, error)
|
2023-03-28 00:55:10 +00:00
|
|
|
UpsertServiceBanner(ctx context.Context, value string) error
|
2023-06-21 12:20:58 +00:00
|
|
|
UpsertTailnetAgent(ctx context.Context, arg UpsertTailnetAgentParams) (TailnetAgent, error)
|
|
|
|
UpsertTailnetClient(ctx context.Context, arg UpsertTailnetClientParams) (TailnetClient, error)
|
2023-09-21 19:30:48 +00:00
|
|
|
UpsertTailnetClientSubscription(ctx context.Context, arg UpsertTailnetClientSubscriptionParams) error
|
2023-06-21 12:20:58 +00:00
|
|
|
UpsertTailnetCoordinator(ctx context.Context, id uuid.UUID) (TailnetCoordinator, error)
|
2023-11-15 06:13:27 +00:00
|
|
|
UpsertTailnetPeer(ctx context.Context, arg UpsertTailnetPeerParams) (TailnetPeer, error)
|
|
|
|
UpsertTailnetTunnel(ctx context.Context, arg UpsertTailnetTunnelParams) (TailnetTunnel, error)
|
2024-02-13 14:31:20 +00:00
|
|
|
UpsertWorkspaceAgentPortShare(ctx context.Context, arg UpsertWorkspaceAgentPortShareParams) (WorkspaceAgentPortShare, error)
|
2022-01-05 15:20:56 +00:00
|
|
|
}
|
|
|
|
|
2022-10-10 20:37:06 +00:00
|
|
|
var _ sqlcQuerier = (*sqlQuerier)(nil)
|