Documentation
¶
Index ¶
- Constants
- func IsValidNotificationProvider(provider NotificationProvider) bool
- type APIError
- type APIErrorCode
- type APIErrorResponse
- type APISuccessResponse
- type Activity
- type ActivityMessage
- type ActivityMessageLevel
- type ActivityStatus
- type ActivityType
- type ApiKey
- type ApiKeyPermission
- type AuthTransaction
- type AutoUpdateRecord
- type AutoUpdateStatus
- type BaseModel
- type ComposeTemplate
- type ComposeTemplateMetadata
- type ContainerRegistry
- type CreateContainerRegistryRequest
- type CreateGitRepositoryRequest
- type CurrentUserContextKey
- type CustomizeItem
- type CustomizeVariable
- type DiscordConfig
- type DockerAPIError
- type EmailAuthMode
- type EmailConfig
- type EmailTLSMode
- type Environment
- type EnvironmentStatus
- type EnvironmentUpdateJob
- type EnvironmentUpdateJobStatus
- type EnvironmentUpdateResult
- type EnvironmentUpdateResultStatus
- type EnvironmentUpdateResults
- type Event
- type EventSeverity
- type EventType
- type FederatedCredential
- type FederatedTokenReplay
- type GenericConfig
- type GitOpsSync
- type GitRepository
- type GlobalVariable
- type GoogleChatConfig
- type GotifyConfig
- type ImageBuild
- type ImageBuildStatus
- type ImageUpdate
- type ImageUpdateRecord
- type JSON
- type KVEntry
- type MatrixConfig
- type NotificationEventType
- type NotificationProvider
- type NotificationSettings
- type NtfyConfig
- type OidcConfig
- type OidcRoleMapping
- type Passkey
- type PasskeyCeremony
- type PasskeyRecoveryCode
- type Project
- type ProjectStatus
- type PushoverConfig
- type Role
- type SettingKeyNotFoundError
- type SettingSensitiveForbiddenError
- type SettingVariable
- type SettingVisibility
- type Settings
- func (s *Settings) Clone() *Settings
- func (s *Settings) FieldByKey(key string) (defaultValue string, isPublic bool, isSensitive bool, err error)
- func (s *Settings) ToSettingVariableSlice(visibility SettingVisibility, redactSensitiveValues bool) []SettingVariable
- func (s *Settings) UpdateField(key string, value string, noSensitive bool) error
- type SignalConfig
- type SlackConfig
- type StringSlice
- type TelegramConfig
- type TemplateRegistry
- type UpdateContainerRegistryRequest
- type UpdateGitRepositoryRequest
- type User
- type UserAvatar
- type UserRoleAssignment
- type UserSession
- type VolumeBackup
- type VulnerabilityIgnore
- type VulnerabilityScanRecord
- func (v *VulnerabilityScanRecord) GetHighestSeverity() string
- func (v *VulnerabilityScanRecord) GetTotalVulnerabilities() int
- func (v *VulnerabilityScanRecord) IsCompleted() bool
- func (v *VulnerabilityScanRecord) IsFailed() bool
- func (v *VulnerabilityScanRecord) IsScanning() bool
- func (v *VulnerabilityScanRecord) TableName() string
- type Webhook
Constants ¶
const ( // ApiKeyKindScoped keys carry their own permission grant rows. ApiKeyKindScoped = "scoped" // ApiKeyKindPersonal keys have no grants; they inherit the owner's role // permissions at authentication time. ApiKeyKindPersonal = "personal" )
const ( // EventTypeContainerStart and the constants below enumerate Arcane event types. EventTypeContainerStart EventType = "container.start" EventTypeContainerStop EventType = "container.stop" EventTypeContainerRestart EventType = "container.restart" EventTypeContainerDelete EventType = "container.delete" EventTypeContainerCreate EventType = "container.create" EventTypeContainerScan EventType = "container.scan" EventTypeContainerUpdate EventType = "container.update" EventTypeContainerDeploy EventType = "container.deploy" EventTypeContainerKill EventType = "container.kill" EventTypeContainerPause EventType = "container.pause" EventTypeContainerUnpause EventType = "container.unpause" EventTypeContainerError EventType = "container.error" EventTypeImagePull EventType = "image.pull" EventTypeImageLoad EventType = "image.load" EventTypeImageTag EventType = "image.tag" EventTypeImageCommit EventType = "image.commit" EventTypeImageDelete EventType = "image.delete" EventTypeImageScan EventType = "image.scan" EventTypeImageError EventType = "image.error" EventTypeImageVulnerabilityScan EventType = "image.vulnerability_scan" EventTypeProjectDeploy EventType = "project.deploy" EventTypeProjectDelete EventType = "project.delete" EventTypeProjectStart EventType = "project.start" EventTypeProjectStop EventType = "project.stop" EventTypeProjectCreate EventType = "project.create" EventTypeProjectUpdate EventType = "project.update" EventTypeProjectError EventType = "project.error" EventTypeGitRepositoryCreate EventType = "git.repository.create" EventTypeGitRepositoryUpdate EventType = "git.repository.update" EventTypeGitRepositoryDelete EventType = "git.repository.delete" EventTypeGitRepositoryTest EventType = "git.repository.test" EventTypeGitRepositoryError EventType = "git.repository.error" EventTypeGitSyncCreate EventType = "git.sync.create" EventTypeGitSyncUpdate EventType = "git.sync.update" EventTypeGitSyncDelete EventType = "git.sync.delete" EventTypeGitSyncRun EventType = "git.sync.run" EventTypeGitSyncError EventType = "git.sync.error" EventTypeVolumeCreate EventType = "volume.create" EventTypeVolumeDelete EventType = "volume.delete" EventTypeVolumeError EventType = "volume.error" EventTypeVolumeFileCreate EventType = "volume.file.create" EventTypeVolumeFileDelete EventType = "volume.file.delete" EventTypeVolumeFileUpload EventType = "volume.file.upload" EventTypeVolumeBackupCreate EventType = "volume.backup.create" EventTypeVolumeBackupDelete EventType = "volume.backup.delete" EventTypeVolumeBackupRestore EventType = "volume.backup.restore" EventTypeVolumeBackupRestoreFiles EventType = "volume.backup.restore_files" EventTypeVolumeBackupDownload EventType = "volume.backup.download" EventTypeNetworkCreate EventType = "network.create" EventTypeNetworkDelete EventType = "network.delete" EventTypeNetworkError EventType = "network.error" EventTypeSystemPrune EventType = "system.prune" EventTypeUserLogin EventType = "user.login" EventTypeUserLogout EventType = "user.logout" EventTypeFederatedExchange EventType = "federated.exchange" EventTypeSystemAutoUpdate EventType = "system.auto_update" EventTypeSystemUpgrade EventType = "system.upgrade" EventTypeEnvironmentCreate EventType = "environment.create" EventTypeEnvironmentConnect EventType = "environment.connect" EventTypeEnvironmentDisconnect EventType = "environment.disconnect" EventTypeEnvironmentUpdate EventType = "environment.update" EventTypeEnvironmentDelete EventType = "environment.delete" EventTypeEnvironmentApiKeyRegenerated EventType = "environment.api_key.regenerated" EventTypeEnvironmentMTLSCAGenerated EventType = "environment.mtls.ca_generated" EventTypeEnvironmentMTLSCertIssued EventType = "environment.mtls.cert_issued" EventTypeEnvironmentMTLSEnroll EventType = "environment.mtls.enroll" EventTypeEnvironmentMTLSDownload EventType = "environment.mtls.download" EventTypeWebhookCreate EventType = "webhook.create" EventTypeWebhookUpdate EventType = "webhook.update" EventTypeWebhookDelete EventType = "webhook.delete" EventTypeWebhookTrigger EventType = "webhook.trigger" // EventTypeNotificationSend is emitted for every notification delivery // attempt; severity is success or error depending on the send result. EventTypeNotificationSend EventType = "notification.send" // EventTypeLifecycleExecute is emitted by LifecycleService each time a // pre-deploy script runs. Severity is success on a clean exit and warning // on non-zero exit or timeout. EventTypeLifecycleExecute EventType = "lifecycle.execute" // EventSeverityInfo and the constants below enumerate event severities. EventSeverityInfo EventSeverity = "info" EventSeverityWarning EventSeverity = "warning" EventSeverityError EventSeverity = "error" EventSeveritySuccess EventSeverity = "success" )
const ( FederatedCredentialMatchExact = "exact" FederatedCredentialMatchGlob = "glob" )
const ( UpdateTypeDigest = "digest" UpdateTypeTag = "tag" UpdateTypeLocal = "local" )
const ( RoleAssignmentSourceManual = "manual" RoleAssignmentSourceOidc = "oidc" )
Assignment source values stored in UserRoleAssignment.Source.
const ( OidcMappingSourceManual = "manual" OidcMappingSourceEnv = "env" )
const ( UserSessionSourceLocal = "local" UserSessionSourceOidc = "oidc" UserSessionSourceFederated = "federated" UserSessionSourcePasskey = "passkey" )
const ( ScanStatusPending = "pending" ScanStatusScanning = "scanning" ScanStatusCompleted = "completed" ScanStatusFailed = "failed" )
Scan status constants
const ( WebhookTargetTypeContainer = "container" WebhookTargetTypeProject = "project" WebhookTargetTypeUpdater = "updater" WebhookTargetTypeGitOps = "gitops" WebhookActionTypeUpdate = "update" WebhookActionTypeStart = "start" WebhookActionTypeStop = "stop" WebhookActionTypeRestart = "restart" WebhookActionTypeRedeploy = "redeploy" WebhookActionTypeUp = "up" WebhookActionTypeDown = "down" WebhookActionTypeRun = "run" WebhookActionTypeSync = "sync" )
Variables ¶
This section is empty.
Functions ¶
func IsValidNotificationProvider ¶
func IsValidNotificationProvider(provider NotificationProvider) bool
Types ¶
type APIError ¶
type APIError struct {
Message string `json:"message"`
Code APIErrorCode `json:"code"`
StatusCode int `json:"statusCode"`
Details any `json:"details,omitempty"`
}
func NewAPIError ¶
func NewAPIError(message string, code APIErrorCode, statusCode int) *APIError
NewAPIError creates a new APIError
func NewAPIErrorWithDetails ¶
func NewAPIErrorWithDetails(message string, code APIErrorCode, statusCode int, details any) *APIError
func ToAPIError ¶
func (*APIError) HTTPStatus ¶
type APIErrorCode ¶
type APIErrorCode string
const ( APIErrorCodeBadRequest APIErrorCode = "BAD_REQUEST" APIErrorCodeForbidden APIErrorCode = "FORBIDDEN" APIErrorCodeNotFound APIErrorCode = "NOT_FOUND" APIErrorCodeConflict APIErrorCode = "CONFLICT" APIErrorCodeInternalServerError APIErrorCode = "INTERNAL_SERVER_ERROR" APIErrorCodeDockerAPIError APIErrorCode = "DOCKER_API_ERROR" APIErrorCodeValidationError APIErrorCode = "VALIDATION_ERROR" APIErrorCodeTimeout APIErrorCode = "TIMEOUT" )
type APIErrorResponse ¶
type APIErrorResponse struct {
Success bool `json:"success"`
Error string `json:"error"`
Code APIErrorCode `json:"code"`
Details any `json:"details,omitempty"`
}
type APISuccessResponse ¶
type Activity ¶
type Activity struct {
BaseModel
EnvironmentID string `json:"environmentId" gorm:"column:environment_id;not null;index" sortable:"true"`
BatchID *string `json:"batchId,omitempty" gorm:"column:batch_id;index"`
Type ActivityType `json:"type" gorm:"column:type;not null;index" sortable:"true"`
Status ActivityStatus `json:"status" gorm:"column:status;not null;index" sortable:"true"`
ResourceType *string `json:"resourceType,omitempty" gorm:"column:resource_type;index" sortable:"true"`
ResourceID *string `json:"resourceId,omitempty" gorm:"column:resource_id;index"`
ResourceName *string `json:"resourceName,omitempty" gorm:"column:resource_name" sortable:"true"`
Progress *int `json:"progress,omitempty" gorm:"column:progress"`
Step string `json:"step,omitempty" gorm:"column:step"`
LatestMessage string `json:"latestMessage,omitempty" gorm:"column:latest_message"`
StartedByUserID *string `json:"startedByUserId,omitempty" gorm:"column:started_by_user_id;index"`
StartedByUsername *string `json:"startedByUsername,omitempty" gorm:"column:started_by_username"`
StartedByDisplayName *string `json:"startedByDisplayName,omitempty" gorm:"column:started_by_display_name"`
StartedAt time.Time `json:"startedAt" gorm:"column:started_at;not null" sortable:"true"`
EndedAt *time.Time `json:"endedAt,omitempty" gorm:"column:ended_at" sortable:"true"`
DurationMs *int64 `json:"durationMs,omitempty" gorm:"column:duration_ms" sortable:"true"`
Error *string `json:"error,omitempty" gorm:"column:error"`
Metadata JSON `json:"metadata,omitempty" gorm:"type:text"`
}
type ActivityMessage ¶
type ActivityMessage struct {
BaseModel
ActivityID string `json:"activityId" gorm:"column:activity_id;not null;index"`
Level ActivityMessageLevel `json:"level" gorm:"column:level;not null"`
Message string `json:"message" gorm:"column:message;not null"`
Payload JSON `json:"payload,omitempty" gorm:"type:text"`
Activity *Activity `json:"-" gorm:"foreignKey:ActivityID;constraint:OnDelete:CASCADE"`
}
func (ActivityMessage) TableName ¶
func (ActivityMessage) TableName() string
type ActivityMessageLevel ¶
type ActivityMessageLevel string
const ( ActivityMessageLevelInfo ActivityMessageLevel = "info" ActivityMessageLevelWarning ActivityMessageLevel = "warning" ActivityMessageLevelError ActivityMessageLevel = "error" ActivityMessageLevelSuccess ActivityMessageLevel = "success" )
type ActivityStatus ¶
type ActivityStatus string
const ( ActivityStatusQueued ActivityStatus = "queued" ActivityStatusRunning ActivityStatus = "running" ActivityStatusSuccess ActivityStatus = "success" ActivityStatusFailed ActivityStatus = "failed" ActivityStatusCancelled ActivityStatus = "cancelled" )
type ActivityType ¶
type ActivityType string
const ( ActivityTypeImagePull ActivityType = "image_pull" ActivityTypeImageBuild ActivityType = "image_build" ActivityTypeImageUpdateCheck ActivityType = "image_update_check" ActivityTypeProjectPull ActivityType = "project_pull" ActivityTypeProjectBuild ActivityType = "project_build" ActivityTypeProjectDeploy ActivityType = "project_deploy" ActivityTypeProjectRedeploy ActivityType = "project_redeploy" ActivityTypeProjectDown ActivityType = "project_down" ActivityTypeProjectRestart ActivityType = "project_restart" ActivityTypeProjectDestroy ActivityType = "project_destroy" ActivityTypeContainerStart ActivityType = "container_start" ActivityTypeContainerStop ActivityType = "container_stop" ActivityTypeContainerRestart ActivityType = "container_restart" ActivityTypeContainerRedeploy ActivityType = "container_redeploy" ActivityTypeContainerDelete ActivityType = "container_delete" ActivityTypeContainerKill ActivityType = "container_kill" ActivityTypeContainerPause ActivityType = "container_pause" ActivityTypeContainerUnpause ActivityType = "container_unpause" ActivityTypeVulnerabilityScan ActivityType = "vulnerability_scan" ActivityTypeAutoUpdate ActivityType = "auto_update" ActivityTypeSystemPrune ActivityType = "system_prune" ActivityTypeResourceAction ActivityType = "resource_action" )
type ApiKey ¶
type ApiKey struct {
BaseModel
Name string `json:"name" gorm:"column:name;not null" sortable:"true"`
Description *string `json:"description,omitempty" gorm:"column:description"`
KeyHash string `json:"-" gorm:"column:key_hash;not null"`
KeyPrefix string `json:"keyPrefix" gorm:"column:key_prefix;not null"`
ManagedBy *string `json:"-" gorm:"column:managed_by"`
Kind string `json:"kind" gorm:"column:kind;not null;default:scoped"`
UserID *string `json:"userId,omitempty" gorm:"column:user_id"`
EnvironmentID *string `json:"environmentId,omitempty" gorm:"column:environment_id"`
ExpiresAt *time.Time `json:"expiresAt,omitempty" gorm:"column:expires_at" sortable:"true"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty" gorm:"column:last_used_at" sortable:"true"`
PermissionGrants []ApiKeyPermission `json:"-" gorm:"foreignKey:ApiKeyID;references:ID;constraint:OnDelete:CASCADE"`
}
type ApiKeyPermission ¶
type ApiKeyPermission struct {
BaseModel
ApiKeyID string `json:"apiKeyId" gorm:"column:api_key_id;not null;index"`
Permission string `json:"permission" gorm:"column:permission;not null"`
EnvironmentID *string `json:"environmentId,omitempty" gorm:"column:environment_id"`
}
ApiKeyPermission is one permission grant on an API key, optionally scoped to a single environment. Permissions are stored per-row (rather than as a JSON column on api_keys) so we can index by (api_key_id, permission) for fast lookups in the auth bridge.
func (ApiKeyPermission) TableName ¶
func (ApiKeyPermission) TableName() string
type AuthTransaction ¶ added in v2.7.0
type AuthTransaction struct {
BaseModel
Kind string `json:"kind" gorm:"column:kind;not null;index"`
UserID string `json:"userId" gorm:"column:user_id;not null;index"`
SessionID *string `json:"sessionId,omitempty" gorm:"column:session_id;index"`
Source string `json:"source" gorm:"column:source;not null"`
UserAgent *string `json:"-" gorm:"column:user_agent"`
IPAddress *string `json:"-" gorm:"column:ip_address"`
SecretHash *string `json:"-" gorm:"column:secret_hash;index"`
Status string `json:"status" gorm:"column:status;not null;index"`
ExpiresAt time.Time `json:"expiresAt" gorm:"column:expires_at;not null;index"`
CompletedAt *time.Time `json:"completedAt,omitempty" gorm:"column:completed_at"`
}
AuthTransaction links a primary authentication result to its pending passkey MFA or step-up ceremony. The client receives only ID/secret values; primary credentials and WebAuthn SessionData remain server-side.
func (AuthTransaction) TableName ¶ added in v2.7.0
func (AuthTransaction) TableName() string
type AutoUpdateRecord ¶
type AutoUpdateRecord struct {
BaseModel
ResourceID string `json:"resourceId"`
ResourceType string `json:"resourceType"`
ResourceName string `json:"resourceName"`
Status AutoUpdateStatus `json:"status"`
StartTime time.Time `json:"startTime"`
EndTime *time.Time `json:"endTime,omitempty"`
UpdateAvailable bool `json:"updateAvailable"`
UpdateApplied bool `json:"updateApplied"`
OldImageVersions JSON `json:"oldImageVersions,omitempty" gorm:"type:text"`
NewImageVersions JSON `json:"newImageVersions,omitempty" gorm:"type:text"`
Error *string `json:"error,omitempty"`
Details JSON `json:"details,omitempty" gorm:"type:text"`
}
func (AutoUpdateRecord) TableName ¶
func (AutoUpdateRecord) TableName() string
type AutoUpdateStatus ¶
type AutoUpdateStatus string
const ( AutoUpdateStatusPending AutoUpdateStatus = "pending" AutoUpdateStatusChecking AutoUpdateStatus = "checking" AutoUpdateStatusUpdating AutoUpdateStatus = "updating" AutoUpdateStatusCompleted AutoUpdateStatus = "completed" AutoUpdateStatusFailed AutoUpdateStatus = "failed" AutoUpdateStatusSkipped AutoUpdateStatus = "skipped" AutoUpdateStatusRestarted AutoUpdateStatus = "restarted" )
type BaseModel ¶
type ComposeTemplate ¶
type ComposeTemplate struct {
BaseModel
Name string `json:"name"`
Description string `json:"description"`
Content string `json:"content" gorm:"type:text"`
EnvContent *string `json:"envContent,omitempty" gorm:"type:text"`
IsCustom bool `json:"isCustom"`
IsRemote bool `json:"isRemote"`
RegistryID *string `json:"registryId,omitempty"`
Registry *TemplateRegistry `json:"registry,omitempty" gorm:"foreignKey:RegistryID;references:ID"`
Metadata *ComposeTemplateMetadata `json:"metadata,omitempty" gorm:"embedded;embeddedPrefix:meta_"`
}
func (ComposeTemplate) TableName ¶
func (ComposeTemplate) TableName() string
type ComposeTemplateMetadata ¶
type ComposeTemplateMetadata struct {
Version *string `json:"version,omitempty"`
Author *string `json:"author,omitempty"`
Tags []string `json:"tags,omitempty" gorm:"serializer:json"`
RemoteURL *string `json:"remoteUrl,omitempty"`
EnvURL *string `json:"envUrl,omitempty"`
DocumentationURL *string `json:"documentationUrl,omitempty"`
IconURL *string `json:"iconUrl,omitempty"`
}
type ContainerRegistry ¶
type ContainerRegistry struct {
BaseModel
URL string `json:"url" sortable:"true"`
Username string `json:"username" sortable:"true"`
Token string `json:"token"`
Description *string `json:"description,omitempty" sortable:"true"`
Insecure bool `json:"insecure" sortable:"true"`
Enabled bool `json:"enabled" sortable:"true"`
RegistryType string `json:"registryType" sortable:"true"`
RepositoryNames StringSlice `json:"repositoryNames" gorm:"column:repository_names;type:text;not null;default:'[]'"`
AWSAccessKeyID string `json:"awsAccessKeyId"`
AWSSecretAccessKey string `json:"awsSecretAccessKey"`
AWSRegion string `json:"awsRegion"`
ECRToken string `json:"ecrToken"`
ECRTokenGeneratedAt *time.Time `json:"ecrTokenGeneratedAt"`
CreatedAt time.Time `json:"createdAt" sortable:"true"`
UpdatedAt time.Time `json:"updatedAt" sortable:"true"`
}
func (ContainerRegistry) TableName ¶
func (ContainerRegistry) TableName() string
type CreateContainerRegistryRequest ¶
type CreateContainerRegistryRequest struct {
URL string `json:"url" binding:"required"`
Username string `json:"username"`
Token string `json:"token"`
Description *string `json:"description"`
Insecure *bool `json:"insecure"`
Enabled *bool `json:"enabled"`
RegistryType string `json:"registryType"`
RepositoryNames []string `json:"repositoryNames"`
AWSAccessKeyID string `json:"awsAccessKeyId"`
AWSSecretAccessKey string `json:"awsSecretAccessKey"`
AWSRegion string `json:"awsRegion"`
}
type CreateGitRepositoryRequest ¶
type CreateGitRepositoryRequest struct {
Name string `json:"name" binding:"required"`
URL string `json:"url" binding:"required"`
AuthType string `json:"authType" binding:"required,oneof=none http ssh"`
Username string `json:"username,omitempty"`
Token string `json:"token,omitempty"`
SSHKey string `json:"sshKey,omitempty"`
SSHHostKeyVerification string `json:"sshHostKeyVerification,omitempty" binding:"omitempty,oneof=strict accept_new skip"`
Description *string `json:"description,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
}
type CurrentUserContextKey ¶ added in v2.7.0
type CurrentUserContextKey struct{}
CurrentUserContextKey is the context key holding the authenticated user model, set via context.WithValue(ctx, models.CurrentUserContextKey{}, user). It lives here (rather than in api/middleware) so that services, which cannot import the middleware package, can read the requesting user for per-user preferences.
type CustomizeItem ¶
type CustomizeItem struct {
// Defaults category
DefaultProjectTemplate CustomizeVariable `` /* 213-byte string literal not displayed */
DefaultContainerSettings CustomizeVariable `` /* 222-byte string literal not displayed */
DefaultNetworkMode CustomizeVariable `` /* 201-byte string literal not displayed */
// Templates category
CustomTemplates CustomizeVariable `` /* 346-byte string literal not displayed */
TemplateCategories CustomizeVariable `` /* 196-byte string literal not displayed */
TemplateValidation CustomizeVariable `` /* 190-byte string literal not displayed */
// Registries category
ContainerRegistries CustomizeVariable `` /* 363-byte string literal not displayed */
RegistryCredentials CustomizeVariable `` /* 218-byte string literal not displayed */
RegistryMirrors CustomizeVariable `` /* 187-byte string literal not displayed */
// Variables category
GlobalVariables CustomizeVariable `` /* 346-byte string literal not displayed */
SecretVariables CustomizeVariable `` /* 196-byte string literal not displayed */
VariableTemplates CustomizeVariable `` /* 202-byte string literal not displayed */
// Git repositories category
GitRepositories CustomizeVariable `` /* 398-byte string literal not displayed */
GitRepositoryDefaults CustomizeVariable `` /* 220-byte string literal not displayed */
GitRepositoryTemplates CustomizeVariable `` /* 205-byte string literal not displayed */
}
CustomizeItem represents a customization configuration item This struct uses reflection tags to define customization categories and metadata Categories must be grouped together and use `catmeta` tag for category-level metadata
type CustomizeVariable ¶
type CustomizeVariable struct {
Value string
}
type DiscordConfig ¶
type DockerAPIError ¶
func (*DockerAPIError) Error ¶
func (e *DockerAPIError) Error() string
func (*DockerAPIError) HTTPStatus ¶
func (e *DockerAPIError) HTTPStatus() int
type EmailAuthMode ¶
type EmailAuthMode string
const ( EmailAuthModeNone EmailAuthMode = "none" EmailAuthModeAuto EmailAuthMode = "auto" EmailAuthModePlain EmailAuthMode = "plain" EmailAuthModeLogin EmailAuthMode = "login" EmailAuthModeCRAMMD5 EmailAuthMode = "crammd5" )
type EmailConfig ¶
type EmailConfig struct {
SMTPHost string `json:"smtpHost"`
SMTPPort int `json:"smtpPort"`
SMTPUsername string `json:"smtpUsername"`
SMTPPassword string `json:"smtpPassword"`
FromAddress string `json:"fromAddress"`
ToAddresses []string `json:"toAddresses"`
TLSMode EmailTLSMode `json:"tlsMode"`
AuthMode EmailAuthMode `json:"authMode,omitempty"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type EmailTLSMode ¶
type EmailTLSMode string
const ( EmailTLSModeNone EmailTLSMode = "none" EmailTLSModeStartTLS EmailTLSMode = "starttls" EmailTLSModeSSL EmailTLSMode = "ssl" )
type Environment ¶
type Environment struct {
BaseModel
Name string `json:"name" sortable:"true"`
ApiUrl string `json:"apiUrl" gorm:"column:api_url" sortable:"true"`
Status string `json:"status" sortable:"true"`
Enabled bool `json:"enabled" sortable:"true"`
IsEdge bool `json:"isEdge" gorm:"column:is_edge;default:false"`
Hidden bool `json:"hidden" gorm:"column:hidden;default:false"`
LastSeen *time.Time `json:"lastSeen" gorm:"column:last_seen"`
LastEdgeTransport *string `json:"lastEdgeTransport" gorm:"column:last_edge_transport"`
AccessToken *string `json:"-" gorm:"column:access_token"`
ApiKeyID *string `json:"-" gorm:"column:api_key_id"`
ParentEnvironmentID *string `json:"-" gorm:"column:parent_environment_id"`
SwarmNodeID *string `json:"-" gorm:"column:swarm_node_id"`
}
func (Environment) TableName ¶
func (Environment) TableName() string
type EnvironmentStatus ¶
type EnvironmentStatus string
const ( EnvironmentStatusOnline EnvironmentStatus = "online" EnvironmentStatusStandby EnvironmentStatus = "standby" EnvironmentStatusOffline EnvironmentStatus = "offline" EnvironmentStatusError EnvironmentStatus = "error" EnvironmentStatusPending EnvironmentStatus = "pending" )
type EnvironmentUpdateJob ¶ added in v2.1.0
type EnvironmentUpdateJob struct {
BaseModel
Status EnvironmentUpdateJobStatus `json:"status" gorm:"column:status"`
UserID string `json:"userId" gorm:"column:user_id"`
Username string `json:"username" gorm:"column:username"`
ManagerVersionAtStart string `json:"managerVersionAtStart" gorm:"column:manager_version_at_start"`
ManagerDigestAtStart string `json:"managerDigestAtStart" gorm:"column:manager_digest_at_start"`
ManagerTargetVersion string `json:"managerTargetVersion" gorm:"column:manager_target_version"`
Results EnvironmentUpdateResults `json:"results,omitempty" gorm:"column:results;type:text"`
Error *string `json:"error,omitempty" gorm:"column:error"`
CompletedAt *time.Time `json:"completedAt,omitempty" gorm:"column:completed_at"`
}
EnvironmentUpdateJob is a persisted fleet-wide update orchestration record. It survives the manager's final self-upgrade restart so the manager result can be finalized on the next boot. See EnvironmentUpdateJobStatus.
func (EnvironmentUpdateJob) TableName ¶ added in v2.1.0
func (EnvironmentUpdateJob) TableName() string
type EnvironmentUpdateJobStatus ¶ added in v2.1.0
type EnvironmentUpdateJobStatus string
EnvironmentUpdateJobStatus is the lifecycle status of a fleet-wide "update all environments" job.
const ( // EnvironmentUpdateJobStatusPendingRestart means the remote agents have been // updated and the manager has triggered its own self-upgrade as the final step; // it is waiting to restart on the new version, after which the job is finalized. EnvironmentUpdateJobStatusPendingRestart EnvironmentUpdateJobStatus = "pending_restart" // EnvironmentUpdateJobStatusRunning means the agents phase is in progress. EnvironmentUpdateJobStatusRunning EnvironmentUpdateJobStatus = "running" // EnvironmentUpdateJobStatusCompleted means every environment has been processed. EnvironmentUpdateJobStatusCompleted EnvironmentUpdateJobStatus = "completed" // EnvironmentUpdateJobStatusFailed means the job stopped before completing. EnvironmentUpdateJobStatusFailed EnvironmentUpdateJobStatus = "failed" )
type EnvironmentUpdateResult ¶ added in v2.1.0
type EnvironmentUpdateResult struct {
EnvironmentID string `json:"environmentId"`
EnvironmentName string `json:"environmentName"`
Status EnvironmentUpdateResultStatus `json:"status"`
FromVersion string `json:"fromVersion,omitempty"`
ToVersion string `json:"toVersion,omitempty"`
Error string `json:"error,omitempty"`
}
EnvironmentUpdateResult is the outcome for a single environment within a job. The manager appears as the first entry with EnvironmentID "0".
type EnvironmentUpdateResultStatus ¶ added in v2.1.0
type EnvironmentUpdateResultStatus string
EnvironmentUpdateResultStatus is the per-environment outcome within a job.
const ( // EnvironmentUpdateResultStatusPending is the initial state recorded for an // environment that is seeded into the job but not yet being processed (and for // the manager entry while its self-upgrade is in flight). EnvironmentUpdateResultStatusPending EnvironmentUpdateResultStatus = "pending" // EnvironmentUpdateResultStatusUpdating means this environment is being processed // right now; it drives the live per-environment progress indicator in the UI. EnvironmentUpdateResultStatusUpdating EnvironmentUpdateResultStatus = "updating" // EnvironmentUpdateResultStatusUpdated means the upgrade was triggered and the // new version was confirmed. EnvironmentUpdateResultStatusUpdated EnvironmentUpdateResultStatus = "updated" // EnvironmentUpdateResultStatusTriggered means the upgrade was triggered but not // confirmed within the wait window (still likely succeeding in the background). EnvironmentUpdateResultStatusTriggered EnvironmentUpdateResultStatus = "triggered" // EnvironmentUpdateResultStatusUpToDate means the environment already ran the // target image, so the pull found nothing new and no container was recreated. EnvironmentUpdateResultStatusUpToDate EnvironmentUpdateResultStatus = "up_to_date" // EnvironmentUpdateResultStatusSkippedOffline means the environment was unreachable. EnvironmentUpdateResultStatusSkippedOffline EnvironmentUpdateResultStatus = "skipped_offline" // EnvironmentUpdateResultStatusFailed means the upgrade trigger failed. EnvironmentUpdateResultStatusFailed EnvironmentUpdateResultStatus = "failed" )
type EnvironmentUpdateResults ¶ added in v2.1.0
type EnvironmentUpdateResults []EnvironmentUpdateResult
EnvironmentUpdateResults is a JSON-serialized slice of per-environment results, stored in a single TEXT column.
func (*EnvironmentUpdateResults) Scan ¶ added in v2.1.0
func (r *EnvironmentUpdateResults) Scan(value any) error
type Event ¶
type Event struct {
BaseModel
Type EventType `json:"type" sortable:"true"`
Severity EventSeverity `json:"severity" sortable:"true"`
Title string `json:"title" sortable:"true"`
Description string `json:"description"`
ResourceType *string `json:"resourceType,omitempty" sortable:"true"`
ResourceID *string `json:"resourceId,omitempty" sortable:"true"`
ResourceName *string `json:"resourceName,omitempty" sortable:"true"`
UserID *string `json:"userId,omitempty" sortable:"true"`
Username *string `json:"username,omitempty" sortable:"true"`
EnvironmentID *string `json:"environmentId,omitempty"`
Metadata JSON `json:"metadata,omitempty" gorm:"type:text"`
Timestamp time.Time `json:"timestamp" sortable:"true"`
}
type EventSeverity ¶
type EventSeverity string
type FederatedCredential ¶
type FederatedCredential struct {
BaseModel
Name string `json:"name" gorm:"column:name;not null" sortable:"true"`
Description *string `json:"description,omitempty" gorm:"column:description"`
Enabled bool `json:"enabled" gorm:"column:enabled;not null;default:false;index" sortable:"true"`
IssuerURL string `json:"issuerUrl" gorm:"column:issuer_url;not null;index" sortable:"true"`
Audiences StringSlice `json:"audiences" gorm:"column:audiences;type:text;not null"`
SubjectClaim string `json:"subjectClaim" gorm:"column:subject_claim;not null;default:'sub'"`
SubjectMatch string `json:"subjectMatch" gorm:"column:subject_match;not null"`
MatchType string `json:"matchType" gorm:"column:match_type;not null;default:'exact'"`
RoleID string `json:"roleId" gorm:"column:role_id;not null;index"`
EnvironmentID *string `json:"environmentId,omitempty" gorm:"column:environment_id;index"`
IdentityUserID string `json:"identityUserId" gorm:"column:identity_user_id;not null;index"`
TokenTTLSeconds int `json:"tokenTtlSeconds" gorm:"column:token_ttl_seconds;not null;default:900"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty" gorm:"column:last_used_at" sortable:"true"`
ExpiresAt *time.Time `json:"expiresAt,omitempty" gorm:"column:expires_at" sortable:"true"`
IdentityUser *User `json:"identityUser,omitempty" gorm:"foreignKey:IdentityUserID;constraint:OnDelete:CASCADE"`
Role *Role `json:"role,omitempty" gorm:"foreignKey:RoleID;constraint:OnDelete:RESTRICT"`
Environment *Environment `json:"environment,omitempty" gorm:"foreignKey:EnvironmentID;constraint:OnDelete:SET NULL"`
}
func (FederatedCredential) TableName ¶
func (FederatedCredential) TableName() string
type FederatedTokenReplay ¶
type FederatedTokenReplay struct {
BaseModel
TokenHash string `json:"-" gorm:"column:token_hash;not null;uniqueIndex"`
IssuerURL string `json:"issuerUrl" gorm:"column:issuer_url;not null;index"`
ExpiresAt time.Time `json:"expiresAt" gorm:"column:expires_at;not null;index"`
}
func (FederatedTokenReplay) TableName ¶
func (FederatedTokenReplay) TableName() string
type GenericConfig ¶
type GenericConfig struct {
WebhookURL string `json:"webhookUrl"`
Method string `json:"method,omitempty"`
ContentType string `json:"contentType,omitempty"`
TitleKey string `json:"titleKey,omitempty"`
MessageKey string `json:"messageKey,omitempty"`
CustomHeaders map[string]string `json:"customHeaders,omitempty"`
DisableTLS bool `json:"disableTls"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
// SuccessBodyContains is an optional substring that must appear in the
// response body for the send to be considered successful. Useful for
// providers that always return HTTP 200 but embed a status indicator in
// the JSON body (e.g. PushPlus returns {"code":200,...} on success and
// {"code":900,...} on failure). When empty, only the HTTP status code is
// checked (existing behaviour).
SuccessBodyContains string `json:"successBodyContains,omitempty"`
// PayloadTemplate is an optional Go text/template rendered into the request
// body, letting users target endpoints that require a nested or
// provider-specific payload shape rather than the flat
// {"title":...,"message":...} object. The template receives the title and
// message (under the configured TitleKey/MessageKey) plus event variables
// (environment, environmentId, event, timestamp), all pre-escaped for JSON
// string contexts. When empty, the flat JSON payload is used (existing
// behaviour).
PayloadTemplate string `json:"payloadTemplate,omitempty"`
}
type GitOpsSync ¶
type GitOpsSync struct {
BaseModel
Environment *Environment `json:"environment,omitempty" gorm:"foreignKey:EnvironmentID"`
Repository *GitRepository `json:"repository,omitempty" gorm:"foreignKey:RepositoryID"`
ProjectID *string `json:"projectId,omitempty" sortable:"true"` // Set after project is created
Project *Project `json:"project,omitempty" gorm:"foreignKey:ProjectID"`
SyncedFiles *string `json:"syncedFiles,omitempty" gorm:"column:synced_files"` // JSON array of synced file paths
LastSyncAt *time.Time `json:"lastSyncAt,omitempty" sortable:"true"`
LastSyncStatus *string `json:"lastSyncStatus,omitempty" search:"status,success,failed,pending,error"`
LastSyncError *string `json:"lastSyncError,omitempty"`
LastSyncCommit *string `json:"lastSyncCommit,omitempty" search:"commit,hash,sha,revision"`
// Pre-deploy lifecycle hook (configuration)
// When PreDeployScriptPath is set, the named script is executed in a
// throwaway container before each deploy of the linked project. The script,
// runner image, and execution context together act as repo-trusted code —
// any push to the repo that changes the script will run unreviewed on the
// next deploy. See docs for details.
PreDeployScriptPath *string `json:"preDeployScriptPath,omitempty" gorm:"column:pre_deploy_script_path" search:"lifecycle,hook,pre-deploy,script,path"`
PreDeployRunnerImage *string `json:"preDeployRunnerImage,omitempty" gorm:"column:pre_deploy_runner_image"`
PreDeployEnv *string `json:"preDeployEnv,omitempty" gorm:"column:pre_deploy_env"` // KEY=VALUE lines, one per line; same format as .env files
PreDeployExtraMounts *string `json:"preDeployExtraMounts,omitempty" gorm:"column:pre_deploy_extra_mounts"` // docker -v style "src:tgt[:ro|:rw]" entries, one per line
// Pre-deploy lifecycle hook (last-run state)
PreDeployLastRunAt *time.Time `json:"preDeployLastRunAt,omitempty" gorm:"column:pre_deploy_last_run_at" sortable:"true"`
PreDeployLastRunStatus *string `json:"preDeployLastRunStatus,omitempty" gorm:"column:pre_deploy_last_run_status" sortable:"true"` // "success" | "failed" | "timeout"
PreDeployLastRunOutput *string `json:"preDeployLastRunOutput,omitempty" gorm:"column:pre_deploy_last_run_output"` // truncated stdout+stderr
Name string `json:"name" sortable:"true" search:"sync,gitops,automation,deploy,deployment,continuous"`
EnvironmentID string `json:"environmentId" sortable:"true"`
RepositoryID string `json:"repositoryId" sortable:"true"`
Branch string `json:"branch" sortable:"true" search:"branch,main,master,develop,feature,release"`
ComposePath string `json:"composePath" sortable:"true" search:"compose,docker-compose,path,file,yaml,yml"`
TargetType string `json:"targetType" gorm:"column:target_type;default:'project'"` // "project" or "swarm_stack"
ProjectName string `json:"projectName" sortable:"true" search:"project,name,stack,application,service"` // Name of project to create/update
PreDeployNetworkMode string `json:"preDeployNetworkMode" gorm:"column:pre_deploy_network_mode;default:'none'"` // Docker network mode passed to the runner container. Default "none" denies network access; set to "bridge", "host", or a named network when the script needs it.
SyncInterval int `json:"syncInterval" sortable:"true" search:"interval,frequency,schedule,cron,minutes"` // in minutes
MaxSyncFiles int `json:"maxSyncFiles" gorm:"column:max_sync_files;default:500"` // 0 = unlimited; env var overrides take precedence
MaxSyncTotalSize int64 `json:"maxSyncTotalSize" gorm:"column:max_sync_total_size;default:52428800"` // bytes; 0 = unlimited; env var overrides take precedence
MaxSyncBinarySize int64 `json:"maxSyncBinarySize" gorm:"column:max_sync_binary_size;default:10485760"` // bytes; 0 = unlimited; env var overrides take precedence
PreDeployTimeoutSec int `json:"preDeployTimeoutSec" gorm:"column:pre_deploy_timeout_sec;default:60"`
AutoSync bool `json:"autoSync" sortable:"true" search:"auto,automatic,sync,continuous,scheduled"`
SyncDirectory bool `json:"syncDirectory" gorm:"column:sync_directory"` // Sync entire directory containing compose file
}
func (GitOpsSync) TableName ¶
func (GitOpsSync) TableName() string
type GitRepository ¶
type GitRepository struct {
BaseModel
Name string `json:"name" sortable:"true" search:"git,repository,repo,source,version,control,github,gitlab,bitbucket"`
URL string `json:"url" sortable:"true" search:"url,git,clone,remote,https,ssh"`
AuthType string `json:"authType" sortable:"true" search:"auth,authentication,credentials,token,ssh,http"` // none, http, ssh
Username string `json:"username" sortable:"true" search:"username,user,login,account"`
Token string `json:"token" search:"token,password,credentials,secret,auth"` // encrypted
SSHKey string `json:"sshKey" search:"ssh,key,private,public,certificate"` // encrypted
SSHHostKeyVerification string `json:"sshHostKeyVerification" gorm:"default:accept_new"` // strict, accept_new, skip
Description *string `json:"description,omitempty" sortable:"true"`
Enabled bool `json:"enabled" sortable:"true" search:"enabled,active,disabled"`
}
func (GitRepository) TableName ¶
func (GitRepository) TableName() string
type GlobalVariable ¶ added in v2.5.0
type GlobalVariable struct {
BaseModel
Key string `json:"key" gorm:"column:key" sortable:"true"`
Value string `json:"-" gorm:"column:value"`
IsSecret bool `json:"isSecret" gorm:"column:is_secret"`
// No gorm default tag: a default:true tag would make GORM omit false on
// insert and the column default would silently win.
AllEnvironments bool `json:"allEnvironments" gorm:"column:all_environments"`
Environments []Environment `json:"-" gorm:"many2many:global_variable_environments;joinForeignKey:GlobalVariableID;joinReferences:EnvironmentID"`
}
GlobalVariable is a manager-level key/value variable materialized into each environment's .env.global file. Value holds ciphertext when IsSecret is true.
func (GlobalVariable) TableName ¶ added in v2.5.0
func (GlobalVariable) TableName() string
type GoogleChatConfig ¶ added in v2.7.0
type GoogleChatConfig struct {
// WebhookURL is the full incoming webhook URL copied from Google Chat,
// e.g. https://chat.googleapis.com/v1/spaces/SPACE/messages?key=KEY&token=TOKEN.
WebhookURL string `json:"webhookUrl"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type GotifyConfig ¶
type GotifyConfig struct {
Host string `json:"host"`
Port int `json:"port,omitempty"`
Token string `json:"token"`
Path string `json:"path,omitempty"`
Priority int `json:"priority,omitempty"`
Title string `json:"title,omitempty"`
DisableTLS bool `json:"disableTls"`
InsecureSkipVerify bool `json:"insecureSkipVerify"`
UseHeader bool `json:"useHeader"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type ImageBuild ¶
type ImageBuild struct {
BaseModel
BuildArgs JSON `json:"buildArgs,omitempty" gorm:"column:build_args;type:text"`
Labels JSON `json:"labels,omitempty" gorm:"column:labels;type:text"`
Ulimits JSON `json:"ulimits,omitempty" gorm:"column:ulimits;type:text"`
UserID *string `json:"userId,omitempty" gorm:"column:user_id"`
Username *string `json:"username,omitempty" gorm:"column:username"`
Digest *string `json:"digest,omitempty" gorm:"column:digest"`
ErrorMessage *string `json:"errorMessage,omitempty" gorm:"column:error_message"`
Output *string `json:"output,omitempty" gorm:"column:output;type:text"`
CompletedAt *time.Time `json:"completedAt,omitempty" gorm:"column:completed_at" sortable:"true"`
DurationMs *int64 `json:"durationMs,omitempty" gorm:"column:duration_ms"`
EnvironmentID string `json:"environmentId" gorm:"column:environment_id;index"`
Status ImageBuildStatus `json:"status" gorm:"column:status;index" sortable:"true"`
Provider string `json:"provider,omitempty" gorm:"column:provider"`
ContextDir string `json:"contextDir" gorm:"column:context_dir"`
Dockerfile string `json:"dockerfile,omitempty" gorm:"column:dockerfile"`
Target string `json:"target,omitempty" gorm:"column:target"`
BuildNetwork string `json:"network,omitempty" gorm:"column:build_network"`
Isolation string `json:"isolation,omitempty" gorm:"column:isolation"`
Tags StringSlice `json:"tags,omitempty" gorm:"column:tags;type:text"`
Platforms StringSlice `json:"platforms,omitempty" gorm:"column:platforms;type:text"`
CacheFrom StringSlice `json:"cacheFrom,omitempty" gorm:"column:cache_from;type:text"`
CacheTo StringSlice `json:"cacheTo,omitempty" gorm:"column:cache_to;type:text"`
Entitlements StringSlice `json:"entitlements,omitempty" gorm:"column:entitlements;type:text"`
ExtraHosts StringSlice `json:"extraHosts,omitempty" gorm:"column:extra_hosts;type:text"`
ShmSize int64 `json:"shmSize,omitempty" gorm:"column:shm_size"`
NoCache bool `json:"noCache" gorm:"column:no_cache;default:false"`
Pull bool `json:"pull" gorm:"column:pull;default:false"`
Privileged bool `json:"privileged" gorm:"column:privileged;default:false"`
Push bool `json:"push" gorm:"column:push"`
Load bool `json:"load" gorm:"column:load"`
OutputTruncated bool `json:"outputTruncated" gorm:"column:output_truncated;default:false"`
}
func (ImageBuild) TableName ¶
func (ImageBuild) TableName() string
type ImageBuildStatus ¶
type ImageBuildStatus string
const ( ImageBuildStatusRunning ImageBuildStatus = "running" ImageBuildStatusSuccess ImageBuildStatus = "success" ImageBuildStatusFailed ImageBuildStatus = "failed" )
type ImageUpdate ¶
type ImageUpdateRecord ¶
type ImageUpdateRecord struct {
BaseModel
CheckTime time.Time `json:"checkTime" gorm:"column:check_time"`
LatestVersion *string `json:"latestVersion,omitempty" gorm:"column:latest_version"`
CurrentDigest *string `json:"currentDigest,omitempty" gorm:"column:current_digest"`
LatestDigest *string `json:"latestDigest,omitempty" gorm:"column:latest_digest"`
LastError *string `json:"lastError,omitempty" gorm:"column:last_error"`
AuthMethod *string `json:"authMethod,omitempty" gorm:"column:auth_method"`
AuthUsername *string `json:"authUsername,omitempty" gorm:"column:auth_username"`
AuthRegistry *string `json:"authRegistry,omitempty" gorm:"column:auth_registry"`
ID string `json:"id" gorm:"primaryKey;type:text"`
Repository string `json:"repository"`
Tag string `json:"tag"`
UpdateType string `json:"updateType" gorm:"column:update_type"`
CurrentVersion string `json:"currentVersion" gorm:"column:current_version"`
ResponseTimeMs int `json:"responseTimeMs" gorm:"column:response_time_ms"`
HasUpdate bool `json:"hasUpdate" gorm:"column:has_update"`
UsedCredential bool `json:"usedCredential,omitempty" gorm:"column:used_credential"`
NotificationSent bool `json:"notificationSent" gorm:"column:notification_sent;default:false"`
}
func (*ImageUpdateRecord) IsDigestUpdate ¶
func (i *ImageUpdateRecord) IsDigestUpdate() bool
func (*ImageUpdateRecord) IsTagUpdate ¶
func (i *ImageUpdateRecord) IsTagUpdate() bool
func (*ImageUpdateRecord) NeedsUpdate ¶
func (i *ImageUpdateRecord) NeedsUpdate() bool
func (*ImageUpdateRecord) TableName ¶
func (i *ImageUpdateRecord) TableName() string
type KVEntry ¶
type KVEntry struct {
Key string `gorm:"column:key;primaryKey"`
Value string `gorm:"column:value"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime"`
UpdatedAt *time.Time `gorm:"column:updated_at;autoUpdateTime"`
}
KVEntry stores lightweight application state as arbitrary key/value pairs.
type MatrixConfig ¶
type MatrixConfig struct {
Host string `json:"host"`
Port int `json:"port,omitempty"`
Rooms string `json:"rooms"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
DisableTLSVerification bool `json:"disableTlsVerification"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type NotificationEventType ¶
type NotificationEventType string
const ( NotificationEventImageUpdate NotificationEventType = "image_update" NotificationEventContainerUpdate NotificationEventType = "container_update" NotificationEventVulnerabilityFound NotificationEventType = "vulnerability_found" NotificationEventPruneReport NotificationEventType = "prune_report" NotificationEventAutoHeal NotificationEventType = "auto_heal" )
type NotificationProvider ¶
type NotificationProvider string
const ( NotificationProviderDiscord NotificationProvider = "discord" NotificationProviderEmail NotificationProvider = "email" NotificationProviderTelegram NotificationProvider = "telegram" NotificationProviderSignal NotificationProvider = "signal" NotificationProviderSlack NotificationProvider = "slack" NotificationProviderNtfy NotificationProvider = "ntfy" NotificationProviderPushover NotificationProvider = "pushover" NotificationProviderGotify NotificationProvider = "gotify" NotificationProviderMatrix NotificationProvider = "matrix" NotificationProviderGoogleChat NotificationProvider = "googlechat" NotificationProviderGeneric NotificationProvider = "generic" )
type NotificationSettings ¶
type NotificationSettings struct {
ID uint `json:"id" gorm:"primaryKey"`
Provider NotificationProvider `json:"provider" gorm:"not null;index;type:varchar(50)"`
Enabled bool `json:"enabled" gorm:"default:false"`
Config JSON `json:"config" gorm:"type:jsonb"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
func (NotificationSettings) TableName ¶
func (NotificationSettings) TableName() string
type NtfyConfig ¶
type NtfyConfig struct {
Host string `json:"host"`
Port int `json:"port"`
Topic string `json:"topic"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Title string `json:"title,omitempty"`
Priority string `json:"priority,omitempty"`
Tags []string `json:"tags,omitempty"`
Icon string `json:"icon,omitempty"`
Cache bool `json:"cache"`
Firebase bool `json:"firebase"`
DisableTLS bool `json:"disableTls"`
DisableTLSVerification bool `json:"disableTlsVerification"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type OidcConfig ¶
type OidcConfig struct {
ClientID string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
IssuerURL string `json:"issuerUrl"`
Scopes string `json:"scopes"`
AuthorizationEndpoint string `json:"authorizationEndpoint,omitempty"`
TokenEndpoint string `json:"tokenEndpoint,omitempty"`
UserinfoEndpoint string `json:"userinfoEndpoint,omitempty"`
JwksURI string `json:"jwksUri,omitempty"`
DeviceAuthorizationEndpoint string `json:"deviceAuthorizationEndpoint,omitempty"`
// GroupsClaim is the claim path Arcane reads group memberships from on
// every OIDC login. Matched against oidc_role_mappings to produce role
// assignments. Default: "groups".
GroupsClaim string `json:"groupsClaim,omitempty"`
SkipTlsVerify bool `json:"skipTlsVerify"`
}
type OidcRoleMapping ¶
type OidcRoleMapping struct {
BaseModel
ClaimValue string `json:"claimValue" gorm:"column:claim_value;not null;index"`
RoleID string `json:"roleId" gorm:"column:role_id;not null;index"`
EnvironmentID *string `json:"environmentId,omitempty" gorm:"column:environment_id"`
Source string `json:"source" gorm:"column:source;not null;default:'manual'"`
}
OidcRoleMapping maps an OIDC group/claim value to a role assignment. On every OIDC login, the auth service replaces all source='oidc' rows on the user with assignments derived from the mappings whose ClaimValue matches a claim returned by the IdP.
Source distinguishes UI/API-managed rows (the default) from env-declared rows reconciled at boot from OIDC_ROLE_MAPPINGS. Env-managed rows are read-only via the API — they can only be changed by editing the env var and restarting.
func (OidcRoleMapping) TableName ¶
func (OidcRoleMapping) TableName() string
type Passkey ¶ added in v2.7.0
type Passkey struct {
BaseModel
UserID string `json:"userId" gorm:"column:user_id;not null;index"`
User *User `json:"-" gorm:"foreignKey:UserID;constraint:OnDelete:CASCADE"`
RPID string `json:"rpId" gorm:"column:rp_id;not null"`
CredentialID []byte `json:"-" gorm:"column:credential_id;not null"`
PublicKey []byte `json:"-" gorm:"column:public_key;not null"`
AttestationType string `json:"attestationType,omitempty" gorm:"column:attestation_type"`
AttestationFormat string `json:"attestationFormat,omitempty" gorm:"column:attestation_format"`
Transports StringSlice `json:"transports,omitempty" gorm:"column:transports;type:text"`
AAGUID []byte `json:"-" gorm:"column:aaguid"`
SignCount uint32 `json:"signCount" gorm:"column:sign_count;not null;default:0"`
BackupEligible bool `json:"backupEligible" gorm:"column:backup_eligible;not null;default:false"`
BackupState bool `json:"backupState" gorm:"column:backup_state;not null;default:false"`
CloneWarning bool `json:"cloneWarning" gorm:"column:clone_warning;not null;default:false"`
AuthenticatorAttachment string `json:"authenticatorAttachment,omitempty" gorm:"column:authenticator_attachment"`
AttestationClientDataJSON []byte `json:"-" gorm:"column:attestation_client_data_json"`
AttestationClientDataHash []byte `json:"-" gorm:"column:attestation_client_data_hash"`
AttestationAuthenticatorData []byte `json:"-" gorm:"column:attestation_authenticator_data"`
AttestationPublicKeyAlgorithm int64 `json:"-" gorm:"column:attestation_public_key_algorithm"`
AttestationObject []byte `json:"-" gorm:"column:attestation_object"`
Name string `json:"name" gorm:"column:name;not null"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty" gorm:"column:last_used_at"`
}
Passkey stores the WebAuthn credential record required to validate future assertions. The raw attestation fields are retained so the credential can be audited or revalidated if the WebAuthn library's verification policy evolves.
type PasskeyCeremony ¶ added in v2.7.0
type PasskeyCeremony struct {
BaseModel
Purpose string `json:"purpose" gorm:"column:purpose;not null;index"`
UserID *string `json:"userId,omitempty" gorm:"column:user_id;index"`
SessionID *string `json:"sessionId,omitempty" gorm:"column:session_id;index"`
AuthTransactionID *string `json:"authTransactionId,omitempty" gorm:"column:auth_transaction_id;index"`
RPID string `json:"rpId" gorm:"column:rp_id;not null"`
SessionData string `json:"-" gorm:"column:session_data;type:text;not null"`
ExpiresAt time.Time `json:"expiresAt" gorm:"column:expires_at;not null;index"`
ConsumedAt *time.Time `json:"-" gorm:"column:consumed_at;index"`
}
PasskeyCeremony holds the opaque server-side state between WebAuthn begin and finish calls. It is intentionally never serialized to the client.
func (PasskeyCeremony) TableName ¶ added in v2.7.0
func (PasskeyCeremony) TableName() string
type PasskeyRecoveryCode ¶ added in v2.7.0
type PasskeyRecoveryCode struct {
BaseModel
UserID string `json:"userId" gorm:"column:user_id;not null;index"`
CodeHash string `json:"-" gorm:"column:code_hash;not null;uniqueIndex"`
UsedAt *time.Time `json:"usedAt,omitempty" gorm:"column:used_at;index"`
}
PasskeyRecoveryCode stores only a one-way digest of a recovery code. The plaintext is returned once during generation and is never recoverable.
func (PasskeyRecoveryCode) TableName ¶ added in v2.7.0
func (PasskeyRecoveryCode) TableName() string
type Project ¶
type Project struct {
BaseModel
Name string `json:"name" sortable:"true" gorm:"index:idx_projects_name"`
DirName *string `json:"dir_name"`
Path string `json:"path" sortable:"true" gorm:"uniqueIndex"`
Status ProjectStatus `json:"status" sortable:"true"`
StatusReason *string `json:"status_reason"`
ServiceCount int `json:"service_count" sortable:"true"`
RunningCount int `json:"running_count" sortable:"true"`
GitOpsManagedBy *string `json:"gitops_managed_by,omitempty" gorm:"column:gitops_managed_by"`
ComposeProjectName *string `json:"compose_project_name,omitempty" gorm:"column:compose_project_name"`
ImageRefsJSON string `json:"image_refs_json,omitempty" gorm:"column:image_refs_json"`
BuildImageRefsJSON *string `json:"-" gorm:"column:build_image_refs_json"`
IsArchived bool `json:"is_archived" gorm:"column:is_archived;default:false;index"`
ArchivedAt *time.Time `json:"archived_at,omitempty" gorm:"column:archived_at"`
}
type ProjectStatus ¶
type ProjectStatus string
const ( ProjectStatusRunning ProjectStatus = "running" ProjectStatusStopped ProjectStatus = "stopped" ProjectStatusPartiallyRunning ProjectStatus = "partially running" ProjectStatusUnknown ProjectStatus = "unknown" ProjectStatusDeploying ProjectStatus = "deploying" ProjectStatusStopping ProjectStatus = "stopping" ProjectStatusRestarting ProjectStatus = "restarting" )
type PushoverConfig ¶
type Role ¶
type Role struct {
BaseModel
Name string `json:"name" gorm:"column:name;not null;uniqueIndex" sortable:"true"`
Description *string `json:"description,omitempty" gorm:"column:description"`
Permissions StringSlice `json:"permissions" gorm:"column:permissions;type:text;not null"`
BuiltIn bool `json:"builtIn" gorm:"column:built_in;not null;default:false" sortable:"true"`
}
Role is a named permission set. Built-in roles (Admin, Editor, Deployer, Viewer) are seeded by migration 054 and cannot be edited or deleted.
type SettingKeyNotFoundError ¶
type SettingKeyNotFoundError struct {
// contains filtered or unexported fields
}
func (SettingKeyNotFoundError) Error ¶
func (e SettingKeyNotFoundError) Error() string
func (SettingKeyNotFoundError) Is ¶
func (e SettingKeyNotFoundError) Is(target error) bool
type SettingSensitiveForbiddenError ¶
type SettingSensitiveForbiddenError struct {
// contains filtered or unexported fields
}
func (SettingSensitiveForbiddenError) Error ¶
func (e SettingSensitiveForbiddenError) Error() string
func (SettingSensitiveForbiddenError) Is ¶
func (e SettingSensitiveForbiddenError) Is(target error) bool
type SettingVariable ¶
func (SettingVariable) AsDurationSeconds ¶
func (s SettingVariable) AsDurationSeconds() time.Duration
AsDurationSeconds returns the value as a time.Duration in seconds
func (SettingVariable) AsInt ¶
func (s SettingVariable) AsInt() int
AsInt returns the value as an integer
func (SettingVariable) IsTrue ¶
func (s SettingVariable) IsTrue() bool
IsTrue returns true if the value is a truthy string
func (SettingVariable) TableName ¶
func (SettingVariable) TableName() string
type SettingVisibility ¶
type SettingVisibility int
const ( SettingVisibilityPublic SettingVisibility = iota SettingVisibilityNonAdmin SettingVisibilityAll )
type Settings ¶
type Settings struct {
// General category
ProjectsDirectory SettingVariable `` /* 234-byte string literal not displayed */
TemplatesDirectory SettingVariable `` /* 252-byte string literal not displayed */
FollowProjectSymlinks SettingVariable `` /* 287-byte string literal not displayed */
SwarmStackSourcesDirectory SettingVariable `` /* 273-byte string literal not displayed */
DiskUsagePath SettingVariable `` /* 171-byte string literal not displayed */
BaseServerURL SettingVariable `` /* 183-byte string literal not displayed */
EnableGravatar SettingVariable `` /* 203-byte string literal not displayed */
AvatarMaxUploadSizeMb SettingVariable `` /* 258-byte string literal not displayed */
DefaultShell SettingVariable `` /* 162-byte string literal not displayed */
EnvironmentHealthInterval SettingVariable `` /* 395-byte string literal not displayed */
// Docker category
AutoUpdate SettingVariable `` /* 208-byte string literal not displayed */
AutoUpdateInterval SettingVariable `` /* 223-byte string literal not displayed */
AutoUpdateExcludedContainers SettingVariable `` /* 210-byte string literal not displayed */
PollingEnabled SettingVariable `` /* 197-byte string literal not displayed */
PollingInterval SettingVariable `` /* 209-byte string literal not displayed */
ImageEventWatcherEnabled SettingVariable `` /* 269-byte string literal not displayed */
DockerClientRefreshInterval SettingVariable `` /* 274-byte string literal not displayed */
EventCleanupInterval SettingVariable `` /* 213-byte string literal not displayed */
ExpiredSessionsCleanupInterval SettingVariable `` /* 266-byte string literal not displayed */
ActivityHistoryRetentionDays SettingVariable `` /* 418-byte string literal not displayed */
ActivityHistoryMaxEntries SettingVariable `` /* 285-byte string literal not displayed */
MaxConcurrentActivities SettingVariable `` /* 275-byte string literal not displayed */
AutoInjectEnv SettingVariable `` /* 243-byte string literal not displayed */
DefaultDeployPullPolicy SettingVariable `` /* 215-byte string literal not displayed */
ScheduledPruneEnabled SettingVariable `` /* 213-byte string literal not displayed */
ScheduledPruneInterval SettingVariable `` /* 207-byte string literal not displayed */
PruneContainerMode SettingVariable `` /* 234-byte string literal not displayed */
PruneContainerUntil SettingVariable `` /* 238-byte string literal not displayed */
PruneImageMode SettingVariable `` /* 223-byte string literal not displayed */
PruneImageUntil SettingVariable `` /* 222-byte string literal not displayed */
PruneVolumeMode SettingVariable `` /* 224-byte string literal not displayed */
PruneNetworkMode SettingVariable `` /* 225-byte string literal not displayed */
PruneNetworkUntil SettingVariable `` /* 230-byte string literal not displayed */
PruneBuildCacheMode SettingVariable `` /* 241-byte string literal not displayed */
PruneBuildCacheUntil SettingVariable `` /* 244-byte string literal not displayed */
AutoHealEnabled SettingVariable `` /* 217-byte string literal not displayed */
AutoHealInterval SettingVariable `` /* 214-byte string literal not displayed */
AutoHealExcludedContainers SettingVariable `` /* 233-byte string literal not displayed */
AutoHealMaxRestarts SettingVariable `` /* 237-byte string literal not displayed */
AutoHealRestartWindow SettingVariable `` /* 238-byte string literal not displayed */
VolumeBrowserHelperIdleTimeout SettingVariable `` /* 292-byte string literal not displayed */
MaxImageUploadSize SettingVariable `` /* 232-byte string literal not displayed */
GitSyncMaxFiles SettingVariable `` /* 275-byte string literal not displayed */
GitSyncMaxTotalSizeMb SettingVariable `` /* 295-byte string literal not displayed */
GitSyncMaxBinarySizeMb SettingVariable `` /* 310-byte string literal not displayed */
DockerHost SettingVariable `` /* 175-byte string literal not displayed */
BuildProvider SettingVariable `` /* 308-byte string literal not displayed */
BuildsDirectory SettingVariable `` /* 192-byte string literal not displayed */
BuildTimeout SettingVariable `` /* 204-byte string literal not displayed */
DepotProjectId SettingVariable `` /* 165-byte string literal not displayed */
DepotToken SettingVariable `` /* 167-byte string literal not displayed */
// Authentication and security categories
AuthLocalEnabled SettingVariable `` /* 400-byte string literal not displayed */
AuthSessionTimeout SettingVariable `` /* 203-byte string literal not displayed */
AuthPasswordPolicy SettingVariable `` /* 209-byte string literal not displayed */
VulnerabilityScanEnabled SettingVariable `` /* 389-byte string literal not displayed */
VulnerabilityScanInterval SettingVariable `` /* 243-byte string literal not displayed */
TrivyImage SettingVariable `` /* 216-byte string literal not displayed */
TrivyNetwork SettingVariable `` /* 293-byte string literal not displayed */
TrivySecurityOpts SettingVariable `` /* 319-byte string literal not displayed */
TrivyPrivileged SettingVariable `` /* 244-byte string literal not displayed */
TrivyPreserveCacheOnVolumePrune SettingVariable `` /* 287-byte string literal not displayed */
TrivyResourceLimitsEnabled SettingVariable `` /* 238-byte string literal not displayed */
TrivyCpuLimit SettingVariable `` /* 261-byte string literal not displayed */
TrivyMemoryLimitMb SettingVariable `` /* 246-byte string literal not displayed */
TrivyConcurrentScanContainers SettingVariable `` /* 302-byte string literal not displayed */
TrivyConfig SettingVariable `` /* 200-byte string literal not displayed */
TrivyIgnore SettingVariable `` /* 216-byte string literal not displayed */
TrivyServerEnabled SettingVariable `` /* 372-byte string literal not displayed */
TrivyServerUrl SettingVariable `` /* 276-byte string literal not displayed */
TrivyServerToken SettingVariable `` /* 285-byte string literal not displayed */
TrivyIgnoreUnfixed SettingVariable `` /* 316-byte string literal not displayed */
LifecycleEnabled SettingVariable `` /* 327-byte string literal not displayed */
LifecycleDefaultRunnerImage SettingVariable `` /* 303-byte string literal not displayed */
LifecycleMaxTimeoutSec SettingVariable `` /* 276-byte string literal not displayed */
OidcEnabled SettingVariable `` /* 230-byte string literal not displayed */
OidcClientId SettingVariable `` /* 178-byte string literal not displayed */
OidcClientSecret SettingVariable `` /* 195-byte string literal not displayed */
OidcIssuerUrl SettingVariable `` /* 191-byte string literal not displayed */
OidcAuthorizationEndpoint SettingVariable `` /* 217-byte string literal not displayed */
OidcTokenEndpoint SettingVariable `` /* 185-byte string literal not displayed */
OidcUserinfoEndpoint SettingVariable `` /* 197-byte string literal not displayed */
OidcJwksEndpoint SettingVariable `` /* 186-byte string literal not displayed */
OidcDeviceAuthorizationEndpoint SettingVariable `` /* 271-byte string literal not displayed */
OidcScopes SettingVariable `` /* 181-byte string literal not displayed */
OidcGroupsClaim SettingVariable `` /* 245-byte string literal not displayed */
OidcSkipTlsVerify SettingVariable `` /* 210-byte string literal not displayed */
OidcAutoRedirectToProvider SettingVariable `` /* 243-byte string literal not displayed */
OidcMergeAccounts SettingVariable `` /* 259-byte string literal not displayed */
OidcProviderName SettingVariable `` /* 227-byte string literal not displayed */
OidcProviderLogoUrl SettingVariable `` /* 211-byte string literal not displayed */
OidcMobileRedirectUris SettingVariable `` /* 286-byte string literal not displayed */
// Notifications category (placeholder for category metadata only - actual settings managed via notification service)
NotificationsCategoryPlaceholder SettingVariable `` /* 396-byte string literal not displayed */
AgentToken SettingVariable `key:"agentToken,internal,sensitive"`
InstanceID SettingVariable `key:"instanceId,internal"`
// Users category (admin management page - no actual settings)
UsersCategoryPlaceholder SettingVariable `` /* 304-byte string literal not displayed */
// API Keys category (admin management page - no actual settings)
ApiKeysCategoryPlaceholder SettingVariable `` /* 351-byte string literal not displayed */
FederatedCredentialsCategoryPlaceholder SettingVariable `` /* 262-byte string literal not displayed */
// Webhooks category (management page - no actual settings)
WebhooksCategoryPlaceholder SettingVariable `` /* 392-byte string literal not displayed */
// Timeout category
DockerAPITimeout SettingVariable `` /* 362-byte string literal not displayed */
DockerImagePullTimeout SettingVariable `` /* 243-byte string literal not displayed */
TrivyScanTimeout SettingVariable `` /* 231-byte string literal not displayed */
GitOperationTimeout SettingVariable `` /* 237-byte string literal not displayed */
HTTPClientTimeout SettingVariable `` /* 218-byte string literal not displayed */
RegistryTimeout SettingVariable `` /* 218-byte string literal not displayed */
ProxyRequestTimeout SettingVariable `` /* 215-byte string literal not displayed */
}
func (*Settings) FieldByKey ¶
func (*Settings) ToSettingVariableSlice ¶
func (s *Settings) ToSettingVariableSlice(visibility SettingVisibility, redactSensitiveValues bool) []SettingVariable
type SignalConfig ¶
type SignalConfig struct {
Host string `json:"host"`
Port int `json:"port"`
User string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
Token string `json:"token,omitempty"`
Source string `json:"source"`
Recipients []string `json:"recipients"`
DisableTLS bool `json:"disableTls"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type SlackConfig ¶
type SlackConfig struct {
Token string `json:"token"`
BotName string `json:"botName,omitempty"`
Icon string `json:"icon,omitempty"`
Color string `json:"color,omitempty"`
Title string `json:"title,omitempty"`
Channel string `json:"channel,omitempty"`
ThreadTS string `json:"threadTs,omitempty"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type StringSlice ¶
type StringSlice []string
func (*StringSlice) Scan ¶
func (s *StringSlice) Scan(value any) error
type TelegramConfig ¶
type TelegramConfig struct {
BotToken string `json:"botToken"`
ChatIDs []string `json:"chatIds"`
Preview bool `json:"preview"`
Notification bool `json:"notification"`
ParseMode string `json:"parseMode,omitempty"`
Title string `json:"title,omitempty"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type TemplateRegistry ¶
type TemplateRegistry struct {
BaseModel
Name string `json:"name"`
URL string `json:"url"`
Enabled bool `json:"enabled"`
Description string `json:"description"`
}
func (TemplateRegistry) TableName ¶
func (TemplateRegistry) TableName() string
type UpdateContainerRegistryRequest ¶
type UpdateContainerRegistryRequest struct {
URL *string `json:"url"`
Username *string `json:"username"`
Token *string `json:"token"`
Description *string `json:"description"`
Insecure *bool `json:"insecure"`
Enabled *bool `json:"enabled"`
RegistryType *string `json:"registryType"`
RepositoryNames *[]string `json:"repositoryNames"`
AWSAccessKeyID *string `json:"awsAccessKeyId"`
AWSSecretAccessKey *string `json:"awsSecretAccessKey"`
AWSRegion *string `json:"awsRegion"`
}
type UpdateGitRepositoryRequest ¶
type UpdateGitRepositoryRequest struct {
Name *string `json:"name,omitempty"`
URL *string `json:"url,omitempty"`
AuthType *string `json:"authType,omitempty" binding:"omitempty,oneof=none http ssh"`
Username *string `json:"username,omitempty"`
Token *string `json:"token,omitempty"`
SSHKey *string `json:"sshKey,omitempty"`
SSHHostKeyVerification *string `json:"sshHostKeyVerification,omitempty" binding:"omitempty,oneof=strict accept_new skip"`
Description *string `json:"description,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
}
type User ¶
type User struct {
BaseModel
Username string `json:"username" sortable:"true"`
PasswordHash string `json:"-" gorm:"column:password_hash"`
DisplayName *string `json:"displayName,omitempty" gorm:"column:display_name" sortable:"true"`
Email *string `json:"email,omitempty" sortable:"true"`
OidcSubjectId *string `json:"oidcSubjectId,omitempty" gorm:"column:oidc_subject_id"`
LastLogin *time.Time `json:"lastLogin,omitempty" gorm:"column:last_login" sortable:"true"`
Locale *string `json:"locale,omitempty" gorm:"column:locale"`
TimeFormat user.TimeFormat `json:"timeFormat" gorm:"column:time_format;not null;default:auto"`
FontSize *int `json:"fontSize,omitempty" gorm:"column:font_size"`
Preferences user.Preferences `json:"preferences" gorm:"column:preferences;serializer:json"`
RequiresPasswordChange bool `json:"requiresPasswordChange" gorm:"column:requires_password_change"`
IsServiceAccount bool `json:"isServiceAccount" gorm:"column:is_service_account;not null;default:false"`
PasskeyMFAEnabled bool `json:"passkeyMfaEnabled" gorm:"column:passkey_mfa_enabled;not null;default:false"`
// Avatar metadata
HasAvatar bool `json:"hasAvatar" gorm:"column:has_avatar;not null;default:false"`
// OIDC provider tokens
OidcAccessToken *string `json:"-" gorm:"type:text"`
OidcRefreshToken *string `json:"-" gorm:"type:text"`
OidcAccessTokenExpiresAt *time.Time `json:"-"`
}
func CurrentUserFromContext ¶ added in v2.6.0
CurrentUserFromContext retrieves the authenticated user from the context. Returns nil, false on unauthenticated paths (background jobs, agent proxying).
type UserAvatar ¶ added in v2.2.0
type UserAvatar struct {
UserID string `json:"userId" gorm:"column:user_id;primaryKey"`
Data []byte `json:"-" gorm:"column:data;type:blob;not null"`
MimeType string `json:"mimeType" gorm:"column:mime_type;not null"`
}
UserAvatar represents the raw profile picture data for a user. Stored separately from the main User struct to prevent loading up to 2MB of binary data on every user query.
func (UserAvatar) TableName ¶ added in v2.2.0
func (UserAvatar) TableName() string
type UserRoleAssignment ¶
type UserRoleAssignment struct {
BaseModel
UserID string `json:"userId" gorm:"column:user_id;not null;index"`
RoleID string `json:"roleId" gorm:"column:role_id;not null;index"`
EnvironmentID *string `json:"environmentId,omitempty" gorm:"column:environment_id;index"`
Source string `json:"source" gorm:"column:source;not null;default:'manual'"`
}
UserRoleAssignment binds a user to a role, optionally scoped to one environment. EnvironmentID == nil means "global" — the role's permissions apply across all environments AND to org-level resources.
Source distinguishes manual assignments (managed by admins via the UI) from assignments synthesized from OIDC group mappings on every login.
func (UserRoleAssignment) TableName ¶
func (UserRoleAssignment) TableName() string
type UserSession ¶
type UserSession struct {
BaseModel
UserID string `json:"userId" gorm:"column:user_id;not null;index"`
User *User `json:"user,omitempty" gorm:"foreignKey:UserID;constraint:OnDelete:CASCADE"`
RefreshTokenHash string `json:"-" gorm:"column:refresh_token_hash;not null;uniqueIndex"`
UserAgent *string `json:"userAgent,omitempty" gorm:"column:user_agent"`
IPAddress *string `json:"ipAddress,omitempty" gorm:"column:ip_address"`
Source string `json:"source,omitempty" gorm:"column:source"`
FederatedCredentialID *string `json:"federatedCredentialId,omitempty" gorm:"column:federated_credential_id;index"`
FederatedCredential *FederatedCredential `json:"federatedCredential,omitempty" gorm:"foreignKey:FederatedCredentialID;constraint:OnDelete:SET NULL"`
LastUsedAt time.Time `json:"lastUsedAt" gorm:"column:last_used_at;not null"`
ExpiresAt time.Time `json:"expiresAt" gorm:"column:expires_at;not null;index"`
RevokedAt *time.Time `json:"revokedAt,omitempty" gorm:"column:revoked_at"`
MFAMethod *string `json:"mfaMethod,omitempty" gorm:"column:mfa_method"`
MFAVerifiedAt *time.Time `json:"mfaVerifiedAt,omitempty" gorm:"column:mfa_verified_at"`
}
func (UserSession) TableName ¶
func (UserSession) TableName() string
type VolumeBackup ¶
type VolumeBackup struct {
BaseModel
VolumeName string `json:"volumeName" gorm:"column:volume_name;index"`
Size int64 `json:"size" gorm:"column:size"`
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at"`
ActivityID *string `json:"activityId,omitempty" gorm:"-"`
}
func (*VolumeBackup) TableName ¶
func (*VolumeBackup) TableName() string
func (*VolumeBackup) ToDTO ¶
func (b *VolumeBackup) ToDTO() volume.BackupEntry
type VulnerabilityIgnore ¶
type VulnerabilityIgnore struct {
// ID is the unique identifier for this ignore record
ID string `json:"id" gorm:"primaryKey;type:text"`
// EnvironmentID is the environment where this ignore applies
EnvironmentID string `json:"environmentId" gorm:"column:environment_id;index"`
// ImageID is the Docker image ID
ImageID string `json:"imageId" gorm:"column:image_id;index"`
// VulnerabilityID is the CVE or vulnerability identifier (e.g., CVE-2023-1234)
VulnerabilityID string `json:"vulnerabilityId" gorm:"column:vulnerability_id;index"`
// PkgName is the package name containing the vulnerability
PkgName string `json:"pkgName" gorm:"column:pkg_name"`
// InstalledVersion is the version of the package with the vulnerability
InstalledVersion string `json:"installedVersion" gorm:"column:installed_version"`
// Reason is an optional reason for ignoring this vulnerability
Reason *string `json:"reason,omitempty" gorm:"column:reason"`
// CreatedBy is the user ID who created this ignore record
CreatedBy string `json:"createdBy" gorm:"column:created_by"`
// CreatedAt is when this ignore record was created
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at"`
}
VulnerabilityIgnore stores ignored vulnerability records
func (*VulnerabilityIgnore) BeforeCreate ¶
func (v *VulnerabilityIgnore) BeforeCreate(db *gorm.DB) error
BeforeCreate sets the ID and CreatedAt before inserting
func (*VulnerabilityIgnore) CompositeKey ¶
func (v *VulnerabilityIgnore) CompositeKey() string
CompositeKey generates a composite key for deduplication. This helps prevent duplicate ignore records for the same vulnerability.
func (*VulnerabilityIgnore) TableName ¶
func (v *VulnerabilityIgnore) TableName() string
type VulnerabilityScanRecord ¶
type VulnerabilityScanRecord struct {
BaseModel
// ImageID is the Docker image ID (primary key)
ID string `json:"id" gorm:"primaryKey;type:text"`
// ImageName is the image name with tag (e.g., nginx:latest)
ImageName string `json:"imageName" gorm:"column:image_name"`
// Status is the status of the scan (pending, scanning, completed, failed)
Status string `json:"status" gorm:"column:status"`
// ScanTime is the timestamp when the scan was performed
ScanTime time.Time `json:"scanTime" gorm:"column:scan_time"`
// Duration is the duration of the scan in milliseconds
Duration int64 `json:"duration" gorm:"column:duration"`
// Total vulnerability counts by severity
CriticalCount int `json:"criticalCount" gorm:"column:critical_count"`
HighCount int `json:"highCount" gorm:"column:high_count"`
MediumCount int `json:"mediumCount" gorm:"column:medium_count"`
LowCount int `json:"lowCount" gorm:"column:low_count"`
UnknownCount int `json:"unknownCount" gorm:"column:unknown_count"`
TotalCount int `json:"totalCount" gorm:"column:total_count"`
// Vulnerabilities stores the JSON encoded vulnerabilities list
Vulnerabilities StringSlice `json:"vulnerabilities" gorm:"column:vulnerabilities;type:text"`
// Error contains the error message if the scan failed
Error *string `json:"error,omitempty" gorm:"column:error"`
// ScannerVersion is the version of the scanner used
ScannerVersion string `json:"scannerVersion" gorm:"column:scanner_version"`
}
VulnerabilityScanRecord stores vulnerability scan results for images
func (*VulnerabilityScanRecord) GetHighestSeverity ¶
func (v *VulnerabilityScanRecord) GetHighestSeverity() string
GetHighestSeverity returns the highest severity level found
func (*VulnerabilityScanRecord) GetTotalVulnerabilities ¶
func (v *VulnerabilityScanRecord) GetTotalVulnerabilities() int
GetTotalVulnerabilities returns the total count of vulnerabilities
func (*VulnerabilityScanRecord) IsCompleted ¶
func (v *VulnerabilityScanRecord) IsCompleted() bool
IsCompleted returns true if the scan has completed
func (*VulnerabilityScanRecord) IsFailed ¶
func (v *VulnerabilityScanRecord) IsFailed() bool
IsFailed returns true if the scan has failed
func (*VulnerabilityScanRecord) IsScanning ¶
func (v *VulnerabilityScanRecord) IsScanning() bool
IsScanning returns true if the scan is in progress
func (*VulnerabilityScanRecord) TableName ¶
func (v *VulnerabilityScanRecord) TableName() string
type Webhook ¶
type Webhook struct {
BaseModel
Name string `json:"name" gorm:"column:name;not null"`
TokenHash string `json:"-" gorm:"column:token_hash;not null;uniqueIndex"`
TokenPrefix string `json:"tokenPrefix" gorm:"column:token_prefix;not null"`
TargetType string `json:"targetType" gorm:"column:target_type;not null"`
ActionType string `json:"actionType" gorm:"column:action_type;not null;default:''"`
TargetID string `json:"targetId" gorm:"column:target_id;not null"`
TargetRef string `json:"-" gorm:"column:target_ref;not null;default:''"`
EnvironmentID string `json:"environmentId" gorm:"column:environment_id;not null;default:''"`
Enabled bool `json:"enabled" gorm:"column:enabled;not null;default:true"`
LastTriggeredAt *time.Time `json:"lastTriggeredAt,omitempty" gorm:"column:last_triggered_at"`
}
Source Files
¶
- activity.go
- api_key.go
- auto_update.go
- base.go
- container_registry.go
- customize.go
- environment.go
- environment_update_job.go
- errors.go
- event.go
- federated_credential.go
- federated_token_replay.go
- git_repository.go
- gitops_sync.go
- global_variable.go
- image_build.go
- image_update.go
- kv.go
- notification.go
- passkey.go
- project.go
- rbac.go
- settings.go
- template.go
- updater.go
- user.go
- user_avatar.go
- user_session.go
- volume_backup.go
- vulnerability_ignore.go
- vulnerability_scan.go
- webhook.go