dbfake

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnimplemented = xerrors.New("unimplemented")

ErrUnimplemented is returned by methods only used by the enterprise/tailnet.pgCoord. This coordinator explicitly depends on postgres triggers that announce changes on the pubsub. Implementing support for this in the fake database would strongly couple the FakeQuerier to the pubsub, which is undesirable. Furthermore, it makes little sense to directly test the pgCoord against anything other than postgres. The FakeQuerier is designed to allow us to test the Coderd API, and for that kind of test, the in-memory, AGPL tailnet coordinator is sufficient. Therefore, these methods remain unimplemented in the FakeQuerier.

Functions

func New

func New() database.Store

New returns an in-memory fake of the database.

Types

type FakeQuerier added in v0.26.1

type FakeQuerier struct {
	// contains filtered or unexported fields
}

FakeQuerier replicates database functionality to enable quick testing. It's an exported type so that our test code can do type checks.

func (*FakeQuerier) AcquireLock added in v0.26.1

func (*FakeQuerier) AcquireLock(_ context.Context, _ int64) error

func (*FakeQuerier) AcquireProvisionerJob added in v0.26.1

func (*FakeQuerier) CleanTailnetCoordinators added in v0.26.1

func (*FakeQuerier) CleanTailnetCoordinators(_ context.Context) error

func (*FakeQuerier) DeleteAPIKeyByID added in v0.26.1

func (q *FakeQuerier) DeleteAPIKeyByID(_ context.Context, id string) error

func (*FakeQuerier) DeleteAPIKeysByUserID added in v0.26.1

func (q *FakeQuerier) DeleteAPIKeysByUserID(_ context.Context, userID uuid.UUID) error

func (*FakeQuerier) DeleteApplicationConnectAPIKeysByUserID added in v0.26.1

func (q *FakeQuerier) DeleteApplicationConnectAPIKeysByUserID(_ context.Context, userID uuid.UUID) error

func (*FakeQuerier) DeleteCoordinator added in v0.26.1

func (*FakeQuerier) DeleteCoordinator(context.Context, uuid.UUID) error

func (*FakeQuerier) DeleteGitSSHKey added in v0.26.1

func (q *FakeQuerier) DeleteGitSSHKey(_ context.Context, userID uuid.UUID) error

func (*FakeQuerier) DeleteGroupByID added in v0.26.1

func (q *FakeQuerier) DeleteGroupByID(_ context.Context, id uuid.UUID) error

func (*FakeQuerier) DeleteGroupMemberFromGroup added in v0.26.1

func (q *FakeQuerier) DeleteGroupMemberFromGroup(_ context.Context, arg database.DeleteGroupMemberFromGroupParams) error

func (*FakeQuerier) DeleteGroupMembersByOrgAndUser added in v0.26.1

func (q *FakeQuerier) DeleteGroupMembersByOrgAndUser(_ context.Context, arg database.DeleteGroupMembersByOrgAndUserParams) error

func (*FakeQuerier) DeleteLicense added in v0.26.1

func (q *FakeQuerier) DeleteLicense(_ context.Context, id int32) (int32, error)

func (*FakeQuerier) DeleteOldWorkspaceAgentStartupLogs added in v0.26.1

func (*FakeQuerier) DeleteOldWorkspaceAgentStartupLogs(_ context.Context) error

func (*FakeQuerier) DeleteOldWorkspaceAgentStats added in v0.26.1

func (*FakeQuerier) DeleteOldWorkspaceAgentStats(_ context.Context) error

func (*FakeQuerier) DeleteReplicasUpdatedBefore added in v0.26.1

func (q *FakeQuerier) DeleteReplicasUpdatedBefore(_ context.Context, before time.Time) error

func (*FakeQuerier) DeleteTailnetAgent added in v0.26.1

func (*FakeQuerier) DeleteTailnetClient added in v0.26.1

func (*FakeQuerier) GetAPIKeyByID added in v0.26.1

func (q *FakeQuerier) GetAPIKeyByID(_ context.Context, id string) (database.APIKey, error)

func (*FakeQuerier) GetAPIKeyByName added in v0.26.1

func (q *FakeQuerier) GetAPIKeyByName(_ context.Context, params database.GetAPIKeyByNameParams) (database.APIKey, error)

func (*FakeQuerier) GetAPIKeysByLoginType added in v0.26.1

func (q *FakeQuerier) GetAPIKeysByLoginType(_ context.Context, t database.LoginType) ([]database.APIKey, error)

func (*FakeQuerier) GetAPIKeysByUserID added in v0.26.1

func (q *FakeQuerier) GetAPIKeysByUserID(_ context.Context, params database.GetAPIKeysByUserIDParams) ([]database.APIKey, error)

func (*FakeQuerier) GetAPIKeysLastUsedAfter added in v0.26.1

func (q *FakeQuerier) GetAPIKeysLastUsedAfter(_ context.Context, after time.Time) ([]database.APIKey, error)

func (*FakeQuerier) GetActiveUserCount added in v0.26.1

func (q *FakeQuerier) GetActiveUserCount(_ context.Context) (int64, error)

