Documentation
¶
Index ¶
- Constants
- func IsValidNotificationProvider(provider NotificationProvider) bool
- type APIError
- func NewAPIError(message string, code APIErrorCode, statusCode int) *APIError
- func NewAPIErrorWithDetails(message string, code APIErrorCode, statusCode int, details any) *APIError
- func NewConflictError(message string) *APIError
- func NewInternalServerError(message string) *APIError
- func NewNotFoundError(message string) *APIError
- func NewValidationError(message string, details any) *APIError
- func ToAPIError(err error) *APIError
- type APIErrorCode
- type APIErrorResponse
- type APISuccessResponse
- type ApiKey
- type AppriseSettings
- type AutoUpdateRecord
- type AutoUpdateStatus
- type BaseModel
- type ComposeTemplate
- type ComposeTemplateMetadata
- type ConflictError
- type ContainerRegistry
- type ConvertDockerRunRequest
- type ConvertDockerRunResponse
- type CreateContainerRegistryRequest
- type CreateGitRepositoryRequest
- type CustomizeItem
- type CustomizeVariable
- type DiscordConfig
- type DockerAPIError
- type DockerComposeConfig
- type DockerComposeDeploy
- type DockerComposeHealthcheck
- type DockerComposeResourceLimits
- type DockerComposeResources
- type DockerComposeService
- type DockerRunCommand
- type EmailConfig
- type EmailTLSMode
- type Environment
- type EnvironmentStatus
- type Event
- type EventSeverity
- type EventType
- type GenericConfig
- type GitOpsSync
- type GitRepository
- type GotifyConfig
- type ImageUpdate
- type ImageUpdateRecord
- type JSON
- type MatrixConfig
- type NotFoundError
- type NotificationEventType
- type NotificationLog
- type NotificationProvider
- type NotificationSettings
- type NtfyConfig
- type OidcConfig
- type Project
- type ProjectStatus
- type PushoverConfig
- type SettingKeyNotFoundError
- type SettingSensitiveForbiddenError
- type SettingVariable
- type Settings
- func (s *Settings) FieldByKey(key string) (defaultValue string, isPublic bool, isSensitive bool, err error)
- func (s *Settings) IsLocalSetting(key string) bool
- func (s *Settings) ToSettingVariableSlice(showAll bool, 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 ValidationError
- 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
Constants ¶
const ( // 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" EventTypeContainerError EventType = "container.error" EventTypeImagePull EventType = "image.pull" EventTypeImageLoad EventType = "image.load" 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" EventTypeSystemAutoUpdate EventType = "system.auto_update" EventTypeSystemUpgrade EventType = "system.upgrade" EventTypeEnvironmentCreate EventType = "environment.create" EventTypeEnvironmentUpdate EventType = "environment.update" EventTypeEnvironmentDelete EventType = "environment.delete" EventTypeEnvironmentApiKeyRegenerated EventType = "environment.api_key.regenerated" // Event severities EventSeverityInfo EventSeverity = "info" EventSeverityWarning EventSeverity = "warning" EventSeverityError EventSeverity = "error" EventSeveritySuccess EventSeverity = "success" )
const ( UpdateTypeDigest = "digest" UpdateTypeTag = "tag" )
const ( ScanStatusPending = "pending" ScanStatusScanning = "scanning" ScanStatusCompleted = "completed" ScanStatusFailed = "failed" )
Scan status constants
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 NewConflictError ¶
func NewInternalServerError ¶
func NewNotFoundError ¶
func NewValidationError ¶
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 ApiKey ¶
type ApiKey struct {
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"`
UserID string `json:"userId" gorm:"column:user_id;not null"`
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"`
BaseModel
}
type AppriseSettings ¶
type AppriseSettings struct {
ID uint `json:"id" gorm:"primaryKey"`
APIURL string `json:"apiUrl" gorm:"not null"`
Enabled bool `json:"enabled" gorm:"default:false"`
ImageUpdateTag string `json:"imageUpdateTag" gorm:"type:varchar(255)"`
ContainerUpdateTag string `json:"containerUpdateTag" gorm:"type:varchar(255)"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
func (AppriseSettings) TableName ¶
func (AppriseSettings) TableName() string
type AutoUpdateRecord ¶
type AutoUpdateRecord struct {
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"`
BaseModel
}
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" )
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"`
}
type ConflictError ¶
type ConflictError struct {
Message string
}
func (*ConflictError) Error ¶
func (e *ConflictError) Error() string
type ContainerRegistry ¶
type ContainerRegistry struct {
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"`
CreatedAt time.Time `json:"createdAt" sortable:"true"`
UpdatedAt time.Time `json:"updatedAt" sortable:"true"`
BaseModel
}
func (ContainerRegistry) TableName ¶
func (ContainerRegistry) TableName() string
type ConvertDockerRunRequest ¶
type ConvertDockerRunRequest struct {
DockerRunCommand string `json:"dockerRunCommand" binding:"required"`
}
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 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 `` /* 353-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 DockerComposeConfig ¶
type DockerComposeConfig struct {
Services map[string]DockerComposeService `yaml:"services" json:"services"`
}
type DockerComposeDeploy ¶
type DockerComposeDeploy struct {
Resources *DockerComposeResources `yaml:"resources,omitempty" json:"resources,omitempty"`
}
type DockerComposeHealthcheck ¶
type DockerComposeHealthcheck struct {
Test string `yaml:"test" json:"test"`
}
type DockerComposeResources ¶
type DockerComposeResources struct {
Limits *DockerComposeResourceLimits `yaml:"limits,omitempty" json:"limits,omitempty"`
}
type DockerComposeService ¶
type DockerComposeService struct {
Image string `yaml:"image" json:"image"`
ContainerName string `yaml:"container_name,omitempty" json:"container_name,omitempty"`
Ports []string `yaml:"ports,omitempty" json:"ports,omitempty"`
Volumes []string `yaml:"volumes,omitempty" json:"volumes,omitempty"`
Environment []string `yaml:"environment,omitempty" json:"environment,omitempty"`
Networks []string `yaml:"networks,omitempty" json:"networks,omitempty"`
Restart string `yaml:"restart,omitempty" json:"restart,omitempty"`
WorkingDir string `yaml:"working_dir,omitempty" json:"working_dir,omitempty"`
User string `yaml:"user,omitempty" json:"user,omitempty"`
Entrypoint string `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
Command string `yaml:"command,omitempty" json:"command,omitempty"`
StdinOpen bool `yaml:"stdin_open,omitempty" json:"stdin_open,omitempty"`
TTY bool `yaml:"tty,omitempty" json:"tty,omitempty"`
Privileged bool `yaml:"privileged,omitempty" json:"privileged,omitempty"`
Labels []string `yaml:"labels,omitempty" json:"labels,omitempty"`
Healthcheck *DockerComposeHealthcheck `yaml:"healthcheck,omitempty" json:"healthcheck,omitempty"`
Deploy *DockerComposeDeploy `yaml:"deploy,omitempty" json:"deploy,omitempty"`
}
type DockerRunCommand ¶
type DockerRunCommand struct {
Image string `json:"image"`
Name string `json:"name,omitempty"`
Ports []string `json:"ports,omitempty"`
Volumes []string `json:"volumes,omitempty"`
Environment []string `json:"environment,omitempty"`
Networks []string `json:"networks,omitempty"`
Restart string `json:"restart,omitempty"`
Workdir string `json:"workdir,omitempty"`
User string `json:"user,omitempty"`
Entrypoint string `json:"entrypoint,omitempty"`
Command string `json:"command,omitempty"`
Detached bool `json:"detached,omitempty"`
Interactive bool `json:"interactive,omitempty"`
TTY bool `json:"tty,omitempty"`
Remove bool `json:"remove,omitempty"`
Privileged bool `json:"privileged,omitempty"`
Labels []string `json:"labels,omitempty"`
HealthCheck string `json:"healthCheck,omitempty"`
MemoryLimit string `json:"memoryLimit,omitempty"`
CPULimit string `json:"cpuLimit,omitempty"`
}
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"`
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 {
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"`
LastSeen *time.Time `json:"lastSeen" gorm:"column:last_seen"`
AccessToken *string `json:"-" gorm:"column:access_token"`
ApiKeyID *string `json:"-" gorm:"column:api_key_id"`
BaseModel
}
func (Environment) TableName ¶
func (Environment) TableName() string
type EnvironmentStatus ¶
type EnvironmentStatus string
const ( EnvironmentStatusOnline EnvironmentStatus = "online" EnvironmentStatusOffline EnvironmentStatus = "offline" EnvironmentStatusError EnvironmentStatus = "error" EnvironmentStatusPending EnvironmentStatus = "pending" )
type Event ¶
type Event struct {
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"`
BaseModel
}
type EventSeverity ¶
type EventSeverity 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"`
}
type GitOpsSync ¶
type GitOpsSync struct {
Name string `json:"name" sortable:"true" search:"sync,gitops,automation,deploy,deployment,continuous"`
EnvironmentID string `json:"environmentId" sortable:"true"`
Environment *Environment `json:"environment,omitempty" gorm:"foreignKey:EnvironmentID"`
RepositoryID string `json:"repositoryId" sortable:"true"`
Repository *GitRepository `json:"repository,omitempty" gorm:"foreignKey:RepositoryID"`
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"`
ProjectName string `json:"projectName" sortable:"true" search:"project,name,stack,application,service"` // Name of project to create/update
ProjectID *string `json:"projectId,omitempty" sortable:"true"` // Set after project is created
Project *Project `json:"project,omitempty" gorm:"foreignKey:ProjectID"`
AutoSync bool `json:"autoSync" sortable:"true" search:"auto,automatic,sync,continuous,scheduled"`
SyncInterval int `json:"syncInterval" sortable:"true" search:"interval,frequency,schedule,cron,minutes"` // in minutes
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"`
BaseModel
}
func (GitOpsSync) TableName ¶
func (GitOpsSync) TableName() string
type GitRepository ¶
type GitRepository struct {
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"`
BaseModel
}
func (GitRepository) TableName ¶
func (GitRepository) TableName() string
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"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type ImageUpdate ¶
type ImageUpdateRecord ¶
type ImageUpdateRecord struct {
ID string `json:"id" gorm:"primaryKey;type:text"`
Repository string `json:"repository"`
Tag string `json:"tag"`
HasUpdate bool `json:"hasUpdate" gorm:"column:has_update"`
UpdateType string `json:"updateType" gorm:"column:update_type"`
CurrentVersion string `json:"currentVersion" gorm:"column:current_version"`
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"`
CheckTime time.Time `json:"checkTime" gorm:"column:check_time"`
ResponseTimeMs int `json:"responseTimeMs" gorm:"column:response_time_ms"`
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"`
UsedCredential bool `json:"usedCredential,omitempty" gorm:"column:used_credential"`
NotificationSent bool `json:"notificationSent" gorm:"column:notification_sent;default:false"`
BaseModel
}
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 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"` //nolint:gosec // JSON schema compatibility with external provider config
DisableTLSVerification bool `json:"disableTlsVerification"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type NotFoundError ¶
type NotFoundError struct {
Message string
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type NotificationEventType ¶
type NotificationEventType string
const ( NotificationEventImageUpdate NotificationEventType = "image_update" NotificationEventContainerUpdate NotificationEventType = "container_update" NotificationEventVulnerabilityFound NotificationEventType = "vulnerability_found" NotificationEventPruneReport NotificationEventType = "prune_report" )
type NotificationLog ¶
type NotificationLog struct {
ID uint `json:"id" gorm:"primaryKey"`
Provider NotificationProvider `json:"provider" gorm:"not null;index;type:varchar(50)"`
ImageRef string `json:"imageRef" gorm:"not null;type:text"`
Status string `json:"status" gorm:"not null"`
Error *string `json:"error,omitempty"`
Metadata JSON `json:"metadata" gorm:"type:jsonb"`
SentAt time.Time `json:"sentAt" gorm:"not null;index"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
func (NotificationLog) TableName ¶
func (NotificationLog) TableName() string
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" 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"` //nolint:gosec // JSON schema compatibility with external provider config
Priority string `json:"priority,omitempty"`
Tags []string `json:"tags,omitempty"`
Icon string `json:"icon,omitempty"`
Cache bool `json:"cache"`
Firebase bool `json:"firebase"`
DisableTLSVerification bool `json:"disableTlsVerification"`
Events map[NotificationEventType]bool `json:"events,omitempty"`
}
type OidcConfig ¶
type OidcConfig struct {
ClientID string `json:"clientId"`
ClientSecret string `json:"clientSecret"` //nolint:gosec // OIDC schema compatibility requires this field name
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"`
// Admin mapping: evaluate this claim to grant admin.
// Examples:
// - adminClaim: "admin", adminValue: "true" (boolean or string "true")
// - adminClaim: "roles", adminValue: "admin" (array membership)
// - adminClaim: "realm_access.roles", adminValue: "admin" (Keycloak)
AdminClaim string `json:"adminClaim,omitempty"`
AdminValue string `json:"adminValue,omitempty"`
SkipTlsVerify bool `json:"skipTlsVerify"`
}
type Project ¶
type Project struct {
Name string `json:"name" sortable:"true"`
DirName *string `json:"dir_name"`
Path string `json:"path"`
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"`
BaseModel
}
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 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 Settings ¶
type Settings struct {
// General category
ProjectsDirectory SettingVariable `` /* 234-byte string literal not displayed */
DiskUsagePath SettingVariable `` /* 171-byte string literal not displayed */
BaseServerURL SettingVariable `` /* 183-byte string literal not displayed */
EnableGravatar SettingVariable `` /* 192-byte string literal not displayed */
DefaultShell SettingVariable `` /* 162-byte string literal not displayed */
EnvironmentHealthInterval SettingVariable `` /* 396-byte string literal not displayed */
AccentColor SettingVariable `` /* 169-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 */
EventCleanupInterval SettingVariable `` /* 213-byte string literal not displayed */
AnalyticsHeartbeatInterval SettingVariable `` /* 238-byte string literal not displayed */
AutoInjectEnv SettingVariable `` /* 243-byte string literal not displayed */
PruneMode SettingVariable `` /* 216-byte string literal not displayed */
ScheduledPruneEnabled SettingVariable `` /* 213-byte string literal not displayed */
ScheduledPruneInterval SettingVariable `` /* 207-byte string literal not displayed */
GitopsSyncInterval SettingVariable `` /* 223-byte string literal not displayed */
ScheduledPruneContainers SettingVariable `` /* 208-byte string literal not displayed */
ScheduledPruneImages SettingVariable `` /* 191-byte string literal not displayed */
ScheduledPruneVolumes SettingVariable `` /* 195-byte string literal not displayed */
ScheduledPruneNetworks SettingVariable `` /* 199-byte string literal not displayed */
ScheduledPruneBuildCache SettingVariable `` /* 210-byte string literal not displayed */
MaxImageUploadSize SettingVariable `` /* 232-byte string literal not displayed */
DockerHost SettingVariable `` /* 169-byte string literal not displayed */
// Security category
AuthLocalEnabled SettingVariable `` /* 351-byte string literal not displayed */
AuthSessionTimeout SettingVariable `` /* 197-byte string literal not displayed */
AuthPasswordPolicy SettingVariable `` /* 203-byte string literal not displayed */
VulnerabilityScanEnabled SettingVariable `` /* 242-byte string literal not displayed */
VulnerabilityScanInterval SettingVariable `` /* 243-byte string literal not displayed */
TrivyImage SettingVariable `` /* 199-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 */
AuthOidcConfig SettingVariable `` /* 222-byte string literal not displayed */
OidcEnabled SettingVariable `` /* 224-byte string literal not displayed */
OidcClientId SettingVariable `` /* 166-byte string literal not displayed */
OidcClientSecret SettingVariable `` /* 189-byte string literal not displayed */
OidcIssuerUrl SettingVariable `` /* 179-byte string literal not displayed */
OidcAuthorizationEndpoint SettingVariable `` /* 211-byte string literal not displayed */
OidcTokenEndpoint SettingVariable `` /* 179-byte string literal not displayed */
OidcUserinfoEndpoint SettingVariable `` /* 191-byte string literal not displayed */
OidcJwksEndpoint SettingVariable `` /* 180-byte string literal not displayed */
OidcDeviceAuthorizationEndpoint SettingVariable `` /* 265-byte string literal not displayed */
OidcScopes SettingVariable `` /* 169-byte string literal not displayed */
OidcAdminClaim SettingVariable `` /* 180-byte string literal not displayed */
OidcAdminValue SettingVariable `` /* 183-byte string literal not displayed */
OidcSkipTlsVerify SettingVariable `` /* 198-byte string literal not displayed */
OidcAutoRedirectToProvider SettingVariable `` /* 237-byte string literal not displayed */
OidcMergeAccounts SettingVariable `` /* 247-byte string literal not displayed */
OidcProviderName SettingVariable `` /* 221-byte string literal not displayed */
OidcProviderLogoUrl SettingVariable `` /* 205-byte string literal not displayed */
// Appearance category
SidebarHoverExpansion SettingVariable `` /* 349-byte string literal not displayed */
KeyboardShortcutsEnabled SettingVariable `` /* 273-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 */
// 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) IsLocalSetting ¶
func (*Settings) ToSettingVariableSlice ¶
func (s *Settings) ToSettingVariableSlice(showAll bool, 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"` //nolint:gosec // JSON schema compatibility with external provider config
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
nolint:recvcheck
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 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 {
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"`
Roles StringSlice `json:"roles" gorm:"type:text"`
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"`
RequiresPasswordChange bool `json:"requiresPasswordChange" gorm:"column:requires_password_change"`
// OIDC provider tokens
OidcAccessToken *string `json:"-" gorm:"type:text"`
OidcRefreshToken *string `json:"-" gorm:"type:text"`
OidcAccessTokenExpiresAt *time.Time `json:"-"`
BaseModel
}
type ValidationError ¶
func (*ValidationError) Error ¶
func (e *ValidationError) Error() 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"`
}
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
VulnerabilityIgnoreCompositeKey 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 {
// 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"`
BaseModel
}
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