Documentation
¶
Index ¶
- func Migrate(db *gorm.DB, logger logrus.FieldLogger) error
- type ClusterModel
- func (cs *ClusterModel) AfterFind() error
- func (cs *ClusterModel) BeforeCreate() (err error)
- func (cs *ClusterModel) Delete() error
- func (cs *ClusterModel) Save() error
- func (cs *ClusterModel) String() string
- func (ClusterModel) TableName() string
- func (cs *ClusterModel) UpdateConfigSecret(configSecretId string) error
- func (cs *ClusterModel) UpdateSshSecret(sshSecretId string) error
- func (cs *ClusterModel) UpdateStatus(status, statusMessage string) error
- type ClusterTags
Constants ¶
This section is empty.
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 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 StatusMessage string `sql:"type:text;"` AKS azureadapter.AKSClusterModel `gorm:"foreignkey:ID"` Kubernetes kubernetesadapter.KubernetesClusterModel `gorm:"foreignkey:ID"` CreatedBy uint Tags ClusterTags `gorm:"type:json"` }
ClusterModel describes the common cluster model Note: this model is being moved to github.com/banzaicloud/pipeline/internal/cluster/clusteradapter.ClusterModel
func (*ClusterModel) AfterFind ¶
func (cs *ClusterModel) AfterFind() error
AfterFind converts metadata json string into map in case of Kubernetes and sets NodeInstanceType and/or Location field(s) to unknown if they are empty
func (*ClusterModel) BeforeCreate ¶
func (cs *ClusterModel) BeforeCreate() (err error)
func (*ClusterModel) String ¶
func (cs *ClusterModel) String() string
String method prints formatted cluster fields
func (ClusterModel) TableName ¶
func (ClusterModel) TableName() string
TableName sets ClusterModel's table name
func (*ClusterModel) UpdateConfigSecret ¶
func (cs *ClusterModel) UpdateConfigSecret(configSecretId string) error
UpdateConfigSecret updates the model's config secret id in database
func (*ClusterModel) UpdateSshSecret ¶
func (cs *ClusterModel) UpdateSshSecret(sshSecretId string) error
UpdateSshSecret updates the model's ssh secret id in database
func (*ClusterModel) UpdateStatus ¶
func (cs *ClusterModel) UpdateStatus(status, statusMessage string) error
UpdateStatus updates the model's status and status message in database
type ClusterTags ¶
func (*ClusterTags) Scan ¶
func (fs *ClusterTags) Scan(src interface{}) error
Click to show internal directories.
Click to hide internal directories.