func (*FakeQuerier) GetAppSecurityKey added in v0.26.1

func (q *FakeQuerier) GetAppSecurityKey(_ context.Context) (string, error)

func (*FakeQuerier) GetAuditLogsOffset added in v0.26.1

func (*FakeQuerier) GetAuthorizationUserRoles added in v0.26.1

func (q *FakeQuerier) GetAuthorizationUserRoles(_ context.Context, userID uuid.UUID) (database.GetAuthorizationUserRolesRow, error)

func (*FakeQuerier) GetAuthorizedTemplates added in v0.26.1

func (*FakeQuerier) GetAuthorizedUsers added in v0.26.2

func (q *FakeQuerier) GetAuthorizedUsers(ctx context.Context, arg database.GetUsersParams, prepared rbac.PreparedAuthorized) ([]database.GetUsersRow, error)

func (*FakeQuerier) GetAuthorizedWorkspaces added in v0.26.1

func (q *FakeQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg database.GetWorkspacesParams, prepared rbac.PreparedAuthorized) ([]database.GetWorkspacesRow, error)

func (*FakeQuerier) GetDERPMeshKey added in v0.26.1

func (q *FakeQuerier) GetDERPMeshKey(_ context.Context) (string, error)

func (*FakeQuerier) GetDefaultProxyConfig added in v0.26.1

func (q *FakeQuerier) GetDefaultProxyConfig(_ context.Context) (database.GetDefaultProxyConfigRow, error)

func (*FakeQuerier) GetDeploymentDAUs added in v0.26.1

func (q *FakeQuerier) GetDeploymentDAUs(_ context.Context, tzOffset int32) ([]database.GetDeploymentDAUsRow, error)

func (*FakeQuerier) GetDeploymentID added in v0.26.1

func (q *FakeQuerier) GetDeploymentID(_ context.Context) (string, error)

func (*FakeQuerier) GetDeploymentWorkspaceAgentStats added in v0.26.1

func (q *FakeQuerier) GetDeploymentWorkspaceAgentStats(_ context.Context, createdAfter time.Time) (database.GetDeploymentWorkspaceAgentStatsRow, error)

func (*FakeQuerier) GetDeploymentWorkspaceStats added in v0.26.1

func (q *FakeQuerier) GetDeploymentWorkspaceStats(ctx context.Context) (database.GetDeploymentWorkspaceStatsRow, error)

func (*FakeQuerier) GetFileByHashAndCreator added in v0.26.1

func (q *FakeQuerier) GetFileByHashAndCreator(_ context.Context, arg database.GetFileByHashAndCreatorParams) (database.File, error)

func (*FakeQuerier) GetFileByID added in v0.26.1

func (q *FakeQuerier) GetFileByID(_ context.Context, id uuid.UUID) (database.File, error)

func (*FakeQuerier) GetFileTemplates added in v0.26.1

func (q *FakeQuerier) GetFileTemplates(_ context.Context, id uuid.UUID) ([]database.GetFileTemplatesRow, error)

func (*FakeQuerier) GetGitSSHKey added in v0.26.1

func (q *FakeQuerier) GetGitSSHKey(_ context.Context, userID uuid.UUID) (database.GitSSHKey, error)

func (*FakeQuerier) GetGroupByID added in v0.26.1

func (q *FakeQuerier) GetGroupByID(ctx context.Context, id uuid.UUID) (database.Group, error)

func (*FakeQuerier) GetGroupByOrgAndName added in v0.26.1

func (*FakeQuerier) GetGroupMembers added in v0.26.1

func (q *FakeQuerier) GetGroupMembers(_ context.Context, groupID uuid.UUID) ([]database.User, error)

func (*FakeQuerier) GetGroupsByOrganizationID added in v0.26.1

func (q *FakeQuerier) GetGroupsByOrganizationID(_ context.Context, organizationID uuid.UUID) ([]database.Group, error)

func (*FakeQuerier) GetHungProvisionerJobs added in v0.26.1

func (q *FakeQuerier) GetHungProvisionerJobs(_ context.Context, hungSince time.Time) ([]database.ProvisionerJob, error)

func (*FakeQuerier) GetLastUpdateCheck added in v0.26.1

func (q *FakeQuerier) GetLastUpdateCheck(_ context.Context) (string, error)

func (*FakeQuerier) GetLatestWorkspaceBuildByWorkspaceID added in v0.26.1

func (q *FakeQuerier) GetLatestWorkspaceBuildByWorkspaceID(ctx context.Context, workspaceID uuid.UUID) (database.WorkspaceBuild, error)

func (*FakeQuerier) GetLatestWorkspaceBuilds added in v0.26.1

func (q *FakeQuerier) GetLatestWorkspaceBuilds(_ context.Context) ([]database.WorkspaceBuild, error)

func (*FakeQuerier) GetLatestWorkspaceBuildsByWorkspaceIDs added in v0.26.1

func (q *FakeQuerier) GetLatestWorkspaceBuildsByWorkspaceIDs(_ context.Context, ids []uuid.UUID) ([]database.WorkspaceBuild, error)

