Documentation
ΒΆ
Index ΒΆ
- Constants
- Variables
- func GetFeatureDescriptions() map[OrgFeature]string
- type AWSAccount
- type AWSECRImageConfig
- type AWSIAMRoleType
- type AWSRegionType
- type AWSStackOutputs
- type Account
- type AccountIdentity
- type AccountRole
- type AccountType
- type ActionWorkflow
- type ActionWorkflowConfig
- func (a *ActionWorkflowConfig) AfterQuery(tx *gorm.DB) error
- func (a *ActionWorkflowConfig) BeforeCreate(tx *gorm.DB) error
- func (a *ActionWorkflowConfig) GetComponentTriggerIndex(typ ActionWorkflowTriggerType, componentID string) int
- func (a *ActionWorkflowConfig) GetTriggerIndex(typ ActionWorkflowTriggerType) int
- func (a *ActionWorkflowConfig) HasComponentTrigger(typ ActionWorkflowTriggerType, componentID string) bool
- func (a *ActionWorkflowConfig) HasTrigger(typ ActionWorkflowTriggerType) bool
- func (a *ActionWorkflowConfig) Indexes(db *gorm.DB) []migrations.Index
- func (i *ActionWorkflowConfig) Views(db *gorm.DB) []migrations.View
- func (a *ActionWorkflowConfig) WorkflowConfigCanTriggerManually() bool
- type ActionWorkflowStatus
- type ActionWorkflowStepConfig
- type ActionWorkflowTriggerConfig
- type ActionWorkflowTriggerType
- type App
- type AppAWSIAMPolicyConfig
- type AppAWSIAMRoleConfig
- type AppBranch
- type AppBreakGlassConfig
- type AppConfig
- type AppConfigStatus
- type AppConfigVersion
- type AppInput
- type AppInputConfig
- type AppInputGroup
- type AppInputSource
- type AppInputType
- type AppPermissionsConfig
- type AppPoliciesConfig
- type AppPolicyConfig
- type AppRepository
- type AppRepositoryType
- type AppRunnerConfig
- type AppRunnerConfigHelmDriverType
- type AppRunnerType
- type AppSandboxConfig
- type AppSecret
- type AppSecretConfig
- type AppSecretConfigFmt
- type AppSecretsConfig
- type AppStackConfig
- type AppStatus
- type AzureAccount
- type AzureStackOutputs
- type CHTableSize
- type CloudPlatform
- type CloudPlatformRegion
- type Component
- type ComponentBuild
- type ComponentBuildStatus
- type ComponentConfigConnection
- func (c *ComponentConfigConnection) AfterQuery(tx *gorm.DB) error
- func (c *ComponentConfigConnection) BeforeCreate(tx *gorm.DB) error
- func (c *ComponentConfigConnection) GetBuildTimeout() *time.Duration
- func (c *ComponentConfigConnection) GetDeployTimeout() *time.Duration
- func (a *ComponentConfigConnection) Indexes(db *gorm.DB) []migrations.Index
- func (c *ComponentConfigConnection) UseView() bool
- func (c *ComponentConfigConnection) ViewVersion() string
- func (c *ComponentConfigConnection) Views(db *gorm.DB) []migrations.View
- type ComponentConfigDependency
- type ComponentDependency
- type ComponentRelease
- type ComponentReleaseStep
- type ComponentReleaseStrategy
- type ComponentStatus
- type ComponentType
- type CompositeStatus
- type ConnectedGithubVCSConfig
- type DeviceCode
- type DockerBuildComponentConfig
- type DriftedObject
- func (d *DriftedObject) AfterQuery(tx *gorm.DB) error
- func (d *DriftedObject) BeforeCreate(tx *gorm.DB) error
- func (d *DriftedObject) EventLoops() []bulk.EventLoop
- func (d *DriftedObject) Indexes(db *gorm.DB) []migrations.Index
- func (d *DriftedObject) UseView() bool
- func (d *DriftedObject) ViewVersion() string
- func (d *DriftedObject) Views(db *gorm.DB) []migrations.View
- type EndpointAudit
- type Event
- type ExternalImageComponentConfig
- type HelmChart
- type HelmComponentConfig
- type HelmConfig
- type HelmRelease
- type HelmRepoConfig
- type IdentityProvider
- func (a *IdentityProvider) BeforeCreate(tx *gorm.DB) error
- func (ip *IdentityProvider) GetGitHubConfig() (*providers.GitHubConfig, error)
- func (ip *IdentityProvider) GetGoogleConfig() (*providers.GoogleConfig, error)
- func (ip *IdentityProvider) GetOpenIDConfig() (*providers.OpenIDConfig, error)
- func (a *IdentityProvider) Indexes(db *gorm.DB) []migrations.Index
- func (ip *IdentityProvider) SetGitHubConfig(cfg *providers.GitHubConfig) error
- func (ip *IdentityProvider) SetGoogleConfig(cfg *providers.GoogleConfig) error
- func (ip *IdentityProvider) SetOpenIDConfig(cfg *providers.OpenIDConfig) error
- func (ip *IdentityProvider) ValidateConfig() error
- type Install
- func (i *Install) AfterQuery(tx *gorm.DB) error
- func (i *Install) BeforeCreate(tx *gorm.DB) error
- func (i *Install) EventLoops() []bulk.EventLoop
- func (i *Install) Indexes(db *gorm.DB) []migrations.Index
- func (i *Install) UseView() bool
- func (i *Install) ViewVersion() string
- func (i *Install) Views(db *gorm.DB) []migrations.View
- type InstallActionWorkflow
- type InstallActionWorkflowManualTrigger
- type InstallActionWorkflowRun
- type InstallActionWorkflowRunStatus
- type InstallActionWorkflowRunStep
- type InstallActionWorkflowRunStepStatus
- type InstallApprovalOption
- type InstallAuditLog
- func (*InstallAuditLog) CurrentViewVersion() int
- func (m InstallAuditLog) GetTableOptions() (string, bool)
- func (r InstallAuditLog) MigrateDB(db *gorm.DB) *gorm.DB
- func (*InstallAuditLog) UseView() bool
- func (i *InstallAuditLog) ViewVersion() string
- func (i *InstallAuditLog) Views(db *gorm.DB) []migrations.View
- type InstallComponent
- type InstallComponentStatus
- type InstallComponentSummary
- type InstallConfig
- type InstallDeploy
- type InstallDeployStatus
- type InstallDeployType
- type InstallEvent
- type InstallInputs
- type InstallIntermediateData
- type InstallSandbox
- type InstallSandboxRun
- type InstallSandboxStatus
- type InstallStack
- type InstallStackOutputs
- type InstallStackVersion
- type InstallStackVersionRun
- type InstallState
- type Installer
- type InstallerApp
- type InstallerMetadata
- type InstallerType
- type JSONMap
- type JobComponentConfig
- type KubernetesManifestComponentConfig
- type KustomizeConfig
- type LatestRunnerHeartBeat
- type LogStream
- type NotificationsConfig
- type OCIArtifact
- type OperationStatus
- type Org
- type OrgFeature
- type OrgFeatureInfo
- type OrgInvite
- type OrgInviteStatus
- type OrgStatus
- type OrgType
- type OtelLogRecord
- type OtelMetricExponentialHistogram
- type OtelMetricExponentialHistogramExemplar
- type OtelMetricExponentialHistogramIngestion
- type OtelMetricGauge
- type OtelMetricGaugeExemplar
- type OtelMetricGaugeIngestion
- type OtelMetricHistogram
- type OtelMetricHistogramExemplar
- type OtelMetricHistogramIngestion
- type OtelMetricSum
- type OtelMetricSumExemplar
- type OtelMetricSumIngestion
- type OtelMetricSummary
- type OtelMetricSummaryExemplar
- type OtelMetricSummaryIngestion
- type OtelTrace
- type OtelTraceEvent
- type OtelTraceIngestion
- type OtelTraceLink
- type PSQLTableSize
- type Policy
- type PolicyInputRef
- type PolicyName
- type PolicyReport
- type PolicyReportOwnerType
- type PolicyResult
- type PolicyViolation
- type ProviderType
- type PublicGitVCSConfig
- type Queue
- type QueueSignal
- type ReleaseStatus
- type Role
- type RoleType
- type Runner
- type RunnerGroup
- type RunnerGroupSettings
- type RunnerGroupType
- type RunnerHealthCheck
- func (r *RunnerHealthCheck) AfterQuery(tx *gorm.DB) error
- func (r *RunnerHealthCheck) BeforeCreate(tx *gorm.DB) error
- func (r RunnerHealthCheck) GetTableClusterOptions() string
- func (r RunnerHealthCheck) GetTableOptions() string
- func (*RunnerHealthCheck) UseView() bool
- func (*RunnerHealthCheck) ViewVersion() string
- func (i *RunnerHealthCheck) Views(db *gorm.DB) []migrations.View
- type RunnerHeartBeat
- type RunnerJob
- type RunnerJobExecution
- type RunnerJobExecutionOutputs
- type RunnerJobExecutionResult
- func (r *RunnerJobExecutionResult) BeforeCreate(tx *gorm.DB) error
- func (r *RunnerJobExecutionResult) GetContentsB64String() (string, error)
- func (r *RunnerJobExecutionResult) GetContentsDisplayDecompressedBytes() ([]byte, error)
- func (r *RunnerJobExecutionResult) GetContentsDisplayString() (string, error)
- func (r *RunnerJobExecutionResult) Indexes(db *gorm.DB) []migrations.Index
- type RunnerJobExecutionStatus
- type RunnerJobGroup
- type RunnerJobOperationType
- type RunnerJobPlan
- type RunnerJobStatus
- type RunnerJobType
- type RunnerOperation
- type RunnerOperationStatus
- type RunnerOperationType
- type RunnerProcess
- type RunnerStatus
- type SandboxRunStatus
- type SandboxRunType
- type Signal
- type StackType
- type Status
- type StepErrorBehavior
- type TemporalPayload
- type TerraformLock
- type TerraformModuleComponentConfig
- type TerraformStateData
- type TerraformStateInstance
- type TerraformStateResource
- type TerraformWorkspace
- type TerraformWorkspaceLock
- type TerraformWorkspaceState
- func (t *TerraformWorkspaceState) BeforeCreate(tx *gorm.DB) (err error)
- func (t *TerraformWorkspaceState) Indexes(db *gorm.DB) []migrations.Index
- func (i *TerraformWorkspaceState) UseView() bool
- func (i *TerraformWorkspaceState) ViewVersion() string
- func (i *TerraformWorkspaceState) Views(db *gorm.DB) []migrations.View
- type TerraformWorkspaceStateJSON
- type Token
- type TokenType
- type UserJourney
- type UserJourneyStep
- type UserJourneys
- type VCSConnection
- type VCSConnectionCommit
- type VCSConnectionType
- type Waitlist
- type Workflow
- type WorkflowMetadataKey
- type WorkflowStep
- type WorkflowStepApproval
- type WorkflowStepApprovalResponse
- type WorkflowStepApprovalType
- type WorkflowStepExecutionType
- type WorkflowStepPolicyValidation
- type WorkflowStepResponseType
- type WorkflowStepTargetType
- type WorkflowType
Constants ΒΆ
const ( // Build timeout bounds (applies to build operations) MinBuildTimeout = time.Second * 1 MaxBuildTimeout = time.Hour * 1 // Deploy timeout bounds (applies to deploy operations) MinDeployTimeout = time.Second * 1 MaxDeployTimeout = time.Hour * 1 )
const (
DefaultAWSInstanceType = "t3a.medium"
)
const (
HeaderInstallWorkflowID = "X-Nuon-Install-Workflow-ID"
)
const (
WorkflowMetadataKeyWorkflowNameSuffix = "workflow-name-suffix"
)
Variables ΒΆ
var ( CommonRunnerGroupSettingsGroups = [...]string{"operations", "sync"} DefaultOrgRunnerGroupSettingsGroups = [...]string{"build", "sandbox", "runner"} DefaultInstallRunnerGroupSettingsGroups = [...]string{"deploys", "action", "sandbox"} )
TODO(fd): use the consts
var AllActionWorkflowComponentTriggerTypes = []ActionWorkflowTriggerType{ ActionWorkflowTriggerTypePreDeployComponent, ActionWorkflowTriggerTypePostDeployComponent, ActionWorkflowTriggerTypePreTeardownComponent, ActionWorkflowTriggerTypePostTeardownComponent, }
These component types require a component to be passed with them
var AllActionWorkflowTriggerTypes = []ActionWorkflowTriggerType{ ActionWorkflowTriggerTypeManual, ActionWorkflowTriggerTypeCron, ActionWorkflowTriggerTypePreDeployComponent, ActionWorkflowTriggerTypePostDeployComponent, ActionWorkflowTriggerTypePreTeardownComponent, ActionWorkflowTriggerTypePostTeardownComponent, ActionWorkflowTriggerTypePreProvision, ActionWorkflowTriggerTypePostProvision, ActionWorkflowTriggerTypePreReprovision, ActionWorkflowTriggerTypePostReprovision, ActionWorkflowTriggerTypePreDeprovision, ActionWorkflowTriggerTypePostDeprovision, ActionWorkflowTriggerTypePreDeployAllComponents, ActionWorkflowTriggerTypePostDeployAllComponents, ActionWorkflowTriggerTypePreTeardownAllComponents, ActionWorkflowTriggerTypePostTeardownAllComponents, ActionWorkflowTriggerTypePreDeprovisionSandbox, ActionWorkflowTriggerTypePostDeprovisionSandbox, ActionWorkflowTriggerTypePreReprovisionSandbox, ActionWorkflowTriggerTypePostReprovisionSandbox, ActionWorkflowTriggerTypePreUpdateInputs, ActionWorkflowTriggerTypePostUpdateInputs, }
All component types
var AllPolicyTypes = config.AllAppPolicyTypes
Functions ΒΆ
func GetFeatureDescriptions ΒΆ
func GetFeatureDescriptions() map[OrgFeature]string
GetFeatureDescriptions returns a map of feature names to their descriptions
Types ΒΆ
type AWSAccount ΒΆ
type AWSAccount struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"-" gorm:"notnull" temporaljson:"install_id,omitzero,omitempty"`
Region string `json:"region,omitzero" gorm:"notnull" temporaljson:"region,omitzero,omitempty"`
IAMRoleARN string `json:"iam_role_arn,omitzero" gorm:"notnull" temporaljson:"iam_role_arn,omitzero,omitempty"`
}
func (*AWSAccount) BeforeCreate ΒΆ
func (a *AWSAccount) BeforeCreate(tx *gorm.DB) error
func (*AWSAccount) Indexes ΒΆ
func (a *AWSAccount) Indexes(db *gorm.DB) []migrations.Index
type AWSECRImageConfig ΒΆ
type AWSECRImageConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
// connection to parent model
ComponentConfigID string `json:"component_config_id,omitzero" gorm:"notnull" temporaljson:"component_config_id,omitzero,omitempty"`
ComponentConfigType string `json:"component_config_type,omitzero" gorm:"notnull" temporaljson:"component_config_type,omitzero,omitempty"`
// actual configuration
IAMRoleARN string `json:"iam_role_arn,omitzero" gorm:"notnull" temporaljson:"iam_role_arn,omitzero,omitempty"`
AWSRegion string `json:"aws_region,omitzero" gorm:"notnull" temporaljson:"aws_region,omitzero,omitempty"`
}
func (*AWSECRImageConfig) BeforeCreate ΒΆ
func (c *AWSECRImageConfig) BeforeCreate(tx *gorm.DB) error
func (*AWSECRImageConfig) Indexes ΒΆ
func (c *AWSECRImageConfig) Indexes(db *gorm.DB) []migrations.Index
type AWSIAMRoleType ΒΆ
type AWSIAMRoleType string
const ( // used for initial install setup AWSIAMRoleTypeRunnerProvision AWSIAMRoleType = "runner_provision" // used for tearing down an install AWSIAMRoleTypeRunnerDeprovision AWSIAMRoleType = "runner_deprovision" // used for updates and other maintenance AWSIAMRoleTypeRunnerMaintenance AWSIAMRoleType = "runner_maintenance" // used for break-glass by the vendor AWSIAMRoleTypeBreakGlass AWSIAMRoleType = "breakglass" // used for break glass mode where the runner is given elevated permissions // // NOTE(jm): at some point, we probably need break glass actions AWSIAMRoleTypeRunnerBreakGlass AWSIAMRoleType = "runner_breakglass" )
type AWSRegionType ΒΆ
type AWSRegionType string
const ( AWSRegionTypeDefault AWSRegionType = "default" AWSRegionTypeGovCloud AWSRegionType = "govcloud" AWSRegionTypeUnknown AWSRegionType = "" )
func (AWSRegionType) String ΒΆ
func (a AWSRegionType) String() string
type AWSStackOutputs ΒΆ
type AWSStackOutputs struct {
AccountID string `json:"account_id,omitzero" mapstructure:"account_id" temporaljson:"account_id,omitzero,omitempty"`
Region string `json:"region,omitzero" mapstructure:"region" temporaljson:"region,omitzero,omitempty"`
VPCID string `json:"vpc_id,omitzero" mapstructure:"vpc_id" temporaljson:"vpcid,omitzero,omitempty"`
RunnerSubnet string `json:"runner_subnet,omitzero" mapstructure:"runner_subnet" temporaljson:"runner_subnet,omitzero,omitempty"`
PublicSubnets []string `json:"public_subnets,omitzero" mapstructure:"public_subnets" temporaljson:"public_subnets,omitzero,omitempty"`
PrivateSubnets []string `json:"private_subnets,omitzero" mapstructure:"private_subnets" temporaljson:"private_subnets,omitzero,omitempty"`
ProvisionIAMRoleARN string `` /* 133-byte string literal not displayed */
DeprovisionIAMRoleARN string `` /* 139-byte string literal not displayed */
MaintenanceIAMRoleARN string `` /* 139-byte string literal not displayed */
RunnerIAMRoleARN string `json:"runner_iam_role_arn,omitzero" mapstructure:"runner_iam_role_arn" temporaljson:"runner_iam_role_arn,omitzero,omitempty"`
BreakGlassRoleARNs map[string]string `` /* 130-byte string literal not displayed */
InstallInputs map[string]string `json:"install_inputs,omitzero" mapstructure:"install_inputs" temporaljson:"install_inputs,omitzero,omitempty"`
}
type Account ΒΆ
type Account struct {
ID string `gorm:"primarykey" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_email_subject,unique" temporaljson:"deleted_at,omitzero,omitempty"`
Email string `json:"email,omitzero" gorm:"index:idx_email_subject,unique,not null;default null" temporaljson:"email,omitzero,omitempty"`
Subject string `json:"subject,omitzero" gorm:"index:idx_email_subject,unique,not null;" temporaljson:"subject,omitzero,omitempty"`
AccountType AccountType `json:"account_type,omitzero" temporaljson:"account_type,omitzero,omitempty"`
Roles []Role `gorm:"many2many:account_roles;constraint:OnDelete:CASCADE;" json:"roles,omitzero" temporaljson:"roles,omitzero,omitempty"`
Tokens []Token `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"tokens,omitzero,omitempty"`
Identities []AccountIdentity `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"identities,omitzero,omitempty"`
UserJourneys UserJourneys `json:"user_journeys,omitzero" gorm:"type:jsonb;default null" temporaljson:"user_journeys,omitzero,omitempty"`
// ReadOnly Fields
OrgIDs []string `json:"org_ids,omitzero" gorm:"-" temporaljson:"org_i_ds,omitzero,omitempty"`
Orgs []*Org `json:"-" gorm:"-" temporaljson:"orgs,omitzero,omitempty"`
AllPermissions permissions.Set `json:"permissions,omitzero" gorm:"-" temporaljson:"all_permissions,omitzero,omitempty"`
IsEmployee bool `json:"-"`
}
func (*Account) JoinTables ΒΆ
func (*Account) JoinTables() []migrations.JoinTable
type AccountIdentity ΒΆ
type AccountIdentity struct {
ID string `gorm:"primarykey" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
// Account relationship
AccountID string `` /* 138-byte string literal not displayed */
Account *Account `gorm:"constraint:OnDelete:CASCADE" faker:"-" json:"-" temporaljson:"account,omitzero,omitempty"`
// Identity Provider relationship (nullable for default env-var provider)
IdentityProviderID *string `gorm:"index" json:"identity_provider_id,omitempty" temporaljson:"identity_provider_id,omitzero,omitempty"`
IdentityProvider *IdentityProvider `gorm:"constraint:OnDelete:SET NULL" faker:"-" json:"-" temporaljson:"identity_provider,omitzero,omitempty"`
// Provider type - required, enables lookup when using the default env-var provider
ProviderType ProviderType `` /* 191-byte string literal not displayed */
// Subject identifier from the IdP - the canonical, stable user identifier
Sub string `gorm:"not null;index:idx_account_identity_provider_sub,unique" json:"sub,omitzero" temporaljson:"sub,omitzero,omitempty"`
// User profile information from the identity provider
Name string `json:"name,omitempty" temporaljson:"name,omitempty"`
Picture string `json:"picture,omitempty" temporaljson:"picture,omitempty"`
}
AccountIdentity links an account to an identity provider using the IdP's subject identifier. This enables secure authentication where users are identified by their stable `sub` claim rather than by email (which can change or be reassigned).
func (*AccountIdentity) BeforeCreate ΒΆ
func (a *AccountIdentity) BeforeCreate(tx *gorm.DB) error
func (*AccountIdentity) Indexes ΒΆ
func (a *AccountIdentity) Indexes(db *gorm.DB) []migrations.Index
func (AccountIdentity) TableName ΒΆ
func (a AccountIdentity) TableName() string
type AccountRole ΒΆ
type AccountRole struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_account_role:unique" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID generics.NullString `json:"org_id,omitzero" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org *Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
RoleID string `gorm:"primary_key;index:idx_account_role:unique" temporaljson:"role_id,omitzero,omitempty"`
Role Role `temporaljson:"role,omitzero,omitempty"`
AccountID string `json:"account_id,omitzero" gorm:"primary_key;index:idx_account_role:unique" temporaljson:"account_id,omitzero,omitempty"`
Account Account `json:"account,omitzero" temporaljson:"account,omitzero,omitempty"`
}
AccountRole is a many2many table used by gorm under the hood
func (*AccountRole) BeforeSave ΒΆ
func (c *AccountRole) BeforeSave(tx *gorm.DB) error
func (*AccountRole) Indexes ΒΆ
func (a *AccountRole) Indexes(db *gorm.DB) []migrations.Index
type AccountType ΒΆ
type AccountType string
const ( AccountTypeAuth AccountType = "auth" AccountTypeAuth0 AccountType = "auth0" AccountTypeService AccountType = "service" // Internal Account Types for testing AccountTypeCanary AccountType = "canary" AccountTypeIntegration AccountType = "integration" )
type ActionWorkflow ΒΆ
type ActionWorkflow struct {
ID string `json:"id" gorm:"primary_key;check:id_checker,char_length(id)=26" temporaljson:"id,omitzero,omitempty"`
// TODO: change to default null after migration & after initial pr
Status ActionWorkflowStatus `json:"status,omitzero" gorm:"notnull;default:'active'" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" temporaljson:"status_description,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_action_workflow_app_id_name,unique" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
App App `json:"-" swaggerignore:"true" temporaljson:"app,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"index:idx_action_workflow_app_id_name,unique" faker:"-" temporaljson:"app_id,omitzero,omitempty"`
Configs []ActionWorkflowConfig `json:"configs" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"configs,omitzero,omitempty"`
ConfigCount int `json:"config_count" gorm:"->;-:migration" temporaljson:"config_count,omitzero,omitempty"`
// metadata
Name string `json:"name,omitzero" gorm:"index:idx_action_workflow_app_id_name,unique" temporaljson:"name,omitzero,omitempty"`
}
func (*ActionWorkflow) BeforeCreate ΒΆ
func (a *ActionWorkflow) BeforeCreate(tx *gorm.DB) error
func (*ActionWorkflow) Indexes ΒΆ
func (a *ActionWorkflow) Indexes(db *gorm.DB) []migrations.Index
type ActionWorkflowConfig ΒΆ
type ActionWorkflowConfig struct {
ID string `json:"id,omitzero" gorm:"primary_key;check:id_checker,char_length(id)=26" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_action_workflow_id_app_config_id,unique" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
App App `json:"-" swaggerignore:"true" temporaljson:"app,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"notnull;index:idx_app_install_name,unique" temporaljson:"app_id,omitzero,omitempty"`
AppConfigID string `` /* 134-byte string literal not displayed */
AppConfig AppConfig `json:"-" temporaljson:"app_config,omitzero,omitempty"`
ActionWorkflowID string `` /* 144-byte string literal not displayed */
ActionWorkflow ActionWorkflow `json:"-" temporaljson:"action_workflow,omitzero,omitempty"`
// INFO: if adding new associations here, ensure they are added to the batch delete activity
Triggers []ActionWorkflowTriggerConfig `json:"triggers,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"triggers,omitzero,omitempty"`
Steps []ActionWorkflowStepConfig `json:"steps,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"steps,omitzero,omitempty"`
Runs []InstallActionWorkflowRun `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"runs,omitzero,omitempty"`
Timeout time.Duration `` /* 126-byte string literal not displayed */
ComponentDependencyIDs pq.StringArray `json:"component_dependency_ids" temporaljson:"component_dependency_ids" swaggertype:"array,string" gorm:"type:text[]"`
References pq.StringArray `json:"references" temporaljson:"references" swaggertype:"array,string" gorm:"type:text[]"`
Refs []refs.Ref `gorm:"-"`
CronTrigger *ActionWorkflowTriggerConfig `json:"-" temporaljson:"cron_trigger,omitzero,omitempty"`
LifecycleTriggers []ActionWorkflowTriggerConfig `json:"-" temporaljson:"lifecycle_triggers,omitzero,omitempty"`
BreakGlassRoleARN generics.NullString `` /* 132-byte string literal not displayed */
}
func (*ActionWorkflowConfig) AfterQuery ΒΆ
func (a *ActionWorkflowConfig) AfterQuery(tx *gorm.DB) error
func (*ActionWorkflowConfig) BeforeCreate ΒΆ
func (a *ActionWorkflowConfig) BeforeCreate(tx *gorm.DB) error
func (*ActionWorkflowConfig) GetComponentTriggerIndex ΒΆ
func (a *ActionWorkflowConfig) GetComponentTriggerIndex(typ ActionWorkflowTriggerType, componentID string) int
func (*ActionWorkflowConfig) GetTriggerIndex ΒΆ
func (a *ActionWorkflowConfig) GetTriggerIndex(typ ActionWorkflowTriggerType) int
func (*ActionWorkflowConfig) HasComponentTrigger ΒΆ
func (a *ActionWorkflowConfig) HasComponentTrigger(typ ActionWorkflowTriggerType, componentID string) bool
func (*ActionWorkflowConfig) HasTrigger ΒΆ
func (a *ActionWorkflowConfig) HasTrigger(typ ActionWorkflowTriggerType) bool
func (*ActionWorkflowConfig) Indexes ΒΆ
func (a *ActionWorkflowConfig) Indexes(db *gorm.DB) []migrations.Index
func (*ActionWorkflowConfig) Views ΒΆ
func (i *ActionWorkflowConfig) Views(db *gorm.DB) []migrations.View
func (*ActionWorkflowConfig) WorkflowConfigCanTriggerManually ΒΆ
func (a *ActionWorkflowConfig) WorkflowConfigCanTriggerManually() bool
type ActionWorkflowStatus ΒΆ
type ActionWorkflowStatus string
const ( ActionWorkflowStatusActive ActionWorkflowStatus = "active" // error state ActionWorkflowStatusError ActionWorkflowStatus = "error" // queued for deletion ActionWorkflowStatusDeleteQueued ActionWorkflowStatus = "delete_queued" )
type ActionWorkflowStepConfig ΒΆ
type ActionWorkflowStepConfig struct {
ID string `json:"id" gorm:"primary_key;check:id_checker,char_length(id)=26" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `` /* 136-byte string literal not displayed */
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
App App `json:"-" swaggerignore:"true" temporaljson:"app,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"notnull;index:idx_app_install_name,unique" temporaljson:"app_id,omitzero,omitempty"`
// this belongs to an app config id
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
AppConfig AppConfig `json:"-" temporaljson:"app_config,omitzero,omitempty"`
ActionWorkflowConfigID string `` /* 184-byte string literal not displayed */
ActionWorkflowConfig ActionWorkflowConfig `json:"-" temporaljson:"action_workflow_config,omitzero,omitempty"`
// metadata
Name string `` /* 142-byte string literal not displayed */
PreviousStepID string `json:"previous_step_id,omitzero" temporaljson:"previous_step_id,omitzero,omitempty"`
Idx int `json:"idx,omitzero" temporaljson:"idx,omitzero,omitempty"`
References pq.StringArray `json:"references" temporaljson:"references" swaggertype:"array,string" gorm:"type:text[]"`
// all the details needed for a step
PublicGitVCSConfig *PublicGitVCSConfig `` /* 158-byte string literal not displayed */
ConnectedGithubVCSConfig *ConnectedGithubVCSConfig `` /* 170-byte string literal not displayed */
VCSConnectionType VCSConnectionType `json:"-" gorm:"-" temporaljson:"vcs_connection_type,omitzero,omitempty"`
EnvVars pgtype.Hstore `json:"env_vars,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"env_vars,omitzero,omitempty"`
Command string `json:"command,omitzero" temporaljson:"command,omitzero,omitempty"`
InlineContents string `json:"inline_contents,omitzero" temporaljson:"inline_contents,omitzero,omitempty"`
}
func (*ActionWorkflowStepConfig) AfterQuery ΒΆ
func (a *ActionWorkflowStepConfig) AfterQuery(tx *gorm.DB) error
func (*ActionWorkflowStepConfig) BeforeCreate ΒΆ
func (a *ActionWorkflowStepConfig) BeforeCreate(tx *gorm.DB) error
func (*ActionWorkflowStepConfig) Indexes ΒΆ
func (a *ActionWorkflowStepConfig) Indexes(db *gorm.DB) []migrations.Index
type ActionWorkflowTriggerConfig ΒΆ
type ActionWorkflowTriggerConfig struct {
ID string `json:"id" gorm:"primary_key;check:id_checker,char_length(id)=26" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `` /* 139-byte string literal not displayed */
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
App App `json:"-" swaggerignore:"true" temporaljson:"app,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"notnull;index:idx_app_install_name,unique" temporaljson:"app_id,omitzero,omitempty"`
// this belongs to an app config id
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
AppConfig AppConfig `json:"-" temporaljson:"app_config,omitzero,omitempty"`
ActionWorkflowConfigID string `` /* 187-byte string literal not displayed */
ActionWorkflowConfig ActionWorkflowConfig `json:"-" temporaljson:"action_workflow_config,omitzero,omitempty"`
Type ActionWorkflowTriggerType `` /* 188-byte string literal not displayed */
Index int `json:"index,omitzero" swaggertype:"integer" gorm:"default:0;"`
CronSchedule string `json:"cron_schedule,omitzero,omitempty" temporaljson:"cron_schedule,omitzero,omitempty"`
ComponentID generics.NullString `json:"component_id,omitzero" swaggertype:"string" temporaljson:"component_id,omitzero,omitempty"`
Component *Component `json:"component" temporaljson:"component,omitzero,omitempty"`
}
func (*ActionWorkflowTriggerConfig) BeforeCreate ΒΆ
func (a *ActionWorkflowTriggerConfig) BeforeCreate(tx *gorm.DB) error
func (*ActionWorkflowTriggerConfig) Indexes ΒΆ
func (a *ActionWorkflowTriggerConfig) Indexes(db *gorm.DB) []migrations.Index
type ActionWorkflowTriggerType ΒΆ
type ActionWorkflowTriggerType string
const ( // this is for manual debugging/triggering in the ui ActionWorkflowTriggerTypeManual ActionWorkflowTriggerType = "manual" // run on a hook ActionWorkflowTriggerTypeCron ActionWorkflowTriggerType = "cron" // individaul component ones ActionWorkflowTriggerTypePreDeployComponent ActionWorkflowTriggerType = "pre-deploy-component" ActionWorkflowTriggerTypePostDeployComponent ActionWorkflowTriggerType = "post-deploy-component" ActionWorkflowTriggerTypePreTeardownComponent ActionWorkflowTriggerType = "pre-teardown-component" ActionWorkflowTriggerTypePostTeardownComponent ActionWorkflowTriggerType = "post-teardown-component" // internals ActionWorkflowTriggerTypePreSecretsSync ActionWorkflowTriggerType = "pre-secrets-sync" ActionWorkflowTriggerTypePostSecretsSync ActionWorkflowTriggerType = "post-secrets-sync" // workflow triggers ActionWorkflowTriggerTypePreProvision ActionWorkflowTriggerType = "pre-provision" ActionWorkflowTriggerTypePostProvision ActionWorkflowTriggerType = "post-provision" ActionWorkflowTriggerTypePreReprovision ActionWorkflowTriggerType = "pre-reprovision" ActionWorkflowTriggerTypePostReprovision ActionWorkflowTriggerType = "post-reprovision" ActionWorkflowTriggerTypePreDeprovision ActionWorkflowTriggerType = "pre-deprovision" ActionWorkflowTriggerTypePostDeprovision ActionWorkflowTriggerType = "post-deprovision" ActionWorkflowTriggerTypePreDeployAllComponents ActionWorkflowTriggerType = "pre-deploy-all-components" ActionWorkflowTriggerTypePostDeployAllComponents ActionWorkflowTriggerType = "post-deploy-all-components" ActionWorkflowTriggerTypePreTeardownAllComponents ActionWorkflowTriggerType = "pre-teardown-all-components" ActionWorkflowTriggerTypePostTeardownAllComponents ActionWorkflowTriggerType = "post-teardown-all-components" ActionWorkflowTriggerTypePreDeprovisionSandbox ActionWorkflowTriggerType = "pre-deprovision-sandbox" ActionWorkflowTriggerTypePostDeprovisionSandbox ActionWorkflowTriggerType = "post-deprovision-sandbox" ActionWorkflowTriggerTypePreReprovisionSandbox ActionWorkflowTriggerType = "pre-reprovision-sandbox" ActionWorkflowTriggerTypePostReprovisionSandbox ActionWorkflowTriggerType = "post-reprovision-sandbox" ActionWorkflowTriggerTypePreUpdateInputs ActionWorkflowTriggerType = "pre-update-inputs" ActionWorkflowTriggerTypePostUpdateInputs ActionWorkflowTriggerType = "post-update-inputs" )
type App ΒΆ
type App struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_app_name,unique" temporaljson:"deleted_at,omitzero,omitempty"`
Name string `json:"name,omitzero" gorm:"index:idx_app_name,unique" temporaljson:"name,omitzero,omitempty"`
Description generics.NullString `json:"description,omitzero" swaggertype:"string" temporaljson:"description,omitzero,omitempty"`
DisplayName generics.NullString `json:"display_name,omitzero" swaggertype:"string" temporaljson:"display_name,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"index:idx_app_name,unique" temporaljson:"org_id,omitzero,omitempty"`
Org *Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
NotificationsConfig NotificationsConfig `` /* 155-byte string literal not displayed */
Repository AppRepository `faker:"-" json:"-" swaggerignore:"true" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"repository,omitzero,omitempty"`
Components []Component `` /* 129-byte string literal not displayed */
Installs []Install `faker:"-" json:"-" swaggerignore:"true" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"installs,omitzero,omitempty"`
ActionWorkflows []ActionWorkflow `json:"-" swaggerignore:"true" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"action_workflows,omitzero,omitempty"`
AppInputConfigs []AppInputConfig `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"app_input_configs,omitzero,omitempty"`
AppSandboxConfigs []AppSandboxConfig `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"app_sandbox_configs,omitzero,omitempty"`
AppRunnerConfigs []AppRunnerConfig `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"app_runner_configs,omitzero,omitempty"`
CloudFormationStackConfigs []AppStackConfig `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"cloud_formation_stack_configs,omitzero,omitempty"`
AppConfigs []AppConfig `json:"app_configs" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"app_configs,omitzero,omitempty"`
AppSecrets []AppSecret `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"app_secrets,omitzero,omitempty"`
InstallerApps []InstallerApp `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"installer_apps,omitzero,omitempty"`
Status AppStatus `json:"status,omitzero" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" temporaljson:"status_description,omitzero,omitempty"`
// fields set via after query
AppInputConfig AppInputConfig `json:"input_config,omitzero" gorm:"-" temporaljson:"app_input_config,omitzero,omitempty"`
AppSandboxConfig AppSandboxConfig `json:"sandbox_config,omitzero" gorm:"-" temporaljson:"app_sandbox_config,omitzero,omitempty"`
AppRunnerConfig AppRunnerConfig `json:"runner_config,omitzero" gorm:"-" temporaljson:"app_runner_config,omitzero,omitempty"`
Links map[string]any `json:"links,omitzero,omitempty" temporaljson:"-" gorm:"-"`
CloudPlatform CloudPlatform `json:"cloud_platform,omitzero" gorm:"-" swaggertype:"string" temporaljson:"cloud_platform,omitzero,omitempty"`
RunnerType AppRunnerType `json:"runner_type,omitzero" gorm:"-" swaggertype:"string" temporaljson:"runner_type,omitzero,omitempty"`
ConfigRepo string `json:"config_repo,omitzero" temporaljson:"config_repo,omitzero,omitempty"`
ConfigDirectory string `json:"config_directory,omitzero" temporaljson:"config_directory,omitzero,omitempty"`
}
func (*App) EventLoops ΒΆ
type AppAWSIAMPolicyConfig ΒΆ
type AppAWSIAMPolicyConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
AppAWSIAMRoleConfigID string `json:"app_aws_iam_role_config_id,omitzero" temporaljson:"app_awsiam_role_config_id,omitzero,omitempty"`
AppAWSIAMRoleConfig AppAWSIAMRoleConfig `json:"-" temporaljson:"app_awsiam_role_config,omitzero,omitempty"`
ManagedPolicyName string `json:"managed_policy_name,omitzero" features:"template" temporaljson:"managed_policy_name,omitzero,omitempty"`
Name string `json:"name" features:"template,omitzero" temporaljson:"name,omitzero,omitempty"`
Contents []byte `` /* 126-byte string literal not displayed */
CloudFormationStackName string `` /* 131-byte string literal not displayed */
}
func (*AppAWSIAMPolicyConfig) AfterQuery ΒΆ
func (a *AppAWSIAMPolicyConfig) AfterQuery(tx *gorm.DB) error
func (*AppAWSIAMPolicyConfig) BeforeCreate ΒΆ
func (a *AppAWSIAMPolicyConfig) BeforeCreate(tx *gorm.DB) error
func (*AppAWSIAMPolicyConfig) Indexes ΒΆ
func (a *AppAWSIAMPolicyConfig) Indexes(db *gorm.DB) []migrations.Index
type AppAWSIAMRoleConfig ΒΆ
type AppAWSIAMRoleConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
Type AWSIAMRoleType `json:"type,omitzero" temporaljson:"type,omitzero,omitempty"`
Name string `json:"name,omitzero" features:"template" temporaljson:"name,omitzero,omitempty"`
Description string `json:"description,omitzero" features:"template" temporaljson:"description,omitzero,omitempty"`
DisplayName string `json:"display_name,omitzero" features:"template" temporaljson:"display_name,omitzero,omitempty"`
OwnerID string `` /* 126-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;" temporaljson:"owner_type,omitzero,omitempty"`
Policies []AppAWSIAMPolicyConfig `json:"policies,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"policies,omitzero,omitempty"`
PermissionsBoundaryJSON []byte `` /* 155-byte string literal not displayed */
CloudFormationStackName string `` /* 131-byte string literal not displayed */
CloudFormationStackParamName string `` /* 137-byte string literal not displayed */
}
func (*AppAWSIAMRoleConfig) AfterQuery ΒΆ
func (a *AppAWSIAMRoleConfig) AfterQuery(tx *gorm.DB) error
func (*AppAWSIAMRoleConfig) BeforeCreate ΒΆ
func (a *AppAWSIAMRoleConfig) BeforeCreate(tx *gorm.DB) error
func (*AppAWSIAMRoleConfig) Indexes ΒΆ
func (a *AppAWSIAMRoleConfig) Indexes(db *gorm.DB) []migrations.Index
type AppBranch ΒΆ
type AppBranch struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `` /* 144-byte string literal not displayed */
App App `faker:"-" json:"-" temporaljson:"app,omitzero,omitempty"`
Name string `gorm:"uniqueIndex:idx_app_branch_name_per_app;not null" json:"name" temporaljson:"name"`
ConnectedGithubVCSConfigID string `gorm:"notnull" json:"connected_github_vcs_config_id" temporaljson:"connected_github_vcs_config_id"`
ConnectedGithubVCSConfig ConnectedGithubVCSConfig `json:"-" temporaljson:"connected_github_vcs_config"`
Workflows []Workflow `json:"workflows,omitzero" gorm:"polymorphic:Owner;constraint:OnDelete:CASCADE;" temporaljson:"workflows,omitzero,omitempty"`
}
type AppBreakGlassConfig ΒΆ
type AppBreakGlassConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" temporaljson:"app_id,omitzero,omitempty"`
App App `faker:"-" json:"-" temporaljson:"app,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
Roles []AppAWSIAMRoleConfig `json:"aws_iam_roles,omitzero" gorm:"constraint:OnDelete:CASCADE;polymorphic:Owner;" temporaljson:"roles,omitzero,omitempty"`
}
func (*AppBreakGlassConfig) BeforeCreate ΒΆ
func (a *AppBreakGlassConfig) BeforeCreate(tx *gorm.DB) error
func (*AppBreakGlassConfig) Indexes ΒΆ
func (a *AppBreakGlassConfig) Indexes(db *gorm.DB) []migrations.Index
type AppConfig ΒΆ
type AppConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" temporaljson:"app_id,omitzero,omitempty"`
Status AppConfigStatus `json:"status,omitzero" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"notnull;default null" temporaljson:"status_description,omitzero,omitempty"`
State string `json:"state,omitzero" temporaljson:"state,omitzero,omitempty"`
Readme string `json:"readme,omitzero" temporaljson:"readme,omitzero,omitempty"`
Checksum string `json:"checksum,omitzero" temporaljson:"checksum,omitzero,omitempty"`
CLIVersion string `json:"cli_version,omitzero" gorm:"default null" temporaljson:"cli_version,omitzero,omitempty"`
ComponentIDs pq.StringArray `gorm:"type:text[]" json:"component_ids,omitzero" temporaljson:"component_ids,omitzero,omitempty" swaggertype:"array,string"`
PermissionsConfig AppPermissionsConfig `` /* 126-byte string literal not displayed */
BreakGlassConfig AppBreakGlassConfig `` /* 126-byte string literal not displayed */
PoliciesConfig AppPoliciesConfig `json:"policies,omitempty,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"policies_config,omitzero,omitempty"`
SecretsConfig AppSecretsConfig `json:"secrets,omitempty,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"secrets_config,omitzero,omitempty"`
SandboxConfig AppSandboxConfig `json:"sandbox,omitempty,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"sandbox_config,omitzero,omitempty"`
InputConfig AppInputConfig `json:"input,omitempty,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"input_config,omitzero,omitempty"`
RunnerConfig AppRunnerConfig `json:"runner,omitempty,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"runner_config,omitzero,omitempty"`
StackConfig AppStackConfig `json:"stack,omitempty,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"stack_config,omitzero,omitempty"`
ComponentConfigConnections []ComponentConfigConnection `` /* 153-byte string literal not displayed */
ActionWorkflowConfigs []ActionWorkflowConfig `` /* 143-byte string literal not displayed */
// individual pointers
InstallAWSCloudFormationStackVersion []InstallStackVersion `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_aws_cloud_formation_stack_version,omitzero,omitempty"`
// fields that are filled in via after query or views
Version int `json:"version,omitzero" gorm:"->;-:migration" temporaljson:"version,omitzero,omitempty"`
AppBranchID generics.NullString `` /* 130-byte string literal not displayed */
AppBranch *AppBranch `json:"app_branch" temporaljson:"app_branch,omitzero,omitempty"`
VCSConnectionCommitID generics.NullString `json:"-" swaggertype:"string" temporaljson:"vcs_connection_commit_id,omitzero,omitempty"`
VCSConnectionCommit *VCSConnectionCommit `json:"vcs_connection_commit,omitzero" temporaljson:"vcs_connection_commit,omitzero,omitempty"`
}
func (AppConfig) ViewVersion ΒΆ
type AppConfigStatus ΒΆ
type AppConfigStatus string
const ( AppConfigStatusActive AppConfigStatus = "active" AppConfigStatusPending AppConfigStatus = "pending" AppConfigStatusSyncing AppConfigStatus = "syncing" AppConfigStatusError AppConfigStatus = "error" AppConfigStatusOutdated AppConfigStatus = "outdated" )
type AppConfigVersion ΒΆ
type AppConfigVersion string
const ( AppConfigVersionDefault AppConfigVersion = "" AppConfigVersionV2 AppConfigVersion = "v2" )
type AppInput ΒΆ
type AppInput struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_app_input_unique_name,unique" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppInputConfigID string `` /* 150-byte string literal not displayed */
AppInputConfig AppInputConfig `json:"-" temporaljson:"app_input_config,omitzero,omitempty"`
AppInputGroup AppInputGroup `json:"group,omitzero" temporaljson:"app_input_group,omitzero,omitempty"`
AppInputGroupID string `json:"group_id,omitzero" temporaljson:"app_input_group_id,omitzero,omitempty"`
Name string `` /* 127-byte string literal not displayed */
DisplayName string `json:"display_name,omitzero" temporaljson:"display_name,omitzero,omitempty"`
Description string `json:"description,omitzero" gorm:"not null; default null" temporaljson:"description,omitzero,omitempty"`
Default string `json:"default,omitzero" temporaljson:"default,omitzero,omitempty"`
Required bool `json:"required,omitzero" temporaljson:"required,omitzero,omitempty"`
Sensitive bool `json:"sensitive,omitzero" temporaljson:"sensitive,omitzero,omitempty"`
Index int `json:"index,omitzero"`
Internal bool `json:"internal,omitzero"`
Type AppInputType `json:"type,omitzero" swaggertype:"string"`
Source AppInputSource `json:"source,omitzero" gorm:"not null;default:'vendor'" swaggertype:"string" temporaljson:"source"`
// CloudFormation configuration (computed fields, not stored in DB)
CloudFormationStackName string `json:"cloudformation_stack_name,omitzero" gorm:"-" temporaljson:"cloudformation_stack_name,omitzero,omitempty"`
CloudFormationStackParamName string `` /* 130-byte string literal not displayed */
}
type AppInputConfig ΒΆ
type AppInputConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" temporaljson:"app_id,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
AppInputs []AppInput `json:"inputs,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"app_inputs,omitzero,omitempty"`
AppInputGroups []AppInputGroup `json:"input_groups,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"app_input_groups,omitzero,omitempty"`
InstallInputs []InstallInputs `json:"install_inputs,omitzero" gorm:"constraint:OnDelete:CASCADE" temporaljson:"install_inputs,omitzero,omitempty"`
}
func (*AppInputConfig) BeforeCreate ΒΆ
func (a *AppInputConfig) BeforeCreate(tx *gorm.DB) error
func (*AppInputConfig) Indexes ΒΆ
func (a *AppInputConfig) Indexes(db *gorm.DB) []migrations.Index
type AppInputGroup ΒΆ
type AppInputGroup struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppInputConfigID string `json:"app_input_id,omitzero" gorm:"notnull; default null" temporaljson:"app_input_config_id,omitzero,omitempty"`
AppInputConfig AppInputConfig `json:"-" temporaljson:"app_input_config,omitzero,omitempty"`
Name string `json:"name,omitzero" gorm:"not null;default null" temporaljson:"name,omitzero,omitempty"`
DisplayName string `json:"display_name,omitzero" temporaljson:"display_name,omitzero,omitempty"`
Description string `json:"description,omitzero" gorm:"not null; default null" temporaljson:"description,omitzero,omitempty"`
Index int `json:"index,omitzero"`
AppInputs []AppInput `json:"app_inputs,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"app_inputs,omitzero,omitempty"`
}
func (*AppInputGroup) BeforeCreate ΒΆ
func (a *AppInputGroup) BeforeCreate(tx *gorm.DB) error
func (*AppInputGroup) Indexes ΒΆ
func (a *AppInputGroup) Indexes(db *gorm.DB) []migrations.Index
type AppInputSource ΒΆ
type AppInputSource string
const ( AppInputSourceVendor AppInputSource = "vendor" AppInputSourceCustomer AppInputSource = "customer" )
type AppInputType ΒΆ
type AppInputType string
const ( AppInputTypeString AppInputType = "string" AppInputTypeNumber AppInputType = "number" AppInputTypeBool AppInputType = "bool" AppInputTypeList AppInputType = "list" AppInputTypeJSON AppInputType = "json" )
type AppPermissionsConfig ΒΆ
type AppPermissionsConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" temporaljson:"app_id,omitzero,omitempty"`
App App `faker:"-" json:"-" temporaljson:"app,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
Roles []AppAWSIAMRoleConfig `json:"aws_iam_roles,omitzero" gorm:"constraint:OnDelete:CASCADE;polymorphic:Owner" temporaljson:"roles,omitzero,omitempty"`
// loaded via an after query
ProvisionRole AppAWSIAMRoleConfig `json:"provision_aws_iam_role,omitzero" gorm:"-" temporaljson:"provision_role,omitzero,omitempty"`
MaintenanceRole AppAWSIAMRoleConfig `json:"maintenance_aws_iam_role,omitzero" gorm:"-" temporaljson:"maintenance_role,omitzero,omitempty"`
DeprovisionRole AppAWSIAMRoleConfig `json:"deprovision_aws_iam_role,omitzero" gorm:"-" temporaljson:"deprovision_role,omitzero,omitempty"`
BreakGlassRole AppAWSIAMRoleConfig `json:"break_glass_aws_iam_role,omitzero" gorm:"-" temporaljson:"break_glass_role,omitzero,omitempty"`
}
func (*AppPermissionsConfig) AfterQuery ΒΆ
func (a *AppPermissionsConfig) AfterQuery(tx *gorm.DB) error
func (*AppPermissionsConfig) BeforeCreate ΒΆ
func (a *AppPermissionsConfig) BeforeCreate(tx *gorm.DB) error
func (*AppPermissionsConfig) Indexes ΒΆ
func (a *AppPermissionsConfig) Indexes(db *gorm.DB) []migrations.Index
type AppPoliciesConfig ΒΆ
type AppPoliciesConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson,omitzero:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"notnull;default null" temporaljson:"app_id,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" gorm:"notnull;default null" temporaljson:"app_config_id,omitzero,omitempty"`
Policies []AppPolicyConfig `json:"policies,omitempty" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"policies,omitzero,omitempty"`
}
func (*AppPoliciesConfig) BeforeCreate ΒΆ
func (a *AppPoliciesConfig) BeforeCreate(tx *gorm.DB) error
func (*AppPoliciesConfig) Indexes ΒΆ
func (a *AppPoliciesConfig) Indexes(db *gorm.DB) []migrations.Index
type AppPolicyConfig ΒΆ
type AppPolicyConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"notnull;default null" temporaljson:"app_id,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" gorm:"notnull;default null" temporaljson:"app_config_id,omitzero,omitempty"`
AppPoliciesConfigID string `json:"app_policies_config,omitzero" gorm:"notnull;default null" temporaljson:"app_policies_config_id,omitzero,omitempty"`
AppPoliciesConfig AppPoliciesConfig `json:"-" temporaljson:"app_policies_config,omitzero,omitempty"`
Type config.AppPolicyType `json:"type,omitzero" temporaljson:"type,omitzero,omitempty"`
Engine config.AppPolicyEngine `json:"engine,omitzero" temporaljson:"engine,omitzero,omitempty"`
Name string `json:"name,omitzero" temporaljson:"name,omitzero,omitempty"`
Description string `json:"description,omitzero" temporaljson:"description,omitzero,omitempty"`
Contents string `json:"contents,omitzero" features:"template" temporaljson:"contents,omitzero,omitempty"`
Components []string `json:"components,omitzero" gorm:"serializer:json" temporaljson:"components,omitzero,omitempty"`
}
func (*AppPolicyConfig) BeforeCreate ΒΆ
func (a *AppPolicyConfig) BeforeCreate(tx *gorm.DB) error
func (*AppPolicyConfig) Indexes ΒΆ
func (a *AppPolicyConfig) Indexes(db *gorm.DB) []migrations.Index
type AppRepository ΒΆ
type AppRepository struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"notnull" temporaljson:"app_id,omitzero,omitempty"`
RegistryID string
RepositoryName string
RepositoryArn string
RepositoryURI string
Region string
}
func (*AppRepository) BeforeCreate ΒΆ
func (a *AppRepository) BeforeCreate(tx *gorm.DB) error
func (*AppRepository) Indexes ΒΆ
func (i *AppRepository) Indexes(db *gorm.DB) []migrations.Index
type AppRepositoryType ΒΆ
type AppRepositoryType string
const (
AppRepositoryTypeAWSECR AppRepositoryType = "aws-ecr"
)
type AppRunnerConfig ΒΆ
type AppRunnerConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" temporaljson:"app_id,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
EnvVars pgtype.Hstore `json:"env_vars,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"env_vars,omitzero,omitempty"`
Type AppRunnerType `json:"app_runner_type,omitzero" gorm:"not null;default null;" temporaljson:"type,omitzero,omitempty"`
HelmDriver AppRunnerConfigHelmDriverType `json:"helm_driver" gorm:"default null" swaggertype:"string" temporaljson:"helm_driver,omitzero,omitempty"`
CloudPlatform CloudPlatform `json:"cloud_platform,omitzero" gorm:"-" temporaljson:"cloud_platform,omitzero,omitempty"`
// takes a URL to a bash script ‡ which will be `curl | bash`-ed on the VM. usually via user-data or equivalent.
InitScriptURL string `json:"init_script,omitzero" gorm:"default null" temporaljson:"init_script,omitzero,omitempty" features:"get,omitzero"`
}
func (*AppRunnerConfig) AfterQuery ΒΆ
func (a *AppRunnerConfig) AfterQuery(tx *gorm.DB) error
func (*AppRunnerConfig) BeforeCreate ΒΆ
func (a *AppRunnerConfig) BeforeCreate(tx *gorm.DB) error
func (*AppRunnerConfig) Indexes ΒΆ
func (a *AppRunnerConfig) Indexes(db *gorm.DB) []migrations.Index
func (*AppRunnerConfig) Views ΒΆ
func (i *AppRunnerConfig) Views(db *gorm.DB) []migrations.View
type AppRunnerConfigHelmDriverType ΒΆ
type AppRunnerConfigHelmDriverType string
const ( AppRunnerHelmDriverSecret AppRunnerConfigHelmDriverType = "secret" AppRunnerHelmDriverConfigMap AppRunnerConfigHelmDriverType = "configmap" AppRunnerHelmDriverEmpty AppRunnerConfigHelmDriverType = "" )
type AppRunnerType ΒΆ
type AppRunnerType string
const ( AppRunnerTypeUnknown AppRunnerType = "unknown" // legacy types from before independent runners AppRunnerTypeAWSECS AppRunnerType = "aws-ecs" AppRunnerTypeAWSEKS AppRunnerType = "aws-eks" AppRunnerTypeAzureAKS AppRunnerType = "azure-aks" AppRunnerTypeAzureACS AppRunnerType = "azure-acs" AppRunnerTypeLocal AppRunnerType = "local" // for independent runners AppRunnerTypeAWS AppRunnerType = "aws" AppRunnerTypeAzure AppRunnerType = "azure" )
func (AppRunnerType) JobType ΒΆ
func (a AppRunnerType) JobType() RunnerJobType
type AppSandboxConfig ΒΆ
type AppSandboxConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"not null;default null" temporaljson:"app_id,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
PublicGitVCSConfig *PublicGitVCSConfig `` /* 167-byte string literal not displayed */
ConnectedGithubVCSConfig *ConnectedGithubVCSConfig `` /* 179-byte string literal not displayed */
VCSConnectionType VCSConnectionType `json:"-" gorm:"-" temporaljson:"vcs_connection_type,omitzero,omitempty"`
Variables pgtype.Hstore `` /* 136-byte string literal not displayed */
EnvVars pgtype.Hstore `` /* 139-byte string literal not displayed */
VariablesFiles pq.StringArray `` /* 147-byte string literal not displayed */
References pq.StringArray `json:"references" temporaljson:"references" swaggertype:"array,string" gorm:"type:text[]"`
Refs []refs.Ref `gorm:"-"`
TerraformVersion string `json:"terraform_version,omitzero" gorm:"notnull" temporaljson:"terraform_version,omitzero,omitempty"`
DriftSchedule string `json:"drift_schedule,omitzero" gorm:"default null" temporaljson:"drift_schedule,omitzero,omitempty"`
InstallSandboxRuns []InstallSandboxRun `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_sandbox_runs,omitzero,omitempty"`
// cloud specific fields
AWSRegionType generics.NullString `json:"aws_region_type,omitzero" swaggertype:"string" temporaljson:"aws_region_type,omitzero,omitempty"`
// fields set via after query
CloudPlatform CloudPlatform `json:"cloud_platform,omitzero" gorm:"-" swaggertype:"string" temporaljson:"cloud_platform,omitzero,omitempty"`
}
func (*AppSandboxConfig) AfterQuery ΒΆ
func (c *AppSandboxConfig) AfterQuery(tx *gorm.DB) error
NOTE: currently, only public repo vcs configs are supported when rendering policies and artifacts
func (*AppSandboxConfig) BeforeCreate ΒΆ
func (a *AppSandboxConfig) BeforeCreate(tx *gorm.DB) error
func (*AppSandboxConfig) Indexes ΒΆ
func (c *AppSandboxConfig) Indexes(db *gorm.DB) []migrations.Index
func (*AppSandboxConfig) Views ΒΆ
func (i *AppSandboxConfig) Views(db *gorm.DB) []migrations.View
type AppSecret ΒΆ
type AppSecret struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_app_secret_name,unique" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"not null;default null;index:idx_app_secret_name,unique" temporaljson:"app_id,omitzero,omitempty"`
App App `json:"-" faker:"-" temporaljson:"app,omitzero,omitempty"`
Name string `json:"name,omitzero" gorm:"not null;default null;index:idx_app_secret_name,unique" temporaljson:"name,omitzero,omitempty"`
Value string `json:"-" gorm:"not null;default null" temporaljson:"value,omitzero,omitempty"`
// after query fields
Length int `json:"length,omitzero" gorm:"-" temporaljson:"length,omitzero,omitempty"`
}
type AppSecretConfig ΒΆ
type AppSecretConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" temporaljson:"app_id,omitzero,omitempty"`
App App `faker:"-" json:"-" temporaljson:"app,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
AppSecretsConfig AppSecretsConfig `json:"-" faker:"-" temporaljson:"app_secrets_config,omitzero,omitempty"`
AppSecretsConfigID string `json:"app_secrets_config_id,omitzero" temporaljson:"app_secrets_config_id,omitzero,omitempty"`
Name string `json:"name,omitzero" features:"template" temporaljson:"name,omitzero,omitempty"`
DisplayName string `json:"display_name,omitzero" features:"template" temporaljson:"display_name,omitzero,omitempty"`
Description string `json:"description,omitzero" features:"template" temporaljson:"description,omitzero,omitempty"`
Required bool `json:"required,omitzero" temporaljson:"required,omitzero,omitempty"`
AutoGenerate bool `json:"auto_generate,omitzero" temporaljson:"auto_generate,omitzero,omitempty"`
Format AppSecretConfigFmt `json:"format" temporaljson:"format" swaggertype:"string"`
Default string `json:"default" temporaljson:"default"`
// for syncing into kubernetes
KubernetesSync bool `json:"kubernetes_sync,omitzero" temporaljson:"kubernetes_sync,omitzero,omitempty"`
KubernetesSecretNamespace string `json:"kubernetes_secret_namespace,omitzero" features:"template" temporaljson:"kubernetes_secret_namespace,omitzero,omitempty"`
KubernetesSecretName string `json:"kubernetes_secret_name,omitzero" features:"template" temporaljson:"kubernetes_secret_name,omitzero,omitempty"`
KubernetesSecretKey string `json:"-" features:"-" temporaljson:"kubernetes_secret_key,omitzero,omitempty"`
CloudFormationStackName string `json:"cloudformation_stack_name,omitzero" gorm:"-" temporaljson:"cloud_formation_stack_name,omitzero,omitempty"`
CloudFormationParamName string `json:"cloudformation_param_name,omitzero" gorm:"-" temporaljson:"cloud_formation_param_name,omitzero,omitempty"`
}
func (*AppSecretConfig) AfterQuery ΒΆ
func (a *AppSecretConfig) AfterQuery(tx *gorm.DB) error
func (*AppSecretConfig) BeforeCreate ΒΆ
func (a *AppSecretConfig) BeforeCreate(tx *gorm.DB) error
func (*AppSecretConfig) Indexes ΒΆ
func (a *AppSecretConfig) Indexes(db *gorm.DB) []migrations.Index
func (*AppSecretConfig) UpdateCloudformationStackInfo ΒΆ
func (a *AppSecretConfig) UpdateCloudformationStackInfo()
type AppSecretConfigFmt ΒΆ
type AppSecretConfigFmt string
const ( AppSecretConfigFmtBase64 AppSecretConfigFmt = "base64" AppSecretConfigFmtDefault AppSecretConfigFmt = "" )
type AppSecretsConfig ΒΆ
type AppSecretsConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" temporaljson:"app_id,omitzero,omitempty"`
App App `faker:"-" json:"-" temporaljson:"app,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
Secrets []AppSecretConfig `json:"secrets,omitzero" temporaljson:"secrets,omitzero,omitempty"`
}
func (*AppSecretsConfig) BeforeCreate ΒΆ
func (a *AppSecretsConfig) BeforeCreate(tx *gorm.DB) error
func (*AppSecretsConfig) Indexes ΒΆ
func (a *AppSecretsConfig) Indexes(db *gorm.DB) []migrations.Index
type AppStackConfig ΒΆ
type AppStackConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" temporaljson:"app_id,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
Type StackType `json:"type,omitzero" temporaljson:"type,omitzero,omitempty"`
Name string `json:"name,omitzero" features:"template" temporaljson:"name,omitzero,omitempty"`
Description string `json:"description,omitzero" features:"template" temporaljson:"description,omitzero,omitempty"`
RunnerNestedTemplateURL string `json:"runner_nested_template_url,omitzero" temporaljson:"runner_nested_template_url,omitzero,omitempty" features:"template"`
VPCNestedTemplateURL string `json:"vpc_nested_template_url,omitzero" temporaljson:"vpc_nested_template_url,omitzero,omitempty" features:"template"`
CustomNestedStacks []config.CustomNestedStack `` /* 138-byte string literal not displayed */
}
func (*AppStackConfig) BeforeCreate ΒΆ
func (a *AppStackConfig) BeforeCreate(tx *gorm.DB) error
func (*AppStackConfig) Indexes ΒΆ
func (a *AppStackConfig) Indexes(db *gorm.DB) []migrations.Index
type AzureAccount ΒΆ
type AzureAccount struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"-" gorm:"notnull" temporaljson:"install_id,omitzero,omitempty"`
Install Install `json:"-" temporaljson:"install,omitzero,omitempty"`
Location string `json:"location,omitzero" gorm:"notnull" temporaljson:"location,omitzero,omitempty"`
SubscriptionID string `json:"subscription_id,omitzero" gorm:"not null;default null" temporaljson:"subscription_id,omitzero,omitempty"`
SubscriptionTenantID string `json:"subscription_tenant_id,omitzero" gorm:"not null;default null" temporaljson:"subscription_tenant_id,omitzero,omitempty"`
ServicePrincipalAppID string `` /* 128-byte string literal not displayed */
ServicePrincipalPassword string `` /* 132-byte string literal not displayed */
}
func (*AzureAccount) BeforeCreate ΒΆ
func (a *AzureAccount) BeforeCreate(tx *gorm.DB) error
func (*AzureAccount) Indexes ΒΆ
func (a *AzureAccount) Indexes(db *gorm.DB) []migrations.Index
type AzureStackOutputs ΒΆ
type AzureStackOutputs struct {
ResourceGroupID string `json:"resource_group_id,omitzero" mapstructure:"resource_group_id" temporaljson:"resource_group_id,omitzero,omitempty"`
ResourceGroupName string `json:"resource_group_name,omitzero" mapstructure:"resource_group_name" temporaljson:"resource_group_name,omitzero,omitempty"`
ResourceGroupLocation string `` /* 136-byte string literal not displayed */
SubscriptionID string `` /* 147-byte string literal not displayed */
SubscriptionTenantID string `` /* 182-byte string literal not displayed */
NetworkID string `json:"network_id,omitzero" mapstructure:"network_id" temporaljson:"network_id,omitzero,omitempty"`
NetworkName string `json:"network_name,omitzero" mapstructure:"network_name" temporaljson:"network_name,omitzero,omitempty"`
PublicSubnetIDs []string `json:"public_subnet_ids,omitzero" mapstructure:"public_subnet_ids" temporaljson:"public_subnet_ids,omitzero,omitempty"`
PublicSubnetNames []string `json:"public_subnet_names,omitzero" mapstructure:"public_subnet_names" temporaljson:"public_subnet_names,omitzero,omitempty"`
PrivateSubnetIDs []string `json:"private_subnet_ids,omitzero" mapstructure:"private_subnet_ids" temporaljson:"private_subnet_ids,omitzero,omitempty"`
PrivateSubnetNames []string `` /* 127-byte string literal not displayed */
KeyVaultID string `json:"key_vault_id,omitzero" mapstructure:"key_vault_id" temporaljson:"key_vault_id,omitzero,omitempty"`
KeyVaultName string `json:"key_vault_name,omitzero" mapstructure:"key_vault_name" temporaljson:"key_vault_name,omitzero,omitempty"`
}
type CHTableSize ΒΆ
type CHTableSize struct {
TableName string `json:"table_name,omitzero"`
SizePretty string `json:"size_pretty,omitzero"`
SizeBytes float64 `json:"size_bytes,omitzero" gorm:"->;-:migration" temporaljson:"size_bytes,omitzero,omitempty"`
}
func (CHTableSize) GetTableOptions ΒΆ
func (m CHTableSize) GetTableOptions() (string, bool)
func (*CHTableSize) UseView ΒΆ
func (*CHTableSize) UseView() bool
func (*CHTableSize) ViewVersion ΒΆ
func (*CHTableSize) ViewVersion() string
func (*CHTableSize) Views ΒΆ
func (i *CHTableSize) Views(db *gorm.DB) []migrations.View
type CloudPlatform ΒΆ
type CloudPlatform string
const ( CloudPlatformAWS CloudPlatform = "aws" CloudPlatformAzure CloudPlatform = "azure" CloudPlatformUnknown CloudPlatform = "unknown" )
func NewCloudPlatform ΒΆ
func NewCloudPlatform(platform string) (CloudPlatform, error)
func (CloudPlatform) Regions ΒΆ
func (c CloudPlatform) Regions() []CloudPlatformRegion
func (CloudPlatform) String ΒΆ
func (c CloudPlatform) String() string
type CloudPlatformRegion ΒΆ
type CloudPlatformRegion struct {
Name string `json:"name,omitzero" temporaljson:"name,omitzero,omitempty"`
Value string `json:"value,omitzero" temporaljson:"value,omitzero,omitempty"`
DisplayName string `json:"display_name,omitzero" temporaljson:"display_name,omitzero,omitempty"`
Icon string `json:"icon,omitzero" temporaljson:"icon,omitzero,omitempty"`
}
type Component ΒΆ
type Component struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26;" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index:idx_app_component_name,unique" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
Name string `json:"name,omitzero" gorm:"notnull;index:idx_app_component_name,unique" temporaljson:"name,omitzero,omitempty"`
VarName string `json:"var_name,omitzero" temporaljson:"var_name,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"notnull;index:idx_app_component_name,unique" temporaljson:"app_id,omitzero,omitempty"`
App App `faker:"-" json:"-" temporaljson:"app,omitzero,omitempty"`
Status ComponentStatus `json:"status,omitzero" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" temporaljson:"status_description,omitzero,omitempty"`
ConfigVersions int `gorm:"-" json:"config_versions,omitzero" temporaljson:"config_versions,omitzero,omitempty"`
ComponentConfigs []ComponentConfigConnection `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"component_configs,omitzero,omitempty"`
InstallComponents []InstallComponent `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"install_components,omitzero,omitempty"`
ActionWorkflowTriggerConfigs []ActionWorkflowTriggerConfig `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"action_workflow_trigger_configs,omitzero,omitempty"`
Dependencies []*Component `gorm:"many2many:component_dependencies;constraint:OnDelete:CASCADE;" json:"-" temporaljson:"dependencies,omitzero,omitempty"`
DependencyIDs []string `gorm:"-" json:"dependencies,omitzero" temporaljson:"dependency_i_ds,omitzero,omitempty"`
Links map[string]any `json:"links,omitzero,omitempty" temporaljson:"-" gorm:"-"`
Type ComponentType `json:"type,omitzero" temporaljson:"type,omitzero,omitempty"`
LatestConfig *ComponentConfigConnection `gorm:"-" json:"-" temporaljson:"latest_config,omitzero,omitempty"`
LatestBuild *ComponentBuild `gorm:"-" json:"latest_build,omitzero" temporaljson:"latest_build,omitzero,omitempty"`
ResolvedVarName string `json:"resolved_var_name,omitzero" gorm:"-" temporaljson:"resolved_var_name,omitzero,omitempty"`
}
func (*Component) JoinTables ΒΆ
func (c *Component) JoinTables() []migrations.JoinTable
type ComponentBuild ΒΆ
type ComponentBuild struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"created_by,omitzero" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// runner details
RunnerJob RunnerJob `json:"runner_job,omitzero" gorm:"polymorphic:Owner;" temporaljson:"runner_job,omitzero,omitempty"`
LogStream LogStream `json:"log_stream,omitzero" gorm:"polymorphic:Owner;" temporaljson:"log_stream,omitzero,omitempty"`
PolicyReports []PolicyReport `` /* 138-byte string literal not displayed */
// DEPRECATED: will retain the field to connect against the last component config connection that set this build
ComponentConfigConnectionID string `` /* 126-byte string literal not displayed */
ComponentConfigConnection ComponentConfigConnection `json:"component_config_connection,omitzero" temporaljson:"component_config_connection,omitzero,omitempty"`
VCSConnectionCommitID *string `json:"-" temporaljson:"vcs_connection_commit_id,omitzero,omitempty"`
VCSConnectionCommit *VCSConnectionCommit `json:"vcs_connection_commit,omitzero" temporaljson:"vcs_connection_commit,omitzero,omitempty"`
ComponentReleases []ComponentRelease `json:"releases,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"component_releases,omitzero,omitempty"`
InstallDeploys []InstallDeploy `json:"install_deploys,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_deploys,omitzero,omitempty"`
Status ComponentBuildStatus `json:"status,omitzero" gorm:"notnull" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"notnull" temporaljson:"status_description,omitzero,omitempty"`
StatusV2 CompositeStatus `json:"status_v2,omitzero" gorm:"type:jsonb" temporaljson:"status_v2,omitzero,omitempty"`
GitRef *string `json:"git_ref,omitzero" temporaljson:"git_ref,omitzero,omitempty"`
// Read-only fields set on the object to de-nest data
ComponentID string `gorm:"-" json:"component_id,omitzero" temporaljson:"component_id,omitzero,omitempty"`
ComponentName string `gorm:"-" json:"component_name,omitzero" temporaljson:"component_name,omitzero,omitempty"`
ComponentConfigVersion int `gorm:"-" json:"component_config_version,omitzero" temporaljson:"component_config_version,omitzero,omitempty"`
// checksum of our intermediate component config
Checksum string `json:"checksum,omitzero" gorm:"default null" temporaljson:"checksum,omitzero,omitempty"`
}
func (*ComponentBuild) AfterQuery ΒΆ
func (c *ComponentBuild) AfterQuery(tx *gorm.DB) error
func (*ComponentBuild) BeforeCreate ΒΆ
func (c *ComponentBuild) BeforeCreate(tx *gorm.DB) error
func (*ComponentBuild) Indexes ΒΆ
func (c *ComponentBuild) Indexes(db *gorm.DB) []migrations.Index
type ComponentBuildStatus ΒΆ
type ComponentBuildStatus string
const ( ComponentBuildStatusPlanning ComponentBuildStatus = "planning" ComponentBuildStatusError ComponentBuildStatus = "error" ComponentBuildStatusBuilding ComponentBuildStatus = "building" ComponentBuildStatusActive ComponentBuildStatus = "active" ComponentBuildStatusDeleting ComponentBuildStatus = "deleting" ComponentBuildStatusPolicyFailed ComponentBuildStatus = "policy_failed" )
type ComponentConfigConnection ΒΆ
type ComponentConfigConnection struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
ComponentID string `json:"component_id,omitzero" gorm:"notnull" temporaljson:"component_id,omitzero,omitempty"`
ComponentName string `json:"component_name,omitzero" gorm:"-" temporaljson:"component_name,omitzero,omitempty"`
Component Component `json:"-" temporaljson:"component,omitzero,omitempty"`
ComponentBuilds []ComponentBuild `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"component_builds,omitzero,omitempty"`
TerraformModuleComponentConfig *TerraformModuleComponentConfig `` /* 146-byte string literal not displayed */
HelmComponentConfig *HelmComponentConfig `json:"helm,omitempty,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"helm_component_config,omitzero,omitempty"`
ExternalImageComponentConfig *ExternalImageComponentConfig `` /* 142-byte string literal not displayed */
DockerBuildComponentConfig *DockerBuildComponentConfig `` /* 138-byte string literal not displayed */
JobComponentConfig *JobComponentConfig `json:"job,omitzero,omitempty" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"job_component_config,omitzero,omitempty"`
KubernetesManifestComponentConfig *KubernetesManifestComponentConfig `` /* 152-byte string literal not displayed */
ComponentDependencyIDs pq.StringArray `json:"component_dependency_ids" temporaljson:"component_dependency_ids" swaggertype:"array,string" gorm:"type:text[]"`
References pq.StringArray `json:"references" temporaljson:"references" swaggertype:"array,string" gorm:"type:text[]"`
Checksum string `json:"checksum,omitzero" gorm:"default null" temporaljson:"checksum,omitzero,omitempty"`
DriftSchedule string `json:"drift_schedule,omitzero" gorm:"default null" temporaljson:"drift_schedule,omitzero,omitempty"`
BuildTimeout string `json:"build_timeout,omitempty" gorm:"default:null" temporaljson:"build_timeout,omitzero,omitempty"` // Duration string for build operations (e.g., "30m", "1h"). Max 1h.
DeployTimeout string `json:"deploy_timeout,omitempty" gorm:"default:null" temporaljson:"deploy_timeout,omitzero,omitempty"` // Duration string for deploy operations (e.g., "30m", "1h"). Max 1h.
// loaded via after query
VCSConnectionType VCSConnectionType `json:"-" gorm:"-" temporaljson:"vcs_connection_type,omitzero,omitempty"`
PublicGitVCSConfig *PublicGitVCSConfig `gorm:"-" json:"-" temporaljson:"public_git_vcs_config,omitzero,omitempty"`
ConnectedGithubVCSConfig *ConnectedGithubVCSConfig `gorm:"-" json:"-" temporaljson:"connected_github_vcs_config,omitzero,omitempty"`
Type ComponentType `gorm:"-" json:"type,omitzero" temporaljson:"type,omitzero,omitempty"`
Version int `json:"version,omitzero" gorm:"->;-:migration" temporaljson:"version,omitzero,omitempty"`
AppConfigVersion int `json:"app_config_version,omitzero" gorm:"->;-:migration" temporaljson:"app_config_version,omitzero,omitempty"`
Refs []refs.Ref `gorm:"-"`
}
func (*ComponentConfigConnection) AfterQuery ΒΆ
func (c *ComponentConfigConnection) AfterQuery(tx *gorm.DB) error
func (*ComponentConfigConnection) BeforeCreate ΒΆ
func (c *ComponentConfigConnection) BeforeCreate(tx *gorm.DB) error
func (*ComponentConfigConnection) GetBuildTimeout ΒΆ
func (c *ComponentConfigConnection) GetBuildTimeout() *time.Duration
func (*ComponentConfigConnection) GetDeployTimeout ΒΆ
func (c *ComponentConfigConnection) GetDeployTimeout() *time.Duration
func (*ComponentConfigConnection) Indexes ΒΆ
func (a *ComponentConfigConnection) Indexes(db *gorm.DB) []migrations.Index
func (*ComponentConfigConnection) UseView ΒΆ
func (c *ComponentConfigConnection) UseView() bool
func (*ComponentConfigConnection) ViewVersion ΒΆ
func (c *ComponentConfigConnection) ViewVersion() string
func (*ComponentConfigConnection) Views ΒΆ
func (c *ComponentConfigConnection) Views(db *gorm.DB) []migrations.View
type ComponentConfigDependency ΒΆ
type ComponentConfigDependency struct {
CreatedByID string `json:"created_by_id" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
ComponentConfigConnectionID string `` /* 138-byte string literal not displayed */
ComponentConfigConnection ComponentConfigConnection `json:"-" faker:"-"`
ComponentID string `gorm:"primary_key" temporaljson:"component_id,omitzero,omitempty"`
DependencyID string `gorm:"primary_key" temporaljson:"dependency_id,omitzero,omitempty"`
}
ComponentConfigDependency is a many2many table used by gorm under the hood
func (*ComponentConfigDependency) BeforeSave ΒΆ
func (c *ComponentConfigDependency) BeforeSave(tx *gorm.DB) error
func (*ComponentConfigDependency) Indexes ΒΆ
func (c *ComponentConfigDependency) Indexes(db *gorm.DB) []migrations.Index
type ComponentDependency ΒΆ
type ComponentDependency struct {
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
ComponentID string `json:"component_id,omitzero" gorm:"primary_key" temporaljson:"component_id,omitzero,omitempty"`
DependencyID string `json:"dependency_id,omitzero" gorm:"primary_key" temporaljson:"dependency_id,omitzero,omitempty"`
}
ComponentDependency is a many2many table used by gorm under the hood
func (*ComponentDependency) BeforeSave ΒΆ
func (c *ComponentDependency) BeforeSave(tx *gorm.DB) error
func (*ComponentDependency) Indexes ΒΆ
func (c *ComponentDependency) Indexes(db *gorm.DB) []migrations.Index
type ComponentRelease ΒΆ
type ComponentRelease struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
ComponentBuildID string `json:"build_id,omitzero" temporaljson:"component_build_id,omitzero,omitempty"`
ComponentBuild ComponentBuild `json:"build,omitzero" swaggerignore:"true" temporaljson:"component_build,omitzero,omitempty"`
TotalComponentReleaseSteps int `json:"total_release_steps,omitzero" gorm:"-" temporaljson:"total_component_release_steps,omitzero,omitempty"`
ComponentReleaseSteps []ComponentReleaseStep `` /* 133-byte string literal not displayed */
Status ReleaseStatus `json:"status,omitzero" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" temporaljson:"status_description,omitzero,omitempty"`
}
func (*ComponentRelease) BeforeCreate ΒΆ
func (a *ComponentRelease) BeforeCreate(tx *gorm.DB) error
func (*ComponentRelease) Indexes ΒΆ
func (a *ComponentRelease) Indexes(db *gorm.DB) []migrations.Index
type ComponentReleaseStep ΒΆ
type ComponentReleaseStep struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// parent release ID
ComponentReleaseID string `json:"component_release_id,omitzero" temporaljson:"component_release_id,omitzero,omitempty"`
ComponentRelease ComponentRelease `json:"-" temporaljson:"component_release,omitzero,omitempty"`
Status string `json:"status,omitzero" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" temporaljson:"status_description,omitzero,omitempty"`
// When a step is created, a set of installs are targeted. However, by the time the release step goes out, the
// install might have been setup in any order of ways.
RequestedInstallIDs pq.StringArray `` /* 140-byte string literal not displayed */
InstallDeploys []InstallDeploy `` /* 127-byte string literal not displayed */
// fields to control the delay of the individual step, as this is set based on the parent strategy
Delay *string `json:"delay,omitzero" temporaljson:"delay,omitzero,omitempty"`
}
func (*ComponentReleaseStep) BeforeCreate ΒΆ
func (a *ComponentReleaseStep) BeforeCreate(tx *gorm.DB) error
func (*ComponentReleaseStep) Indexes ΒΆ
func (a *ComponentReleaseStep) Indexes(db *gorm.DB) []migrations.Index
type ComponentReleaseStrategy ΒΆ
type ComponentReleaseStrategy string
const ( // Parallel means that all steps start at the same time ComponentReleaseStrategyParallel ComponentReleaseStrategy = "parallel" // Sync with delay splits the installs into steps (based on count/step), and then just waits the period of time ComponentReleaseStrategySyncWithDelay ComponentReleaseStrategy = "sync_with_delay" )
type ComponentStatus ΒΆ
type ComponentStatus string
const ( ComponentStatusError ComponentStatus = "error" ComponentStatusActive ComponentStatus = "active" ComponentStatusDeprovisioning ComponentStatus = "deprovisioning" ComponentStatusDeleteQueued ComponentStatus = "delete_queued" )
type ComponentType ΒΆ
type ComponentType string
const ( ComponentTypeTerraformModule ComponentType = "terraform_module" ComponentTypeHelmChart ComponentType = "helm_chart" ComponentTypeDockerBuild ComponentType = "docker_build" ComponentTypeExternalImage ComponentType = "external_image" ComponentTypeJob ComponentType = "job" ComponentTypeKubernetesManifest ComponentType = "kubernetes_manifest" ComponentTypeUnknown ComponentType = "unknown" )
func (ComponentType) BuildJobType ΒΆ
func (c ComponentType) BuildJobType() RunnerJobType
func (ComponentType) DeployJobType ΒΆ
func (c ComponentType) DeployJobType() RunnerJobType
func (ComponentType) DeployPlanJobType ΒΆ
func (c ComponentType) DeployPlanJobType() RunnerJobType
func (ComponentType) IsImage ΒΆ
func (c ComponentType) IsImage() bool
func (ComponentType) SyncJobType ΒΆ
func (c ComponentType) SyncJobType() RunnerJobType
type CompositeStatus ΒΆ
type CompositeStatus struct {
CreatedByID string `json:"created_by_id,omitzero,omitempty" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAtTS int64 `json:"created_at_ts,omitzero,omitempty" temporaljson:"created_at_ts,omitzero,omitempty"`
Status Status `json:"status,omitzero,omitempty" temporaljson:"status,omitzero,omitempty"`
StatusHumanDescription string `json:"status_human_description,omitzero,omitempty" temporaljson:"status_human_description,omitzero,omitempty"`
Metadata map[string]any `json:"metadata,omitzero,omitempty" temporaljson:"metadata,omitzero,omitempty"`
History []CompositeStatus `json:"history,omitzero,omitempty" temporaljson:"history,omitzero,omitempty"`
}
func NewCompositeStatus ΒΆ
func NewCompositeStatus(ctx context.Context, status Status) CompositeStatus
func (CompositeStatus) GormDataType ΒΆ
func (CompositeStatus) GormDataType() string
func (*CompositeStatus) Scan ΒΆ
func (c *CompositeStatus) Scan(v interface{}) (err error)
Scan implements the database/sql.Scanner interface.
type ConnectedGithubVCSConfig ΒΆ
type ConnectedGithubVCSConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// parent component
ComponentConfigID string `json:"component_config_id,omitzero" gorm:"notnull" temporaljson:"component_config_id,omitzero,omitempty"`
ComponentConfigType string `json:"component_config_type,omitzero" gorm:"notnull" temporaljson:"component_config_type,omitzero,omitempty"`
Repo string `json:"repo,omitzero" gorm:"notnull" temporaljson:"repo,omitzero,omitempty"`
RepoName string `json:"repo_name,omitzero" gorm:"notnull" temporaljson:"repo_name,omitzero,omitempty"`
RepoOwner string `json:"repo_owner,omitzero" gorm:"notnull" temporaljson:"repo_owner,omitzero,omitempty"`
Directory string `json:"directory,omitzero" gorm:"notnull" temporaljson:"directory,omitzero,omitempty"`
Branch string `json:"branch,omitzero" gorm:"notnull" temporaljson:"branch,omitzero,omitempty"`
VCSConnectionID string `json:"vcs_connection_id,omitzero" gorm:"notnull" temporaljson:"vcs_connection_id,omitzero,omitempty"`
VCSConnection VCSConnection `json:"vcs_connection,omitzero,omitempty" temporaljson:"vcs_connection,omitzero,omitempty"`
}
func (*ConnectedGithubVCSConfig) BeforeCreate ΒΆ
func (c *ConnectedGithubVCSConfig) BeforeCreate(tx *gorm.DB) error
func (*ConnectedGithubVCSConfig) Indexes ΒΆ
func (c *ConnectedGithubVCSConfig) Indexes(db *gorm.DB) []migrations.Index
type DeviceCode ΒΆ
type DeviceCode struct {
ID string `gorm:"primarykey" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_device_code_account,unique" temporaljson:"deleted_at,omitzero,omitempty"`
// Account relationship
AccountID string `gorm:"not null;index:idx_device_code_account,unique" json:"account_id,omitzero" temporaljson:"account_id,omitzero,omitempty"`
Account *Account `gorm:"constraint:OnDelete:CASCADE" faker:"-" json:"-" temporaljson:"account,omitzero,omitempty"`
Code string `gorm:"unique;not null;index:idx_device_code_account,unique"`
ExpiresAt time.Time `gorm:"not null"` // 2 min from approval
Consumed bool `gorm:"default:false"` // Token issued?
}
AccountIdentity links an account to an identity provider using the IdP's subject identifier. This enables secure authentication where users are identified by their stable `sub` claim rather than by email (which can change or be reassigned).
func (*DeviceCode) BeforeCreate ΒΆ
func (a *DeviceCode) BeforeCreate(tx *gorm.DB) error
func (*DeviceCode) Indexes ΒΆ
func (a *DeviceCode) Indexes(db *gorm.DB) []migrations.Index
type DockerBuildComponentConfig ΒΆ
type DockerBuildComponentConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// value
ComponentConfigConnectionID string `` /* 126-byte string literal not displayed */
ComponentConfigConnection ComponentConfigConnection `json:"-" temporaljson:"component_config_connection,omitzero,omitempty"`
Dockerfile string `json:"dockerfile,omitzero" gorm:"default:Dockerfile;notnull" temporaljson:"dockerfile,omitzero,omitempty"`
Target string `json:"target,omitzero" temporaljson:"target,omitzero,omitempty"`
BuildArgs pq.StringArray `json:"build_args,omitzero" gorm:"type:text[]" swaggertype:"array,string" temporaljson:"build_args,omitzero,omitempty"`
EnvVars pgtype.Hstore `json:"env_vars,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"env_vars,omitzero,omitempty"`
PublicGitVCSConfig *PublicGitVCSConfig `` /* 158-byte string literal not displayed */
ConnectedGithubVCSConfig *ConnectedGithubVCSConfig `` /* 170-byte string literal not displayed */
}
func (*DockerBuildComponentConfig) BeforeCreate ΒΆ
func (c *DockerBuildComponentConfig) BeforeCreate(tx *gorm.DB) error
func (*DockerBuildComponentConfig) Indexes ΒΆ
func (c *DockerBuildComponentConfig) Indexes(db *gorm.DB) []migrations.Index
type DriftedObject ΒΆ
type DriftedObject struct {
// These fields will be populated from the drifts_view
TargetType string `json:"target_type,omitzero" gorm:"->;-:migration" temporaljson:"target_type,omitzero,omitempty"`
TargetID string `json:"target_id,omitzero" gorm:"->;-:migration" temporaljson:"target_id,omitzero,omitempty"`
InstallWorkflowID string `json:"install_workflow_id,omitzero" gorm:"->;-:migration" temporaljson:"install_workflow_id,omitzero,omitempty"`
AppSandboxConfigID *string `json:"app_sandbox_config_id,omitzero" gorm:"->;-:migration" temporaljson:"app_sandbox_config_id,omitzero,omitempty"`
ComponentBuildID *string `json:"component_build_id,omitzero" gorm:"->;-:migration" temporaljson:"component_build_id,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"->;-:migration" temporaljson:"install_id,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"->;-:migration" temporaljson:"org_id,omitzero,omitempty"`
InstallComponentID *string `json:"install_component_id,omitzero" gorm:"->;-:migration" temporaljson:"install_component_id,omitzero,omitempty"`
InstallSandboxID *string `json:"install_sandbox_id,omitzero" gorm:"->;-:migration" temporaljson:"install_sandbox_id,omitzero,omitempty"`
ComponentName string `json:"component_name,omitzero" gorm:"->;-:migration" temporaljson:"component_name,omitzero,omitempty"`
}
func (*DriftedObject) AfterQuery ΒΆ
func (d *DriftedObject) AfterQuery(tx *gorm.DB) error
func (*DriftedObject) BeforeCreate ΒΆ
func (d *DriftedObject) BeforeCreate(tx *gorm.DB) error
func (*DriftedObject) EventLoops ΒΆ
func (d *DriftedObject) EventLoops() []bulk.EventLoop
func (*DriftedObject) Indexes ΒΆ
func (d *DriftedObject) Indexes(db *gorm.DB) []migrations.Index
func (*DriftedObject) UseView ΒΆ
func (d *DriftedObject) UseView() bool
func (*DriftedObject) ViewVersion ΒΆ
func (d *DriftedObject) ViewVersion() string
func (*DriftedObject) Views ΒΆ
func (d *DriftedObject) Views(db *gorm.DB) []migrations.View
type EndpointAudit ΒΆ
type EndpointAudit struct {
ID string `gorm:"primarykey" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
Method string `json:"method,omitzero" gorm:"not null;default null" temporaljson:"method,omitzero,omitempty"`
Name string `json:"name,omitzero" gorm:"not null;default null" temporaljson:"name,omitzero,omitempty"`
Route string `json:"route,omitzero" gorm:"not null;default null" temporaljson:"route,omitzero,omitempty"`
LastUsedAt generics.NullTime `json:"last_used_at,omitzero" gorm:"type:timestamp;default:null" temporaljson:"last_used_at,omitzero,omitempty"`
Deprecated bool `json:"deprecated,omitzero" gorm:"not null;default:false" temporaljson:"deprecated,omitzero,omitempty"`
}
func (*EndpointAudit) BeforeCreate ΒΆ
func (a *EndpointAudit) BeforeCreate(tx *gorm.DB) error
func (*EndpointAudit) Indexes ΒΆ
func (c *EndpointAudit) Indexes(db *gorm.DB) []migrations.Index
type Event ΒΆ
type Event struct {
ID string `json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"precision:6" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"precision" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"type:Nullable(Int8)" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"type:LowCardinality(String)" temporaljson:"org_id,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"type:LowCardinality(String)" temporaljson:"app_id,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"type:LowCardinality(String)" temporaljson:"install_id,omitzero,omitempty"`
ComponentID string `json:"component_id,omitzero" gorm:"type:LowCardinality(String)" temporaljson:"component_id,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
}
type ExternalImageComponentConfig ΒΆ
type ExternalImageComponentConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// value
ComponentConfigConnectionID string `` /* 126-byte string literal not displayed */
ComponentConfigConnection ComponentConfigConnection `json:"-" temporaljson:"component_config_connection,omitzero,omitempty"`
ImageURL string `json:"image_url,omitzero" gorm:"notnull" temporaljson:"image_url,omitzero,omitempty"`
Tag string `json:"tag,omitzero" gorm:"notnull" temporaljson:"tag,omitzero,omitempty"`
AWSECRImageConfig *AWSECRImageConfig `` /* 164-byte string literal not displayed */
}
func (*ExternalImageComponentConfig) BeforeCreate ΒΆ
func (e *ExternalImageComponentConfig) BeforeCreate(tx *gorm.DB) error
func (*ExternalImageComponentConfig) Indexes ΒΆ
func (e *ExternalImageComponentConfig) Indexes(db *gorm.DB) []migrations.Index
type HelmChart ΒΆ
type HelmChart struct {
ID string `gorm:"primary_key:true;check:id_checker,char_length(id)=26" json:"id"`
CreatedByID string `json:"created_by_id" gorm:"not null;default:null" `
CreatedBy Account `json:"-"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" `
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" `
DeletedAt soft_delete.DeletedAt `json:"-" `
OrgID string `json:"org_id" `
Org Org `json:"-" `
OwnerID string `json:"owner_id" gorm:"type:text;check:owner_id_checker,char_length(id)=26;uniqueIndex:idx_owner" `
OwnerType string `json:"owner_type" gorm:"type:text;uniqueIndex:idx_owner"`
HelmReleases []HelmRelease `faker:"-" gorm:"constraint:OnDelete:CASCADE;"`
}
type HelmComponentConfig ΒΆ
type HelmComponentConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// parent reference
ComponentConfigConnectionID string `` /* 126-byte string literal not displayed */
ComponentConfigConnection ComponentConfigConnection `json:"-" temporaljson:"component_config_connection,omitzero,omitempty"`
HelmConfig *HelmConfig `json:"helm_config_json,omitzero" gorm:"type:jsonb" temporaljson:"helm_config_json,omitzero,omitempty"`
// Helm specific configurations
ChartName string `json:"chart_name,omitzero" gorm:"notnull" features:"template" temporaljson:"chart_name,omitzero,omitempty"`
Values pgtype.Hstore `` /* 130-byte string literal not displayed */
ValuesFiles pq.StringArray `` /* 141-byte string literal not displayed */
Namespace generics.NullString `json:"namespace,omitzero" swaggertype:"string" features:"template" temporaljson:"namespace,omitzero,omitempty"`
StorageDriver generics.NullString `json:"storage_driver,omitzero" swaggertype:"string" features:"template" temporaljson:"storage_driver,omitzero,omitempty"`
// Newer config fields that we don't need a column for
TakeOwnership bool `json:"take_ownership,omitzero" gorm:"-" temporaljson:"take_ownership,omitzero,omitempty"`
PublicGitVCSConfig *PublicGitVCSConfig `` /* 167-byte string literal not displayed */
ConnectedGithubVCSConfig *ConnectedGithubVCSConfig `` /* 179-byte string literal not displayed */
}
func (*HelmComponentConfig) AfterQuery ΒΆ
func (c *HelmComponentConfig) AfterQuery(tx *gorm.DB) error
func (*HelmComponentConfig) BeforeCreate ΒΆ
func (c *HelmComponentConfig) BeforeCreate(tx *gorm.DB) error
func (*HelmComponentConfig) Indexes ΒΆ
func (c *HelmComponentConfig) Indexes(db *gorm.DB) []migrations.Index
type HelmConfig ΒΆ
type HelmConfig struct {
ChartName string `json:"chart_name"`
Values map[string]*string `json:"values"`
ValuesFiles []string `json:"values_files"`
Namespace string `json:"namespace"`
StorageDriver string `json:"storage_driver"`
HelmRepoConfig *HelmRepoConfig `json:"helm_repo_config,omitempty"`
// Newer fields that we don't need to store as columns in the database
TakeOwnership bool `json:"take_ownership,omitempty"`
}
func (HelmConfig) GormDataType ΒΆ
func (HelmConfig) GormDataType() string
func (*HelmConfig) Scan ΒΆ
func (c *HelmConfig) Scan(v interface{}) (err error)
Scan implements the database/sql.Scanner interface.
type HelmRelease ΒΆ
type HelmRelease struct {
HelmChartID string `gorm:"primary_key:true"`
HelmChart HelmChart `gorm:"-" temporaljson:"helm_chart,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" gorm:"not null;default:null" `
CreatedBy Account `json:"-"`
CreatedAt time.Time `json:"created_at" gorm:"notnull"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" `
DeletedAt soft_delete.DeletedAt `json:"-" `
OrgID string `json:"org_id" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
Key string `gorm:"primaryKey:true"`
// See https://github.com/helm/helm/blob/c9fe3d118caec699eb2565df9838673af379ce12/pkg/storage/driver/secrets.go#L231
Type string `gorm:"not null"`
// The rspb.Release body, as a base64-encoded string
Body string `gorm:"not null"`
// Release "labels" that can be used as filters in the storage.Query(labels map[string]string)
// we implemented. Note that allowing Helm users to filter against new dimensions will require a
// new migration to be added, and the Create and/or update functions to be updated accordingly.
Name string `gorm:"not null"`
Namespace string `gorm:"not null"`
Version int `gorm:"not null"`
Status string `gorm:"not null"`
Owner string `gorm:"not null"`
Labels JSONMap `json:"labels,omitempty"`
}
func (*HelmRelease) BeforeCreate ΒΆ
func (t *HelmRelease) BeforeCreate(tx *gorm.DB) (err error)
func (*HelmRelease) Indexes ΒΆ
func (t *HelmRelease) Indexes(db *gorm.DB) []migrations.Index
type HelmRepoConfig ΒΆ
type IdentityProvider ΒΆ
type IdentityProvider struct {
ID string `gorm:"primarykey" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_provider_type,unique" temporaljson:"deleted_at,omitzero,omitempty"`
// OrgID can be nil for global providers available to all orgs in the deployment.
// If set, the provider is only available to users in that specific org.
OrgID *string `json:"org_id,omitempty" gorm:"index:idx_provider_type,unique" temporaljson:"org_id,omitzero,omitempty"`
Org *Org `faker:"-" json:"-" gorm:"constraint:OnDelete:SET NULL" temporaljson:"org,omitzero,omitempty"`
ProviderType ProviderType `json:"provider_type,omitzero" gorm:"not null,index:idx_provider_type,unique" temporaljson:"provider_type,omitzero,omitempty"`
Enabled bool `json:"enabled" gorm:"default:false" temporaljson:"enabled,omitempty"`
// Config holds provider-specific configuration as JSON.
// The structure depends on ProviderType:
// - oidc: providers.OpenIDConfig
// - google: providers.GoogleConfig
// - github: providers.GitHubConfig
Config []byte `json:"config,omitzero" gorm:"type:jsonb" temporaljson:"config,omitzero,omitempty"`
}
func (*IdentityProvider) BeforeCreate ΒΆ
func (a *IdentityProvider) BeforeCreate(tx *gorm.DB) error
func (*IdentityProvider) GetGitHubConfig ΒΆ
func (ip *IdentityProvider) GetGitHubConfig() (*providers.GitHubConfig, error)
GetGitHubConfig unmarshals the Config as GitHubConfig.
func (*IdentityProvider) GetGoogleConfig ΒΆ
func (ip *IdentityProvider) GetGoogleConfig() (*providers.GoogleConfig, error)
GetGoogleConfig unmarshals the Config as GoogleConfig.
func (*IdentityProvider) GetOpenIDConfig ΒΆ
func (ip *IdentityProvider) GetOpenIDConfig() (*providers.OpenIDConfig, error)
GetOpenIDConfig unmarshals the Config as OpenIDConfig.
func (*IdentityProvider) Indexes ΒΆ
func (a *IdentityProvider) Indexes(db *gorm.DB) []migrations.Index
func (*IdentityProvider) SetGitHubConfig ΒΆ
func (ip *IdentityProvider) SetGitHubConfig(cfg *providers.GitHubConfig) error
SetGitHubConfig marshals and sets the Config from GitHubConfig.
func (*IdentityProvider) SetGoogleConfig ΒΆ
func (ip *IdentityProvider) SetGoogleConfig(cfg *providers.GoogleConfig) error
SetGoogleConfig marshals and sets the Config from GoogleConfig.
func (*IdentityProvider) SetOpenIDConfig ΒΆ
func (ip *IdentityProvider) SetOpenIDConfig(cfg *providers.OpenIDConfig) error
SetOpenIDConfig marshals and sets the Config from OpenIDConfig.
func (*IdentityProvider) ValidateConfig ΒΆ
func (ip *IdentityProvider) ValidateConfig() error
ValidateConfig validates the Config field based on ProviderType.
type Install ΒΆ
type Install struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index:idx_app_install_name,unique" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
Metadata pgtype.Hstore `json:"metadata,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"metadata,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
Name string `json:"name,omitzero" gorm:"notnull;index:idx_app_install_name,unique" temporaljson:"name,omitzero,omitempty"`
App App `swaggerignore:"true" json:"app,omitzero" temporaljson:"app,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"notnull;index:idx_app_install_name,unique" temporaljson:"app_id,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
AppConfig AppConfig `json:"-" temporaljson:"app_config,omitzero,omitempty"`
AppSandboxConfigID string `json:"-" swaggerignore:"true" temporaljson:"app_sandbox_config_id,omitzero,omitempty"`
AppSandboxConfig AppSandboxConfig `json:"app_sandbox_config,omitzero" temporaljson:"app_sandbox_config,omitzero,omitempty"`
AppRunnerConfigID string `json:"-" swaggerignore:"true" temporaljson:"app_runner_config_id,omitzero,omitempty"`
AppRunnerConfig AppRunnerConfig `json:"app_runner_config,omitzero" temporaljson:"app_runner_config,omitzero,omitempty"`
InstallComponents []InstallComponent `` /* 133-byte string literal not displayed */
InstallActionWorkflows []InstallActionWorkflow `` /* 145-byte string literal not displayed */
InstallSandboxRuns []InstallSandboxRun `` /* 137-byte string literal not displayed */
InstallInputs []InstallInputs `json:"install_inputs,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_inputs,omitzero,omitempty"`
InstallEvents []InstallEvent `json:"install_events,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_events,omitzero,omitempty"`
InstallIntermediateData []InstallIntermediateData `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_intermediate_data,omitzero,omitempty"`
InstallSandbox InstallSandbox `json:"sandbox" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_sandbox,omitzero,omitempty"`
InstallConfig *InstallConfig `json:"install_config,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_config,omitzero,omitempty"`
InstallStates []InstallState `json:"install_states,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_states,omitzero,omitempty"`
InstallStack *InstallStack `json:"install_stack,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_stack,omitzero,omitempty"`
AWSAccount *AWSAccount `json:"aws_account,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"aws_account,omitzero,omitempty"`
AzureAccount *AzureAccount `json:"azure_account,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"azure_account,omitzero,omitempty"`
RunnerGroup RunnerGroup `json:"-" gorm:"polymorphic:Owner;constraint:OnDelete:CASCADE;" temporaljson:"runner_group,omitzero,omitempty"`
InstallNumber int `json:"install_number,omitzero" gorm:"->;-:migration" temporaljson:"install_number,omitzero,omitempty"`
SandboxStatus InstallSandboxStatus `json:"sandbox_status,omitzero" gorm:"->;-:migration" swaggertype:"string" temporaljson:"sandbox_status,omitzero,omitempty"`
SandboxStatusDescription string `` /* 133-byte string literal not displayed */
ComponentStatuses pgtype.Hstore `` /* 149-byte string literal not displayed */
Workflows []Workflow `json:"workflows,omitzero" gorm:"polymorphic:Owner;constraint:OnDelete:CASCADE;" temporaljson:"workflows,omitzero,omitempty"`
CurrentInstallInputs *InstallInputs `json:"-" gorm:"-" temporaljson:"current_install_inputs,omitzero,omitempty"`
CompositeComponentStatus InstallComponentStatus `` /* 133-byte string literal not displayed */
CompositeComponentStatusDescription string `` /* 157-byte string literal not displayed */
RunnerStatus RunnerStatus `json:"runner_status,omitzero" gorm:"-" swaggertype:"string" temporaljson:"runner_status,omitzero,omitempty"`
RunnerStatusDescription string `` /* 131-byte string literal not displayed */
RunnerID string `json:"runner_id,omitzero" gorm:"-" temporaljson:"runner_id,omitzero,omitempty"`
CloudPlatform CloudPlatform `json:"cloud_platform,omitzero" gorm:"-" swaggertype:"string" temporaljson:"cloud_platform,omitzero,omitempty"`
RunnerType AppRunnerType `json:"runner_type,omitzero" gorm:"-" swaggertype:"string" temporaljson:"runner_type,omitzero,omitempty"`
DriftedObjects []DriftedObject `json:"drifted_objects,omitzero" gorm:"-" temporaljson:"drifted_objects,omitzero,omitempty"`
Links map[string]any `json:"links,omitzero,omitempty" temporaljson:"-" gorm:"-"`
// TODO(jm): deprecate these fields once the terraform provider has been updated
Status string `json:"status,omitzero" gorm:"-" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"-" temporaljson:"status_description,omitzero,omitempty"`
}
func (*Install) AfterQuery ΒΆ
We want to report the status of the sandbox, the runner, and the components, and then roll that up into a high-level status for the install overall.
func (*Install) EventLoops ΒΆ
func (*Install) ViewVersion ΒΆ
type InstallActionWorkflow ΒΆ
type InstallActionWorkflow struct {
ID string `json:"id,omitzero" gorm:"primary_key;check:id_checker,char_length(id)=26" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `` /* 147-byte string literal not displayed */
// used for RLS
OrgID string `` /* 142-byte string literal not displayed */
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
Install Install `json:"-" swaggerignore:"true" temporaljson:"install,omitzero,omitempty"`
InstallID string `` /* 175-byte string literal not displayed */
ActionWorkflow ActionWorkflow `json:"action_workflow,omitzero" temporaljson:"action_workflow,omitzero,omitempty"`
ActionWorkflowID string `` /* 138-byte string literal not displayed */
Runs []InstallActionWorkflowRun `faker:"-" gorm:"constraint:OnDelete:CASCADE;" json:"runs,omitzero" temporaljson:"runs,omitzero,omitempty"`
// after query fields filled in after querying
Status InstallActionWorkflowRunStatus `json:"status,omitzero" gorm:"-" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
}
func (*InstallActionWorkflow) AfterQuery ΒΆ
func (c *InstallActionWorkflow) AfterQuery(tx *gorm.DB) error
func (*InstallActionWorkflow) BeforeCreate ΒΆ
func (a *InstallActionWorkflow) BeforeCreate(tx *gorm.DB) error
func (*InstallActionWorkflow) Indexes ΒΆ
func (a *InstallActionWorkflow) Indexes(db *gorm.DB) []migrations.Index
type InstallActionWorkflowManualTrigger ΒΆ
type InstallActionWorkflowManualTrigger struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallActionWorkflowRun InstallActionWorkflowRun `` /* 137-byte string literal not displayed */
}
func (*InstallActionWorkflowManualTrigger) AfterQuery ΒΆ
func (i *InstallActionWorkflowManualTrigger) AfterQuery(tx *gorm.DB) error
func (*InstallActionWorkflowManualTrigger) BeforeCreate ΒΆ
func (i *InstallActionWorkflowManualTrigger) BeforeCreate(tx *gorm.DB) error
func (*InstallActionWorkflowManualTrigger) Indexes ΒΆ
func (i *InstallActionWorkflowManualTrigger) Indexes(db *gorm.DB) []migrations.Index
type InstallActionWorkflowRun ΒΆ
type InstallActionWorkflowRun struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"created_by,omitzero" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `` /* 143-byte string literal not displayed */
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
RunnerJob *RunnerJob `json:"runner_job,omitzero" gorm:"polymorphic:Owner;" temporaljson:"runner_job,omitzero,omitempty"`
LogStream LogStream `json:"log_stream,omitzero" gorm:"polymorphic:Owner;" temporaljson:"log_stream,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `` /* 147-byte string literal not displayed */
Install Install `swaggerignore:"true" json:"-" temporaljson:"install,omitzero,omitempty"`
InstallActionWorkflowID string `` /* 157-byte string literal not displayed */
InstallActionWorkflow InstallActionWorkflow `json:"install_action_workflow,omitzero" temporaljson:"install_action_workflow,omitzero,omitempty"`
Status InstallActionWorkflowRunStatus `json:"status,omitzero" gorm:"notnull" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"notnull" temporaljson:"status_description,omitzero,omitempty"`
StatusV2 CompositeStatus `json:"status_v2,omitzero" gorm:"type:jsonb" temporaljson:"status_v2,omitzero,omitempty"`
TriggerType ActionWorkflowTriggerType `json:"trigger_type,omitzero" gorm:"notnull;default:''" temporaljson:"trigger_type,omitzero,omitempty"`
TriggeredByID string `` /* 147-byte string literal not displayed */
TriggeredByType string `json:"triggered_by_type,omitzero" gorm:"type:text;" temporaljson:"triggered_by_type,omitzero,omitempty"`
ActionWorkflowConfigID string `json:"action_workflow_config_id,omitzero" gorm:"notnull" temporaljson:"action_workflow_config_id,omitzero,omitempty"`
ActionWorkflowConfig ActionWorkflowConfig `json:"config,omitzero" temporaljson:"action_workflow_config,omitzero,omitempty"`
Steps []InstallActionWorkflowRunStep `json:"steps,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"steps,omitzero,omitempty"`
RunEnvVars pgtype.Hstore `json:"run_env_vars,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"run_env_vars,omitzero,omitempty"`
InstallWorkflowID *string `json:"install_workflow_id" gorm:"default null" temporaljson:"install_sandbox_id,omitzero,omitempty"`
InstallWorkflow *Workflow `swaggerignore:"true" json:"-" temporaljson:"install_workflow,omitzero,omitempty"`
// after query
ExecutionTime time.Duration `json:"execution_time,omitzero" gorm:"-" swaggertype:"primitive,integer" temporaljson:"execution_time,omitzero,omitempty"`
Outputs map[string]interface{} `json:"outputs,omitzero" gorm:"-" temporaljson:"outputs,omitzero,omitempty"`
WorkflowID *string `json:"workflow_id,omitzero" gorm:"-" temporaljson:"workflow_step_id,omitzero,omitempty"`
Workflow *Workflow `json:"workflow,omitzero" gorm:"-" temporaljson:"workflow_step,omitzero,omitempty"`
}
func (*InstallActionWorkflowRun) AfterQuery ΒΆ
func (i *InstallActionWorkflowRun) AfterQuery(tx *gorm.DB) error
func (*InstallActionWorkflowRun) BeforeCreate ΒΆ
func (i *InstallActionWorkflowRun) BeforeCreate(tx *gorm.DB) error
func (*InstallActionWorkflowRun) Indexes ΒΆ
func (i *InstallActionWorkflowRun) Indexes(db *gorm.DB) []migrations.Index
func (*InstallActionWorkflowRun) Views ΒΆ
func (i *InstallActionWorkflowRun) Views(db *gorm.DB) []migrations.View
type InstallActionWorkflowRunStatus ΒΆ
type InstallActionWorkflowRunStatus string
const ( InstallActionRunStatusFinished InstallActionWorkflowRunStatus = "finished" InstallActionRunStatusQueued InstallActionWorkflowRunStatus = "queued" InstallActionRunStatusInProgress InstallActionWorkflowRunStatus = "in-progress" InstallActionRunStatusError InstallActionWorkflowRunStatus = "error" InstallActionRunStatusTimedOut InstallActionWorkflowRunStatus = "timed-out" InstallActionRunStatusCancelled InstallActionWorkflowRunStatus = "cancelled" InstallActionRunStatusUnknown InstallActionWorkflowRunStatus = "unknown" )
type InstallActionWorkflowRunStep ΒΆ
type InstallActionWorkflowRunStep struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
Status InstallActionWorkflowRunStepStatus `json:"status,omitzero" temporaljson:"status,omitzero,omitempty"`
InstallActionWorkflowRunID string `json:"install_action_workflow_run_id,omitzero" temporaljson:"install_action_workflow_run_id,omitzero,omitempty"`
InstallActionWorkflowRun InstallActionWorkflowRun `json:"-" temporaljson:"install_action_workflow_run,omitzero,omitempty"`
StepID string `json:"step_id,omitzero" temporaljson:"step_id,omitzero,omitempty"`
Step ActionWorkflowStepConfig `json:"-" temporaljson:"step,omitzero,omitempty"`
ExecutionDuration time.Duration `` /* 148-byte string literal not displayed */
}
func (*InstallActionWorkflowRunStep) BeforeCreate ΒΆ
func (i *InstallActionWorkflowRunStep) BeforeCreate(tx *gorm.DB) error
func (*InstallActionWorkflowRunStep) Indexes ΒΆ
func (i *InstallActionWorkflowRunStep) Indexes(db *gorm.DB) []migrations.Index
type InstallActionWorkflowRunStepStatus ΒΆ
type InstallActionWorkflowRunStepStatus string
const ( InstallActionWorkflowRunStepStatusFinished InstallActionWorkflowRunStepStatus = "finished" InstallActionWorkflowRunStepStatusPending InstallActionWorkflowRunStepStatus = "pending" InstallActionWorkflowRunStepStatusInProgress InstallActionWorkflowRunStepStatus = "in-progress" InstallActionWorkflowRunStepStatusTimedOut InstallActionWorkflowRunStepStatus = "timed-out" InstallActionWorkflowRunStepStatusError InstallActionWorkflowRunStepStatus = "error" )
type InstallApprovalOption ΒΆ
type InstallApprovalOption string
const ( InstallApprovalOptionApproveAll InstallApprovalOption = "approve-all" InstallApprovalOptionPrompt InstallApprovalOption = "prompt" )
type InstallAuditLog ΒΆ
type InstallAuditLog struct {
InstallID string `json:"install_id,omitzero" gorm:"->;-:migration"`
Type string `json:"type,omitzero" gorm:"->;-:migration"`
TimeStamp time.Time `json:"time_stamp,omitzero" gorm:"->;-:migration"`
LogLine string `json:"log_line,omitzero" gorm:"->;-:migration"`
}
func (*InstallAuditLog) CurrentViewVersion ΒΆ added in v0.19.777
func (*InstallAuditLog) CurrentViewVersion() int
func (InstallAuditLog) GetTableOptions ΒΆ
func (m InstallAuditLog) GetTableOptions() (string, bool)
func (*InstallAuditLog) UseView ΒΆ
func (*InstallAuditLog) UseView() bool
func (*InstallAuditLog) ViewVersion ΒΆ
func (i *InstallAuditLog) ViewVersion() string
func (*InstallAuditLog) Views ΒΆ
func (i *InstallAuditLog) Views(db *gorm.DB) []migrations.View
type InstallComponent ΒΆ
type InstallComponent struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"index:install_component_group,unique;notnull" temporaljson:"install_id,omitzero,omitempty"`
Install Install `faker:"-" json:"-" temporaljson:"install,omitzero,omitempty"`
ComponentID string `` /* 127-byte string literal not displayed */
Component Component `faker:"-" json:"component,omitzero" temporaljson:"component,omitzero,omitempty"`
InstallDeploys []InstallDeploy `` /* 127-byte string literal not displayed */
TerraformWorkspace TerraformWorkspace `` /* 143-byte string literal not displayed */
DriftedObject DriftedObject `faker:"-" gorm:"-;" json:"drifted_object,omitzero" temporaljson:"drifted_object,omitzero,omitempty"`
Links map[string]any `json:"links,omitzero,omitempty" temporaljson:"-" gorm:"-"`
HelmChart HelmChart `json:"helm_chart" gorm:"polymorphic:Owner;constraint:OnDelete:CASCADE;" temporaljson:"helm_chart,omitzero,omitempty"`
Status InstallComponentStatus `json:"status,omitzero" gorm:"default:''" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"default:''" temporaljson:"status_description,omitzero,omitempty"`
StatusV2 CompositeStatus `json:"status_v2,omitzero" gorm:"type:jsonb" temporaljson:"status_v2,omitzero,omitempty"`
}
func (*InstallComponent) AfterQuery ΒΆ
func (c *InstallComponent) AfterQuery(tx *gorm.DB) error
func (*InstallComponent) BeforeCreate ΒΆ
func (c *InstallComponent) BeforeCreate(tx *gorm.DB) error
func (*InstallComponent) Indexes ΒΆ
func (c *InstallComponent) Indexes(db *gorm.DB) []migrations.Index
type InstallComponentStatus ΒΆ
type InstallComponentStatus string
const ( InstallComponentStatusUnset InstallComponentStatus = "" InstallComponentStatusDeleted InstallComponentStatus = "deleted" InstallComponentStatusDeleteFailed InstallComponentStatus = "delete_failed" InstallComponentStatusQueued InstallComponentStatus = "queued" // all legacy statuses that could be set from install deploy InstallComponentStatusActive InstallComponentStatus = "active" InstallComponentStatusInactive InstallComponentStatus = "inactive" InstallComponentStatusError InstallComponentStatus = "error" InstallComponentStatusNoop InstallComponentStatus = "noop" InstallComponentStatusPlanning InstallComponentStatus = "planning" InstallComponentStatusSyncing InstallComponentStatus = "syncing" InstallComponentStatusExecuting InstallComponentStatus = "executing" InstallComponentStatusUnknown InstallComponentStatus = "unknown" InstallComponentStatusPending InstallComponentStatus = "pending" )
func DeployStatusToComponentStatus ΒΆ
func DeployStatusToComponentStatus(status InstallDeployStatus) InstallComponentStatus
type InstallComponentSummary ΒΆ
type InstallComponentSummary struct {
ID string `json:"id"`
ComponentID string `json:"component_id"`
ComponentName string `json:"component_name"`
DeployStatus InstallDeployStatus `json:"deploy_status"`
DeployStatusDescription string `json:"deploy_status_description"`
BuildStatus ComponentBuildStatus `json:"build_status"`
BuildStatusDescription string `json:"build_status_description"`
ComponentConfig *ComponentConfigConnection `json:"component_config"`
Dependencies []Component `json:"dependencies"`
DriftedStatus bool `json:"drifted_status"`
}
type InstallConfig ΒΆ
type InstallConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"notnull;default null" temporaljson:"install_id,omitzero,omitempty"`
Install Install `json:"-" temporaljson:"install,omitzero,omitempty"`
ApprovalOption InstallApprovalOption `json:"approval_option,omitzero" gorm:"not null;default 'auto'" temporaljson:"approval_option,omitzero,omitempty"`
}
func (*InstallConfig) BeforeCreate ΒΆ
func (a *InstallConfig) BeforeCreate(tx *gorm.DB) error
func (*InstallConfig) Indexes ΒΆ
func (c *InstallConfig) Indexes(db *gorm.DB) []migrations.Index
type InstallDeploy ΒΆ
type InstallDeploy struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"created_by,omitzero" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// runner details
RunnerJobs []RunnerJob `json:"runner_jobs,omitzero" gorm:"polymorphic:Owner;" temporaljson:"runner_jobs,omitzero,omitempty"`
OCIArtifact OCIArtifact `json:"oci_artifact,omitzero,omitempty" gorm:"polymorphic:Owner;" temporaljson:"oci_artifact,omitempty"`
LogStream LogStream `json:"log_stream,omitzero" gorm:"polymorphic:Owner;" temporaljson:"log_stream,omitzero,omitempty"`
ActionWorkflowRuns []InstallActionWorkflowRun `json:"action_workflow_runs,omitzero" gorm:"polymorphic:TriggeredBy;" temporaljson:"action_workflow_runs,omitzero,omitempty"`
PolicyReports []PolicyReport `` /* 137-byte string literal not displayed */
ComponentBuildID string `json:"build_id,omitzero" gorm:"notnull" temporaljson:"component_build_id,omitzero,omitempty"`
ComponentBuild ComponentBuild `faker:"-" json:"component_build,omitzero" temporaljson:"component_build,omitzero,omitempty"`
InstallComponentID string `json:"install_component_id,omitzero" gorm:"notnull" temporaljson:"install_component_id,omitzero,omitempty"`
InstallComponent InstallComponent `faker:"-" json:"-" temporaljson:"install_component,omitzero,omitempty"`
ComponentReleaseStepID *string `json:"release_id,omitzero" temporaljson:"component_release_step_id,omitzero,omitempty"`
ComponentReleaseStep *ComponentReleaseStep `json:"-" temporaljson:"component_release_step,omitzero,omitempty"`
Status InstallDeployStatus `json:"status,omitzero" gorm:"notnull" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"notnull" temporaljson:"status_description,omitzero,omitempty"`
Type InstallDeployType `json:"install_deploy_type,omitzero" temporaljson:"type,omitzero,omitempty"`
StatusV2 CompositeStatus `json:"status_v2,omitzero" gorm:"type:jsonb" temporaljson:"status_v2,omitzero,omitempty"`
// DEPRECATED: use WorkflowID
InstallWorkflowID *string `json:"install_workflow_id,omitzero" gorm:"default null" temporaljson:"install_sandbox_id,omitzero,omitempty"`
InstallWorkflow *Workflow `swaggerignore:"true" json:"-" temporaljson:"install_workflow,omitzero,omitempty"`
// Fields that are de-nested at read time using AfterQuery
InstallID string `json:"install_id" gorm:"-" temporaljson:"install_id,omitzero,omitempty"`
ComponentID string `json:"component_id,omitzero" gorm:"-" temporaljson:"component_id,omitzero,omitempty"`
ComponentName string `json:"component_name,omitzero" gorm:"-" temporaljson:"component_name,omitzero,omitempty"`
ComponentConfigVersion int `gorm:"-" json:"component_config_version,omitzero" temporaljson:"component_config_version,omitzero,omitempty"`
WorkflowID *string `json:"workflow_id,omitzero" gorm:"-" temporaljson:"workflow_step_id,omitzero,omitempty"`
Workflow *Workflow `json:"workflow,omitzero" gorm:"-" temporaljson:"workflow_step,omitzero,omitempty"`
PlanOnly bool `json:"plan_only" gorm:"-" temporaljson:"plan_only,omitzero,omitempty"`
Outputs map[string]any `json:"outputs,omitzero" gorm:"-" temporaljson:"outputs,omitzero,omitempty"`
}
func (*InstallDeploy) AfterQuery ΒΆ
func (c *InstallDeploy) AfterQuery(tx *gorm.DB) error
func (*InstallDeploy) BeforeCreate ΒΆ
func (c *InstallDeploy) BeforeCreate(tx *gorm.DB) error
func (*InstallDeploy) Indexes ΒΆ
func (c *InstallDeploy) Indexes(db *gorm.DB) []migrations.Index
func (*InstallDeploy) IsTornDown ΒΆ
func (c *InstallDeploy) IsTornDown() bool
func (*InstallDeploy) Views ΒΆ
func (i *InstallDeploy) Views(db *gorm.DB) []migrations.View
type InstallDeployStatus ΒΆ
type InstallDeployStatus string
const ( InstallDeployStatusActive InstallDeployStatus = "active" InstallDeployStatusInactive InstallDeployStatus = "inactive" InstallDeployStatusError InstallDeployStatus = "error" InstallDeployStatusNoop InstallDeployStatus = "noop" InstallDeployStatusPlanning InstallDeployStatus = "planning" InstallDeployStatusSyncing InstallDeployStatus = "syncing" InstallDeployStatusExecuting InstallDeployStatus = "executing" InstallDeployStatusCancelled InstallDeployStatus = "cancelled" InstallDeployStatusUnknown InstallDeployStatus = "unknown" InstallDeployStatusPending InstallDeployStatus = "pending" InstallDeployStatusQueued InstallDeployStatus = "queued" InstallDeployStatusPendingApproval InstallDeployStatus = "pending-approval" InstallDeployStatusDriftDetected InstallDeployStatus = "drift-detected" InstallDeployStatusAutoSkipped InstallDeployStatus = "auto-skipped" InstallDeployStatusNoDrift InstallDeployStatus = "no-drift" InstallDeployApprovalDenied InstallDeployStatus = "approval-denied" )
type InstallDeployType ΒΆ
type InstallDeployType string
const ( InstallDeployTypeSync InstallDeployType = "sync-image" InstallDeployTypeApply InstallDeployType = "apply" InstallDeployTypeTeardown InstallDeployType = "teardown" )
type InstallEvent ΒΆ
type InstallEvent struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" temporaljson:"install_id,omitzero,omitempty"`
Install Install `swaggerignore:"-" json:"-" temporaljson:"install,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" swaggerignore:"-" temporaljson:"org,omitzero,omitempty"`
Operation string `json:"operation,omitzero" temporaljson:"operation,omitzero,omitempty"`
OperationStatus OperationStatus `json:"operation_status,omitzero" temporaljson:"operation_status,omitzero,omitempty"`
Payload []byte `json:"payload,omitzero" gorm:"type:jsonb" swaggertype:"object,string" temporaljson:"payload,omitzero,omitempty"`
OperationName string `gorm:"-" json:"operation_name,omitzero" temporaljson:"operation_name,omitzero,omitempty"`
}
func (*InstallEvent) AfterQuery ΒΆ
func (i *InstallEvent) AfterQuery(tx *gorm.DB) error
func (*InstallEvent) BeforeCreate ΒΆ
func (a *InstallEvent) BeforeCreate(tx *gorm.DB) error
func (*InstallEvent) Indexes ΒΆ
func (i *InstallEvent) Indexes(db *gorm.DB) []migrations.Index
type InstallInputs ΒΆ
type InstallInputs struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"notnull;default null" temporaljson:"install_id,omitzero,omitempty"`
Install Install `json:"-" temporaljson:"install,omitzero,omitempty"`
Values pgtype.Hstore `json:"values,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"values,omitzero,omitempty"`
ValuesRedacted pgtype.Hstore `` /* 143-byte string literal not displayed */
AppInputConfigID string `json:"app_input_config_id,omitzero" temporaljson:"app_input_config_id,omitzero,omitempty"`
AppInputConfig AppInputConfig `json:"-" temporaljson:"app_input_config,omitzero,omitempty"`
}
func (*InstallInputs) BeforeCreate ΒΆ
func (a *InstallInputs) BeforeCreate(tx *gorm.DB) error
func (*InstallInputs) Indexes ΒΆ
func (i *InstallInputs) Indexes(db *gorm.DB) []migrations.Index
func (*InstallInputs) UseView ΒΆ
func (i *InstallInputs) UseView() bool
func (*InstallInputs) ViewVersion ΒΆ
func (i *InstallInputs) ViewVersion() string
func (*InstallInputs) Views ΒΆ
func (i *InstallInputs) Views(db *gorm.DB) []migrations.View
type InstallIntermediateData ΒΆ
type InstallIntermediateData struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"not null;default null" temporaljson:"install_id,omitzero,omitempty"`
Install Install `swaggerignore:"true" json:"-" temporaljson:"install,omitzero,omitempty"`
RunnerJob RunnerJob `json:"-" temporaljson:"runner_job,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
IntermediateDataJSON string `json:"-" gorm:"default null;not null" temporaljson:"intermediate_data_json,omitzero,omitempty"`
IntermediateData map[string]interface{} `json:"intermediate_data,omitzero" gorm:"-" temporaljson:"intermediate_data,omitzero,omitempty"`
}
func (*InstallIntermediateData) AfterQuery ΒΆ
func (i *InstallIntermediateData) AfterQuery(tx *gorm.DB) error
func (*InstallIntermediateData) BeforeCreate ΒΆ
func (i *InstallIntermediateData) BeforeCreate(tx *gorm.DB) error
func (*InstallIntermediateData) Indexes ΒΆ
func (i *InstallIntermediateData) Indexes(db *gorm.DB) []migrations.Index
type InstallSandbox ΒΆ
type InstallSandbox struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"notnull" temporaljson:"install_id,omitzero,omitempty"`
Status InstallSandboxStatus `json:"status,omitzero" gorm:"not null;default null" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"not null;default null" temporaljson:"status_description,omitzero,omitempty"`
StatusV2 CompositeStatus `json:"status_v2,omitzero" gorm:"type:jsonb" temporaljson:"status_v2,omitzero,omitempty"`
TerraformWorkspace TerraformWorkspace `` /* 143-byte string literal not displayed */
InstallSandboxRuns []InstallSandboxRun `` /* 137-byte string literal not displayed */
}
func (*InstallSandbox) AfterQuery ΒΆ
func (c *InstallSandbox) AfterQuery(tx *gorm.DB) error
func (*InstallSandbox) BeforeCreate ΒΆ
func (c *InstallSandbox) BeforeCreate(tx *gorm.DB) error
func (*InstallSandbox) Indexes ΒΆ
func (c *InstallSandbox) Indexes(db *gorm.DB) []migrations.Index
type InstallSandboxRun ΒΆ
type InstallSandboxRun struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"created_by,omitzero" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// runner details
RunnerJobs []RunnerJob `json:"runner_jobs,omitzero" gorm:"polymorphic:Owner;" temporaljson:"runner_job,omitzero,omitempty"`
LogStream LogStream `json:"log_stream,omitzero" gorm:"polymorphic:Owner;" temporaljson:"log_stream,omitzero,omitempty"`
ActionWorkflowRuns []InstallActionWorkflowRun `json:"action_workflow_runs,omitzero" gorm:"polymorphic:TriggeredBy;" temporaljson:"action_workflow_runs,omitzero,omitempty"`
PolicyReports []PolicyReport `` /* 142-byte string literal not displayed */
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"not null;default null" temporaljson:"install_id,omitzero,omitempty"`
Install Install `swaggerignore:"true" json:"-" temporaljson:"install,omitzero,omitempty"`
// TODO: once we run a backfill we can make this non pointer
InstallSandboxID *string `json:"install_sandbox_id,omitzero" gorm:"default null" temporaljson:"install_sandbox_id,omitzero,omitempty"`
InstallSandbox *InstallSandbox `swaggerignore:"true" json:"-" temporaljson:"install_sandbox,omitzero,omitempty"`
InstallWorkflowID *string `json:"install_workflow_id,omitzero" gorm:"default null" temporaljson:"install_sandbox_id,omitzero,omitempty"`
InstallWorkflow *Workflow `swaggerignore:"true" json:"-" temporaljson:"install_workflow,omitzero,omitempty"`
RunType SandboxRunType `json:"run_type,omitzero" temporaljson:"run_type,omitzero,omitempty"`
Status SandboxRunStatus `json:"status,omitzero" gorm:"notnull" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"notnull" temporaljson:"status_description,omitzero,omitempty"`
StatusV2 CompositeStatus `json:"status_v2,omitzero" gorm:"type:jsonb" temporaljson:"status_v2,omitzero,omitempty"`
AppSandboxConfigID string `json:"-" temporaljson:"app_sandbox_config_id,omitzero,omitempty"`
AppSandboxConfig AppSandboxConfig `json:"app_sandbox_config,omitzero" temporaljson:"app_sandbox_config,omitzero,omitempty"`
Outputs map[string]any `json:"outputs,omitzero" gorm:"-" temporaljson:"outputs,omitzero,omitempty"`
// Fields that are de-nested at read time using AfterQuery
WorkflowID *string `json:"workflow_id,omitzero" gorm:"-" temporaljson:"workflow_step_id,omitzero,omitempty"`
Workflow *Workflow `json:"workflow,omitzero" gorm:"-" temporaljson:"workflow_step,omitzero,omitempty"`
}
func (*InstallSandboxRun) AfterQuery ΒΆ
func (i *InstallSandboxRun) AfterQuery(tx *gorm.DB) error
func (*InstallSandboxRun) BeforeCreate ΒΆ
func (i *InstallSandboxRun) BeforeCreate(tx *gorm.DB) error
func (*InstallSandboxRun) Indexes ΒΆ
func (i *InstallSandboxRun) Indexes(db *gorm.DB) []migrations.Index
func (*InstallSandboxRun) Views ΒΆ
func (i *InstallSandboxRun) Views(db *gorm.DB) []migrations.View
type InstallSandboxStatus ΒΆ
type InstallSandboxStatus string
const ( InstallSandboxStatusDeleted InstallSandboxStatus = "deleted" InstallSandboxStatusDeleteFailed InstallSandboxStatus = "delete_failed" // Synced from sandbow runs InstallSandboxStatusActive InstallSandboxStatus = "active" InstallSandboxStatusError InstallSandboxStatus = "error" InstallSandboxStatusQueued InstallSandboxStatus = "queued" InstallSandboxStatusDeprovisioned InstallSandboxStatus = "deprovisioned" InstallSandboxStatusDeprovisioning InstallSandboxStatus = "deprovisioning" InstallSandboxStatusProvisioning InstallSandboxStatus = "provisioning" InstallSandboxStatusReprovisioning InstallSandboxStatus = "reprovisioning" InstallSandboxStatusAccessError InstallSandboxStatus = "access_error" InstallSandboxStatusUnknown InstallSandboxStatus = "unknown" InstallSandboxStatusEmpty InstallSandboxStatus = "empty" )
func SandboxRunStatusToInstallSandboxStatus ΒΆ
func SandboxRunStatusToInstallSandboxStatus(status SandboxRunStatus) InstallSandboxStatus
type InstallStack ΒΆ
type InstallStack struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"notnull;default null" temporaljson:"install_id,omitzero,omitempty"`
InstallStackOutputs InstallStackOutputs `json:"install_stack_outputs,omitzero" temporaljson:"install_stack_outputs,omitzero,omitempty"`
InstallStackVersions []InstallStackVersion `json:"versions,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_stack_versions,omitzero,omitempty"`
}
func (*InstallStack) BeforeCreate ΒΆ
func (a *InstallStack) BeforeCreate(tx *gorm.DB) error
func (*InstallStack) Indexes ΒΆ
func (a *InstallStack) Indexes(db *gorm.DB) []migrations.Index
type InstallStackOutputs ΒΆ
type InstallStackOutputs struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
InstallStackID string `json:"install_stack_id,omitzero" gorm:"notnull;default null" temporaljson:"install_stack_id,omitzero,omitempty"`
InstallStackVersionRunID generics.NullString `json:"install_version_run_id,omitzero" swaggertype:"string" temporaljson:"install_stack_version_run_id,omitzero,omitempty"`
Data pgtype.Hstore `json:"data,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"data,omitzero,omitempty"`
DataContents map[string]any `json:"data_contents,omitzero" gorm:"-"`
AWSStackOutputs *AWSStackOutputs `json:"aws,omitzero" gorm:"-" temporaljson:"aws_stack_outputs,omitzero,omitempty"`
AzureStackOutputs *AzureStackOutputs `json:"azure,omitzero" gorm:"-" temporaljson:"azure_stack_outputs,omitzero,omitempty"`
}
func (*InstallStackOutputs) AfterQuery ΒΆ
func (a *InstallStackOutputs) AfterQuery(tx *gorm.DB) error
func (*InstallStackOutputs) BeforeCreate ΒΆ
func (a *InstallStackOutputs) BeforeCreate(tx *gorm.DB) error
func (*InstallStackOutputs) Indexes ΒΆ
func (a *InstallStackOutputs) Indexes(db *gorm.DB) []migrations.Index
type InstallStackVersion ΒΆ
type InstallStackVersion struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;default null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"notnull;default null" temporaljson:"install_id,omitzero,omitempty"`
InstallStackID string `json:"install_stack_id,omitzero" temporaljson:"install_stack_id,omitzero,omitempty"`
AppConfigID string `json:"app_config_id,omitzero" temporaljson:"app_config_id,omitzero,omitempty"`
Status CompositeStatus `json:"composite_status,omitzero" gorm:"type:jsonb" temporaljson:"status,omitzero,omitempty"`
Runs []InstallStackVersionRun `json:"runs,omitzero" temporaljson:"runs,omitzero,omitempty"`
Contents []byte `json:"contents,omitzero" gorm:"type:jsonb" swaggertype:"string" temporaljson:"contents,omitzero,omitempty"`
Checksum string `json:"checksum,omitzero" temporaljson:"checksum,omitzero,omitempty"`
TemplateURL string `json:"template_url,omitzero" temporaljson:"template_url,omitzero,omitempty"`
PhoneHomeID string `json:"phone_home_id,omitzero" temporaljson:"phone_home_id,omitzero,omitempty"`
PhoneHomeURL string `json:"phone_home_url,omitzero" temporaljson:"phone_home_url,omitzero,omitempty"`
// aws configuration parameters
AWSBucketName string `json:"aws_bucket_name,omitzero" temporaljson:"aws_bucket_name,omitzero,omitempty"`
AWSBucketKey string `json:"aws_bucket_key,omitzero" temporaljson:"aws_bucket_key,omitzero,omitempty"`
QuickLinkURL string `json:"quick_link_url,omitzero" temporaljson:"quick_link_url,omitzero,omitempty"`
}
func (*InstallStackVersion) BeforeCreate ΒΆ
func (a *InstallStackVersion) BeforeCreate(tx *gorm.DB) error
func (*InstallStackVersion) Indexes ΒΆ
func (a *InstallStackVersion) Indexes(db *gorm.DB) []migrations.Index
type InstallStackVersionRun ΒΆ
type InstallStackVersionRun struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallStackVersionID string `` /* 135-byte string literal not displayed */
InstallStackVersion InstallStackVersion `json:"-" temporaljson:"install_stack_version,omitzero,omitempty"`
Data pgtype.Hstore `json:"data,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"data,omitzero,omitempty"`
DataContents map[string]any `json:"data_contents,omitzero" gorm:"-"`
}
func (*InstallStackVersionRun) AfterQuery ΒΆ
func (a *InstallStackVersionRun) AfterQuery(tx *gorm.DB) error
func (*InstallStackVersionRun) BeforeCreate ΒΆ
func (i *InstallStackVersionRun) BeforeCreate(tx *gorm.DB) error
func (*InstallStackVersionRun) Indexes ΒΆ
func (i *InstallStackVersionRun) Indexes(db *gorm.DB) []migrations.Index
func (*InstallStackVersionRun) Views ΒΆ
func (i *InstallStackVersionRun) Views(db *gorm.DB) []migrations.View
type InstallState ΒΆ
type InstallState struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
Install Install `json:"-" faker:"-" temporaljson:"install,omitzero,omitempty"`
InstallID string `json:"install_id,omitzero" gorm:"notnull" temporaljson:"install_id,omitzero,omitempty"`
State *state.State `json:"contents,omitzero" gorm:"type:jsonb" swaggertype:"string" temporaljson:"-"`
Version int `json:"version,omitzero" gorm:"->;-:migration" temporaljson:"version,omitzero,omitempty"`
TriggeredByID string `json:"triggered_by_id,omitzero" gorm:"type:text;check:triggered_by_id_checker,char_length(id)=26"`
TriggeredByType string `json:"triggered_by_type,omitzero" gorm:"type:text;"`
Archived bool `json:"archived" gorm:"default:false;not null" temporaljson:"archived,omitzero,omitempty"`
StaleAt generics.NullTime `json:"stale_at,omitzero" gorm:"type:timestamp;default:null" temporaljson:"stale_at,omitzero,omitempty"`
}
func (*InstallState) BeforeCreate ΒΆ
func (a *InstallState) BeforeCreate(tx *gorm.DB) error
func (*InstallState) Indexes ΒΆ
func (i *InstallState) Indexes(db *gorm.DB) []migrations.Index
func (*InstallState) UseView ΒΆ
func (i *InstallState) UseView() bool
func (*InstallState) ViewVersion ΒΆ
func (i *InstallState) ViewVersion() string
func (*InstallState) Views ΒΆ
func (i *InstallState) Views(db *gorm.DB) []migrations.View
type Installer ΒΆ
type Installer struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull" temporaljson:"org_id,omitzero,omitempty"`
Org Org `faker:"-" json:"-" temporaljson:"org,omitzero,omitempty"`
Apps []App `json:"apps,omitzero" gorm:"many2many:installer_apps;constraint:OnDelete:CASCADE;" temporaljson:"apps,omitzero,omitempty"`
Type InstallerType `json:"type,omitzero" temporaljson:"type,omitzero,omitempty"`
Metadata InstallerMetadata `json:"metadata,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"metadata,omitzero,omitempty"`
}
func (*Installer) JoinTables ΒΆ
func (*Installer) JoinTables() []migrations.JoinTable
type InstallerApp ΒΆ
type InstallerApp struct {
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
AppID string `json:"app_id,omitzero" gorm:"primary_key" temporaljson:"app_id,omitzero,omitempty"`
App App `json:"app,omitzero" temporaljson:"app,omitzero,omitempty"`
InstallerID string `json:"installer_id,omitzero" gorm:"primary_key" temporaljson:"installer_id,omitzero,omitempty"`
Installer Installer `json:"installer,omitzero" temporaljson:"installer,omitzero,omitempty"`
}
func (*InstallerApp) BeforeSave ΒΆ
func (c *InstallerApp) BeforeSave(tx *gorm.DB) error
type InstallerMetadata ΒΆ
type InstallerMetadata struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index" temporaljson:"deleted_at,omitzero,omitempty"`
InstallerID string `json:"installer_id,omitzero" gorm:"notnull" temporaljson:"installer_id,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
Name string `json:"name,omitzero" gorm:"notnull" temporaljson:"name,omitzero,omitempty"`
Description string `json:"description,omitzero" gorm:"notnull" temporaljson:"description,omitzero,omitempty"`
PostInstallMarkdown generics.NullString `json:"post_install_markdown,omitzero" swaggertype:"string" temporaljson:"post_install_markdown,omitzero,omitempty"`
CopyrightMarkdown generics.NullString `json:"copyright_markdown,omitzero" swaggertype:"string" temporaljson:"copyright_markdown,omitzero,omitempty"`
DemoURL generics.NullString `json:"demo_url,omitzero" swaggertype:"string" temporaljson:"demo_url,omitzero,omitempty"`
OgImageURL generics.NullString `json:"og_image_url,omitzero" swaggertype:"string" temporaljson:"og_image_url,omitzero,omitempty"`
DocumentationURL string `json:"documentation_url,omitzero" gorm:"notnull" temporaljson:"documentation_url,omitzero,omitempty"`
LogoURL string `json:"logo_url,omitzero" gorm:"notnull" temporaljson:"logo_url,omitzero,omitempty"`
GithubURL string `json:"github_url,omitzero" gorm:"notnull" temporaljson:"github_url,omitzero,omitempty"`
CommunityURL string `json:"community_url,omitzero" gorm:"notnull" temporaljson:"community_url,omitzero,omitempty"`
HomepageURL string `json:"homepage_url,omitzero" gorm:"notnull" temporaljson:"homepage_url,omitzero,omitempty"`
FaviconURL string `json:"favicon_url,omitzero" temporaljson:"favicon_url,omitzero,omitempty"`
FormattedDemoURL string `json:"formatted_demo_url,omitzero" gorm:"-" temporaljson:"formatted_demo_url,omitzero,omitempty"`
}
func (*InstallerMetadata) AfterQuery ΒΆ
func (a *InstallerMetadata) AfterQuery(tx *gorm.DB) error
func (*InstallerMetadata) BeforeCreate ΒΆ
func (a *InstallerMetadata) BeforeCreate(tx *gorm.DB) error
func (*InstallerMetadata) Indexes ΒΆ
func (a *InstallerMetadata) Indexes(db *gorm.DB) []migrations.Index
type InstallerType ΒΆ
type InstallerType string
const (
InstallerTypeSelfHosted InstallerType = "self_hosted"
)
type JobComponentConfig ΒΆ
type JobComponentConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// value
ComponentConfigConnectionID string `` /* 126-byte string literal not displayed */
ComponentConfigConnection ComponentConfigConnection `json:"-" temporaljson:"component_config_connection,omitzero,omitempty"`
// Image attributes, copied from a docker_buid or external_image component.
ImageURL string `json:"image_url,omitzero" gorm:"notnull" temporaljson:"image_url,omitzero,omitempty"`
Tag string `json:"tag,omitzero" gorm:"notnull" temporaljson:"tag,omitzero,omitempty"`
Cmd pq.StringArray `json:"cmd,omitzero" gorm:"type:text[]" temporaljson:"cmd,omitzero,omitempty"`
EnvVars pgtype.Hstore `json:"env_vars,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"env_vars,omitzero,omitempty"`
Args pq.StringArray `json:"args,omitzero" gorm:"type:text[]" swaggertype:"array,string" temporaljson:"args,omitzero,omitempty"`
}
func (*JobComponentConfig) BeforeCreate ΒΆ
func (e *JobComponentConfig) BeforeCreate(tx *gorm.DB) error
func (*JobComponentConfig) Indexes ΒΆ
func (j *JobComponentConfig) Indexes(db *gorm.DB) []migrations.Index
type KubernetesManifestComponentConfig ΒΆ
type KubernetesManifestComponentConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// value
ComponentConfigConnectionID string `` /* 126-byte string literal not displayed */
ComponentConfigConnection ComponentConfigConnection `json:"-" temporaljson:"component_config_connection,omitzero,omitempty"`
// Primary fields - used for inline manifests (fully supported)
Manifest string `json:"manifest,omitzero" gorm:"not null;default:''" temporaljson:"manifest,omitzero,omitempty"`
Namespace string `json:"namespace,omitzero" gorm:"not null;default:default" temporaljson:"namespace,omitzero,omitempty"`
// Kustomize configuration (mutually exclusive with Manifest)
Kustomize *KustomizeConfig `json:"kustomize,omitzero" gorm:"type:jsonb" temporaljson:"kustomize,omitzero,omitempty"`
// VCS configuration for kustomize sources (similar to HelmComponentConfig)
PublicGitVCSConfig *PublicGitVCSConfig `` /* 167-byte string literal not displayed */
ConnectedGithubVCSConfig *ConnectedGithubVCSConfig `` /* 179-byte string literal not displayed */
}
func (*KubernetesManifestComponentConfig) BeforeCreate ΒΆ
func (e *KubernetesManifestComponentConfig) BeforeCreate(tx *gorm.DB) error
func (*KubernetesManifestComponentConfig) Indexes ΒΆ
func (k *KubernetesManifestComponentConfig) Indexes(db *gorm.DB) []migrations.Index
func (*KubernetesManifestComponentConfig) SourceType ΒΆ
func (k *KubernetesManifestComponentConfig) SourceType() string
SourceType returns the source type based on which fields are populated
type KustomizeConfig ΒΆ
type KustomizeConfig struct {
// Path to kustomization directory (relative to source root)
Path string `json:"path"`
// Additional patch files to apply after kustomize build
Patches []string `json:"patches,omitempty"`
// Enable Helm chart inflation during kustomize build
EnableHelm bool `json:"enable_helm,omitempty"`
// Load restrictor: "none" or "rootOnly" (default: "rootOnly")
LoadRestrictor string `json:"load_restrictor,omitempty"`
}
KustomizeConfig defines kustomize build options
func (KustomizeConfig) GormDataType ΒΆ
func (KustomizeConfig) GormDataType() string
GormDataType returns the GORM data type for this field
func (*KustomizeConfig) Scan ΒΆ
func (c *KustomizeConfig) Scan(v interface{}) (err error)
Scan implements the database/sql.Scanner interface
type LatestRunnerHeartBeat ΒΆ
type LatestRunnerHeartBeat struct {
RunnerID string `json:"runner_id,omitzero" gorm:"->" temporaljson:"runner_id,omitzero,omitempty"`
Process RunnerProcess `json:"process" gorm:"->" swaggertype:"string"`
Version string `json:"version,omitzero" gorm:"->" temporaljson:"version,omitzero,omitempty"`
StartedAt time.Time `json:"started_at,omitzero" gorm:"-" temporaljson:"started_at,omitzero,omitempty"`
AliveTime time.Duration `json:"alive_time,omitzero" gorm:"->" swaggertype:"primitive,integer" temporaljson:"alive_time,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"->;column:created_at_latest" temporaljson:"CreatedAt,omitzero,omitempty"`
}
Struct for a read-only materialized view. the view is created directly in sql. NOTE(fd): i am not registering this model so GORM never thinks about it when migrating.
func (*LatestRunnerHeartBeat) AfterQuery ΒΆ
func (r *LatestRunnerHeartBeat) AfterQuery(tx *gorm.DB) error
func (*LatestRunnerHeartBeat) TableName ΒΆ
func (*LatestRunnerHeartBeat) TableName() string
type LogStream ΒΆ
type LogStream struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
OwnerID string `` /* 126-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;" temporaljson:"owner_type,omitzero,omitempty"`
Open bool `json:"open,omitzero" temporaljson:"open,omitzero,omitempty"`
Attrs pgtype.Hstore `json:"attrs,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"attrs,omitzero,omitempty"`
ParentLogStreamID generics.NullString `json:"-" swaggerignore:"true" temporaljson:"parent_log_stream_id,omitzero,omitempty"`
ParentLogStream *LogStream `json:"-" faker:"-" temporaljson:"parent_log_stream,omitzero,omitempty"`
RunnerJobs []RunnerJob `json:"-" temporaljson:"runner_jobs,omitzero,omitempty"`
WriteToken string `json:"write_token,omitzero" gorm:"-" temporaljson:"write_token,omitzero,omitempty"`
RunnerAPIURL string `json:"runner_api_url,omitzero" gorm:"-" temporaljson:"runner_apiurl,omitzero,omitempty"`
}
type NotificationsConfig ΒΆ
type NotificationsConfig struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull;defaultnull" temporaljson:"org_id,omitzero,omitempty"`
OwnerID string `json:"owner_id,omitzero" gorm:"notnull;defaultnull;" temporaljson:"owner_id,omitzero,omitempty"`
OwnerType string `json:"owner_type,omitzero" gorm:"notnull;defaultnull;" temporaljson:"owner_type,omitzero,omitempty"`
// slack settings
EnableSlackNotifications bool `json:"-" temporaljson:"enable_slack_notifications,omitzero,omitempty"`
SlackWebhookURL string `json:"slack_webhook_url,omitzero" temporaljson:"slack_webhook_url,omitzero,omitempty"`
InternalSlackWebhookURL string `json:"-" temporaljson:"internal_slack_webhook_url,omitzero,omitempty"`
// email settings
EnableEmailNotifications bool `json:"-" temporaljson:"enable_email_notifications,omitzero,omitempty"`
// generated via after query
SlackWebhookURLs []string `gorm:"-" json:"-" temporaljson:"slack_webhook_ur_ls,omitzero,omitempty"`
}
func (*NotificationsConfig) AfterQuery ΒΆ
func (a *NotificationsConfig) AfterQuery(tx *gorm.DB) error
func (*NotificationsConfig) BeforeCreate ΒΆ
func (a *NotificationsConfig) BeforeCreate(tx *gorm.DB) error
func (*NotificationsConfig) Indexes ΒΆ
func (a *NotificationsConfig) Indexes(db *gorm.DB) []migrations.Index
type OCIArtifact ΒΆ
type OCIArtifact struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
OwnerID string `` /* 148-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;uniqueIndex:idx_owner" temporaljson:"owner_type,omitzero,omitempty"`
Tag string `json:"tag,omitzero" temporaljson:"tag,omitzero,omitempty"`
Repository string `json:"repository,omitzero" temporaljson:"repository,omitzero,omitempty"`
MediaType string `json:"media_type,omitzero" temporaljson:"media_type,omitzero,omitempty"`
Digest string `json:"digest,omitzero" temporaljson:"digest,omitzero,omitempty"`
Size int64 `json:"size,omitzero" gorm:"type:bigint" temporaljson:"size,omitzero,omitempty"`
URLs pq.StringArray `gorm:"type:text[]" json:"urls,omitzero" swaggertype:"array,string" temporaljson:"urls,omitzero,omitempty"`
Annotations pgtype.Hstore `json:"annotations,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"metadata,omitzero,omitempty"`
ArtifactType string `json:"artifact_type,omitzero" gorm:"type:text" temporaljson:"artifact_type,omitzero,omitempty"`
// Platform fields
OS string `json:"os,omitzero" gorm:"type:text" temporaljson:"os,omitzero,omitempty"`
Architecture string `json:"architecture,omitzero" gorm:"type:text" temporaljson:"architecture,omitzero,omitempty"`
Variant string `json:"variant,omitzero" gorm:"type:text" temporaljson:"variant,omitzero,omitempty"`
OSVersion string `json:"os_version,omitzero" gorm:"type:text" temporaljson:"os_version,omitzero,omitempty"`
OSFeatures pq.StringArray `gorm:"type:text[]" json:"os_features,omitzero" swaggertype:"array,string" temporaljson:"os_features,omitzero,omitempty"`
}
func (*OCIArtifact) BeforeCreate ΒΆ
func (r *OCIArtifact) BeforeCreate(tx *gorm.DB) (err error)
func (*OCIArtifact) Indexes ΒΆ
func (r *OCIArtifact) Indexes(db *gorm.DB) []migrations.Index
type OperationStatus ΒΆ
type OperationStatus string
const ( OperationStatusStarted OperationStatus = "started" OperationStatusFinished OperationStatus = "finished" OperationStatusNoop OperationStatus = "noop" OperationStatusFailed OperationStatus = "failed" )
type Org ΒΆ
type Org struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index:idx_org_name,unique" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
Name string `gorm:"index:idx_org_name,unique;notnull" json:"name,omitzero" temporaljson:"name,omitzero,omitempty"`
Status OrgStatus `json:"status,omitzero" gorm:"notnull" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"notnull" temporaljson:"status_description,omitzero,omitempty"`
SandboxMode bool `json:"sandbox_mode,omitzero" gorm:"notnull" temporaljson:"sandbox_mode,omitzero,omitempty"`
OrgType OrgType `json:"-" temporaljson:"org_type,omitzero,omitempty"`
DebugMode bool `json:"-" temporaljson:"debug_mode,omitzero,omitempty"`
NotificationsConfig NotificationsConfig `` /* 155-byte string literal not displayed */
NotificationsConfigID string `json:"-" temporaljson:"notifications_config_id,omitzero,omitempty"`
RunnerGroup RunnerGroup `` /* 129-byte string literal not displayed */
LogoURL string `json:"logo_url,omitzero" temporaljson:"logo_url,omitzero,omitempty"`
Priority int `json:"-" temporaljson:"priority,omitzero,omitempty"`
Apps []App `` /* 136-byte string literal not displayed */
VCSConnections []VCSConnection `` /* 127-byte string literal not displayed */
Invites []OrgInvite `faker:"-" swaggerignore:"true" json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"invites,omitzero,omitempty"`
Features types.StringBoolMap `json:"features,omitzero" gorm:"type:jsonb;default null" temporaljson:"features,omitzero,omitempty"`
Tags pq.StringArray `json:"tags,omitzero" gorm:"type:text[];default '{}'" swaggertype:"array,string" temporaljson:"tags,omitzero,omitempty"`
Runners []Runner `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"runners,omitzero,omitempty"`
PublicGitVCSConfigs []PublicGitVCSConfig `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"public_git_vcs_configs,omitzero,omitempty"`
ConnectedGithubVCSConfigs []ConnectedGithubVCSConfig `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"connected_github_vcs_configs,omitzero,omitempty"`
VCSConnectionCommits []VCSConnectionCommit `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"vcs_connection_commits,omitzero,omitempty"`
AWSECRImageConfigs []AWSECRImageConfig `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"awsecr_image_configs,omitzero,omitempty"`
Installs []Install `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"installs,omitzero,omitempty"`
Components []Component `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"components,omitzero,omitempty"`
Installers []Installer `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"installers,omitzero,omitempty"`
InstallerMetadata []InstallerMetadata `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"installer_metadata,omitzero,omitempty"`
Roles []Role `` /* 138-byte string literal not displayed */
Policies []Policy `` /* 144-byte string literal not displayed */
AccountRoles []AccountRole `` /* 154-byte string literal not displayed */
Links map[string]any `json:"links,omitempty" temporaljson:"-" gorm:"-"`
}
func (*Org) EventLoops ΒΆ
type OrgFeature ΒΆ
type OrgFeature string
org feature flags
const ( OrgFeatureAPIPagination OrgFeature = "api-pagination" OrgFeatureOrgDashboard OrgFeature = "org-dashboard" OrgFeatureOrgRunner OrgFeature = "org-runner" OrgFeatureOrgSettings OrgFeature = "org-settings" OrgFeatureOrgSupport OrgFeature = "org-support" OrgFeatureInstallBreakGlass OrgFeature = "install-break-glass" OrgFeatureInstallDeleteComponents OrgFeature = "install-delete-components" OrgFeatureInstallDelete OrgFeature = "install-delete" OrgFeatureTerraformWorkspace OrgFeature = "terraform-workspace" OrgFeatureDevCommand OrgFeature = "dev-command" OrgFeatureAppBranches OrgFeature = "app-branches" OrgFeatureStratusLayout OrgFeature = "stratus-layout" OrgFeatureStratusWorkflow OrgFeature = "stratus-workflow" OrgFeatureTerraformInstaller OrgFeature = "terraform-installer" OrgFeatureDashboardSSE OrgFeature = "dashboard-sse" OrgFeatureUserManagedFeatures OrgFeature = "user-managed-features" )
func GetUserManageableFeatures ΒΆ
func GetUserManageableFeatures() []OrgFeature
GetUserManageableFeatures returns features that users are allowed to toggle (excludes the user-managed-features flag itself, which is admin-only)
type OrgFeatureInfo ΒΆ
OrgFeatureInfo contains metadata about a feature flag
func GetFeaturesWithDescriptions ΒΆ
func GetFeaturesWithDescriptions() []OrgFeatureInfo
GetFeaturesWithDescriptions returns all features with their descriptions
type OrgInvite ΒΆ
type OrgInvite struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_invite_org_email,unique" temporaljson:"deleted_at,omitzero,omitempty"`
// parent relationship
OrgID string `json:"org_id,omitzero" gorm:"notnull;index:idx_invite_org_email,unique" temporaljson:"org_id,omitzero,omitempty"`
Org Org `gorm:"constraint:OnDelete:CASCADE;" json:"-" temporaljson:"org,omitzero,omitempty"`
Email string `gorm:"notnull;default null;index:idx_invite_org_email,unique" json:"email,omitzero" temporaljson:"email,omitzero,omitempty"`
Status OrgInviteStatus `json:"status,omitzero" gorm:"notnull;default null" temporaljson:"status,omitzero,omitempty"`
RoleType RoleType `json:"role_type,omitzero" temporaljson:"role_type,omitzero,omitempty"`
}
type OrgInviteStatus ΒΆ
type OrgInviteStatus string
const ( OrgInviteStatusPending OrgInviteStatus = "pending" OrgInviteStatusAccepted OrgInviteStatus = "accepted" )
type OtelLogRecord ΒΆ
type OtelLogRecord struct {
ID string `json:"id,omitzero" gorm:"primary_key" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
LogStreamID string `json:"log_stream_id,omitzero" temporaljson:"log_stream_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id,omitzero" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id,omitzero" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step,omitzero" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log message attributes
Timestamp time.Time `json:"timestamp,omitzero" gorm:"type:DateTime64(9);codec:Delta(8),ZSTD(1)" temporaljson:"timestamp,omitzero,omitempty"`
TimestampDate time.Time `json:"timestamp_date,omitzero" gorm:"type:Date;default:toDate(timestamp)" temporaljson:"timestamp_date,omitzero,omitempty"`
TimestampTime time.Time `` /* 130-byte string literal not displayed */
TraceID string `` /* 147-byte string literal not displayed */
SpanID string `json:"span_id,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"span_id,omitzero,omitempty"`
TraceFlags int `json:"trace_flags,omitzero" gorm:"type:UInt8" temporaljson:"trace_flags,omitzero,omitempty"`
SeverityText string `` /* 126-byte string literal not displayed */
SeverityNumber int `json:"severity_number,omitzero" gorm:"type:UInt8" temporaljson:"severity_number,omitzero,omitempty"`
ServiceName string `json:"service_name,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
Body string `` /* 140-byte string literal not displayed */
ResourceSchemaURL string `` /* 138-byte string literal not displayed */
ResourceAttributes map[string]string `` /* 354-byte string literal not displayed */
ScopeSchemaURL string `` /* 132-byte string literal not displayed */
ScopeName string `json:"scope_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `` /* 126-byte string literal not displayed */
ScopeAttributes map[string]string `` /* 352-byte string literal not displayed */
LogAttributes map[string]string `` /* 345-byte string literal not displayed */
}
Logs are designed to be written via an OTLP exporter.
https://opentelemetry.io/docs/specs/otel/logs/bridge-api/
The clickhouse exporter, is a good reference point for this https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/clickhouseexporter/exporter_logs.go
func (*OtelLogRecord) BeforeCreate ΒΆ
func (r *OtelLogRecord) BeforeCreate(tx *gorm.DB) error
func (OtelLogRecord) GetTableClusterOptions ΒΆ
func (r OtelLogRecord) GetTableClusterOptions() string
func (OtelLogRecord) GetTableOptions ΒΆ
func (r OtelLogRecord) GetTableOptions() string
type OtelMetricExponentialHistogram ΒΆ
type OtelMetricExponentialHistogram struct {
ID string `gorm:"primary_key" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id,omitzero" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id,omitzero" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step,omitzero" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log message attributes
ResourceAttributes map[string]string `` /* 354-byte string literal not displayed */
ResourceSchemaURL string `` /* 138-byte string literal not displayed */
ScopeName string `json:"scope_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `` /* 126-byte string literal not displayed */
ScopeAttributes map[string]string `` /* 352-byte string literal not displayed */
ScopeDroppedAttrCount uint32 `` /* 132-byte string literal not displayed */
ScopeSchemaURL string `` /* 132-byte string literal not displayed */
ServiceName string `json:"service_name,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 328-byte string literal not displayed */
StartTimeUnix time.Time `` /* 129-byte string literal not displayed */
TimeUnix time.Time `json:"time_unix,omitzero" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Count uint64 `json:"count,omitzero" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"count,omitzero,omitempty"`
Sum float64 `json:"sum,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"sum,omitzero,omitempty"`
Scale float64 `json:"scale,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"scale,omitzero,omitempty"`
ZeroCount uint64 `json:"zero_count,omitzero" gorm:"type:UInt64;codec:ZSTD(1)" temporaljson:"zero_count,omitzero,omitempty"`
PositiveOffset int32 `json:"positive_offset,omitzero" gorm:"type:Int32; codec:ZSTD(1)" temporaljson:"positive_offset,omitzero,omitempty"`
PositiveBucketCounts []uint64 `` /* 136-byte string literal not displayed */
NegativeOffset int32 `json:"negative_offset,omitzero" gorm:"type:Int32; codec:ZSTD(1)" temporaljson:"negative_offset,omitzero,omitempty"`
NegativeBucketCounts []uint64 `` /* 136-byte string literal not displayed */
Flags uint32 `json:"flags,omitzero" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
Min float64 `json:"min,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"min,omitzero,omitempty"`
Max float64 `json:"max,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"max,omitzero,omitempty"`
AggregationTemporality int32 `` /* 130-byte string literal not displayed */
Exemplars []OtelMetricExponentialHistogramExemplar `` /* 217-byte string literal not displayed */
}
func (*OtelMetricExponentialHistogram) BeforeCreate ΒΆ
func (m *OtelMetricExponentialHistogram) BeforeCreate(tx *gorm.DB) error
func (OtelMetricExponentialHistogram) GetTableOptions ΒΆ
func (m OtelMetricExponentialHistogram) GetTableOptions() (string, bool)
func (OtelMetricExponentialHistogram) TableName ΒΆ
func (m OtelMetricExponentialHistogram) TableName() string
type OtelMetricExponentialHistogramExemplar ΒΆ
type OtelMetricExponentialHistogramExemplar struct {
FilteredAttributes map[string]string `json:"filtered_attributes,omitzero" temporaljson:"filtered_attributes,omitzero,omitempty"`
TimesUnix string `json:"times_unix,omitzero" temporaljson:"times_unix,omitzero,omitempty"`
Value string `json:"value,omitzero" temporaljson:"value,omitzero,omitempty"`
SpanID string `json:"span_id,omitzero" temporaljson:"span_id,omitzero,omitempty"`
TraceID string `json:"trace_id,omitzero" temporaljson:"trace_id,omitzero,omitempty"`
}
type OtelMetricExponentialHistogramIngestion ΒΆ
type OtelMetricExponentialHistogramIngestion struct {
ID string `gorm:"primary_key" json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log message attributes
ResourceAttributes map[string]string `` /* 345-byte string literal not displayed */
ResourceSchemaURL string `` /* 129-byte string literal not displayed */
ScopeName string `json:"scope_name" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `json:"scope_version" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_version,omitzero,omitempty"`
ScopeAttributes map[string]string `` /* 343-byte string literal not displayed */
ScopeDroppedAttrCount uint32 `json:"scope_dropped_attr_count" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"scope_dropped_attr_count,omitzero,omitempty"`
ScopeSchemaURL string `json:"scope_schema_url" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_schema_url,omitzero,omitempty"`
ServiceName string `json:"service_name" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 319-byte string literal not displayed */
StartTimeUnix time.Time `json:"start_time_unix" gorm:"type:DateTime64(9); codec:Delta, ZSTD(1)" temporaljson:"start_time_unix,omitzero,omitempty"`
TimeUnix time.Time `json:"time_unix" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Count uint64 `json:"count" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"count,omitzero,omitempty"`
Sum float64 `json:"sum" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"sum,omitzero,omitempty"`
Scale int32 `json:"scale" gorm:"type:Int32;codec:ZSTD(1)" temporaljson:"scale,omitzero,omitempty"`
ZeroCount uint64 `json:"zero_count" gorm:"type:UInt64;codec:ZSTD(1)" temporaljson:"zero_count,omitzero,omitempty"`
PositiveOffset int32 `json:"positive_offset" gorm:"type:Int32; codec:ZSTD(1)" temporaljson:"positive_offset,omitzero,omitempty"`
PositiveBucketCounts clickhouse.ArraySet `` /* 127-byte string literal not displayed */
NegativeOffset int32 `json:"negative_offset" gorm:"type:Int32; codec:ZSTD(1)" temporaljson:"negative_offset,omitzero,omitempty"`
NegativeBucketCounts clickhouse.ArraySet `` /* 127-byte string literal not displayed */
Flags uint32 `json:"flags" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
Min float64 `json:"min" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"min,omitzero,omitempty"`
Max float64 `json:"maxx" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"max,omitzero,omitempty"`
AggregationTemporality int32 `json:"aggregation_temporality" gorm:"type:Int32; codec:ZSTD(1)" temporaljson:"aggregation_temporality,omitzero,omitempty"`
ExemplarsFilteredAttributes clickhouse.ArraySet `` /* 164-byte string literal not displayed */
ExemplarsTimeUnix clickhouse.ArraySet `json:"-" gorm:"type:Array(DateTime64(9));column:exemplars.time_unix" temporaljson:"exemplars_time_unix,omitzero,omitempty"`
ExemplarsValue clickhouse.ArraySet `json:"-" gorm:"type:Array(Float64);column:exemplars.value" temporaljson:"exemplars_value,omitzero,omitempty"`
ExemplarsSpanID clickhouse.ArraySet `json:"-" gorm:"type:Array(String);column:exemplars.span_id" temporaljson:"exemplars_span_id,omitzero,omitempty"`
ExemplarsTraceID clickhouse.ArraySet `json:"-" gorm:"type:Array(String);column:exemplars.trace_id" temporaljson:"exemplars_trace_id,omitzero,omitempty"`
}
DO NOT MIGRATE
func (*OtelMetricExponentialHistogramIngestion) BeforeCreate ΒΆ
func (m *OtelMetricExponentialHistogramIngestion) BeforeCreate(tx *gorm.DB) error
func (OtelMetricExponentialHistogramIngestion) TableName ΒΆ
func (m OtelMetricExponentialHistogramIngestion) TableName() string
type OtelMetricGauge ΒΆ
type OtelMetricGauge struct {
ID string `gorm:"primary_key" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id,omitzero" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id,omitzero" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step,omitzero" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL attributes
ResourceAttributes map[string]string `` /* 354-byte string literal not displayed */
ResourceSchemaURL string `` /* 138-byte string literal not displayed */
ScopeName string `json:"scope_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `` /* 126-byte string literal not displayed */
ScopeAttributes map[string]string `` /* 352-byte string literal not displayed */
ScopeDroppedAttrCount int `` /* 132-byte string literal not displayed */
ScopeSchemaURL string `` /* 132-byte string literal not displayed */
ServiceName string `json:"service_name,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 328-byte string literal not displayed */
StartTimeUnix time.Time `` /* 129-byte string literal not displayed */
TimeUnix time.Time `json:"time_unix,omitzero" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Value float64 `json:"value,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"value,omitzero,omitempty"`
Flags uint32 `json:"flags,omitzero" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
Exemplars []OtelMetricGaugeExemplar `` /* 217-byte string literal not displayed */
}
func (*OtelMetricGauge) BeforeCreate ΒΆ
func (m *OtelMetricGauge) BeforeCreate(tx *gorm.DB) error
func (OtelMetricGauge) GetTableClusterOptions ΒΆ
func (r OtelMetricGauge) GetTableClusterOptions() string
func (OtelMetricGauge) GetTableOptions ΒΆ
func (m OtelMetricGauge) GetTableOptions() string
func (OtelMetricGauge) TableName ΒΆ
func (m OtelMetricGauge) TableName() string
type OtelMetricGaugeExemplar ΒΆ
type OtelMetricGaugeExemplar struct {
FilteredAttributes map[string]string `json:"filtered_attributes,omitzero" temporaljson:"filtered_attributes,omitzero,omitempty"`
TimesUnix string `json:"times_unix,omitzero" temporaljson:"times_unix,omitzero,omitempty"`
Value string `json:"value,omitzero" temporaljson:"value,omitzero,omitempty"`
SpanID string `json:"span_id,omitzero" temporaljson:"span_id,omitzero,omitempty"`
TraceID string `json:"trace_id,omitzero" temporaljson:"trace_id,omitzero,omitempty"`
}
type OtelMetricGaugeIngestion ΒΆ
type OtelMetricGaugeIngestion struct {
ID string `gorm:"primary_key" json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log message attributes
ResourceSchemaURL string `` /* 129-byte string literal not displayed */
ResourceAttributes map[string]string `` /* 345-byte string literal not displayed */
ScopeName string `json:"scope_name" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `json:"scope_version" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_version,omitzero,omitempty"`
ScopeAttributes map[string]string `` /* 343-byte string literal not displayed */
ScopeDroppedAttrCount int `json:"scope_dropped_attr_count" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"scope_dropped_attr_count,omitzero,omitempty"`
ScopeSchemaURL string `json:"scope_schema_url" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_schema_url,omitzero,omitempty"`
ServiceName string `json:"service_name" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 319-byte string literal not displayed */
StartTimeUnix time.Time `json:"start_time_unix" gorm:"type:DateTime64(9); codec:Delta, ZSTD(1)" temporaljson:"start_time_unix,omitzero,omitempty"`
TimeUnix time.Time `json:"time_unix" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Value float64 `json:"value" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"value,omitzero,omitempty"`
Flags uint32 `json:"flags" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
// Exemplars []OtelMetricGaugeExemplar `json:"-" temporaljson:"-" gorm:"type:Nested(filtered_attributes Map(LowCardinality(String), String), time_unix DateTime64(9), value Float64, span_id String, trace_id String); codec:ZSTD(1);"`
ExemplarsFilteredAttributes clickhouse.ArraySet `` /* 164-byte string literal not displayed */
ExemplarsTimeUnix clickhouse.ArraySet `json:"-" gorm:"type:Array(DateTime64(9));column:exemplars.time_unix" temporaljson:"exemplars_time_unix,omitzero,omitempty"`
ExemplarsValue clickhouse.ArraySet `json:"-" gorm:"type:Array(Float64);column:exemplars.value" temporaljson:"exemplars_value,omitzero,omitempty"`
ExemplarsSpanID clickhouse.ArraySet `json:"-" gorm:"type:Array(String);column:exemplars.span_id" temporaljson:"exemplars_span_id,omitzero,omitempty"`
ExemplarsTraceID clickhouse.ArraySet `json:"-" gorm:"type:Array(String);column:exemplars.trace_id" temporaljson:"exemplars_trace_id,omitzero,omitempty"`
}
DO NOT MIGRATE
func (*OtelMetricGaugeIngestion) BeforeCreate ΒΆ
func (m *OtelMetricGaugeIngestion) BeforeCreate(tx *gorm.DB) error
func (OtelMetricGaugeIngestion) TableName ΒΆ
func (m OtelMetricGaugeIngestion) TableName() string
type OtelMetricHistogram ΒΆ
type OtelMetricHistogram struct {
ID string `gorm:"primary_key" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id,omitzero" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id,omitzero" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step,omitzero" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log message attributes
ResourceAttributes map[string]string `` /* 354-byte string literal not displayed */
ResourceSchemaURL string `` /* 138-byte string literal not displayed */
ScopeName string `json:"scope_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `` /* 126-byte string literal not displayed */
ScopeAttributes map[string]string `` /* 352-byte string literal not displayed */
ScopeDroppedAttrCount uint32 `` /* 132-byte string literal not displayed */
ScopeSchemaURL string `` /* 132-byte string literal not displayed */
ServiceName string `json:"service_name,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 328-byte string literal not displayed */
StartTimeUnix time.Time `` /* 129-byte string literal not displayed */
TimeUnix time.Time `json:"time_unix,omitzero" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Count uint64 `json:"count,omitzero" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"count,omitzero,omitempty"`
Sum float64 `json:"sum,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"sum,omitzero,omitempty"`
BucketsCount []uint64 `json:"buckets_count,omitzero" gorm:"type:Array(UInt64);codec:ZSTD(1)" temporaljson:"buckets_count,omitzero,omitempty"`
ExplicitBounds []float64 `json:"explicit_bounds,omitzero" gorm:"type:Array(Float64);codec:ZSTD(1)" temporaljson:"explicit_bounds,omitzero,omitempty"`
Flags uint32 `json:"flags,omitzero" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
Min float64 `json:"min,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"min,omitzero,omitempty"`
Max float64 `json:"max,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"max,omitzero,omitempty"`
AggregationTemporality int32 `` /* 130-byte string literal not displayed */
Exemplars []OtelMetricHistogramExemplar `` /* 217-byte string literal not displayed */
}
func (*OtelMetricHistogram) BeforeCreate ΒΆ
func (m *OtelMetricHistogram) BeforeCreate(tx *gorm.DB) error
func (OtelMetricHistogram) GetTableClusterOptions ΒΆ
func (OtelMetricHistogram) GetTableClusterOptions() string
func (OtelMetricHistogram) GetTableOptions ΒΆ
func (OtelMetricHistogram) GetTableOptions() string
func (OtelMetricHistogram) TableName ΒΆ
func (m OtelMetricHistogram) TableName() string
type OtelMetricHistogramExemplar ΒΆ
type OtelMetricHistogramExemplar struct {
FilteredAttributes map[string]string `json:"filtered_attributes,omitzero" temporaljson:"filtered_attributes,omitzero,omitempty"`
TimesUnix string `json:"times_unix,omitzero" temporaljson:"times_unix,omitzero,omitempty"`
Value string `json:"value,omitzero" temporaljson:"value,omitzero,omitempty"`
SpanID string `json:"span_id,omitzero" temporaljson:"span_id,omitzero,omitempty"`
TraceID string `json:"trace_id,omitzero" temporaljson:"trace_id,omitzero,omitempty"`
}
type OtelMetricHistogramIngestion ΒΆ
type OtelMetricHistogramIngestion struct {
ID string `gorm:"primary_key" json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log message attributes
ResourceAttributes map[string]string `` /* 345-byte string literal not displayed */
ResourceSchemaURL string `` /* 129-byte string literal not displayed */
ScopeName string `json:"scope_name" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `json:"scope_version" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_version,omitzero,omitempty"`
ScopeAttributes map[string]string `` /* 343-byte string literal not displayed */
ScopeDroppedAttrCount uint32 `json:"scope_dropped_attr_count" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"scope_dropped_attr_count,omitzero,omitempty"`
ScopeSchemaURL string `json:"scope_schema_url" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_schema_url,omitzero,omitempty"`
ServiceName string `json:"service_name" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 319-byte string literal not displayed */
StartTimeUnix time.Time `json:"start_time_unix" gorm:"type:DateTime64(9); codec:Delta, ZSTD(1)" temporaljson:"start_time_unix,omitzero,omitempty"`
TimeUnix time.Time `json:"time_unix" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Count uint64 `json:"count" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"count,omitzero,omitempty"`
Sum float64 `json:"sum" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"sum,omitzero,omitempty"`
BucketsCount clickhouse.ArraySet `json:"buckets_count" gorm:"type:Array(UInt64);codec:ZSTD(1)" temporaljson:"buckets_count,omitzero,omitempty"`
ExplicitBounds clickhouse.ArraySet `json:"explicit_bounds" gorm:"type:Array(Float64);codec:ZSTD(1)" temporaljson:"explicit_bounds,omitzero,omitempty"`
Flags uint32 `json:"flags" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
Min float64 `json:"min" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"min,omitzero,omitempty"`
Max float64 `json:"maxx" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"max,omitzero,omitempty"`
AggregationTemporality int32 `json:"aggregation_temporality" gorm:"type:Int32; codec:ZSTD(1)" temporaljson:"aggregation_temporality,omitzero,omitempty"`
ExemplarsFilteredAttributes clickhouse.ArraySet `` /* 164-byte string literal not displayed */
ExemplarsTimeUnix clickhouse.ArraySet `json:"-" gorm:"type:Array(DateTime64(9));column:exemplars.time_unix" temporaljson:"exemplars_time_unix,omitzero,omitempty"`
ExemplarsValue clickhouse.ArraySet `json:"-" gorm:"type:Array(Float64);column:exemplars.value" temporaljson:"exemplars_value,omitzero,omitempty"`
ExemplarsSpanID clickhouse.ArraySet `json:"-" gorm:"type:Array(String);column:exemplars.span_id" temporaljson:"exemplars_span_id,omitzero,omitempty"`
ExemplarsTraceID clickhouse.ArraySet `json:"-" gorm:"type:Array(String);column:exemplars.trace_id" temporaljson:"exemplars_trace_id,omitzero,omitempty"`
}
DO NOT MIGRATE
func (*OtelMetricHistogramIngestion) BeforeCreate ΒΆ
func (m *OtelMetricHistogramIngestion) BeforeCreate(tx *gorm.DB) error
func (OtelMetricHistogramIngestion) TableName ΒΆ
func (m OtelMetricHistogramIngestion) TableName() string
type OtelMetricSum ΒΆ
type OtelMetricSum struct {
ID string `gorm:"primary_key" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id,omitzero" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id,omitzero" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step,omitzero" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log message attributes
ResourceSchemaURL string `` /* 138-byte string literal not displayed */
ResourceAttributes map[string]string `` /* 354-byte string literal not displayed */
ScopeName string `json:"scope_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `` /* 126-byte string literal not displayed */
ScopeAttributes map[string]string `` /* 352-byte string literal not displayed */
ScopeDroppedAttrCount uint32 `` /* 132-byte string literal not displayed */
ScopeSchemaURL string `` /* 132-byte string literal not displayed */
ServiceName string `json:"service_name,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 328-byte string literal not displayed */
StartTimeUnix time.Time `` /* 129-byte string literal not displayed */
TimeUnix time.Time `json:"time_unix,omitzero" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Value float64 `json:"value,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"value,omitzero,omitempty"`
Flags uint32 `json:"flags,omitzero" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
IsMonotonic bool `json:"is_monotonic,omitzero" gorm:"codec:Delta, ZSTD(1)" temporaljson:"is_monotonic,omitzero,omitempty"`
AggregationTemporality int32 `` /* 130-byte string literal not displayed */
Exemplars []OtelMetricSumExemplar `` /* 217-byte string literal not displayed */
}
func (*OtelMetricSum) BeforeCreate ΒΆ
func (m *OtelMetricSum) BeforeCreate(tx *gorm.DB) error
func (OtelMetricSum) GetTableClusterOptions ΒΆ
func (r OtelMetricSum) GetTableClusterOptions() string
func (OtelMetricSum) GetTableOptions ΒΆ
func (m OtelMetricSum) GetTableOptions() string
func (OtelMetricSum) TableName ΒΆ
func (m OtelMetricSum) TableName() string
type OtelMetricSumExemplar ΒΆ
type OtelMetricSumExemplar struct {
FilteredAttributes map[string]string `json:"filtered_attributes,omitzero" temporaljson:"filtered_attributes,omitzero,omitempty"`
TimesUnix string `json:"times_unix,omitzero" temporaljson:"times_unix,omitzero,omitempty"`
Value string `json:"value,omitzero" temporaljson:"value,omitzero,omitempty"`
SpanID string `json:"span_id,omitzero" temporaljson:"span_id,omitzero,omitempty"`
TraceID string `json:"trace_id,omitzero" temporaljson:"trace_id,omitzero,omitempty"`
}
type OtelMetricSumIngestion ΒΆ
type OtelMetricSumIngestion struct {
ID string `gorm:"primary_key" json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL attributes
ResourceAttributes map[string]string `` /* 345-byte string literal not displayed */
ResourceSchemaURL string `` /* 129-byte string literal not displayed */
ScopeName string `json:"scope_name" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `json:"scope_version" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_version,omitzero,omitempty"`
ScopeAttributes map[string]string `` /* 343-byte string literal not displayed */
ScopeDroppedAttrCount int `json:"scope_dropped_attr_count" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"scope_dropped_attr_count,omitzero,omitempty"`
ScopeSchemaURL string `json:"scope_schema_url" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_schema_url,omitzero,omitempty"`
ServiceName string `json:"service_name" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 319-byte string literal not displayed */
StartTimeUnix time.Time `json:"start_time_unix" gorm:"type:DateTime64(9); codec:Delta, ZSTD(1)" temporaljson:"start_time_unix,omitzero,omitempty"`
TimeUnix time.Time `json:"time_unix" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Value float64 `json:"value" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"value,omitzero,omitempty"`
Flags uint32 `json:"flags" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
IsMonotonic bool `json:"is_monotonic" gorm:"codec:Delta, ZSTD(1)" temporaljson:"is_monotonic,omitzero,omitempty"`
AggregationTemporality int32 `json:"aggregation_temporality" gorm:"type:Int32; codec:ZSTD(1)" temporaljson:"aggregation_temporality,omitzero,omitempty"`
// Exemplars []OtelMetricSumExemplar `json:"-" temporaljson:"-" gorm:"type:Nested(filtered_attributes Map(LowCardinality(String), String), time_unix DateTime64(9), value Float64, span_id String, trace_id String); codec:ZSTD(1);"`
ExemplarsFilteredAttributes clickhouse.ArraySet `` /* 164-byte string literal not displayed */
ExemplarsTimeUnix clickhouse.ArraySet `json:"-" gorm:"type:Array(DateTime64(9));column:exemplars.time_unix" temporaljson:"exemplars_time_unix,omitzero,omitempty"`
ExemplarsValue clickhouse.ArraySet `json:"-" gorm:"type:Array(Float64);column:exemplars.value" temporaljson:"exemplars_value,omitzero,omitempty"`
ExemplarsSpanID clickhouse.ArraySet `json:"-" gorm:"type:Array(String);column:exemplars.span_id" temporaljson:"exemplars_span_id,omitzero,omitempty"`
ExemplarsTraceID clickhouse.ArraySet `json:"-" gorm:"type:Array(String);column:exemplars.trace_id" temporaljson:"exemplars_trace_id,omitzero,omitempty"`
}
DO NOT MIGRATE: this is for ingestion only
func (*OtelMetricSumIngestion) BeforeCreate ΒΆ
func (m *OtelMetricSumIngestion) BeforeCreate(tx *gorm.DB) error
func (OtelMetricSumIngestion) TableName ΒΆ
func (m OtelMetricSumIngestion) TableName() string
type OtelMetricSummary ΒΆ
type OtelMetricSummary struct {
ID string `gorm:"primary_key" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id,omitzero" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id,omitzero" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step,omitzero" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log message attributes
ResourceSchemaURL string `` /* 138-byte string literal not displayed */
ResourceAttributes map[string]string `` /* 354-byte string literal not displayed */
ScopeName string `json:"scope_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `` /* 126-byte string literal not displayed */
ScopeAttributes map[string]string `` /* 352-byte string literal not displayed */
ScopeDroppedAttrCount uint32 `` /* 132-byte string literal not displayed */
ScopeSchemaURL string `` /* 132-byte string literal not displayed */
ServiceName string `json:"service_name,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 328-byte string literal not displayed */
StartTimeUnix time.Time `` /* 129-byte string literal not displayed */
TimeUnix time.Time `json:"time_unix,omitzero" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Count uint64 `json:"count,omitzero" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"count,omitzero,omitempty"`
Sum float64 `json:"sum,omitzero" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"sum,omitzero,omitempty"`
Flags uint32 `json:"flags,omitzero" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
ValueAtQuantiles map[float64]float64 `` /* 152-byte string literal not displayed */
}
func (*OtelMetricSummary) BeforeCreate ΒΆ
func (m *OtelMetricSummary) BeforeCreate(tx *gorm.DB) error
func (OtelMetricSummary) GetTableOptions ΒΆ
func (m OtelMetricSummary) GetTableOptions() (string, bool)
func (OtelMetricSummary) TableName ΒΆ
func (m OtelMetricSummary) TableName() string
type OtelMetricSummaryExemplar ΒΆ
type OtelMetricSummaryExemplar struct {
FilteredAttributes map[string]string `json:"filtered_attributes,omitzero" temporaljson:"filtered_attributes,omitzero,omitempty"`
TimesUnix string `json:"times_unix,omitzero" temporaljson:"times_unix,omitzero,omitempty"`
Value string `json:"value,omitzero" temporaljson:"value,omitzero,omitempty"`
SpanID string `json:"span_id,omitzero" temporaljson:"span_id,omitzero,omitempty"`
TraceID string `json:"trace_id,omitzero" temporaljson:"trace_id,omitzero,omitempty"`
}
type OtelMetricSummaryIngestion ΒΆ
type OtelMetricSummaryIngestion struct {
ID string `gorm:"primary_key" json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
OrgID string `json:"org_id" temporaljson:"org_id,omitzero,omitempty"`
RunnerID string `json:"runner_id" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL attributes
ResourceAttributes map[string]string `` /* 345-byte string literal not displayed */
ResourceSchemaURL string `` /* 129-byte string literal not displayed */
ScopeName string `json:"scope_name" gorm:"codec:ZSTD(1)" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `json:"scope_version" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_version,omitzero,omitempty"`
ScopeAttributes map[string]string `` /* 343-byte string literal not displayed */
ScopeDroppedAttrCount int `json:"scope_dropped_attr_count" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"scope_dropped_attr_count,omitzero,omitempty"`
ScopeSchemaURL string `json:"scope_schema_url" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"scope_schema_url,omitzero,omitempty"`
ServiceName string `json:"service_name" gorm:"type:LowCardinality(String);codec:ZSTD(1)" temporaljson:"service_name,omitzero,omitempty"`
MetricName string `json:"metric_name" gorm:"codec:ZSTD(1)" temporaljson:"metric_name,omitzero,omitempty"`
MetricDescription string `json:"metric_description" gorm:"codec:ZSTD(1)" temporaljson:"metric_description,omitzero,omitempty"`
MetricUnit string `json:"metric_unit" gorm:"codec:ZSTD(1)" temporaljson:"metric_unit,omitzero,omitempty"`
Attributes map[string]string `` /* 319-byte string literal not displayed */
StartTimeUnix time.Time `json:"start_time_unix" gorm:"type:DateTime64(9); codec:Delta, ZSTD(1)" temporaljson:"start_time_unix,omitzero,omitempty"`
TimeUnix time.Time `json:"time_unix" gorm:"type:DateTime64(9);codec:ZSTD(1)" temporaljson:"time_unix,omitzero,omitempty"`
Count uint64 `json:"count" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"count,omitzero,omitempty"`
Sum float64 `json:"sum" gorm:"type:Float64;codec:ZSTD(1)" temporaljson:"sum,omitzero,omitempty"`
Flags uint32 `json:"flags" gorm:"type:UInt32;codec:ZSTD(1)" temporaljson:"flags,omitzero,omitempty"`
ValueAtQuantilesQuantile clickhouse.ArraySet `` /* 141-byte string literal not displayed */
ValueAtQuantilesValue clickhouse.ArraySet `` /* 132-byte string literal not displayed */
}
DO NOT MIGRATE: this is for ingestion only
func (*OtelMetricSummaryIngestion) BeforeCreate ΒΆ
func (m *OtelMetricSummaryIngestion) BeforeCreate(tx *gorm.DB) error
func (OtelMetricSummaryIngestion) TableName ΒΆ
func (m OtelMetricSummaryIngestion) TableName() string
type OtelTrace ΒΆ
type OtelTrace struct {
ID string `gorm:"primary_key" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `gorm:"notnull;" json:"created_by_id,omitzero" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `gorm:"notnull" json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `gorm:"notnull" json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id,omitzero" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id,omitzero" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step,omitzero" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log trace attributes
Timestamp time.Time `json:"timestamp,omitzero" gorm:"type:DateTime64(9);codec:Delta(8),ZSTD(1);" temporaljson:"timestamp,omitzero,omitempty"`
TimestampDate time.Time `json:"timestamp_date,omitzero" gorm:"type:Date;default:toDate(timestamp);" temporaljson:"timestamp_date,omitzero,omitempty"`
TimestampTime time.Time `` /* 131-byte string literal not displayed */
ResourceAttributes map[string]string `` /* 354-byte string literal not displayed */
ResourceSchemaURL string `` /* 139-byte string literal not displayed */
ScopeName string `json:"scope_name,omitzero" gorm:"codec:ZSTD(1);" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `` /* 127-byte string literal not displayed */
ScopeAttributes map[string]string `` /* 352-byte string literal not displayed */
ScopeDroppedAttrCount int `json:"scope_dropped_attr_count,omitzero" temporaljson:"scope_dropped_attr_count,omitzero,omitempty"`
ScopeSchemaURL string `` /* 133-byte string literal not displayed */
TraceID string `` /* 147-byte string literal not displayed */
SpanID string `json:"span_id,omitzero" gorm:"codec:ZSTD(1);" temporaljson:"span_id,omitzero,omitempty"`
ParentSpanID string `json:"parent_span_id,omitzero" gorm:"codec:ZSTD(1);" temporaljson:"parent_span_id,omitzero,omitempty"`
TraceState string `json:"trace_state,omitzero" gorm:"codec:ZSTD(1);" temporaljson:"trace_state,omitzero,omitempty"`
SpanName string `json:"span_name,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"span_name,omitzero,omitempty"`
SpanKind string `json:"span_kind,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"span_kind,omitzero,omitempty"`
ServiceName string `json:"service_name,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"service_name,omitzero,omitempty"`
SpanAttributes map[string]string `` /* 348-byte string literal not displayed */
Duration int64 `json:"duration,omitzero" gorm:"codec:ZSTD(1);" temporaljson:"duration,omitzero,omitempty"`
StatusCode string `json:"status_code,omitzero" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"status_code,omitzero,omitempty"`
StatusMessage string `json:"status_message,omitzero" gorm:"codec:ZSTD(1);" temporaljson:"status_message,omitzero,omitempty"`
// Nested Fields
// NOTE(fd): these control the actual migration. careful when modifying. ALTER does not work the same way on nested clickhouse columns.
Events []OtelTraceEvent `` /* 162-byte string literal not displayed */
Links []OtelTraceLink `` /* 159-byte string literal not displayed */
}
func (OtelTrace) GetTableClusterOptions ΒΆ
func (OtelTrace) GetTableOptions ΒΆ
type OtelTraceEvent ΒΆ
type OtelTraceIngestion ΒΆ
type OtelTraceIngestion struct {
ID string `gorm:"primary_key" json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `gorm:"notnull;" json:"created_by_id" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `gorm:"notnull" json:"created_at" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `gorm:"notnull" json:"updated_at" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// internal attributes
RunnerID string `json:"runner_id" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJobID string `json:"runner_job_id" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerJobExecutionID string `json:"runner_job_execution_id" temporaljson:"runner_job_execution_id,omitzero,omitempty"`
RunnerJobExecutionStep string `json:"runner_job_execution_step" temporaljson:"runner_job_execution_step,omitzero,omitempty"`
// OTEL log trace attributes
Timestamp time.Time `json:"timestamp" gorm:"type:DateTime64(9);codec:Delta(8),ZSTD(1);" temporaljson:"timestamp,omitzero,omitempty"`
TimestampDate time.Time `json:"timestamp_date" gorm:"type:Date;default:toDate(timestamp);" temporaljson:"timestamp_date,omitzero,omitempty"`
TimestampTime time.Time `json:"timestamp_time" gorm:"type:DateTime;default:toDateTime(timestamp);" temporaljson:"timestamp_time,omitzero,omitempty"`
ResourceAttributes map[string]string `` /* 345-byte string literal not displayed */
ResourceSchemaURL string `` /* 130-byte string literal not displayed */
ScopeName string `json:"scope_name" gorm:"codec:ZSTD(1);" temporaljson:"scope_name,omitzero,omitempty"`
ScopeVersion string `json:"scope_version" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"scope_version,omitzero,omitempty"`
ScopeAttributes map[string]string `` /* 343-byte string literal not displayed */
ScopeDroppedAttrCount int `json:"scope_dropped_attr_count" temporaljson:"scope_dropped_attr_count,omitzero,omitempty"`
ScopeSchemaURL string `json:"scope_schema_url" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"scope_schema_url,omitzero,omitempty"`
TraceID string `` /* 138-byte string literal not displayed */
SpanID string `json:"span_id" gorm:"codec:ZSTD(1);" temporaljson:"span_id,omitzero,omitempty"`
ParentSpanID string `json:"parent_span_id" gorm:"codec:ZSTD(1);" temporaljson:"parent_span_id,omitzero,omitempty"`
TraceState string `json:"trace_state" gorm:"codec:ZSTD(1);" temporaljson:"trace_state,omitzero,omitempty"`
SpanName string `json:"span_name" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"span_name,omitzero,omitempty"`
SpanKind string `json:"span_kind" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"span_kind,omitzero,omitempty"`
ServiceName string `json:"service_name" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"service_name,omitzero,omitempty"`
SpanAttributes map[string]string `` /* 339-byte string literal not displayed */
Duration int64 `json:"duration" gorm:"codec:ZSTD(1);" temporaljson:"duration,omitzero,omitempty"`
StatusCode string `json:"status_code" gorm:"type:LowCardinality(String);codec:ZSTD(1);" temporaljson:"status_code,omitzero,omitempty"`
StatusMessage string `json:"status_message" gorm:"codec:ZSTD(1);" temporaljson:"status_message,omitzero,omitempty"`
// the items of interest here are these attrs/columns that define a `column` in the `gorm` struct tag so gorm knows what column to send these to
EventsTimestamp []time.Time `json:"-" gorm:"type:DateTime64(9);column:events.timestamp" temporaljson:"events_timestamp,omitzero,omitempty"`
EventsName []string `json:"-" gorm:"type:LowCardinality(String);column:events.name" temporaljson:"events_name,omitzero,omitempty"`
EventsAttributes []map[string]string `` /* 133-byte string literal not displayed */
LinksTraceID []string `json:"-" gorm:"type:LowCardinality(String);column:links.trace_id" temporaljson:"links_trace_id,omitzero,omitempty"`
LinksSpanID []string `json:"-" gorm:"type:LowCardinality(String);column:links.span_id" temporaljson:"links_span_id,omitzero,omitempty"`
LinksState []string `json:"-" gorm:"type:LowCardinality(String);column:links.span_state" temporaljson:"links_state,omitzero,omitempty"`
LinksAttributes []map[string]string `` /* 131-byte string literal not displayed */
}
NOTE(fd): DO NOT MIGRATE THIS it's just here so we can write to the table and read data w/ Nested columns as an Array of Structs
func (*OtelTraceIngestion) BeforeCreate ΒΆ
func (r *OtelTraceIngestion) BeforeCreate(tx *gorm.DB) error
type OtelTraceLink ΒΆ
type OtelTraceLink struct {
TraceID string `json:"trace_id,omitzero" temporaljson:"trace_id,omitzero,omitempty"`
SpanID string `json:"span_id,omitzero" temporaljson:"span_id,omitzero,omitempty"`
SpanState string `json:"span_state,omitzero" temporaljson:"span_state,omitzero,omitempty"`
Attributes map[string]string `json:"attributes,omitzero" temporaljson:"attributes,omitzero,omitempty"`
}
type PSQLTableSize ΒΆ
type PSQLTableSize struct {
TableName string `json:"table_name,omitzero"`
SizePretty string `json:"size_pretty,omitzero"`
SizeBytes float64 `json:"size_bytes,omitzero" gorm:"->;-:migration" temporaljson:"size_bytes,omitzero,omitempty"`
}
func (PSQLTableSize) GetTableOptions ΒΆ
func (m PSQLTableSize) GetTableOptions() (string, bool)
func (*PSQLTableSize) UseView ΒΆ
func (*PSQLTableSize) UseView() bool
func (*PSQLTableSize) ViewVersion ΒΆ
func (*PSQLTableSize) ViewVersion() string
func (*PSQLTableSize) Views ΒΆ
func (i *PSQLTableSize) Views(db *gorm.DB) []migrations.View
type Policy ΒΆ
type Policy struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
RoleID string `json:"role_id,omitzero" gorm:"notnull;default null" temporaljson:"role_id,omitzero,omitempty"`
Role Role `swaggerignore:"true" json:"role,omitzero" temporaljson:"role,omitzero,omitempty"`
OrgID generics.NullString `json:"org_id,omitzero" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org *Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
Name PolicyName `json:"name,omitzero" temporaljson:"name,omitzero,omitempty"`
// Permissions are used to track granular permissions for each domain
Permissions pgtype.Hstore `json:"permissions" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"permissions,omitzero,omitempty"`
}
type PolicyInputRef ΒΆ added in v0.19.771
type PolicyInputRef struct {
ID string `json:"id"`
Type string `json:"type"`
Name string `json:"name,omitempty"`
}
PolicyInputRef represents a reference to an input that was evaluated.
type PolicyName ΒΆ
type PolicyName string
const ( // we create a custom policy for each role PolicyNameOrgAdmin PolicyName = "org_admin" PolicyNameInstaller PolicyName = "installer" PolicyNameRunner PolicyName = "runner" // policy names for service accounts PolicyNameHostedInstaller PolicyName = "hosted_installer" )
type PolicyReport ΒΆ added in v0.19.771
type PolicyReport struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `gorm:"foreignKey:CreatedByID;references:ID" json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `gorm:"foreignKey:OrgID;references:ID" json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// Denormalized context for filtering
AppID string `json:"app_id,omitzero" gorm:"notnull" temporaljson:"app_id,omitzero,omitempty"`
InstallID *string `json:"install_id,omitzero" gorm:"default:null" temporaljson:"install_id,omitzero,omitempty"`
ComponentID *string `json:"component_id,omitzero" gorm:"default:null" temporaljson:"component_id,omitzero,omitempty"`
// Denormalized display names for human-readable reports
OrgName string `json:"org_name,omitzero" gorm:"default:null" temporaljson:"org_name,omitzero,omitempty"`
AppName string `json:"app_name,omitzero" gorm:"default:null" temporaljson:"app_name,omitzero,omitempty"`
InstallName *string `json:"install_name,omitzero" gorm:"default:null" temporaljson:"install_name,omitzero,omitempty"`
ComponentName *string `json:"component_name,omitzero" gorm:"default:null" temporaljson:"component_name,omitzero,omitempty"`
// Optional context references (indexes defined in Indexes())
WorkflowStepPolicyValidationID *string `json:"workflow_step_policy_validation_id,omitzero" temporaljson:"workflow_step_policy_validation_id,omitzero,omitempty"`
RunnerJobID *string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
// Polymorphic relationship to the impacted Nuon resource (indexes defined in Indexes())
OwnerID string `` /* 147-byte string literal not displayed */
OwnerType PolicyReportOwnerType `` /* 197-byte string literal not displayed */
// Canonical policy evaluation data
EvaluatedAt time.Time `json:"evaluated_at,omitzero" gorm:"notnull" temporaljson:"evaluated_at,omitzero,omitempty"`
Violations []PolicyViolation `json:"violations,omitzero" gorm:"type:jsonb;serializer:json;default:'[]'" temporaljson:"violations,omitzero,omitempty"`
PolicyIDs []string `json:"policy_ids,omitzero" gorm:"type:jsonb;serializer:json;default:'[]'" temporaljson:"policy_ids,omitzero,omitempty"`
Policies []PolicyResult `json:"policies,omitzero" gorm:"type:jsonb;serializer:json;default:'[]'" temporaljson:"policies,omitzero,omitempty"`
Inputs []PolicyInputRef `json:"inputs,omitzero" gorm:"type:jsonb;serializer:json;default:'[]'" temporaljson:"inputs,omitzero,omitempty"`
// Summary counts for list views
DenyCount int `json:"deny_count" gorm:"notnull;default:0" temporaljson:"deny_count,omitzero,omitempty"`
WarnCount int `json:"warn_count" gorm:"notnull;default:0" temporaljson:"warn_count,omitzero,omitempty"`
PassCount int `json:"pass_count" gorm:"notnull;default:0" temporaljson:"pass_count,omitzero,omitempty"`
Status CompositeStatus `json:"status,omitzero" gorm:"type:jsonb" temporaljson:"status,omitzero,omitempty"`
}
PolicyReport stores canonical policy evaluation results with format-agnostic storage.
func (*PolicyReport) BeforeCreate ΒΆ added in v0.19.771
func (r *PolicyReport) BeforeCreate(tx *gorm.DB) error
func (*PolicyReport) Indexes ΒΆ added in v0.19.771
func (r *PolicyReport) Indexes(db *gorm.DB) []migrations.Index
func (*PolicyReport) TableName ΒΆ added in v0.19.771
func (r *PolicyReport) TableName() string
type PolicyReportOwnerType ΒΆ added in v0.19.771
type PolicyReportOwnerType string
PolicyReportOwnerType represents the type of resource that was evaluated by policies.
const ( PolicyReportOwnerTypeInstallDeploy PolicyReportOwnerType = "install_deploys" PolicyReportOwnerTypeInstallSandboxRun PolicyReportOwnerType = "install_sandbox_runs" PolicyReportOwnerTypeComponentBuild PolicyReportOwnerType = "component_builds" )
type PolicyResult ΒΆ added in v0.19.771
type PolicyResult struct {
PolicyID string `json:"policy_id"`
PolicyName string `json:"policy_name,omitempty"`
Status string `json:"status"` // "deny", "warn", or "pass"
DenyCount int `json:"deny_count"`
WarnCount int `json:"warn_count"`
PassCount int `json:"pass_count"`
InputCount int `json:"input_count"`
}
PolicyResult represents the evaluation result for a single policy.
type PolicyViolation ΒΆ added in v0.19.771
type PolicyViolation struct {
PolicyID string `json:"policy_id" temporaljson:"policy_id,omitempty"`
PolicyName string `json:"policy_name,omitempty" temporaljson:"policy_name,omitempty"`
InputIndex int `json:"input_index" temporaljson:"input_index,omitempty"`
InputIdentity string `json:"input_identity,omitempty" temporaljson:"input_identity,omitempty"` // Human-readable input reference (e.g., "Deployment/default/nginx")
Message string `json:"message" temporaljson:"message,omitempty"`
Severity string `json:"severity" temporaljson:"severity,omitempty"` // "deny" or "warn"
}
PolicyViolation represents a single policy violation from evaluation.
type ProviderType ΒΆ
type ProviderType string
const ( ProviderTypeOIDC ProviderType = "oidc" ProviderTypeGoogle ProviderType = "google" ProviderTypeGitHub ProviderType = "github" )
type PublicGitVCSConfig ΒΆ
type PublicGitVCSConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
ComponentConfigID string `json:"component_config_id,omitzero" gorm:"notnull" temporaljson:"component_config_id,omitzero,omitempty"`
ComponentConfigType string `json:"component_config_type,omitzero" gorm:"notnull" temporaljson:"component_config_type,omitzero,omitempty"`
// actual configuration
Repo string `json:"repo,omitzero" gorm:"notnull" temporaljson:"repo,omitzero,omitempty"`
Directory string `json:"directory,omitzero" gorm:"notnull" temporaljson:"directory,omitzero,omitempty"`
Branch string `json:"branch,omitzero" gorm:"notnull" temporaljson:"branch,omitzero,omitempty"`
}
func (*PublicGitVCSConfig) BeforeCreate ΒΆ
func (c *PublicGitVCSConfig) BeforeCreate(tx *gorm.DB) error
func (*PublicGitVCSConfig) Indexes ΒΆ
func (c *PublicGitVCSConfig) Indexes(db *gorm.DB) []migrations.Index
type Queue ΒΆ
type Queue struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `` /* 187-byte string literal not displayed */
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"index:idx_app_name,unique" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
OwnerID string `` /* 168-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;" temporaljson:"owner_type,omitzero,omitempty"`
MaxDepth int `json:"max_depth,omitzero"`
MaxInFlight int `json:"max_in_flight,omitzero"`
Workflow signaldb.WorkflowRef `json:"workflow"`
Signals []QueueSignal `json:"queue_signal,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"signals,omitzero,omitempty"`
}
type QueueSignal ΒΆ
type QueueSignal struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
QueueID string `` /* 126-byte string literal not displayed */
Queue Queue `json:"queue"`
OwnerID string `` /* 126-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;" temporaljson:"owner_type,omitzero,omitempty"`
Status CompositeStatus `json:"status"`
Type signal.SignalType `json:"type"`
Signal signaldb.SignalData `json:"signal" temporaljson:"-"`
Workflow signaldb.WorkflowRef `json:"workflow"`
}
func (*QueueSignal) BeforeCreate ΒΆ
func (r *QueueSignal) BeforeCreate(tx *gorm.DB) error
func (*QueueSignal) Indexes ΒΆ
func (r *QueueSignal) Indexes(db *gorm.DB) []migrations.Index
type ReleaseStatus ΒΆ
type ReleaseStatus string
const ( ReleaseStatusPlanning ReleaseStatus = "planning" ReleaseStatusError ReleaseStatus = "error" ReleaseStatusActive ReleaseStatus = "active" ReleaseStatusProvisioning ReleaseStatus = "provisioning" ReleaseStatusDeprovisioning ReleaseStatus = "deprovisioning" ReleaseStatusSyncing ReleaseStatus = "syncing" ReleaseStatusExecuting ReleaseStatus = "executing" )
const ( StatusProvisioning ReleaseStatus = "provisioning" StatusDeprovisioning ReleaseStatus = "deprovisioning" StatusSyncing ReleaseStatus = "syncing" StatusExecuting ReleaseStatus = "executing" )
release specific statuses
type Role ΒΆ
type Role struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"notnull;defaultnull" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `temporaljson:"created_by,omitzero,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
Accounts []Account `gorm:"many2many:account_roles;constraint:OnDelete:CASCADE;" json:"-" temporaljson:"accounts,omitzero,omitempty"`
// NOTE: not all roles have to belong to an org, this is mainly for historical reasons.
OrgID generics.NullString `json:"org_id,omitzero" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org *Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
RoleType RoleType `json:"role_type,omitzero" gorm:"defaultnull;notnull" temporaljson:"role_type,omitzero,omitempty"`
Policies []Policy `json:"policies,omitzero" temporaljson:"policies,omitzero,omitempty"`
}
type Runner ΒΆ
type Runner struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"index:idx_app_name,unique" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_runner_name,unique" temporaljson:"deleted_at,omitzero,omitempty"`
Status RunnerStatus `json:"status,omitzero" gorm:"not null;default null" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"not null;default null" temporaljson:"status_description,omitzero,omitempty"`
RunnerGroupID string `json:"runner_group_id,omitzero" gorm:"index:idx_runner_name,unique" temporaljson:"runner_group_id,omitzero,omitempty"`
RunnerGroup RunnerGroup `json:"runner_group,omitzero" temporaljson:"runner_group,omitzero,omitempty"`
Name string `json:"name,omitzero" gorm:"index:idx_runner_name,unique" temporaljson:"name,omitzero,omitempty"`
DisplayName string `json:"display_name,omitzero" gorm:"not null;default null" temporaljson:"display_name,omitzero,omitempty"`
Jobs []RunnerJob `json:"jobs,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"jobs,omitzero,omitempty"`
Operations []RunnerOperation `json:"operations,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"operations,omitzero,omitempty"`
RunnerJob *RunnerJob `json:"runner_job,omitzero" gorm:"polymorphic:Owner;" temporaljson:"runner_job,omitzero,omitempty"`
}
type RunnerGroup ΒΆ
type RunnerGroup struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index:idx_runner_group_owner" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"default null;not null" temporaljson:"org_id,omitzero,omitempty"`
// parent can org, install or in the future, builtin runner group
OwnerID string `json:"owner_id,omitzero" gorm:"index:idx_runner_group_owner;notnull;default null" temporaljson:"owner_id,omitzero,omitempty"`
OwnerType string `json:"owner_type,omitzero" gorm:"notnull;default null" temporaljson:"owner_type,omitzero,omitempty"`
Runners []Runner `json:"runners,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"runners,omitzero,omitempty"`
Settings RunnerGroupSettings `json:"settings,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"settings,omitzero,omitempty"`
Type RunnerGroupType `json:"type,omitzero" gorm:"notnull;defaultnull" temporaljson:"type,omitzero,omitempty"`
Platform AppRunnerType `json:"platform,omitzero" gorm:"notnull;defaultnull" temporaljson:"platform,omitzero,omitempty"`
}
func (*RunnerGroup) BeforeCreate ΒΆ
func (r *RunnerGroup) BeforeCreate(tx *gorm.DB) error
func (*RunnerGroup) EventLoops ΒΆ
func (r *RunnerGroup) EventLoops() []bulk.EventLoop
func (*RunnerGroup) Indexes ΒΆ
func (r *RunnerGroup) Indexes(db *gorm.DB) []migrations.Index
type RunnerGroupSettings ΒΆ
type RunnerGroupSettings struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_runner_group_settings,unique" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"index:idx_app_name,unique" temporaljson:"org_id,omitzero,omitempty"`
RunnerGroupID string `` /* 127-byte string literal not displayed */
// configuration for deploying the runner
ContainerImageURL string `json:"container_image_url,omitzero" gorm:"default null;not null" temporaljson:"container_image_url,omitzero,omitempty"`
ContainerImageTag string `json:"container_image_tag,omitzero" gorm:"default null;not null" temporaljson:"container_image_tag,omitzero,omitempty"`
ExpectedVersion string `json:"-" gorm:"-" temporaljson:"expected_version,omitzero,omitempty"`
RunnerAPIURL string `json:"runner_api_url,omitzero" gorm:"default null;not null" temporaljson:"runner_apiurl,omitzero,omitempty"`
// configuration for managing the runner server side
SandboxMode bool `json:"sandbox_mode,omitzero" temporaljson:"sandbox_mode,omitzero,omitempty"`
// Various settings for the runner to handle internally
HeartBeatTimeout time.Duration `` /* 140-byte string literal not displayed */
OTELCollectorConfiguration string `` /* 129-byte string literal not displayed */
EnableSentry bool `json:"enable_sentry,omitzero" temporaljson:"enable_sentry,omitzero,omitempty"`
EnableMetrics bool `json:"enable_metrics,omitzero" temporaljson:"enable_metrics,omitzero,omitempty"`
EnableLogging bool `json:"enable_logging,omitzero" temporaljson:"enable_logging,omitzero,omitempty"`
LoggingLevel string `json:"logging_level,omitzero" temporaljson:"logging_level,omitzero,omitempty"`
Groups pq.StringArray `json:"groups,omitzero" gorm:"type:text[];default:'{}'" swaggertype:"array,string" temporaljson:"groups,omitzero,omitempty"` // the job loop groups the runner should poll for
// Metadata is used as both log and metric tags/attributes in the runner when emitting data
Metadata pgtype.Hstore `json:"metadata,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"metadata,omitzero,omitempty"`
// org runner specifics
OrgAWSIAMRoleARN string `json:"org_aws_iam_role_arn,omitzero" temporaljson:"org_awsiam_role_arn,omitzero,omitempty"`
OrgK8sServiceAccountName string `json:"org_k8s_service_account_name,omitzero" temporaljson:"org_k_8_s_service_account_name,omitzero,omitempty"`
// aws runner specifics runner-v2
AWSInstanceType string `json:"aws_instance_type,omitzero" temporaljson:"aws_instance_type,omitzero,omitempty"`
AWSMaxInstanceLifetime int `` // Default: 7 days
/* 219-byte string literal not displayed */
AWSCloudformationStackType string `json:"aws_cloudformation_stack_type,omitzero" temporaljson:"aws_cloudformation_stack_type,omitzero,omitempty"`
AWSTags pgtype.Hstore `json:"aws_tags,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"aws_tags,omitzero,omitempty"`
LocalAWSIAMRoleARN string `json:"local_aws_iam_role_arn,omitzero" temporaljson:"local_awsiam_role_arn,omitzero,omitempty"`
// platform variable for use in the runner
Platform CloudPlatform `json:"platform" temporaljson:"-" gorm:"-" swaggertype:"string"`
}
func (*RunnerGroupSettings) AfterQuery ΒΆ
func (r *RunnerGroupSettings) AfterQuery(tx *gorm.DB) error
func (*RunnerGroupSettings) BeforeCreate ΒΆ
func (r *RunnerGroupSettings) BeforeCreate(tx *gorm.DB) error
func (*RunnerGroupSettings) Indexes ΒΆ
func (i *RunnerGroupSettings) Indexes(db *gorm.DB) []migrations.Index
func (*RunnerGroupSettings) Views ΒΆ
func (i *RunnerGroupSettings) Views(db *gorm.DB) []migrations.View
type RunnerGroupType ΒΆ
type RunnerGroupType string
const ( RunnerGroupTypeInstall RunnerGroupType = "install" RunnerGroupTypeOrg RunnerGroupType = "org" )
type RunnerHealthCheck ΒΆ
type RunnerHealthCheck struct {
ID string `gorm:"primary_key" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"type:DateTime64(9);codec:Delta(8),ZSTD(1)" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"type:DateTime64(9);codec:Delta(8),ZSTD(1)" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"runner_id,omitzero,omitempty"`
RunnerJob RunnerJob `json:"runner_job,omitzero" gorm:"polymorphic:Owner;" temporaljson:"runner_job,omitzero,omitempty"`
RunnerStatus RunnerStatus `json:"status,omitzero" gorm:"codec:ZSTD(1)" temporaljson:"runner_status,omitzero,omitempty"`
MinuteBucket time.Time `` /* 141-byte string literal not displayed */
RunnerStatusCode int `json:"status_code" gorm:"-" temporaljson:"runner_status_code,omitzero,omitempty"`
Process RunnerProcess `json:"process" gorm:"not null;default:''" swaggertype:"string"`
}
clickhouse table
func (*RunnerHealthCheck) AfterQuery ΒΆ
func (r *RunnerHealthCheck) AfterQuery(tx *gorm.DB) error
func (*RunnerHealthCheck) BeforeCreate ΒΆ
func (r *RunnerHealthCheck) BeforeCreate(tx *gorm.DB) error
func (RunnerHealthCheck) GetTableClusterOptions ΒΆ
func (r RunnerHealthCheck) GetTableClusterOptions() string
func (RunnerHealthCheck) GetTableOptions ΒΆ
func (r RunnerHealthCheck) GetTableOptions() string
func (*RunnerHealthCheck) UseView ΒΆ
func (*RunnerHealthCheck) UseView() bool
func (*RunnerHealthCheck) ViewVersion ΒΆ
func (*RunnerHealthCheck) ViewVersion() string
func (*RunnerHealthCheck) Views ΒΆ
func (i *RunnerHealthCheck) Views(db *gorm.DB) []migrations.View
type RunnerHeartBeat ΒΆ
type RunnerHeartBeat struct {
ID string `gorm:"primary_key" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
AliveTime time.Duration `json:"alive_time,omitzero" swaggertype:"primitive,integer" temporaljson:"alive_time,omitzero,omitempty"`
Version string `json:"version,omitzero" temporaljson:"version,omitzero,omitempty"`
StartedAt time.Time `json:"started_at,omitzero" gorm:"-" temporaljson:"started_at,omitzero,omitempty"`
Process RunnerProcess `json:"process" gorm:"not null;default:''" swaggertype:"string"`
}
clickhouse table
func (*RunnerHeartBeat) AfterQuery ΒΆ
func (r *RunnerHeartBeat) AfterQuery(tx *gorm.DB) error
func (*RunnerHeartBeat) BeforeCreate ΒΆ
func (r *RunnerHeartBeat) BeforeCreate(tx *gorm.DB) error
func (RunnerHeartBeat) GetTableClusterOptions ΒΆ
func (r RunnerHeartBeat) GetTableClusterOptions() string
func (RunnerHeartBeat) GetTableOptions ΒΆ
func (r RunnerHeartBeat) GetTableOptions() string
type RunnerJob ΒΆ
type RunnerJob struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `` /* 187-byte string literal not displayed */
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_runner_name,unique;" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"index:idx_app_name,unique" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
RunnerID string `` /* 144-byte string literal not displayed */
OwnerID string `` /* 168-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;" temporaljson:"owner_type,omitzero,omitempty"`
LogStreamID *string `json:"log_stream_id,omitzero" temporaljson:"log_stream_id,omitzero,omitempty"`
// queue timeout is how long a job can be queued, before being made available
QueueTimeout time.Duration `` /* 138-byte string literal not displayed */
// available timeout is how long a job can be marked as "available" before being requeued
AvailableTimeout time.Duration `` /* 146-byte string literal not displayed */
// execution timeout is how long a job can be marked as "exeucuting" before being requeued
ExecutionTimeout time.Duration `` /* 146-byte string literal not displayed */
// overall timeout is how long a job can be attempted, before being cancelled
OverallTimeout time.Duration `` /* 142-byte string literal not displayed */
MaxExecutions int `json:"max_executions,omitzero" gorm:"not null;default null" temporaljson:"max_executions,omitzero,omitempty"`
Status RunnerJobStatus `` /* 131-byte string literal not displayed */
StatusDescription string `json:"status_description,omitzero" gorm:"not null;default null" temporaljson:"status_description,omitzero,omitempty"`
Type RunnerJobType `json:"type,omitzero" gorm:"default null;not null" temporaljson:"type,omitzero,omitempty"`
Group RunnerJobGroup `` /* 129-byte string literal not displayed */
Operation RunnerJobOperationType `json:"operation,omitzero" gorm:"default:null;not null" temporaljson:"operation,omitzero,omitempty"`
Executions []RunnerJobExecution `json:"executions,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"executions,omitzero,omitempty"`
Plan RunnerJobPlan `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"plan,omitzero,omitempty"`
StartedAt time.Time `json:"started_at,omitzero" gorm:"default:null" temporaljson:"started_at,omitzero,omitempty"`
FinishedAt time.Time `json:"finished_at,omitzero" gorm:"default:null" temporaljson:"finished_at,omitzero,omitempty"`
Metadata pgtype.Hstore `json:"metadata,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"metadata,omitzero,omitempty"`
ExecutionCount int `json:"execution_count,omitzero" gorm:"->;-:migration" temporaljson:"execution_count,omitzero,omitempty"`
FinalRunnerJobExecutionID string `` /* 131-byte string literal not displayed */
Outputs []byte `` /* 134-byte string literal not displayed */
ExecutionTime time.Duration `json:"execution_time,omitzero" gorm:"-" swaggertype:"primitive,integer" temporaljson:"execution_time,omitzero,omitempty"`
Execution *RunnerJobExecution `json:"-" gorm:"-" temporaljson:"execution,omitzero,omitempty"`
ParsedOutputs map[string]interface{} `json:"outputs,omitzero" gorm:"-" temporaljson:"parsed_outputs,omitzero,omitempty"`
// foreign keys
States []TerraformWorkspaceState `faker:"-" json:"-" swaggerignore:"true" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"states,omitzero,omitempty"`
LockHistory []TerraformWorkspaceLock `faker:"-" json:"-" swaggerignore:"true" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"lock_history,omitzero,omitempty"`
StateJSON []TerraformWorkspaceStateJSON `json:"-" swaggerignore:"true" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"statesjson,omitzero,omitempty"`
}
func (*RunnerJob) ViewVersion ΒΆ
type RunnerJobExecution ΒΆ
type RunnerJobExecution struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_runner_job_execution_runner_job_id,type:btree" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
RunnerJobID string `` /* 160-byte string literal not displayed */
RunnerJob RunnerJob `json:"-" temporaljson:"runner_job,omitzero,omitempty"`
Status RunnerJobExecutionStatus `` /* 140-byte string literal not displayed */
Result *RunnerJobExecutionResult `json:"result,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"result,omitzero,omitempty"`
Outputs *RunnerJobExecutionOutputs `json:"outputs,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"outputs,omitzero,omitempty"`
// Metadata is used to store additional information about the execution {e.g., client version.}
Metadata pgtype.Hstore `json:"metadata,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"metadata,omitzero,omitempty"`
}
each runner job can be retried one or more times each execution will be tracked and have logs, metrics, events and more
func (*RunnerJobExecution) BeforeCreate ΒΆ
func (r *RunnerJobExecution) BeforeCreate(tx *gorm.DB) error
func (*RunnerJobExecution) Indexes ΒΆ
func (i *RunnerJobExecution) Indexes(db *gorm.DB) []migrations.Index
type RunnerJobExecutionOutputs ΒΆ
type RunnerJobExecutionOutputs struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
RunnerJobExecutionID string `` /* 170-byte string literal not displayed */
RunnerJobExecution RunnerJobExecution `json:"-" temporaljson:"runner_job_execution,omitzero,omitempty"`
Outputs []byte `json:"outputs_json,omitzero" gorm:"type:jsonb" swaggertype:"string" temporaljson:"outputs,omitzero,omitempty"`
ParsedOutputs map[string]interface{} `json:"outputs,omitzero" gorm:"-" swaggertype:"object,object" temporaljson:"parsed_outputs,omitzero,omitempty"`
}
func (*RunnerJobExecutionOutputs) AfterQuery ΒΆ
func (r *RunnerJobExecutionOutputs) AfterQuery(tx *gorm.DB) error
func (*RunnerJobExecutionOutputs) BeforeCreate ΒΆ
func (r *RunnerJobExecutionOutputs) BeforeCreate(tx *gorm.DB) error
func (*RunnerJobExecutionOutputs) Indexes ΒΆ
func (r *RunnerJobExecutionOutputs) Indexes(db *gorm.DB) []migrations.Index
type RunnerJobExecutionResult ΒΆ
type RunnerJobExecutionResult struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_job_execution_result,unique" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
RunnerJobExecutionID string `` /* 162-byte string literal not displayed */
Success bool `json:"success,omitzero" temporaljson:"success,omitzero,omitempty"`
ErrorCode int `json:"error_code,omitzero" temporaljson:"error_code,omitzero,omitempty"`
ErrorMetadata pgtype.Hstore `` /* 126-byte string literal not displayed */
Contents string `json:"contents,omitzero" gorm:"string" swaggertype:"string" temporaljson:"contents"`
ContentsDisplay []byte `json:"contents_display,omitzero" gorm:"type:jsonb" swaggertype:"string" temporaljson:"-"`
// columns for storage of gzipped contents and plans
ContentsGzip []byte `json:"contents_gzip,omitzero" gorm:"type:bytea" swaggertype:"string" temporaljson:"contents_binary"`
ContentsDisplayGzip []byte `json:"contents_display_gzip,omitzero" gorm:"type:bytea" swaggertype:"string" temporaljson:"-"`
}
func (*RunnerJobExecutionResult) BeforeCreate ΒΆ
func (r *RunnerJobExecutionResult) BeforeCreate(tx *gorm.DB) error
func (*RunnerJobExecutionResult) GetContentsB64String ΒΆ
func (r *RunnerJobExecutionResult) GetContentsB64String() (string, error)
func (*RunnerJobExecutionResult) GetContentsDisplayDecompressedBytes ΒΆ
func (r *RunnerJobExecutionResult) GetContentsDisplayDecompressedBytes() ([]byte, error)
func (*RunnerJobExecutionResult) GetContentsDisplayString ΒΆ
func (r *RunnerJobExecutionResult) GetContentsDisplayString() (string, error)
func (*RunnerJobExecutionResult) Indexes ΒΆ
func (r *RunnerJobExecutionResult) Indexes(db *gorm.DB) []migrations.Index
type RunnerJobExecutionStatus ΒΆ
type RunnerJobExecutionStatus string
const ( // the following statuses denote an in-progress execution // initializing means the runner is starting the job RunnerJobExecutionStatusPending RunnerJobExecutionStatus = "pending" // initializing means the runner is starting the job RunnerJobExecutionStatusInitializing RunnerJobExecutionStatus = "initializing" // means the runner is in progress RunnerJobExecutionStatusInProgress RunnerJobExecutionStatus = "in-progress" // means the runner is cleaning up RunnerJobExecutionStatusCleaningUp RunnerJobExecutionStatus = "cleaning-up" // the following statuses denote a finished execution // once a runner has finished the job successfully RunnerJobExecutionStatusFinished RunnerJobExecutionStatus = "finished" // once a runner has failed the job RunnerJobExecutionStatusFailed RunnerJobExecutionStatus = "failed" // once the job has timed out RunnerJobExecutionStatusTimedOut RunnerJobExecutionStatus = "timed-out" // not attempted is when the runner can not attempt RunnerJobExecutionStatusNotAttempted RunnerJobExecutionStatus = "not-attempted" // when a job is cancelled RunnerJobExecutionStatusCancelled RunnerJobExecutionStatus = "cancelled" // when a job status is unknown RunnerJobExecutionStatusUnknown RunnerJobExecutionStatus = "unknown" )
func (RunnerJobExecutionStatus) IsRunning ΒΆ
func (r RunnerJobExecutionStatus) IsRunning() bool
type RunnerJobGroup ΒΆ
type RunnerJobGroup string
const ( // a health check is a runner health check, not to be confused with a heart beat. RunnerJobGroupHealthChecks RunnerJobGroup = "health-checks" // component groups for builds, syncing and deploys RunnerJobGroupSync RunnerJobGroup = "sync" RunnerJobGroupBuild RunnerJobGroup = "build" RunnerJobGroupDeploy RunnerJobGroup = "deploy" // sandbox jobs such as provision, deprovision. RunnerJobGroupSandbox RunnerJobGroup = "sandbox" // runner jobs such as provision, deprovision and pre-flight checks. RunnerJobGroupRunner RunnerJobGroup = "runner" // operations jobs such as shutdown, restart, noop and update settings. RunnerJobGroupOperations RunnerJobGroup = "operations" RunnerJobGroupManagement RunnerJobGroup = "management" // actions workflows RunnerJobGroupActions RunnerJobGroup = "actions" RunnerJobGroupUnknown RunnerJobGroup = "" RunnerJobGroupAny RunnerJobGroup = "any" )
type RunnerJobOperationType ΒΆ
type RunnerJobOperationType string
operation types that correspond to the type of operation
const ( // exec is used for shut down, scripts and more. It is mainly ignored as those job types do not really need to // think about operations RunnerJobOperationTypeExec RunnerJobOperationType = "exec" // update build RunnerJobOperationTypeBuild RunnerJobOperationType = "build" // the following operations are for common use cases for things such as helm, terraform and other jobs that have // multiple operation types. RunnerJobOperationTypeCreateApplyPlan RunnerJobOperationType = "create-apply-plan" RunnerJobOperationTypeCreateTeardownPlan RunnerJobOperationType = "create-teardown-plan" RunnerJobOperationTypeApplyPlan RunnerJobOperationType = "apply-plan" RunnerJobOperationTypeUnknown RunnerJobOperationType = "unknown" )
type RunnerJobPlan ΒΆ
type RunnerJobPlan struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" gorm:"index:idx_runner_job_plan,unique" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
RunnerJobID string `` /* 137-byte string literal not displayed */
PlanJSON string `json:"plan_json,omitzero" temporaljson:"plan_json,omitzero,omitempty"`
CompositePlan plantypes.CompositePlan `json:"composite_plan,omitzero" gorm:"type:jsonb" temporaljson:"composite_plan,omitzero,omitempty"`
}
func (*RunnerJobPlan) BeforeCreate ΒΆ
func (r *RunnerJobPlan) BeforeCreate(tx *gorm.DB) error
func (*RunnerJobPlan) Indexes ΒΆ
func (r *RunnerJobPlan) Indexes(db *gorm.DB) []migrations.Index
type RunnerJobStatus ΒΆ
type RunnerJobStatus string
const ( // all jobs are set as queued to start, and the event loop should update them to available. RunnerJobStatusQueued RunnerJobStatus = "queued" // the runner queries jobs that are available, to find something to work on RunnerJobStatusAvailable RunnerJobStatus = "available" // once a runner is actively working on the job RunnerJobStatusInProgress RunnerJobStatus = "in-progress" // once a runner has finished the job RunnerJobStatusFinished RunnerJobStatus = "finished" // once a runner has failed the job RunnerJobStatusFailed RunnerJobStatus = "failed" // once the job has timed out RunnerJobStatusTimedOut RunnerJobStatus = "timed-out" // not attempted is when the runner can not attempt RunnerJobStatusNotAttempted RunnerJobStatus = "not-attempted" // cancelled RunnerJobStatusCancelled RunnerJobStatus = "cancelled" // status is not known RunnerJobStatusUnknown RunnerJobStatus = "unknown" )
type RunnerJobType ΒΆ
type RunnerJobType string
const ( // a health check is a runner health check, not to be confused with a heart beat RunnerJobTypeHealthCheck RunnerJobType = "health-check" // build job types RunnerJobTypeDockerBuild RunnerJobType = "docker-build" RunnerJobTypeContainerImageBuild RunnerJobType = "container-image-build" RunnerJobTypeTerraformModuleBuild RunnerJobType = "terraform-module-build" RunnerJobTypeHelmChartBuild RunnerJobType = "helm-chart-build" RunnerJobTypeKubernetesManifestBuild RunnerJobType = "kubernetes-manifest-build" RunnerJobTypeNOOPBuild RunnerJobType = "noop-build" // sync job types RunnerJobTypeOCISync RunnerJobType = "oci-sync" RunnerJobTypeNOOPSync RunnerJobType = "noop-sync" RunnerJobTypeFetchImageMetadata RunnerJobType = "fetch-image-metadata" // deploy job types RunnerJobTypeTerraformDeploy RunnerJobType = "terraform-deploy" RunnerJobTypeHelmChartDeploy RunnerJobType = "helm-chart-deploy" RunnerJobTypeJobDeploy RunnerJobType = "job-deploy" RunnerJobTypeKubrenetesManifestDeploy RunnerJobType = "kubernetes-manifest-deploy" RunnerJobTypeJobNOOPDeploy RunnerJobType = "noop-deploy" // operations job types RunnerJobTypeShutDown RunnerJobType = "shut-down" RunnerJobTypeUpdateVersion RunnerJobType = "update-version" RunnerJobTypeNOOP RunnerJobType = "noop" // TODO(fd): revisit these names // management job types // RunnerJobTypeMngVMStats RunnerJobType = "mng-vm-stats" // log some vm stats/metrics RunnerJobTypeMngVMShutDown RunnerJobType = "mng-vm-shut-down" // shut down the vm RunnerJobTypeMngShutDown RunnerJobType = "mng-shut-down" // shutdown the runner mng process (usually triggers restart) RunnerJobTypeMngRunnerUpdateVersion RunnerJobType = "mng-runner-update-version" // update the runner image/version (check for changes and update) RunnerJobTypeMngRunnerRestart RunnerJobType = "mng-runner-restart" // restart the runner systemctl service (technically, a duplicate. runner can restart self.) RunnerJobTypeMngFetchToken RunnerJobType = "mng-fetch-token" // fetch authentication token via AWS presigned requests // sandbox job types RunnerJobTypeSandboxTerraform RunnerJobType = "sandbox-terraform" RunnerJobTypeSandboxTerraformPlan RunnerJobType = "sandbox-terraform-plan" RunnerJobTypeSandboxSyncSecrets RunnerJobType = "sandbox-sync-secrets" // runner job types RunnerJobTypeRunnerHelm RunnerJobType = "runner-helm" RunnerJobTypeRunnerTerraform RunnerJobType = "runner-terraform" RunnerJobTypeRunnerLocal RunnerJobType = "runner-local" // actions job types RunnerJobTypeActionsWorkflowRun RunnerJobType = "actions-workflow" // unknown RunnerJobTypeUnknown = "unknown" )
func (RunnerJobType) Group ΒΆ
func (r RunnerJobType) Group() RunnerJobGroup
type RunnerOperation ΒΆ
type RunnerOperation struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// job details
LogStream LogStream `json:"log_stream,omitzero" gorm:"polymorphic:Owner;" temporaljson:"log_stream,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
RunnerID string `json:"runner_id,omitzero" temporaljson:"runner_id,omitzero,omitempty"`
Runner Runner `json:"-" faker:"-" temporaljson:"runner,omitzero,omitempty"`
OpType RunnerOperationType `json:"operation_type,omitzero" temporaljson:"op_type,omitzero,omitempty"`
Status RunnerOperationStatus `json:"status,omitzero" gorm:"notnull" swaggertype:"string" temporaljson:"status,omitzero,omitempty"`
StatusDescription string `json:"status_description,omitzero" gorm:"notnull" temporaljson:"status_description,omitzero,omitempty"`
}
func (*RunnerOperation) BeforeCreate ΒΆ
func (i *RunnerOperation) BeforeCreate(tx *gorm.DB) error
func (*RunnerOperation) Indexes ΒΆ
func (i *RunnerOperation) Indexes(db *gorm.DB) []migrations.Index
type RunnerOperationStatus ΒΆ
type RunnerOperationStatus string
const ( RunnerOperationStatusFinished RunnerOperationStatus = "finished" RunnerOperationStatusInProgress RunnerOperationStatus = "in-progress" RunnerOperationStatusPending RunnerOperationStatus = "pending" RunnerOperationStatusError RunnerOperationStatus = "error" )
type RunnerOperationType ΒΆ
type RunnerOperationType string
const ( RunnerOperationTypeProvision RunnerOperationType = "provision" RunnerOperationTypeProvisionServiceAccount RunnerOperationType = "provision_service_account" RunnerOperationTypeReprovision RunnerOperationType = "reprovision" RunnerOperationTypeDeprovision RunnerOperationType = "deprovision" )
type RunnerProcess ΒΆ
type RunnerProcess string
Now that we run third type of runner process, we need to distinguish which process is sending the heartbear NOTE(fd): we have to implement Scan/Value so the gorm ch plugin doesn't complain
const ( RunnerProcessMng RunnerProcess = "mng" RunnerProcessInstall RunnerProcess = "install" RunnerProcessOrg RunnerProcess = "org" RunnerProcessUknown RunnerProcess = "" )
func (*RunnerProcess) Scan ΒΆ
func (rp *RunnerProcess) Scan(value any) error
type RunnerStatus ΒΆ
type RunnerStatus string
const ( RunnerStatusError RunnerStatus = "error" RunnerStatusActive RunnerStatus = "active" RunnerStatusPending RunnerStatus = "pending" RunnerStatusProvisioning RunnerStatus = "provisioning" RunnerStatusDeprovisioning RunnerStatus = "deprovisioning" RunnerStatusDeprovisioned RunnerStatus = "deprovisioned" RunnerStatusReprovisioning RunnerStatus = "reprovisioning" RunnerStatusOffline RunnerStatus = "offline" RunnerStatusAwaitingInstallStackRun RunnerStatus = "awaiting-install-stack-run" RunnerStatusUnknown RunnerStatus = "unknown" )
func (RunnerStatus) Code ΒΆ
func (r RunnerStatus) Code() int
func (RunnerStatus) IsHealthy ΒΆ
func (r RunnerStatus) IsHealthy() bool
func (RunnerStatus) String ΒΆ
func (r RunnerStatus) String() string
type SandboxRunStatus ΒΆ
type SandboxRunStatus string
const ( SandboxRunStatusActive SandboxRunStatus = "active" SandboxRunStatusError SandboxRunStatus = "error" SandboxRunStatusQueued SandboxRunStatus = "queued" SandboxRunStatusDeprovisioned SandboxRunStatus = "deprovisioned" SandboxRunStatusDeprovisioning SandboxRunStatus = "deprovisioning" SandboxRunStatusProvisioning SandboxRunStatus = "provisioning" SandboxRunStatusReprovisioning SandboxRunStatus = "reprovisioning" SandboxRunStatusPlanning SandboxRunStatus = "planning" SandboxRunStatusApplying SandboxRunStatus = "applying" SandboxRunStatusAccessError SandboxRunStatus = "access_error" SandboxRunStatusUnknown SandboxRunStatus = "unknown" SandboxRunStatusCancelled SandboxRunStatus = "cancelled" SandboxRunStatusEmpty SandboxRunStatus = "empty" SandboxRunPendingApproval SandboxRunStatus = "pending-approval" SandboxRunApprovalDenied SandboxRunStatus = "approval-denied" SandboxRunDriftDetected SandboxRunStatus = "drift-detected" SandboxRunNoDrift SandboxRunStatus = "no-drift" SandboxRunAutoSkipped SandboxRunStatus = "auto-skipped" )
type SandboxRunType ΒΆ
type SandboxRunType string
const ( SandboxRunTypeProvision SandboxRunType = "provision" SandboxRunTypeReprovision SandboxRunType = "reprovision" SandboxRunTypeDeprovision SandboxRunType = "deprovision" )
type Signal ΒΆ
type Signal struct {
EventLoopID string `json:"event_loop_id,omitzero" temporaljson:"event_loop_id,omitzero,omitempty"`
Namespace string `json:"namespace,omitzero" temporaljson:"namespace,omitzero,omitempty"`
Type string `json:"type,omitzero" temporaljson:"type,omitzero,omitempty"`
SignalJSON []byte `json:"json,omitzero" temporaljson:"signal_json,omitzero,omitempty"`
}
func (Signal) GormDataType ΒΆ
type Status ΒΆ
type Status string
generic statuses
const ( StatusError Status = "error" StatusPending Status = "pending" StatusInProgress Status = "in-progress" StatusCheckPlan Status = "checking-plan" StatusSuccess Status = "success" StatusNotAttempted Status = "not-attempted" StatusCancelled Status = "cancelled" StatusRetrying Status = "retrying" StatusDiscarded Status = "discarded" StatusUserSkipped Status = "user-skipped" StatusAutoSkipped Status = "auto-skipped" StatusPlanning Status = "planning" StatusApplying Status = "applying" StatusQueued Status = "queued" StatusWarning Status = "warning" )
define standard statuses
const ( InstallStackVersionStatusGenerating Status = "generating" InstallStackVersionStatusPendingUser Status = "awaiting-user-run" InstallStackVersionStatusProvisioning Status = "provisioning" InstallStackVersionStatusActive Status = "active" InstallStackVersionStatusOutdated Status = "outdated" InstallStackVersionStatusExpired Status = "expired" )
type specific statuses
const ( WorkflowStepApprovalStatusApproved Status = "approved" WorkflowStepDrifted Status = "drifted" WorkflowStepNoDrift Status = "no-drift" // WorkflowStepApprovalStatusAwaitingResponse Status = "approval-awaiting" // NOTE(fd): superceded by shared const below WorkflowStepApprovalStatusApprovalExpired Status = "approval-expired" WorkflowStepApprovalStatusApprovalDenied Status = "approval-denied" WorkflowStepApprovalStatusApprovalRetryPlan Status = "approval-retry" )
component build specific statuses
const (
AwaitingApproval Status = "approval-awaiting"
)
shared by WorkflowStep and Workflow
const (
InstallDeployStatusV2Noop Status = "noop"
)
func (Status) DefaultHumanDescription ΒΆ
type StepErrorBehavior ΒΆ
type StepErrorBehavior string
DEPRECATED: this is no longer used, but kept for historical data integrity
const ( // abort on error StepErrorBehaviorAbort StepErrorBehavior = "abort" )
type TemporalPayload ΒΆ
type TemporalPayload struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id" temporaljson:"id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
Contents []byte `json:"contents,omitzero" gorm:"type:bytea" swaggertype:"-" temporaljson:"contents,omitzero,omitempty"`
}
func (*TemporalPayload) BeforeCreate ΒΆ
func (a *TemporalPayload) BeforeCreate(tx *gorm.DB) error
type TerraformLock ΒΆ
type TerraformLock struct {
Created string `json:"created,omitzero" temporaljson:"created,omitzero,omitempty"`
Path string `json:"path,omitzero" temporaljson:"path,omitzero,omitempty"`
ID string `json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
Operation string `json:"operation,omitzero" temporaljson:"operation,omitzero,omitempty"`
Info string `json:"info,omitzero" temporaljson:"info,omitzero,omitempty"`
Who string `json:"who,omitzero" temporaljson:"who,omitzero,omitempty"`
Version any `json:"version,omitzero" temporaljson:"version,omitzero,omitempty"`
}
Lock a lock on state
func (TerraformLock) GormDataType ΒΆ
func (TerraformLock) GormDataType() string
func (*TerraformLock) Scan ΒΆ
func (c *TerraformLock) Scan(v interface{}) (err error)
type TerraformModuleComponentConfig ΒΆ
type TerraformModuleComponentConfig struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// parent reference
ComponentConfigConnectionID string `` /* 126-byte string literal not displayed */
ComponentConfigConnection ComponentConfigConnection `json:"-" temporaljson:"component_config_connection,omitzero,omitempty"`
// terraform configuration values
Version string `json:"version,omitzero" gorm:"default:v1.7.5;notnull" temporaljson:"version,omitzero,omitempty"`
Variables pgtype.Hstore `json:"variables,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"variables,omitzero,omitempty"`
VariablesFiles pq.StringArray `` /* 147-byte string literal not displayed */
EnvVars pgtype.Hstore `json:"env_vars,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"env_vars,omitzero,omitempty"`
PublicGitVCSConfig *PublicGitVCSConfig `` /* 167-byte string literal not displayed */
ConnectedGithubVCSConfig *ConnectedGithubVCSConfig `` /* 179-byte string literal not displayed */
}
func (*TerraformModuleComponentConfig) BeforeCreate ΒΆ
func (c *TerraformModuleComponentConfig) BeforeCreate(tx *gorm.DB) error
func (*TerraformModuleComponentConfig) Indexes ΒΆ
func (c *TerraformModuleComponentConfig) Indexes(db *gorm.DB) []migrations.Index
type TerraformStateData ΒΆ
type TerraformStateData struct {
Version int `json:"version,omitzero,omitempty" temporaljson:"version,omitzero,omitempty"`
TerraformVersion string `json:"terraform_version,omitzero,omitempty" temporaljson:"terraform_version,omitzero,omitempty"`
Serial int `json:"serial,omitzero,omitempty" temporaljson:"serial,omitzero,omitempty"`
Lineage string `json:"lineage,omitzero,omitempty" temporaljson:"lineage,omitzero,omitempty"`
Outputs map[string]any `json:"outputs,omitzero,omitempty" temporaljson:"outputs,omitzero,omitempty"`
Resources []TerraformStateResource `json:"resources,omitzero,omitempty" temporaljson:"resources,omitzero,omitempty"`
CheckResults any `json:"check_results,omitzero,omitempty" temporaljson:"check_results,omitzero,omitempty"`
// base 64 encoded version of the contents for compatibility
Contents string `json:"contents,omitzero" temporaljson:"contents,omitzero,omitempty"`
}
func (TerraformStateData) GormDataType ΒΆ
func (TerraformStateData) GormDataType() string
func (*TerraformStateData) Scan ΒΆ
func (c *TerraformStateData) Scan(v interface{}) (err error)
type TerraformStateInstance ΒΆ
type TerraformStateInstance struct {
SchemaVersion int `json:"schema_version,omitzero" temporaljson:"schema_version,omitzero,omitempty"`
Attributes map[string]any `json:"attributes,omitzero" temporaljson:"attributes,omitzero,omitempty"`
SensitiveAttributes []any `json:"sensitive_attributes,omitzero" temporaljson:"sensitive_attributes,omitzero,omitempty"`
}
type TerraformStateResource ΒΆ
type TerraformStateResource struct {
Mode string `json:"mode,omitzero" temporaljson:"mode,omitzero,omitempty"`
Type string `json:"type,omitzero" temporaljson:"type,omitzero,omitempty"`
Name string `json:"name,omitzero" temporaljson:"name,omitzero,omitempty"`
Provider string `json:"provider,omitzero" temporaljson:"provider,omitzero,omitempty"`
Instances []TerraformStateInstance `json:"instances,omitzero" temporaljson:"instances,omitzero,omitempty"`
}
type TerraformWorkspace ΒΆ
type TerraformWorkspace struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
OwnerID string `` /* 148-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;uniqueIndex:idx_owner" temporaljson:"owner_type,omitzero,omitempty"`
States []TerraformWorkspaceState `faker:"-" json:"-" swaggerignore:"true" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"states,omitzero,omitempty"`
LockHistory []TerraformWorkspaceLock `` /* 170-byte string literal not displayed */
StateJSON []TerraformWorkspaceStateJSON `` /* 147-byte string literal not displayed */
}
func (*TerraformWorkspace) BeforeCreate ΒΆ
func (r *TerraformWorkspace) BeforeCreate(tx *gorm.DB) (err error)
func (*TerraformWorkspace) Indexes ΒΆ
func (r *TerraformWorkspace) Indexes(db *gorm.DB) []migrations.Index
type TerraformWorkspaceLock ΒΆ
type TerraformWorkspaceLock struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"null;default:null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
// Foreign key to TerraformWorkspace with unique constraint to prevent multiple active locks
WorkspaceID string `` /* 176-byte string literal not displayed */
Workspace TerraformWorkspace `json:"-" temporaljson:"workspace,omitzero,omitempty"`
Lock *TerraformLock `json:"lock,omitzero" temporaljson:"lock,omitzero,omitempty"`
RunnerJobID *string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerJob RunnerJob `json:"runner_job,omitzero" temporaljson:"runner_job,omitzero,omitempty"`
}
func (*TerraformWorkspaceLock) BeforeCreate ΒΆ
func (r *TerraformWorkspaceLock) BeforeCreate(tx *gorm.DB) (err error)
type TerraformWorkspaceState ΒΆ
type TerraformWorkspaceState struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
Contents []byte `json:"contents,omitzero" gorm:"type:bytea" temporaljson:"contents,omitzero,omitempty"`
TerraformWorkspaceID string `json:"terraform_workspace_id,omitzero" temporaljson:"terraform_workspace_id,omitzero,omitempty"`
TerraformWorkspace TerraformWorkspace `json:"terraform_workspace,omitzero" gorm:"-" temporaljson:"terraform_workspace,omitzero,omitempty"`
RunnerJobID *string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerJob RunnerJob `json:"runner_job,omitzero" temporaljson:"runner_job,omitzero,omitempty"`
Revision int `json:"revision,omitzero" gorm:"->;-:migration" temporaljson:"revision,omitzero,omitempty"`
}
func (*TerraformWorkspaceState) BeforeCreate ΒΆ
func (t *TerraformWorkspaceState) BeforeCreate(tx *gorm.DB) (err error)
func (*TerraformWorkspaceState) Indexes ΒΆ
func (t *TerraformWorkspaceState) Indexes(db *gorm.DB) []migrations.Index
func (*TerraformWorkspaceState) UseView ΒΆ
func (i *TerraformWorkspaceState) UseView() bool
func (*TerraformWorkspaceState) ViewVersion ΒΆ
func (i *TerraformWorkspaceState) ViewVersion() string
func (*TerraformWorkspaceState) Views ΒΆ
func (i *TerraformWorkspaceState) Views(db *gorm.DB) []migrations.View
type TerraformWorkspaceStateJSON ΒΆ
type TerraformWorkspaceStateJSON struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
Contents []byte `json:"contents,omitzero" gorm:"type:bytea" temporaljson:"contents,omitzero,omitempty"`
OrgID string `json:"org_id,omitzero" gorm:"default:null" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" temporaljson:"org,omitzero,omitempty"`
// Foreign key to TerraformWorkspace with unique constraint to prevent conflicting states for a workspace
WorkspaceID string `` /* 139-byte string literal not displayed */
Workspace TerraformWorkspace `json:"-" temporaljson:"workspace,omitzero,omitempty"`
RunnerJobID *string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerJob RunnerJob `json:"runner_job,omitzero" temporaljson:"runner_job,omitzero,omitempty"`
}
func (*TerraformWorkspaceStateJSON) BeforeCreate ΒΆ
func (t *TerraformWorkspaceStateJSON) BeforeCreate(tx *gorm.DB) (err error)
func (*TerraformWorkspaceStateJSON) Indexes ΒΆ
func (a *TerraformWorkspaceStateJSON) Indexes(db *gorm.DB) []migrations.Index
type Token ΒΆ
type Token struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
AccountID string `json:"account_id,omitzero" temporaljson:"account_id,omitzero,omitempty"`
Token string `gorm:"unique" json:"-" temporaljson:"token,omitzero,omitempty"`
TokenType TokenType `json:"token_type,omitzero" temporaljson:"token_type,omitzero,omitempty"`
// claim data
ExpiresAt time.Time `json:"expires_at,omitzero" gorm:"notnull" temporaljson:"expires_at,omitzero,omitempty"`
IssuedAt time.Time `json:"issued_at,omitzero" gorm:"notnull" temporaljson:"issued_at,omitzero,omitempty"`
Issuer string `json:"issuer,omitzero" gorm:"notnull;default null" temporaljson:"issuer,omitzero,omitempty"`
}
type UserJourney ΒΆ
type UserJourney struct {
Name string `json:"name" gorm:"column:name"`
Title string `json:"title" gorm:"column:title"`
Steps []UserJourneyStep `json:"steps" gorm:"column:steps;type:jsonb"`
}
type UserJourneyStep ΒΆ
type UserJourneyStep struct {
Name string `json:"name" gorm:"column:name"`
Title string `json:"title" gorm:"column:title"`
Complete bool `json:"complete" gorm:"column:complete;default:false"`
// Top-level completion tracking fields
CompletedAt *time.Time `json:"completed_at,omitempty" gorm:"column:completed_at"`
CompletionMethod string `json:"completion_method,omitempty" gorm:"column:completion_method"`
CompletionSource string `json:"completion_source,omitempty" gorm:"column:completion_source"`
// Flexible metadata for business data
Metadata map[string]interface{} `json:"metadata,omitempty" gorm:"column:metadata;type:jsonb"`
}
type UserJourneys ΒΆ
type UserJourneys []UserJourney
UserJourneys represents a slice of UserJourney that can be stored in JSONB
func (UserJourneys) GormDataType ΒΆ
func (UserJourneys) GormDataType() string
func (*UserJourneys) Scan ΒΆ
func (uj *UserJourneys) Scan(v interface{}) (err error)
Scan implements the database/sql.Scanner interface.
type VCSConnection ΒΆ
type VCSConnection struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OrgID string `` /* 126-byte string literal not displayed */
Org Org `swaggerignore:"true" json:"-" temporaljson:"org,omitzero,omitempty"`
GithubInstallID string `` /* 127-byte string literal not displayed */
GithubAccountID string `json:"github_account_id,omitempty" gorm:"not null;default:''" temporaljson:"github_account_id,omitzero,omitempty"`
GithubAccountName string `json:"github_account_name,omitempty" gorm:"not null;default:''" temporaljson:"github_account_name,omitzero,omitempty"`
Commits []VCSConnectionCommit `json:"vcs_connection_commit,omitzero" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"commits,omitzero,omitempty"`
ConnectedGithubVCSConfigs []ConnectedGithubVCSConfig `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"connected_github_vcs_configs,omitzero,omitempty"`
}
func (*VCSConnection) BeforeCreate ΒΆ
func (v *VCSConnection) BeforeCreate(tx *gorm.DB) error
func (*VCSConnection) Indexes ΒΆ
func (v *VCSConnection) Indexes(db *gorm.DB) []migrations.Index
type VCSConnectionCommit ΒΆ
type VCSConnectionCommit struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
VCSConnection VCSConnection `json:"-" temporaljson:"vcs_connection,omitzero,omitempty"`
VCSConnectionID string `json:"vcs_connection_id,omitzero" gorm:"notnull" temporaljson:"vcs_connection_id,omitzero,omitempty"`
ComponentBuilds []ComponentBuild `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"component_builds,omitzero,omitempty"`
SHA string `json:"sha,omitzero" gorm:"notnull" temporaljson:"sha,omitzero,omitempty"`
AuthorName string `json:"author_name,omitzero" temporaljson:"author_name,omitzero,omitempty"`
AuthorEmail string `json:"author_email,omitzero" temporaljson:"author_email,omitzero,omitempty"`
Message string `json:"message,omitzero" temporaljson:"message,omitzero,omitempty"`
}
func (*VCSConnectionCommit) BeforeCreate ΒΆ
func (v *VCSConnectionCommit) BeforeCreate(tx *gorm.DB) error
func (*VCSConnectionCommit) Indexes ΒΆ
func (v *VCSConnectionCommit) Indexes(db *gorm.DB) []migrations.Index
type VCSConnectionType ΒΆ
type VCSConnectionType string
const ( VCSConnectionTypeConnectedRepo VCSConnectionType = "connected_repo" VCSConnectionTypePublicRepo VCSConnectionType = "public_repo" VCSConnectionTypeNone VCSConnectionType = "none" )
type Waitlist ΒΆ
type Waitlist struct {
ID string `gorm:"primarykey;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
OrgName string `json:"org_name,omitzero" gorm:"not null;default:null" temporaljson:"org_name,omitzero,omitempty"`
}
type Workflow ΒΆ
type Workflow struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"created_by" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index:idx_app_install_name,unique" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
OwnerID string `` /* 126-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;" temporaljson:"owner_type,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
Type WorkflowType `json:"type,omitzero" gorm:"not null;default null" temporaljson:"type,omitzero,omitempty"`
Metadata pgtype.Hstore `json:"metadata,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"metadata,omitzero,omitempty"`
Status CompositeStatus `json:"status,omitzero" temporaljson:"status,omitzero,omitempty"`
// DEPRECATED: for now we always abort on step errors
StepErrorBehavior StepErrorBehavior `json:"step_error_behavior,omitzero" temporaljson:"step_error_behavior,omitzero,omitempty" swaggertype:"string"`
ApprovalOption InstallApprovalOption `json:"approval_option,omitzero" gorm:"default 'auto'" temporaljson:"approval_option,omitzero,omitempty"`
PlanOnly bool `json:"plan_only"`
StartedAt time.Time `json:"started_at,omitzero" gorm:"default:null" temporaljson:"started_at,omitzero,omitempty"`
FinishedAt time.Time `json:"finished_at,omitzero" gorm:"default:null" temporaljson:"finished_at,omitzero,omitempty"`
Finished bool `json:"finished,omitzero" gorm:"-" temporaljson:"finished,omitzero,omitempty"`
// steps represent each piece of the workflow
Steps []WorkflowStep `` /* 126-byte string literal not displayed */
Name string `json:"name,omitzero" gorm:"-" temporaljson:"name,omitzero,omitempty"`
ExecutionTime time.Duration `json:"execution_time,omitzero" gorm:"-" swaggertype:"primitive,integer" temporaljson:"execution_time,omitzero,omitempty"`
InstallSandboxRuns []InstallSandboxRun `` /* 156-byte string literal not displayed */
InstallDeploys []InstallDeploy `` /* 146-byte string literal not displayed */
InstallActionWorkflowRuns []InstallActionWorkflowRun `` /* 163-byte string literal not displayed */
Links map[string]any `json:"links,omitzero,omitempty" temporaljson:"-" gorm:"-"`
}
TODO(jm): make install workflows a top level concept called a "workflow", and they belong to either an app or an install.
We start with this to make it easier to iterate on them, for now.
type WorkflowMetadataKey ΒΆ
type WorkflowMetadataKey string
type WorkflowStep ΒΆ
type WorkflowStep struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"created_by" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
OwnerID string `` /* 174-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;" temporaljson:"owner_type,omitzero,omitempty"`
// DEPRECATED: this is the install workflow ID, which is now the workflow ID.
InstallWorkflowID string `json:"install_workflow_id,omitzero" temporaljson:"install_workflow_id,omitzero,omitempty"`
Status CompositeStatus `json:"status,omitzero" temporaljson:"status,omitzero,omitempty"`
Name string `json:"name,omitzero" temporaljson:"name,omitzero,omitempty"`
// the signal that needs to be called
Signal Signal `json:"-" temporaljson:"signal,omitzero,omitempty"`
Idx int `json:"idx,omitzero" temporaljson:"idx,omitzero,omitempty"`
// to group steps which belong to same logical group, eg, plan/apply
GroupIdx int `json:"group_idx,omitzero" temporaljson:"group_idx,omitzero,omitempty"`
// counter for every retry attempted on a group
GroupRetryIdx int `json:"group_retry_idx" gorm:"default:0" temporaljson:"group_retry_idx,omitzero,omitempty"`
ExecutionType WorkflowStepExecutionType `json:"execution_type,omitzero" temporaljson:"execution_type"`
// the following fields are set _once_ a step is in flight, and are orchestrated via the step's signal.
//
// this is a polymorphic gorm relationship to one of the following objects:
//
// install_cloudformation_stack
// install_sandbox_run
// install_runner_update
// install_deploy
// install_action_workflow_run (can be many of these)
StepTargetID string `` /* 138-byte string literal not displayed */
StepTargetType string `json:"step_target_type,omitzero" gorm:"type:text;" temporaljson:"step_target_type,omitzero,omitempty"`
Metadata pgtype.Hstore `json:"metadata,omitzero" gorm:"type:hstore" swaggertype:"object,string" temporaljson:"metadata,omitzero,omitempty"`
StartedAt time.Time `json:"started_at,omitzero" gorm:"default:null" temporaljson:"started_at,omitzero,omitempty"`
FinishedAt time.Time `json:"finished_at,omitzero" gorm:"default:null" temporaljson:"finished_at,omitzero,omitempty"`
Finished bool `json:"finished,omitzero" gorm:"-" temporaljson:"finished,omitzero,omitempty"`
Approval *WorkflowStepApproval `gorm:"foreignKey:InstallWorkflowStepID" json:"approval,omitzero" temporaljson:"approval,omitzero,omitempty"`
PolicyValidation *WorkflowStepPolicyValidation `gorm:"foreignKey:InstallWorkflowStepID" json:"policy_validation,omitzero" temporaljson:"policy_validation,omitzero,omitempty"`
ExecutionTime time.Duration `json:"execution_time,omitzero" gorm:"-" swaggertype:"primitive,integer" temporaljson:"execution_time,omitzero,omitempty"`
Links map[string]any `json:"links,omitzero,omitempty" temporaljson:"-" gorm:"-"`
Retryable bool `json:"retryable,omitzero" gorm:"default:false" temporaljson:"retryable,omitzero,omitempty"`
Skippable bool `json:"skippable,omitzero" gorm:"default:false" temporaljson:"skippable,omitzero,omitempty"`
Retried bool `json:"retried,omitzero" gorm:"default:false" temporaljson:"retried,omitzero,omitempty"`
// Fields that are de-nested at read time using AfterQuery
WorkflowID string `json:"workflow_id,omitzero" gorm:"-" temporaljson:"workflow_id,omitzero,omitempty"`
}
func (*WorkflowStep) AfterQuery ΒΆ
func (r *WorkflowStep) AfterQuery(tx *gorm.DB) error
func (*WorkflowStep) BeforeCreate ΒΆ
func (a *WorkflowStep) BeforeCreate(tx *gorm.DB) error
func (*WorkflowStep) BeforeSave ΒΆ
func (i *WorkflowStep) BeforeSave(tx *gorm.DB) error
func (*WorkflowStep) Indexes ΒΆ
func (i *WorkflowStep) Indexes(db *gorm.DB) []migrations.Index
func (*WorkflowStep) TableName ΒΆ
func (i *WorkflowStep) TableName() string
type WorkflowStepApproval ΒΆ
type WorkflowStepApproval struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index:idx_app_install_name,unique" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// the step that this approval belongs too
InstallWorkflowStepID string `gorm:"install_workflow_step_id,notnull" temporaljson:"install_workflow_step_id,omitzero,omitempty"`
InstallWorkflowStep WorkflowStep `temporaljson:"install_workflow_step,omitzero,omitempty"`
// the runner job where this approval was created
RunnerJobID *string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
RunnerJob *RunnerJob `json:"runner_job,omitzero" temporaljson:"runner_job,omitzero,omitempty"`
OwnerID string `` /* 168-byte string literal not displayed */
OwnerType string `json:"owner_type,omitzero" gorm:"type:text;" temporaljson:"owner_type,omitzero,omitempty"`
Contents string `json:"-" temporaljson:"-"`
Type WorkflowStepApprovalType `json:"type"`
Response *WorkflowStepApprovalResponse `` /* 143-byte string literal not displayed */
// afterquery
WorkflowStepID string `json:"workflow_step_id,omitzero" gorm:"-" temporaljson:"workflow_step_id,omitzero,omitempty"`
WorkflowStep WorkflowStep `json:"workflow_step,omitzero" gorm:"-" temporaljson:"workflow_step,omitzero,omitempty"`
}
func (*WorkflowStepApproval) AfterQuery ΒΆ
func (c *WorkflowStepApproval) AfterQuery(tx *gorm.DB) error
func (*WorkflowStepApproval) BeforeCreate ΒΆ
func (c *WorkflowStepApproval) BeforeCreate(tx *gorm.DB) error
func (*WorkflowStepApproval) Indexes ΒΆ
func (c *WorkflowStepApproval) Indexes(db *gorm.DB) []migrations.Index
func (*WorkflowStepApproval) TableName ΒΆ
func (c *WorkflowStepApproval) TableName() string
type WorkflowStepApprovalResponse ΒΆ
type WorkflowStepApprovalResponse struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index:idx_app_install_name,unique" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
InstallWorkflowStepApprovalID string `json:"install_workflow_step_approval_id,omitzero" temporaljson:"install_workflow_step_approval_id,omitzero,omitempty"`
InstallWorkflowStepApproval WorkflowStepApproval `json:"-" gorm:"constraint:OnDelete:CASCADE;" temporaljson:"install_workflow_step_approval,omitzero,omitempty"`
// the response type
Type WorkflowStepResponseType `json:"type,omitzero" temporaljson:"type,omitzero,omitempty" swaggertype:"string"`
Note string `json:"note,omitzero" temporaljson:"note,omitzero,omitempty"`
}
func (*WorkflowStepApprovalResponse) AfterQuery ΒΆ
func (c *WorkflowStepApprovalResponse) AfterQuery(tx *gorm.DB) error
func (*WorkflowStepApprovalResponse) BeforeCreate ΒΆ
func (c *WorkflowStepApprovalResponse) BeforeCreate(tx *gorm.DB) error
func (*WorkflowStepApprovalResponse) Indexes ΒΆ
func (c *WorkflowStepApprovalResponse) Indexes(db *gorm.DB) []migrations.Index
func (*WorkflowStepApprovalResponse) TableName ΒΆ
func (c *WorkflowStepApprovalResponse) TableName() string
type WorkflowStepApprovalType ΒΆ
type WorkflowStepApprovalType string
const ( NoopApprovalType WorkflowStepApprovalType = "noop" ApproveAllApprovalType WorkflowStepApprovalType = "approve-all" TerraformPlanApprovalType WorkflowStepApprovalType = "terraform_plan" KubernetesManifestApprovalType WorkflowStepApprovalType = "kubernetes_manifest_approval" HelmApprovalApprovalType WorkflowStepApprovalType = "helm_approval" )
type WorkflowStepExecutionType ΒΆ
type WorkflowStepExecutionType string
const ( WorkflowStepExecutionTypeSystem WorkflowStepExecutionType = "system" WorkflowStepExecutionTypeUser WorkflowStepExecutionType = "user" WorkflowStepExecutionTypeApproval WorkflowStepExecutionType = "approval" WorkflowStepExecutionTypeSkipped WorkflowStepExecutionType = "skipped" WorkflowStepExecutionTypeHidden WorkflowStepExecutionType = "hidden" )
type WorkflowStepPolicyValidation ΒΆ
type WorkflowStepPolicyValidation struct {
ID string `gorm:"primary_key;check:id_checker,char_length(id)=26" json:"id,omitzero" temporaljson:"id,omitzero,omitempty"`
CreatedByID string `json:"created_by_id,omitzero" gorm:"not null;default:null" temporaljson:"created_by_id,omitzero,omitempty"`
CreatedBy Account `gorm:"foreignKey:CreatedByID;references:ID" json:"-" temporaljson:"created_by,omitzero,omitempty"`
CreatedAt time.Time `json:"created_at,omitzero" gorm:"notnull" temporaljson:"created_at,omitzero,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitzero" gorm:"notnull" temporaljson:"updated_at,omitzero,omitempty"`
DeletedAt soft_delete.DeletedAt `gorm:"index:idx_app_install_name,unique" json:"-" temporaljson:"deleted_at,omitzero,omitempty"`
// used for RLS
OrgID string `json:"org_id,omitzero" gorm:"notnull" swaggerignore:"true" temporaljson:"org_id,omitzero,omitempty"`
Org Org `gorm:"foreignKey:OrgID;references:ID" json:"-" faker:"-" temporaljson:"org,omitzero,omitempty"`
// runnerJobID is the runner job that this was performed within
RunnerJobID string `json:"runner_job_id,omitzero" temporaljson:"runner_job_id,omitzero,omitempty"`
// install workflow step is the install step that this was performed within
InstallWorkflowStepID string `json:"install_workflow_step_id,omitzero" temporaljson:"install_workflow_step_id,omitzero,omitempty"`
// status denotes whether this passed, or whether it failed the job.
Status CompositeStatus `json:"status,omitzero" temporaljson:"status,omitzero,omitempty"`
// response is the kyverno response (deprecated: use Reports for detailed results)
Response string `json:"response,omitzero" gorm:"jsonb" temporaljson:"response,omitzero,omitempty"`
}
func (*WorkflowStepPolicyValidation) BeforeCreate ΒΆ added in v0.19.771
func (v *WorkflowStepPolicyValidation) BeforeCreate(tx *gorm.DB) error
func (*WorkflowStepPolicyValidation) Indexes ΒΆ
func (v *WorkflowStepPolicyValidation) Indexes(db *gorm.DB) []migrations.Index
func (*WorkflowStepPolicyValidation) TableName ΒΆ
func (v *WorkflowStepPolicyValidation) TableName() string
type WorkflowStepResponseType ΒΆ
type WorkflowStepResponseType string
const ( WorkflowStepApprovalResponseTypeDeny WorkflowStepResponseType = "deny" WorkflowStepApprovalResponseTypeApprove WorkflowStepResponseType = "approve" WorkflowStepApprovalResponseTypeSkipCurrent WorkflowStepResponseType = "deny-skip-current" WorkflowStepApprovalResponseTypeSkipCurrentAndDependents WorkflowStepResponseType = "deny-skip-current-and-dependents" WorkflowStepApprovalResponseTypeRetryPlan WorkflowStepResponseType = "retry" // auto approve is when the workflow uses auto-approve WorkflowStepApprovalResponseTypeAutoApprove WorkflowStepResponseType = "auto-approve" )
type WorkflowStepTargetType ΒΆ
type WorkflowStepTargetType string
const ( WorkflowStepTargetTypeInstallCloudformationStack WorkflowStepTargetType = "install_cloudformation_stack" WorkflowStepTargetTypeInstallSandboxRun WorkflowStepTargetType = "install_sandbox_run" WorkflowStepTargetTypeInstallRunnerUpdate WorkflowStepTargetType = "install_runner_update" WorkflowStepTargetTypeInstallDeploy WorkflowStepTargetType = "install_deploy" WorkflowStepTargetTypeInstallActionWorkflowRun WorkflowStepTargetType = "install_action_workflow_run" WorkflowStepTargetTypeInstallDeploys WorkflowStepTargetType = "install_deploys" WorkflowStepTargetTypeInstallSandboxRuns WorkflowStepTargetType = "install_sandbox_runs" WorkflowStepTargetTypeInstallActionWorkflowRuns WorkflowStepTargetType = "install_action_workflow_runs" WorkflowStepTargetTypeInstallStackVersions WorkflowStepTargetType = "install_stack_versions" WorkflowStepTargetTypeInstallStates WorkflowStepTargetType = "install_states" WorkflowStepTargetTypeRunners WorkflowStepTargetType = "runners" )
install_cloudformation_stack install_sandbox_run install_runner_update install_deploy install_action_workflow_run (can be many of these)
type WorkflowType ΒΆ
type WorkflowType string
const ( WorkflowTypeProvision WorkflowType = "provision" WorkflowTypeDeprovision WorkflowType = "deprovision" WorkflowTypeDeprovisionSandbox WorkflowType = "deprovision_sandbox" // day-2 triggers WorkflowTypeManualDeploy WorkflowType = "manual_deploy" WorkflowTypeInputUpdate WorkflowType = "input_update" WorkflowTypeDeployComponents WorkflowType = "deploy_components" WorkflowTypeTeardownComponent WorkflowType = "teardown_component" WorkflowTypeTeardownComponents WorkflowType = "teardown_components" WorkflowTypeReprovisionSandbox WorkflowType = "reprovision_sandbox" WorkflowTypeDriftRunReprovisionSandbox WorkflowType = "drift_run_reprovision_sandbox" WorkflowTypeActionWorkflowRun WorkflowType = "action_workflow_run" WorkflowTypeSyncSecrets WorkflowType = "sync_secrets" WorkflowTypeDriftRun WorkflowType = "drift_run" // app branches workflows WorkflowTypeAppBranchesManualUpdate WorkflowType = "app_branches_manual_update" WorkflowTypeAppBranchesConfigRepoUpdate WorkflowType = "app_branches_config_repo_update" WorkflowTypeAppBranchesComponentRepoUpdate WorkflowType = "app_branches_component_repo_update" // reprovision everything WorkflowTypeReprovision WorkflowType = "reprovision" )
func (WorkflowType) Description ΒΆ
func (i WorkflowType) Description() string
func (WorkflowType) Name ΒΆ
func (i WorkflowType) Name() string
func (WorkflowType) PastTenseName ΒΆ
func (i WorkflowType) PastTenseName() string
Source Files
ΒΆ
- account.go
- account_identity.go
- account_role.go
- action_workflow.go
- action_workflow_config.go
- action_workflow_step_config.go
- action_workflow_trigger_config.go
- app.go
- app_aws_iam_policy_config.go
- app_aws_iam_role_config.go
- app_branch.go
- app_break_glass_config.go
- app_config.go
- app_input.go
- app_input_config.go
- app_input_group.go
- app_permissions_config.go
- app_policies_config.go
- app_policy_config.go
- app_repository.go
- app_runner_config.go
- app_sandbox_config.go
- app_secret.go
- app_secret_config.go
- app_secrets_config.go
- app_stack_config.go
- aws_account.go
- aws_ecr_image_config.go
- azure_account.go
- ch_table_size.go
- cloud_platform.go
- component.go
- component_build.go
- component_config_connection.go
- component_config_dependency.go
- component_dependency.go
- component_release.go
- component_release_step.go
- connected_github_vcs_config.go
- device_code.go
- docker_build_component_config.go
- drifted_object.go
- endpoint_audit.go
- event.go
- external_image_component_config.go
- helm_chart.go
- helm_component_config.go
- helm_release.go
- helper.go
- helpers.go
- identity_provider.go
- install.go
- install_action_workflow.go
- install_action_workflow_manual_trigger.go
- install_action_workflow_run.go
- install_action_workflow_run_step.go
- install_audit_logs.go
- install_component.go
- install_config.go
- install_deploy.go
- install_event.go
- install_inputs.go
- install_intermediate_data.go
- install_sandbox.go
- install_sandbox_run.go
- install_stack.go
- install_stack_outputs.go
- install_stack_version.go
- install_stack_version_run.go
- install_state.go
- installer.go
- installer_app.go
- installer_metadata.go
- job_component_config.go
- kubernetes_manifest_component_config.go
- log_stream.go
- notifications_config.go
- oci_artifact.go
- org.go
- org_invite.go
- otel_log_record.go
- otel_metric_exponential_histogram.go
- otel_metric_gauge.go
- otel_metric_histogram.go
- otel_metric_sum.go
- otel_metric_summary.go
- otel_trace.go
- policy.go
- policy_report.go
- public_git_vcs_config.go
- queue.go
- queue_signal.go
- role.go
- runner.go
- runner_group.go
- runner_group_settings.go
- runner_health_check.go
- runner_heart_beat.go
- runner_job.go
- runner_job_execution.go
- runner_job_execution_outputs.go
- runner_job_execution_result.go
- runner_job_plan.go
- runner_operation.go
- runner_process.go
- signal.go
- status.go
- table_sizes.go
- temporal_payload.go
- terraform_module_component_config.go
- terraform_state_lock.go
- terraform_workspace.go
- terraform_workspace_lock.go
- terraform_workspace_state.go
- terraform_workspace_state_json.go
- timeouts.go
- token.go
- user_journey.go
- vcs_connection.go
- vcs_connection_commit.go
- waitlist.go
- workflow.go
- workflow_step.go
- workflow_step_approval.go
- workflow_step_approval_response.go
- workflow_step_policy_validation.go
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
accounts
|
|
|
actions
|
|
|
admin-dashboard
|
|
|
components/icon
templui component icon - version: v1.3.0 installed by templui v1.3.0 π Documentation: https://templui.io/docs/components/icon
|
templui component icon - version: v1.3.0 installed by templui v1.3.0 π Documentation: https://templui.io/docs/components/icon |
|
components/search
templ: version: v0.3.977
|
templ: version: v0.3.977 |
|
service/views
templ: version: v0.3.977
|
templ: version: v0.3.977 |
|
utils
templui util templui.go - version: v1.3.0 installed by templui v1.3.0
|
templui util templui.go - version: v1.3.0 installed by templui v1.3.0 |
|
app-branches
|
|
|
apps
|
|
|
auth
|
|
|
components
|
|
|
general
|
|
|
identity-providers
|
|
|
installs
|
|
|
orgs
|
|
|
policy_reports
|
|
|
releases
|
|
|
runner-auth
|
|
|
runners
|
|
|
vcs
|
|