mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 15:51:26 +00:00
* feat(branding): white-label — public /branding, admin write, shell theming app_settings branding.* keys (product name, logo/favicon URLs, accent color, docs/support links). Public GET /branding so login and shell theme pre-auth; admin writes via PUT /settings. useBranding() applies document.title, accent CSS var and favicon; BrandWordmark replaces hardcoded wordmarks; admin Platform settings gain a Branding form. MCP containr_branding_get + settings_update. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * feat(invites): team invite links — admin create/revoke, public accept Admins mint single-use invite links (sha256-hashed token at rest, optional email binding, configurable TTL). Public endpoints let the accept page validate the link and register — working even while public signup is disabled. - migration + sqlc queries/model for user_invites - POST /admin/invites (returns one-time token+url), GET list, DELETE revoke - GET /auth/invites/:token public validation, POST /auth/accept-invite - CLI containr invites list|create|revoke; MCP invites tools - /auth/accept-invite page (expired/used/invalid states, bound-email lock) - Admin page Team invites section: create, copy link, revoke - OpenAPI + generated types + CLI guide Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
133 lines
10 KiB
Go
133 lines
10 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.31.1
|
|
|
|
package sqlcdb
|
|
|
|
import (
|
|
"context"
|
|
"database/sql"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Querier interface {
|
|
CompleteCommand(ctx context.Context, arg CompleteCommandParams) (AgentCommand, error)
|
|
CountDatabaseServicesByUserAndName(ctx context.Context, arg CountDatabaseServicesByUserAndNameParams) (int64, error)
|
|
CountDatabasesUsingBackupTarget(ctx context.Context, targetID sql.NullString) (int64, error)
|
|
CountProjectsByUser(ctx context.Context, arg CountProjectsByUserParams) (int64, error)
|
|
CountServicesByProjectAndName(ctx context.Context, arg CountServicesByProjectAndNameParams) (int64, error)
|
|
CountUnreadNotificationsByUser(ctx context.Context, userID uuid.UUID) (int64, error)
|
|
CreateAgent(ctx context.Context, arg CreateAgentParams) (NodeAgent, error)
|
|
CreateAgentAuthToken(ctx context.Context, arg CreateAgentAuthTokenParams) (AgentAuthToken, error)
|
|
CreateBackupTarget(ctx context.Context, arg CreateBackupTargetParams) error
|
|
CreateBanner(ctx context.Context, arg CreateBannerParams) (Banner, error)
|
|
CreateCommand(ctx context.Context, arg CreateCommandParams) (AgentCommand, error)
|
|
CreateContainer(ctx context.Context, arg CreateContainerParams) (ContainerInstance, error)
|
|
CreateDatabaseBackup(ctx context.Context, arg CreateDatabaseBackupParams) error
|
|
CreateDatabaseService(ctx context.Context, arg CreateDatabaseServiceParams) error
|
|
CreateExternalDatabaseService(ctx context.Context, arg CreateExternalDatabaseServiceParams) error
|
|
CreateNotification(ctx context.Context, arg CreateNotificationParams) error
|
|
CreateOutboundWebhook(ctx context.Context, arg CreateOutboundWebhookParams) error
|
|
CreateProject(ctx context.Context, arg CreateProjectParams) (Project, error)
|
|
CreateServiceFromTemplate(ctx context.Context, arg CreateServiceFromTemplateParams) error
|
|
CreateUserInvite(ctx context.Context, arg CreateUserInviteParams) (UserInvite, error)
|
|
CreateUserTemplate(ctx context.Context, arg CreateUserTemplateParams) error
|
|
CreateUserToken(ctx context.Context, arg CreateUserTokenParams) (UserToken, error)
|
|
CreateWebhookDelivery(ctx context.Context, arg CreateWebhookDeliveryParams) error
|
|
DatabaseServiceExistsByIDAndUser(ctx context.Context, arg DatabaseServiceExistsByIDAndUserParams) (bool, error)
|
|
DeleteAgent(ctx context.Context, id string) error
|
|
DeleteBackupTargetByIDAndUser(ctx context.Context, arg DeleteBackupTargetByIDAndUserParams) error
|
|
DeleteBanner(ctx context.Context, id uuid.UUID) error
|
|
DeleteDatabaseServiceByID(ctx context.Context, id string) error
|
|
DeleteDatabaseServiceByIDAndUser(ctx context.Context, arg DeleteDatabaseServiceByIDAndUserParams) error
|
|
DeleteOutboundWebhookByIDAndUser(ctx context.Context, arg DeleteOutboundWebhookByIDAndUserParams) error
|
|
DeleteProjectByID(ctx context.Context, projectID uuid.UUID) (int64, error)
|
|
DeleteUserInvite(ctx context.Context, id uuid.UUID) error
|
|
DeleteUserTemplate(ctx context.Context, arg DeleteUserTemplateParams) (int64, error)
|
|
GetActiveAgentAuthTokenByHash(ctx context.Context, tokenHash string) (AgentAuthToken, error)
|
|
GetAgent(ctx context.Context, id string) (NodeAgent, error)
|
|
GetAgentByHostAndIP(ctx context.Context, arg GetAgentByHostAndIPParams) (NodeAgent, error)
|
|
GetBackupTargetByID(ctx context.Context, id string) (BackupTarget, error)
|
|
GetBackupTargetByIDAndUser(ctx context.Context, arg GetBackupTargetByIDAndUserParams) (BackupTarget, error)
|
|
GetBannerByID(ctx context.Context, id uuid.UUID) (Banner, error)
|
|
GetCommandForAgent(ctx context.Context, arg GetCommandForAgentParams) (AgentCommand, error)
|
|
GetContainer(ctx context.Context, id string) (ContainerInstance, error)
|
|
GetContainerForAgent(ctx context.Context, arg GetContainerForAgentParams) (ContainerInstance, error)
|
|
GetDatabaseBackupByIDAndDatabaseAndUser(ctx context.Context, arg GetDatabaseBackupByIDAndDatabaseAndUserParams) (DatabaseBackup, error)
|
|
GetDatabaseServiceByID(ctx context.Context, id string) (DatabaseService, error)
|
|
GetDatabaseServiceByIDAndUser(ctx context.Context, arg GetDatabaseServiceByIDAndUserParams) (DatabaseService, error)
|
|
GetDatabaseServiceOwnerID(ctx context.Context, id string) (string, error)
|
|
GetOutboundWebhookByID(ctx context.Context, id uuid.UUID) (OutboundWebhook, error)
|
|
GetOutboundWebhookByIDAndUser(ctx context.Context, arg GetOutboundWebhookByIDAndUserParams) (OutboundWebhook, error)
|
|
GetProjectByIDForUser(ctx context.Context, arg GetProjectByIDForUserParams) (Project, error)
|
|
GetProjectOwnerByID(ctx context.Context, projectID uuid.UUID) (uuid.UUID, error)
|
|
GetProjectOwnerID(ctx context.Context, id uuid.UUID) (uuid.UUID, error)
|
|
GetProjectRoleForUser(ctx context.Context, arg GetProjectRoleForUserParams) (string, error)
|
|
GetServiceTemplateByID(ctx context.Context, id string) (ServiceTemplate, error)
|
|
GetUserInviteByTokenHash(ctx context.Context, tokenHash string) (UserInvite, error)
|
|
GetUserTokenByHash(ctx context.Context, tokenHash string) (UserToken, error)
|
|
InsertAgentHeartbeat(ctx context.Context, arg InsertAgentHeartbeatParams) error
|
|
InsertProjectEnvironment(ctx context.Context, arg InsertProjectEnvironmentParams) error
|
|
ListActiveBanners(ctx context.Context) ([]Banner, error)
|
|
ListAgentAuthTokens(ctx context.Context) ([]AgentAuthToken, error)
|
|
ListAgentHeartbeatsSince(ctx context.Context, arg ListAgentHeartbeatsSinceParams) ([]AgentHeartbeat, error)
|
|
ListAgents(ctx context.Context) ([]NodeAgent, error)
|
|
ListAllDatabaseServices(ctx context.Context) ([]DatabaseService, error)
|
|
ListBackupTargetsByUser(ctx context.Context, userID string) ([]BackupTarget, error)
|
|
ListBanners(ctx context.Context) ([]Banner, error)
|
|
ListCommandsForAgent(ctx context.Context, nodeAgentID string) ([]AgentCommand, error)
|
|
ListContainersForAgent(ctx context.Context, nodeAgentID string) ([]ContainerInstance, error)
|
|
ListDatabaseBackupsByDatabaseAndUser(ctx context.Context, arg ListDatabaseBackupsByDatabaseAndUserParams) ([]DatabaseBackup, error)
|
|
ListDatabaseServicesByProject(ctx context.Context, projectID uuid.NullUUID) ([]DatabaseService, error)
|
|
ListDatabaseServicesByUser(ctx context.Context, userID string) ([]DatabaseService, error)
|
|
ListDueDatabaseBackups(ctx context.Context) ([]ListDueDatabaseBackupsRow, error)
|
|
ListEnabledOutboundWebhooks(ctx context.Context) ([]OutboundWebhook, error)
|
|
ListNotificationsByUser(ctx context.Context, arg ListNotificationsByUserParams) ([]Notification, error)
|
|
ListOutboundWebhooksByUser(ctx context.Context, userID uuid.UUID) ([]OutboundWebhook, error)
|
|
ListPendingCommands(ctx context.Context, nodeAgentID string) ([]AgentCommand, error)
|
|
ListPendingProjects(ctx context.Context) ([]Project, error)
|
|
// Visibility model: a project is readable when it is approved for public
|
|
// display, when the caller owns or is a member of it, or when the caller is a
|
|
// platform admin. Anonymous callers pass user_id = uuid.Nil, is_admin = false.
|
|
ListProjectsWithStatsByUser(ctx context.Context, arg ListProjectsWithStatsByUserParams) ([]ListProjectsWithStatsByUserRow, error)
|
|
ListServiceTemplatesByCategoryForUser(ctx context.Context, arg ListServiceTemplatesByCategoryForUserParams) ([]ServiceTemplate, error)
|
|
ListServiceTemplatesForUser(ctx context.Context, ownerID uuid.NullUUID) ([]ServiceTemplate, error)
|
|
ListUserInvites(ctx context.Context) ([]UserInvite, error)
|
|
ListUserTokens(ctx context.Context, userID uuid.UUID) ([]UserToken, error)
|
|
ListWebhookDeliveriesByWebhook(ctx context.Context, webhookID uuid.UUID) ([]WebhookDelivery, error)
|
|
MarkAllNotificationsReadByUser(ctx context.Context, arg MarkAllNotificationsReadByUserParams) error
|
|
MarkNotificationReadByIDAndUser(ctx context.Context, arg MarkNotificationReadByIDAndUserParams) error
|
|
MarkUserInviteUsed(ctx context.Context, arg MarkUserInviteUsedParams) error
|
|
RevokeAgentAuthToken(ctx context.Context, id uuid.UUID) (AgentAuthToken, error)
|
|
RevokeUserToken(ctx context.Context, arg RevokeUserTokenParams) (int64, error)
|
|
SetDatabaseBackupRemoteKeyByID(ctx context.Context, arg SetDatabaseBackupRemoteKeyByIDParams) error
|
|
SetDatabaseBackupScheduleByIDAndUser(ctx context.Context, arg SetDatabaseBackupScheduleByIDAndUserParams) error
|
|
SetDatabaseBackupStatusByID(ctx context.Context, arg SetDatabaseBackupStatusByIDParams) error
|
|
SetDatabaseBackupTargetByIDAndUser(ctx context.Context, arg SetDatabaseBackupTargetByIDAndUserParams) error
|
|
SetDatabaseNextBackupAt(ctx context.Context, arg SetDatabaseNextBackupAtParams) error
|
|
SetDatabaseServicePublicPortByIDAndUser(ctx context.Context, arg SetDatabaseServicePublicPortByIDAndUserParams) error
|
|
SetDatabaseServiceStatusAndConnectionByID(ctx context.Context, arg SetDatabaseServiceStatusAndConnectionByIDParams) error
|
|
SetDatabaseServiceStatusByID(ctx context.Context, arg SetDatabaseServiceStatusByIDParams) error
|
|
SetDatabaseServiceStatusByIDAndUser(ctx context.Context, arg SetDatabaseServiceStatusByIDAndUserParams) error
|
|
SetProjectApproved(ctx context.Context, arg SetProjectApprovedParams) (int64, error)
|
|
TouchAgentAuthToken(ctx context.Context, tokenHash string) error
|
|
TouchUserToken(ctx context.Context, id uuid.UUID) error
|
|
UpdateAgent(ctx context.Context, arg UpdateAgentParams) (NodeAgent, error)
|
|
UpdateAgentHeartbeat(ctx context.Context, arg UpdateAgentHeartbeatParams) error
|
|
UpdateBackupTargetByIDAndUser(ctx context.Context, arg UpdateBackupTargetByIDAndUserParams) error
|
|
UpdateBanner(ctx context.Context, arg UpdateBannerParams) (Banner, error)
|
|
UpdateContainerStatus(ctx context.Context, arg UpdateContainerStatusParams) error
|
|
UpdateDatabaseServiceNameAndPlanByIDAndUser(ctx context.Context, arg UpdateDatabaseServiceNameAndPlanByIDAndUserParams) error
|
|
UpdateDatabaseServiceNameByIDAndUser(ctx context.Context, arg UpdateDatabaseServiceNameByIDAndUserParams) error
|
|
UpdateDatabaseServicePlanByIDAndUser(ctx context.Context, arg UpdateDatabaseServicePlanByIDAndUserParams) error
|
|
UpdateOutboundWebhook(ctx context.Context, arg UpdateOutboundWebhookParams) error
|
|
UpdateProjectByID(ctx context.Context, arg UpdateProjectByIDParams) (int64, error)
|
|
UpdateUserTemplate(ctx context.Context, arg UpdateUserTemplateParams) (int64, error)
|
|
UpdateWebhookDeliveryResult(ctx context.Context, arg UpdateWebhookDeliveryResultParams) error
|
|
UpsertEnvironmentVariable(ctx context.Context, arg UpsertEnvironmentVariableParams) error
|
|
UpsertServiceTemplate(ctx context.Context, arg UpsertServiceTemplateParams) error
|
|
}
|
|
|
|
var _ Querier = (*Queries)(nil)
|