func (*FakeQuerier) GetLicenseByID added in v0.26.1

func (q *FakeQuerier) GetLicenseByID(_ context.Context, id int32) (database.License, error)

func (*FakeQuerier) GetLicenses added in v0.26.1

func (q *FakeQuerier) GetLicenses(_ context.Context) ([]database.License, error)

func (*FakeQuerier) GetLogoURL added in v0.26.1

func (q *FakeQuerier) GetLogoURL(_ context.Context) (string, error)

func (*FakeQuerier) GetOAuthSigningKey added in v0.26.1

func (q *FakeQuerier) GetOAuthSigningKey(_ context.Context) (string, error)

func (*FakeQuerier) GetOrganizationByID added in v0.26.1

func (q *FakeQuerier) GetOrganizationByID(_ context.Context, id uuid.UUID) (database.Organization, error)

func (*FakeQuerier) GetOrganizationByName added in v0.26.1

func (q *FakeQuerier) GetOrganizationByName(_ context.Context, name string) (database.Organization, error)

func (*FakeQuerier) GetOrganizationIDsByMemberIDs added in v0.26.1

func (q *FakeQuerier) GetOrganizationIDsByMemberIDs(_ context.Context, ids []uuid.UUID) ([]database.GetOrganizationIDsByMemberIDsRow, error)

func (*FakeQuerier) GetOrganizationMemberByUserID added in v0.26.1

func (*FakeQuerier) GetOrganizationMembershipsByUserID added in v0.26.1

func (q *FakeQuerier) GetOrganizationMembershipsByUserID(_ context.Context, userID uuid.UUID) ([]database.OrganizationMember, error)

func (*FakeQuerier) GetOrganizations added in v0.26.1

func (q *FakeQuerier) GetOrganizations(_ context.Context) ([]database.Organization, error)

func (*FakeQuerier) GetOrganizationsByUserID added in v0.26.1

func (q *FakeQuerier) GetOrganizationsByUserID(_ context.Context, userID uuid.UUID) ([]database.Organization, error)

func (*FakeQuerier) GetParameterSchemasByJobID added in v0.26.1

func (q *FakeQuerier) GetParameterSchemasByJobID(_ context.Context, jobID uuid.UUID) ([]database.ParameterSchema, error)

func (*FakeQuerier) GetPreviousTemplateVersion added in v0.26.1

func (*FakeQuerier) GetProvisionerDaemons added in v0.26.1

func (q *FakeQuerier) GetProvisionerDaemons(_ context.Context) ([]database.ProvisionerDaemon, error)

func (*FakeQuerier) GetProvisionerJobByID added in v0.26.1

func (q *FakeQuerier) GetProvisionerJobByID(ctx context.Context, id uuid.UUID) (database.ProvisionerJob, error)

func (*FakeQuerier) GetProvisionerJobsByIDs added in v0.26.1

func (q *FakeQuerier) GetProvisionerJobsByIDs(_ context.Context, ids []uuid.UUID) ([]database.ProvisionerJob, error)

func (*FakeQuerier) GetProvisionerJobsByIDsWithQueuePosition added in v0.26.1

func (q *FakeQuerier) GetProvisionerJobsByIDsWithQueuePosition(_ context.Context, ids []uuid.UUID) ([]database.GetProvisionerJobsByIDsWithQueuePositionRow, error)

func (*FakeQuerier) GetProvisionerJobsCreatedAfter added in v0.26.1

func (q *FakeQuerier) GetProvisionerJobsCreatedAfter(_ context.Context, after time.Time) ([]database.ProvisionerJob, error)

func (*FakeQuerier) GetProvisionerLogsAfterID added in v0.26.1

func (*FakeQuerier) GetQuotaAllowanceForUser added in v0.26.1

func (q *FakeQuerier) GetQuotaAllowanceForUser(_ context.Context, userID uuid.UUID) (int64, error)

func (*FakeQuerier) GetQuotaConsumedForUser added in v0.26.1

func (q *FakeQuerier) GetQuotaConsumedForUser(_ context.Context, userID uuid.UUID) (int64, error)

func (*FakeQuerier) GetReplicasUpdatedAfter added in v0.26.1

func (q *FakeQuerier) GetReplicasUpdatedAfter(_ context.Context, updatedAt time.Time) ([]database.Replica, error)

func (*FakeQuerier) GetServiceBanner added in v0.26.1

func (q *FakeQuerier) GetServiceBanner(_ context.Context) (string, error)

func (*FakeQuerier) GetTailnetAgents added in v0.26.1

func (*FakeQuerier) GetTailnetAgents(context.Context, uuid.UUID) ([]database.TailnetAgent, error)

func (*FakeQuerier) GetTailnetClientsForAgent added in v0.26.1

func (*FakeQuerier) GetTailnetClientsForAgent(context.Context, uuid.UUID) ([]database.TailnetClient, error)

func (*FakeQuerier) GetTemplateAverageBuildTime added in v0.26.1

func (*FakeQuerier) GetTemplateByID added in v0.26.1

