Documentation ¶
Index ¶
Constants ¶
View Source
const InstanceTypeSeparator = " "
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterModel ¶
type ClusterModel struct { ID uint `gorm:"primary_key"` UID string `gorm:"unique_index:idx_clusters_uid"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `gorm:"unique_index:idx_clusters_unique_id" sql:"index"` StartedAt *time.Time CreatedBy uint Name string `gorm:"unique_index:idx_clusters_unique_id"` Location string Cloud string Distribution string OrganizationID uint `gorm:"unique_index:idx_clusters_unique_id"` SecretID string ConfigSecretID string SSHSecretID string Status string RbacEnabled bool OidcEnabled bool `gorm:"default:false;not null"` StatusMessage string `sql:"type:text;"` Tags ClusterTags `gorm:"type:json"` }
ClusterModel describes the common cluster model.
func (*ClusterModel) AfterFind ¶
func (m *ClusterModel) AfterFind() error
AfterFind converts Location field(s) to unknown if they are empty.
func (*ClusterModel) BeforeCreate ¶
func (m *ClusterModel) BeforeCreate() (err error)
func (ClusterModel) BeforeDelete ¶
func (m ClusterModel) BeforeDelete(tx *gorm.DB) (err error)
BeforeDelete should not be declared on this model. TODO: please move this to the cluster delete flow this should not have been added here in the first place!!!!!!!
func (ClusterModel) String ¶
func (m ClusterModel) String() string
String method prints formatted cluster fields.
func (ClusterModel) TableName ¶
func (ClusterModel) TableName() string
TableName changes the default table name.
type ClusterTags ¶
func (*ClusterTags) Scan ¶
func (fs *ClusterTags) Scan(src interface{}) error
type StatusHistoryModel ¶
type StatusHistoryModel struct { ID uint `gorm:"primary_key"` ClusterID uint `gorm:"not null;index"` ClusterName string `gorm:"not null"` CreatedAt time.Time `gorm:"not null"` FromStatus string `gorm:"not null"` FromStatusMessage string `sql:"type:text;" gorm:"not null"` ToStatus string `gorm:"not null"` ToStatusMessage string `sql:"type:text;" gorm:"not null"` }
StatusHistoryModel records the status transitions of a cluster and stores it in a database.
func (StatusHistoryModel) TableName ¶
func (StatusHistoryModel) TableName() string
TableName changes the default table name.
Click to show internal directories.
Click to hide internal directories.