func (q *FakeQuerier) GetTemplateByID(ctx context.Context, id uuid.UUID) (database.Template, error)

func (*FakeQuerier) GetTemplateByOrganizationAndName added in v0.26.1

func (q *FakeQuerier) GetTemplateByOrganizationAndName(_ context.Context, arg database.GetTemplateByOrganizationAndNameParams) (database.Template, error)

func (*FakeQuerier) GetTemplateDAUs added in v0.26.1

func (*FakeQuerier) GetTemplateDailyInsights added in v0.27.1

func (*FakeQuerier) GetTemplateGroupRoles added in v0.26.1

func (q *FakeQuerier) GetTemplateGroupRoles(_ context.Context, id uuid.UUID) ([]database.TemplateGroup, error)

func (*FakeQuerier) GetTemplateInsights added in v0.27.1

func (*FakeQuerier) GetTemplateUserRoles added in v0.26.1

func (q *FakeQuerier) GetTemplateUserRoles(_ context.Context, id uuid.UUID) ([]database.TemplateUser, error)

func (*FakeQuerier) GetTemplateVersionByID added in v0.26.1

func (q *FakeQuerier) GetTemplateVersionByID(ctx context.Context, templateVersionID uuid.UUID) (database.TemplateVersion, error)

func (*FakeQuerier) GetTemplateVersionByJobID added in v0.26.1

func (q *FakeQuerier) GetTemplateVersionByJobID(_ context.Context, jobID uuid.UUID) (database.TemplateVersion, error)

func (*FakeQuerier) GetTemplateVersionByTemplateIDAndName added in v0.26.1

func (*FakeQuerier) GetTemplateVersionParameters added in v0.26.1

func (q *FakeQuerier) GetTemplateVersionParameters(_ context.Context, templateVersionID uuid.UUID) ([]database.TemplateVersionParameter, error)

func (*FakeQuerier) GetTemplateVersionVariables added in v0.26.1

func (q *FakeQuerier) GetTemplateVersionVariables(_ context.Context, templateVersionID uuid.UUID) ([]database.TemplateVersionVariable, error)

func (*FakeQuerier) GetTemplateVersionsByIDs added in v0.26.1

func (q *FakeQuerier) GetTemplateVersionsByIDs(_ context.Context, ids []uuid.UUID) ([]database.TemplateVersion, error)

func (*FakeQuerier) GetTemplateVersionsByTemplateID added in v0.26.1

func (q *FakeQuerier) GetTemplateVersionsByTemplateID(_ context.Context, arg database.GetTemplateVersionsByTemplateIDParams) (version []database.TemplateVersion, err error)

func (*FakeQuerier) GetTemplateVersionsCreatedAfter added in v0.26.1

func (q *FakeQuerier) GetTemplateVersionsCreatedAfter(_ context.Context, after time.Time) ([]database.TemplateVersion, error)

func (*FakeQuerier) GetTemplates added in v0.26.1

func (q *FakeQuerier) GetTemplates(_ context.Context) ([]database.Template, error)

func (*FakeQuerier) GetTemplatesWithFilter added in v0.26.1

func (q *FakeQuerier) GetTemplatesWithFilter(ctx context.Context, arg database.GetTemplatesWithFilterParams) ([]database.Template, error)

func (*FakeQuerier) GetUnexpiredLicenses added in v0.26.1

func (q *FakeQuerier) GetUnexpiredLicenses(_ context.Context) ([]database.License, error)

func (*FakeQuerier) GetUserByEmailOrUsername added in v0.26.1

func (q *FakeQuerier) GetUserByEmailOrUsername(_ context.Context, arg database.GetUserByEmailOrUsernameParams) (database.User, error)

func (*FakeQuerier) GetUserByID added in v0.26.1

func (q *FakeQuerier) GetUserByID(_ context.Context, id uuid.UUID) (database.User, error)

func (*FakeQuerier) GetUserCount added in v0.26.1

func (q *FakeQuerier) GetUserCount(_ context.Context) (int64, error)

func (*FakeQuerier) GetUserLatencyInsights added in v0.27.1

func (*FakeQuerier) GetUserLinkByLinkedID added in v0.26.1

func (q *FakeQuerier) GetUserLinkByLinkedID(_ context.Context, id string) (database.UserLink, error)

func (*FakeQuerier) GetUserLinkByUserIDLoginType added in v0.26.1

func (q *FakeQuerier) GetUserLinkByUserIDLoginType(_ context.Context, params database.GetUserLinkByUserIDLoginTypeParams) (database.UserLink, error)

func (*FakeQuerier) GetUsers added in v0.26.1

func (*FakeQuerier) GetUsersByIDs added in v0.26.1

func (q *FakeQuerier) GetUsersByIDs(_ context.Context, ids []uuid.UUID) ([]database.User, error)

func (*FakeQuerier) GetWorkspaceAgentByAuthToken added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentByAuthToken(_ context.Context, authToken uuid.UUID) (database.WorkspaceAgent, error)

func (*FakeQuerier) GetWorkspaceAgentByID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentByID(ctx context.Context, id uuid.UUID) (database.WorkspaceAgent, error)

func (*FakeQuerier) GetWorkspaceAgentByInstanceID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentByInstanceID(_ context.Context, instanceID string) (database.WorkspaceAgent, error)

func (*FakeQuerier) GetWorkspaceAgentLifecycleStateByID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentLifecycleStateByID(ctx context.Context, id uuid.UUID) (database.GetWorkspaceAgentLifecycleStateByIDRow, error)

func (*FakeQuerier) GetWorkspaceAgentMetadata added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentMetadata(_ context.Context, workspaceAgentID uuid.UUID) ([]database.WorkspaceAgentMetadatum, error)

func (*FakeQuerier) GetWorkspaceAgentStartupLogsAfter added in v0.26.1

func (*FakeQuerier) GetWorkspaceAgentStats added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentStats(_ context.Context, createdAfter time.Time) ([]database.GetWorkspaceAgentStatsRow, error)

func (*FakeQuerier) GetWorkspaceAgentStatsAndLabels added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentStatsAndLabels(ctx context.Context, createdAfter time.Time) ([]database.GetWorkspaceAgentStatsAndLabelsRow, error)

func (*FakeQuerier) GetWorkspaceAgentsByResourceIDs added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentsByResourceIDs(ctx context.Context, resourceIDs []uuid.UUID) ([]database.WorkspaceAgent, error)

func (*FakeQuerier) GetWorkspaceAgentsCreatedAfter added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentsCreatedAfter(_ context.Context, after time.Time) ([]database.WorkspaceAgent, error)

func (*FakeQuerier) GetWorkspaceAgentsInLatestBuildByWorkspaceID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAgentsInLatestBuildByWorkspaceID(ctx context.Context, workspaceID uuid.UUID) ([]database.WorkspaceAgent, error)

func (*FakeQuerier) GetWorkspaceAppByAgentIDAndSlug added in v0.26.1

func (*FakeQuerier) GetWorkspaceAppsByAgentID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAppsByAgentID(_ context.Context, id uuid.UUID) ([]database.WorkspaceApp, error)

func (*FakeQuerier) GetWorkspaceAppsByAgentIDs added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAppsByAgentIDs(_ context.Context, ids []uuid.UUID) ([]database.WorkspaceApp, error)

func (*FakeQuerier) GetWorkspaceAppsCreatedAfter added in v0.26.1

func (q *FakeQuerier) GetWorkspaceAppsCreatedAfter(_ context.Context, after time.Time) ([]database.WorkspaceApp, error)

func (*FakeQuerier) GetWorkspaceBuildByID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceBuildByID(ctx context.Context, id uuid.UUID) (database.WorkspaceBuild, error)

func (*FakeQuerier) GetWorkspaceBuildByJobID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceBuildByJobID(_ context.Context, jobID uuid.UUID) (database.WorkspaceBuild, error)

func (*FakeQuerier) GetWorkspaceBuildByWorkspaceIDAndBuildNumber added in v0.26.1

func (q *FakeQuerier) GetWorkspaceBuildByWorkspaceIDAndBuildNumber(_ context.Context, arg database.GetWorkspaceBuildByWorkspaceIDAndBuildNumberParams) (database.WorkspaceBuild, error)

func (*FakeQuerier) GetWorkspaceBuildParameters added in v0.26.1

func (q *FakeQuerier) GetWorkspaceBuildParameters(_ context.Context, workspaceBuildID uuid.UUID) ([]database.WorkspaceBuildParameter, error)

func (*FakeQuerier) GetWorkspaceBuildsByWorkspaceID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceBuildsByWorkspaceID(_ context.Context,
	params database.GetWorkspaceBuildsByWorkspaceIDParams,
) ([]database.WorkspaceBuild, error)

func (*FakeQuerier) GetWorkspaceBuildsCreatedAfter added in v0.26.1

func (q *FakeQuerier) GetWorkspaceBuildsCreatedAfter(_ context.Context, after time.Time) ([]database.WorkspaceBuild, error)

func (*FakeQuerier) GetWorkspaceByAgentID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceByAgentID(ctx context.Context, agentID uuid.UUID) (database.Workspace, error)

func (*FakeQuerier) GetWorkspaceByID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceByID(ctx context.Context, id uuid.UUID) (database.Workspace, error)

func (*FakeQuerier) GetWorkspaceByOwnerIDAndName added in v0.26.1

func (*FakeQuerier) GetWorkspaceByWorkspaceAppID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceByWorkspaceAppID(_ context.Context, workspaceAppID uuid.UUID) (database.Workspace, error)

func (*FakeQuerier) GetWorkspaceProxies added in v0.26.1

func (q *FakeQuerier) GetWorkspaceProxies(_ context.Context) ([]database.WorkspaceProxy, error)

func (*FakeQuerier) GetWorkspaceProxyByHostname added in v0.26.1

func (*FakeQuerier) GetWorkspaceProxyByID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceProxyByID(_ context.Context, id uuid.UUID) (database.WorkspaceProxy, error)

func (*FakeQuerier) GetWorkspaceProxyByName added in v0.26.1

func (q *FakeQuerier) GetWorkspaceProxyByName(_ context.Context, name string) (database.WorkspaceProxy, error)

func (*FakeQuerier) GetWorkspaceResourceByID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceResourceByID(_ context.Context, id uuid.UUID) (database.WorkspaceResource, error)

func (*FakeQuerier) GetWorkspaceResourceMetadataByResourceIDs added in v0.26.1

func (q *FakeQuerier) GetWorkspaceResourceMetadataByResourceIDs(_ context.Context, ids []uuid.UUID) ([]database.WorkspaceResourceMetadatum, error)

func (*FakeQuerier) GetWorkspaceResourceMetadataCreatedAfter added in v0.26.1

func (q *FakeQuerier) GetWorkspaceResourceMetadataCreatedAfter(ctx context.Context, after time.Time) ([]database.WorkspaceResourceMetadatum, error)

func (*FakeQuerier) GetWorkspaceResourcesByJobID added in v0.26.1

func (q *FakeQuerier) GetWorkspaceResourcesByJobID(ctx context.Context, jobID uuid.UUID) ([]database.WorkspaceResource, error)

func (*FakeQuerier) GetWorkspaceResourcesByJobIDs added in v0.26.1

func (q *FakeQuerier) GetWorkspaceResourcesByJobIDs(_ context.Context, jobIDs []uuid.UUID) ([]database.WorkspaceResource, error)

func (*FakeQuerier) GetWorkspaceResourcesCreatedAfter added in v0.26.1

func (q *FakeQuerier) GetWorkspaceResourcesCreatedAfter(_ context.Context, after time.Time) ([]database.WorkspaceResource, error)

func (*FakeQuerier) GetWorkspaces added in v0.26.1

func (*FakeQuerier) GetWorkspacesEligibleForTransition added in v0.26.1

func (q *FakeQuerier) GetWorkspacesEligibleForTransition(ctx context.Context, now time.Time) ([]database.Workspace, error)

func (*FakeQuerier) InTx added in v0.26.1

func (q *FakeQuerier) InTx(fn func(database.Store) error, _ *sql.TxOptions) error

InTx doesn't rollback data properly for in-memory yet.

func (*FakeQuerier) InsertAPIKey added in v0.26.1

func (*FakeQuerier) InsertAllUsersGroup added in v0.26.1

func (q *FakeQuerier) InsertAllUsersGroup(ctx context.Context, orgID uuid.UUID) (database.Group, error)

func (*FakeQuerier) InsertAuditLog added in v0.26.1

func (*FakeQuerier) InsertDERPMeshKey added in v0.26.1

func (q *FakeQuerier) InsertDERPMeshKey(_ context.Context, id string) error

func (*FakeQuerier) InsertDeploymentID added in v0.26.1

func (q *FakeQuerier) InsertDeploymentID(_ context.Context, id string) error

func (*FakeQuerier) InsertFile added in v0.26.1

func (*FakeQuerier) InsertGitSSHKey added in v0.26.1

func (*FakeQuerier) InsertGroup added in v0.26.1

func (*FakeQuerier) InsertGroupMember added in v0.26.1

func (q *FakeQuerier) InsertGroupMember(_ context.Context, arg database.InsertGroupMemberParams) error

func (*FakeQuerier) InsertLicense added in v0.26.1

func (*FakeQuerier) InsertOrganization added in v0.26.1

func (*FakeQuerier) InsertOrganizationMember added in v0.26.1

func (*FakeQuerier) InsertProvisionerDaemon added in v0.26.1

func (*FakeQuerier) InsertProvisionerJob added in v0.26.1

func (*FakeQuerier) InsertProvisionerJobLogs added in v0.26.1

func (*FakeQuerier) InsertReplica added in v0.26.1

func (*FakeQuerier) InsertTemplate added in v0.26.1

func (q *FakeQuerier) InsertTemplate(_ context.Context, arg database.InsertTemplateParams) error

func (*FakeQuerier) InsertTemplateVersion added in v0.26.1

func (*FakeQuerier) InsertTemplateVersionParameter added in v0.26.1

func (*FakeQuerier) InsertTemplateVersionVariable added in v0.26.1

func (*FakeQuerier) InsertUser added in v0.26.1

func (*FakeQuerier) InsertUserGroupsByName added in v0.26.1

func (q *FakeQuerier) InsertUserGroupsByName(_ context.Context, arg database.InsertUserGroupsByNameParams) error

func (*FakeQuerier) InsertWorkspace added in v0.26.1

func (*FakeQuerier) InsertWorkspaceAgent added in v0.26.1

func (*FakeQuerier) InsertWorkspaceAgentMetadata added in v0.26.1

func (q *FakeQuerier) InsertWorkspaceAgentMetadata(_ context.Context, arg database.InsertWorkspaceAgentMetadataParams) error

func (*FakeQuerier) InsertWorkspaceAgentStartupLogs added in v0.26.1

func (*FakeQuerier) InsertWorkspaceAgentStat added in v0.26.1

func (*FakeQuerier) InsertWorkspaceApp added in v0.26.1

func (*FakeQuerier) InsertWorkspaceBuild added in v0.26.1

func (*FakeQuerier) InsertWorkspaceBuildParameters added in v0.26.1

func (q *FakeQuerier) InsertWorkspaceBuildParameters(_ context.Context, arg database.InsertWorkspaceBuildParametersParams) error

func (*FakeQuerier) InsertWorkspaceProxy added in v0.26.1

func (*FakeQuerier) InsertWorkspaceResource added in v0.26.1

func (*FakeQuerier) InsertWorkspaceResourceMetadata added in v0.26.1

func (*FakeQuerier) Ping added in v0.26.1

func (*FakeQuerier) RegisterWorkspaceProxy added in v0.26.1

func (*FakeQuerier) TryAcquireLock added in v0.26.1

func (*FakeQuerier) TryAcquireLock(_ context.Context, _ int64) (bool, error)

func (*FakeQuerier) UpdateAPIKeyByID added in v0.26.1

func (q *FakeQuerier) UpdateAPIKeyByID(_ context.Context, arg database.UpdateAPIKeyByIDParams) error

func (*FakeQuerier) UpdateGitSSHKey added in v0.26.1

func (*FakeQuerier) UpdateGroupByID added in v0.26.1

func (*FakeQuerier) UpdateMemberRoles added in v0.26.1

func (*FakeQuerier) UpdateProvisionerJobByID added in v0.26.1

func (q *FakeQuerier) UpdateProvisionerJobByID(_ context.Context, arg database.UpdateProvisionerJobByIDParams) error

func (*FakeQuerier) UpdateProvisionerJobWithCancelByID added in v0.26.1

func (q *FakeQuerier) UpdateProvisionerJobWithCancelByID(_ context.Context, arg database.UpdateProvisionerJobWithCancelByIDParams) error

func (*FakeQuerier) UpdateProvisionerJobWithCompleteByID added in v0.26.1

func (q *FakeQuerier) UpdateProvisionerJobWithCompleteByID(_ context.Context, arg database.UpdateProvisionerJobWithCompleteByIDParams) error

func (*FakeQuerier) UpdateReplica added in v0.26.1

func (*FakeQuerier) UpdateTemplateACLByID added in v0.26.1

func (q *FakeQuerier) UpdateTemplateACLByID(_ context.Context, arg database.UpdateTemplateACLByIDParams) error

func (*FakeQuerier) UpdateTemplateActiveVersionByID added in v0.26.1

func (q *FakeQuerier) UpdateTemplateActiveVersionByID(_ context.Context, arg database.UpdateTemplateActiveVersionByIDParams) error

func (*FakeQuerier) UpdateTemplateDeletedByID added in v0.26.1

func (q *FakeQuerier) UpdateTemplateDeletedByID(_ context.Context, arg database.UpdateTemplateDeletedByIDParams) error

func (*FakeQuerier) UpdateTemplateMetaByID added in v0.26.1

func (q *FakeQuerier) UpdateTemplateMetaByID(_ context.Context, arg database.UpdateTemplateMetaByIDParams) error

func (*FakeQuerier) UpdateTemplateScheduleByID added in v0.26.1

func (q *FakeQuerier) UpdateTemplateScheduleByID(_ context.Context, arg database.UpdateTemplateScheduleByIDParams) error

func (*FakeQuerier) UpdateTemplateVersionByID added in v0.26.1

func (*FakeQuerier) UpdateTemplateVersionDescriptionByJobID added in v0.26.1

func (q *FakeQuerier) UpdateTemplateVersionDescriptionByJobID(_ context.Context, arg database.UpdateTemplateVersionDescriptionByJobIDParams) error

func (*FakeQuerier) UpdateTemplateVersionGitAuthProvidersByJobID added in v0.26.1

func (q *FakeQuerier) UpdateTemplateVersionGitAuthProvidersByJobID(_ context.Context, arg database.UpdateTemplateVersionGitAuthProvidersByJobIDParams) error

func (*FakeQuerier) UpdateUserDeletedByID added in v0.26.1

func (q *FakeQuerier) UpdateUserDeletedByID(_ context.Context, params database.UpdateUserDeletedByIDParams) error

func (*FakeQuerier) UpdateUserHashedPassword added in v0.26.1

func (q *FakeQuerier) UpdateUserHashedPassword(_ context.Context, arg database.UpdateUserHashedPasswordParams) error

func (*FakeQuerier) UpdateUserLastSeenAt added in v0.26.1

func (q *FakeQuerier) UpdateUserLastSeenAt(_ context.Context, arg database.UpdateUserLastSeenAtParams) (database.User, error)

func (*FakeQuerier) UpdateUserLinkedID added in v0.26.1

func (q *FakeQuerier) UpdateUserLinkedID(_ context.Context, params database.UpdateUserLinkedIDParams) (database.UserLink, error)

func (*FakeQuerier) UpdateUserLoginType added in v0.26.1

func (q *FakeQuerier) UpdateUserLoginType(_ context.Context, arg database.UpdateUserLoginTypeParams) (database.User, error)

func (*FakeQuerier) UpdateUserProfile added in v0.26.1

func (*FakeQuerier) UpdateUserQuietHoursSchedule added in v0.26.2

func (q *FakeQuerier) UpdateUserQuietHoursSchedule(_ context.Context, arg database.UpdateUserQuietHoursScheduleParams) (database.User, error)

func (*FakeQuerier) UpdateUserRoles added in v0.26.1

func (*FakeQuerier) UpdateUserStatus added in v0.26.1

func (*FakeQuerier) UpdateWorkspace added in v0.26.1

func (*FakeQuerier) UpdateWorkspaceAgentConnectionByID added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceAgentConnectionByID(_ context.Context, arg database.UpdateWorkspaceAgentConnectionByIDParams) error

func (*FakeQuerier) UpdateWorkspaceAgentLifecycleStateByID added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceAgentLifecycleStateByID(_ context.Context, arg database.UpdateWorkspaceAgentLifecycleStateByIDParams) error

func (*FakeQuerier) UpdateWorkspaceAgentMetadata added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceAgentMetadata(_ context.Context, arg database.UpdateWorkspaceAgentMetadataParams) error

func (*FakeQuerier) UpdateWorkspaceAgentStartupByID added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceAgentStartupByID(_ context.Context, arg database.UpdateWorkspaceAgentStartupByIDParams) error

func (*FakeQuerier) UpdateWorkspaceAgentStartupLogOverflowByID added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceAgentStartupLogOverflowByID(_ context.Context, arg database.UpdateWorkspaceAgentStartupLogOverflowByIDParams) error

func (*FakeQuerier) UpdateWorkspaceAppHealthByID added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceAppHealthByID(_ context.Context, arg database.UpdateWorkspaceAppHealthByIDParams) error

func (*FakeQuerier) UpdateWorkspaceAutostart added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceAutostart(_ context.Context, arg database.UpdateWorkspaceAutostartParams) error

func (*FakeQuerier) UpdateWorkspaceBuildByID added in v0.26.1

func (*FakeQuerier) UpdateWorkspaceBuildCostByID added in v0.26.1

func (*FakeQuerier) UpdateWorkspaceDeletedByID added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceDeletedByID(_ context.Context, arg database.UpdateWorkspaceDeletedByIDParams) error

func (*FakeQuerier) UpdateWorkspaceLastUsedAt added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceLastUsedAt(_ context.Context, arg database.UpdateWorkspaceLastUsedAtParams) error

func (*FakeQuerier) UpdateWorkspaceLockedDeletingAt added in v0.26.2

func (q *FakeQuerier) UpdateWorkspaceLockedDeletingAt(_ context.Context, arg database.UpdateWorkspaceLockedDeletingAtParams) error

func (*FakeQuerier) UpdateWorkspaceProxy added in v0.26.1

func (*FakeQuerier) UpdateWorkspaceProxyDeleted added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceProxyDeleted(_ context.Context, arg database.UpdateWorkspaceProxyDeletedParams) error

func (*FakeQuerier) UpdateWorkspaceTTL added in v0.26.1

func (q *FakeQuerier) UpdateWorkspaceTTL(_ context.Context, arg database.UpdateWorkspaceTTLParams) error

func (*FakeQuerier) UpdateWorkspacesDeletingAtByTemplateID added in v0.26.2

func (q *FakeQuerier) UpdateWorkspacesDeletingAtByTemplateID(_ context.Context, arg database.UpdateWorkspacesDeletingAtByTemplateIDParams) error

func (*FakeQuerier) UpsertAppSecurityKey added in v0.26.1

func (q *FakeQuerier) UpsertAppSecurityKey(_ context.Context, data string) error

func (*FakeQuerier) UpsertDefaultProxy added in v0.26.1

func (q *FakeQuerier) UpsertDefaultProxy(_ context.Context, arg database.UpsertDefaultProxyParams) error

func (*FakeQuerier) UpsertLastUpdateCheck added in v0.26.1

func (q *FakeQuerier) UpsertLastUpdateCheck(_ context.Context, data string) error

func (*FakeQuerier) UpsertLogoURL added in v0.26.1

func (q *FakeQuerier) UpsertLogoURL(_ context.Context, data string) error

func (*FakeQuerier) UpsertOAuthSigningKey added in v0.26.1

func (q *FakeQuerier) UpsertOAuthSigningKey(_ context.Context, value string) error

func (*FakeQuerier) UpsertServiceBanner added in v0.26.1

func (q *FakeQuerier) UpsertServiceBanner(_ context.Context, data string) error

func (*FakeQuerier) UpsertTailnetAgent added in v0.26.1

func (*FakeQuerier) UpsertTailnetClient added in v0.26.1

func (*FakeQuerier) UpsertTailnetCoordinator added in v0.26.1

func (*FakeQuerier) UpsertTailnetCoordinator(context.Context, uuid.UUID) (database.TailnetCoordinator, error)

func (*FakeQuerier) Wrappers added in v0.26.1

func (*FakeQuerier) Wrappers() []string

Jump to

Keyboard shortcuts

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