Documentation ¶
Index ¶
- Constants
- Variables
- type BackupAccount
- type CisTask
- type CisTaskWithResult
- type Cluster
- func (c *Cluster) BeforeCreate() error
- func (c Cluster) BeforeDelete() error
- func (c Cluster) DeleteClusterAbout()
- func (c Cluster) GetKobeVars() map[string]string
- func (c Cluster) ParseInventory() *api.Inventory
- func (c Cluster) PrepareComponent(ingressType, ingressVersion, dnsCache, supportGpu string) []ClusterSpecComponent
- func (c Cluster) PrepareTools() []ClusterTool
- type ClusterBackupFile
- type ClusterBackupStrategy
- type ClusterManifest
- type ClusterMember
- type ClusterMultiClusterRepository
- type ClusterNode
- type ClusterResource
- type ClusterSecret
- type ClusterSpecComponent
- type ClusterSpecConf
- type ClusterSpecNetwork
- type ClusterSpecRuntime
- type ClusterStorageProvisioner
- type ClusterTool
- type ClusterToolDetail
- type ClusterVelero
- type ComponentDic
- type Credential
- type Demo
- type Host
- type Ip
- type IpPool
- type KubepiBind
- type License
- type Msg
- type MsgAccount
- type MsgConfig
- type MsgSetting
- type MsgSubscribe
- type MsgSubscribeUser
- type MultiClusterRepository
- type MultiClusterSyncClusterLog
- type MultiClusterSyncClusterResourceLog
- type MultiClusterSyncLog
- type NtpServer
- type Plan
- type PlanZones
- type Project
- type ProjectMember
- type ProjectResource
- type ReceiveSetting
- type Region
- type Registry
- type StorageProvisionerDic
- type SystemLog
- type SystemRegistry
- type SystemSetting
- type TaskLog
- type TaskLogDetail
- type TaskRetryLog
- type TemplateConfig
- type Theme
- type Token
- type User
- type UserMsg
- type UserSetting
- type VersionHelp
- type VmConfig
- type Volume
- type Zone
Constants ¶
View Source
const ( Disconnect string = "DisConnect" SshError string = "SshError" )
View Source
const ( EN string = "en-US" ZH string = "zh-CN" )
Variables ¶
View Source
var ( DefaultProjectCanNotDelete = "DEFAULT_PROJECT_CAN_NOT_DELETE" ProjectHasClusterError = "PROJECT_HAS_CLUSTER" )
View Source
var ( AdminCanNotDelete = "ADMIN_CAN_NOT_DELETE" LdapCanNotUpdate = "LDAP_CAN_NOT_UPDATE" )
View Source
var (
DefaultCredentialCanNotDelete = "DEFAULT_CREDENTIAL_CAN_NOT_DELETE"
)
View Source
var (
DeleteBackupAccountFailedByProject = "DELETE_BACKUP_ACCOUNT_FAILED_BY_PROJECT"
)
View Source
var (
DeleteFailedByProject = "DELETE_FAILED_BY_PROJECT"
)
View Source
var (
DeleteZoneError = "DELETE_ZONE_FAILED_RESOURCE"
)
Functions ¶
This section is empty.
Types ¶
type BackupAccount ¶
type BackupAccount struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(256)"` Bucket string `json:"bucket" gorm:"type:varchar(256)"` Credential string `json:"credential" gorm:"type:text(65535)"` Type string `json:"type" gorm:"type:varchar(64)"` Status string `json:"status" gorm:"type:varchar(64)"` }
func (*BackupAccount) BeforeCreate ¶
func (b *BackupAccount) BeforeCreate() (err error)
func (*BackupAccount) BeforeDelete ¶
func (b *BackupAccount) BeforeDelete() (err error)
type CisTask ¶
type CisTask struct { common.BaseModel ID string `json:"id"` ClusterID string `json:"clusterId"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Policy string `json:"policy"` Message string `json:"message" gorm:"type:text(65535)"` //Results []CisTaskResult `json:"results"` Status string `json:"status"` TotalPass int `json:"totalPass"` TotalFail int `json:"totalFail"` TotalWarn int `json:"totalWarn"` TotalInfo int `json:"totalInfo"` }
func (*CisTask) BeforeCreate ¶
func (*CisTask) BeforeDelete ¶
type CisTaskWithResult ¶
func (CisTaskWithResult) TableName ¶
func (CisTaskWithResult) TableName() string
type Cluster ¶
type Cluster struct { common.BaseModel ID string `json:"-"` Name string `json:"name" gorm:"not null;unique"` NodeNameRule string `json:"nodeNameRule"` Source string `json:"source"` Version string `json:"version"` UpgradeVersion string `json:"upgradeVersion"` Provider string `json:"provider"` Architectures string `json:"architectures"` Status string `json:"status"` Message string `json:"message" gorm:"type:text(65535)"` CurrentTaskID string `json:"currentTaskID"` SecretID string `json:"-"` PlanID string `json:"-"` ProjectID string `json:"projectID"` Dirty bool `json:"dirty"` Plan Plan `json:"-"` SpecConf ClusterSpecConf `gorm:"save_associations:false" json:"specConf"` SpecRuntime ClusterSpecRuntime `gorm:"save_associations:false" json:"specRuntime"` SpecNetwork ClusterSpecNetwork `gorm:"save_associations:false" json:"specNetwork"` SpecComponent []ClusterSpecComponent `gorm:"save_associations:false" json:"specComponent"` TaskLog TaskLog `gorm:"save_associations:false" json:"taskLog"` Secret ClusterSecret `gorm:"save_associations:false" json:"-"` Nodes []ClusterNode `gorm:"save_associations:false" json:"-"` Tools []ClusterTool `gorm:"save_associations:false" json:"-"` MultiClusterRepositories []MultiClusterRepository `gorm:"many2many:cluster_multi_cluster_repository"` }
func (*Cluster) BeforeCreate ¶
func (Cluster) BeforeDelete ¶
func (Cluster) DeleteClusterAbout ¶
func (c Cluster) DeleteClusterAbout()
func (Cluster) GetKobeVars ¶
func (Cluster) ParseInventory ¶
func (Cluster) PrepareComponent ¶
func (c Cluster) PrepareComponent(ingressType, ingressVersion, dnsCache, supportGpu string) []ClusterSpecComponent
func (Cluster) PrepareTools ¶
func (c Cluster) PrepareTools() []ClusterTool
type ClusterBackupFile ¶
type ClusterBackupFile struct { common.BaseModel ID string `json:"id"` Name string `json:"name"` ClusterID string `json:"clusterId"` ClusterBackupStrategyID string `json:"clusterBackupStrategyId"` Folder string `json:"folder"` ClusterBackupStrategy ClusterBackupStrategy `json:"-"` CLuster Cluster `json:"-"` }
func (*ClusterBackupFile) BeforeCreate ¶
func (c *ClusterBackupFile) BeforeCreate() error
type ClusterBackupStrategy ¶
type ClusterBackupStrategy struct { common.BaseModel ID string `json:"id"` Cron int `json:"cron"` SaveNum int `json:"saveNum"` BackupAccountID string `json:"backupAccountId"` ClusterID string `json:"clusterId"` Status string `json:"status"` BackupAccount BackupAccount `json:"-" gorm:"save_associations:false"` }
func (*ClusterBackupStrategy) BeforeCreate ¶
func (c *ClusterBackupStrategy) BeforeCreate() error
type ClusterManifest ¶
type ClusterManifest struct { common.BaseModel ID string `json:"-"` Name string `json:"name"` Version string `json:"version"` CoreVars string `json:"coreVars"` NetworkVars string `json:"networkVars"` ToolVars string `json:"toolVars"` StorageVars string `json:"storageVars"` OtherVars string `json:"otherVars"` IsActive bool `json:"isActive"` }
func (*ClusterManifest) BeforeCreate ¶
func (m *ClusterManifest) BeforeCreate() (err error)
type ClusterMember ¶
type ClusterMember struct { common.BaseModel ID string `json:"-" gorm:"type:varchar(64)"` ClusterID string `json:"clusterId" gorm:"type:varchar(64)"` UserID string `json:"userId" gorm:"type:varchar(64)"` Role string `json:"role" gorm:"type:varchar(64)"` User User `json:"user" gorm:"save_associations:false"` }
func (*ClusterMember) BeforeCreate ¶
func (c *ClusterMember) BeforeCreate() (err error)
type ClusterMultiClusterRepository ¶
type ClusterMultiClusterRepository struct { common.BaseModel ID string `json:"-"` ClusterID string `json:"clusterId"` MultiClusterRepositoryID string `json:"multiClusterRepositoryId"` Status string `json:"status"` Message string `json:"message"` }
func (*ClusterMultiClusterRepository) BeforeCreate ¶
func (c *ClusterMultiClusterRepository) BeforeCreate() (err error)
type ClusterNode ¶
type ClusterNode struct { common.BaseModel ID string `json:"-"` Name string `json:"name"` HostID string `json:"-"` Host Host `json:"-" gorm:"save_associations:false"` ClusterID string `json:"clusterId"` Role string `json:"role"` Status string `json:"status"` CurrentTaskID string `json:"currentTaskID"` Dirty bool `json:"dirty"` Message string `json:"message"` }
func (*ClusterNode) BeforeCreate ¶
func (n *ClusterNode) BeforeCreate() (err error)
func (ClusterNode) GetRegistry ¶
func (n ClusterNode) GetRegistry(arch string) (*Registry, error)
func (ClusterNode) ToKobeHost ¶
func (n ClusterNode) ToKobeHost(nodeNameRule string, role string) *api.Host
func (ClusterNode) ToSSHConfig ¶
func (n ClusterNode) ToSSHConfig() ssh.Config
type ClusterResource ¶
type ClusterResource struct { common.BaseModel ID string `json:"id"` ResourceType string `json:"resourceType"` ResourceID string `json:"resourceId"` ClusterID string `json:"clusterId"` Cluster Cluster `json:"-"` }
func (*ClusterResource) BeforeCreate ¶
func (c *ClusterResource) BeforeCreate() (err error)
type ClusterSecret ¶
type ClusterSecret struct { ID string KubeadmToken string `gorm:"type:text(65535)" json:"kubeadmToken"` KubernetesToken string `gorm:"type:text(65535)" json:"kubernetesToken"` CertDataStr string `json:"certDataStr" gorm:"type:text(65535)"` KeyDataStr string `json:"keyDataStr" gorm:"type:text(65535)"` ConfigContent string `json:"configContent" gorm:"type:text(65535)"` }
func (*ClusterSecret) BeforeCreate ¶
func (n *ClusterSecret) BeforeCreate() (err error)
type ClusterSpecComponent ¶
type ClusterSpecComponent struct { common.BaseModel ID string `json:"-"` ClusterID string `json:"-"` Name string `json:"name"` Type string `json:"type"` Version string `json:"version"` Describe string `json:"describe"` Vars string `json:"-" gorm:"type:text(65535)"` Status string `json:"status"` Message string `json:"message" gorm:"type:text(65535)"` }
func (*ClusterSpecComponent) BeforeCreate ¶
func (s *ClusterSpecComponent) BeforeCreate() (err error)
type ClusterSpecConf ¶
type ClusterSpecConf struct { common.BaseModel ID string `json:"-"` ClusterID string `json:"-"` YumOperate string `json:"yumOperate"` MaxNodeNum int `json:"maxNodeNum"` WorkerAmount int `json:"workerAmount"` KubeMaxPods int `json:"kubeMaxPods"` KubeNetworkNodePrefix int `json:"kubeNetworkNodePrefix"` KubePodSubnet string `json:"kubePodSubnet"` KubeServiceSubnet string `json:"kubeServiceSubnet"` KubeProxyMode string `json:"kubeProxyMode"` CgroupDriver string `json:"cgroupDriver"` KubeDnsDomain string `json:"kubeDnsDomain"` KubernetesAudit string `json:"kubernetesAudit"` NodeportAddress string `json:"nodeportAddress"` KubeServiceNodePortRange string `json:"kubeServiceNodePortRange"` EtcdDataDir string `json:"etcdDataDir"` EtcdSnapshotCount int `json:"etcdSnapshotCount"` EtcdCompactionRetention int `json:"etcdCompactionRetention"` EtcdMaxRequest int `json:"etcdMaxRequest"` EtcdQuotaBackend int `json:"etcdQuotaBackend"` MasterScheduleType string `json:"masterScheduleType"` LbMode string `json:"lbMode"` LbKubeApiserverIp string `json:"lbKubeApiserverIp"` KubeApiServerPort int `json:"kubeApiServerPort"` KubeRouter string `json:"kubeRouter"` AuthenticationMode string `json:"authenticationMode"` Status string `json:"status"` Message string `json:"message" gorm:"type:text(65535)"` }
func (*ClusterSpecConf) BeforeCreate ¶
func (s *ClusterSpecConf) BeforeCreate() (err error)
type ClusterSpecNetwork ¶
type ClusterSpecNetwork struct { common.BaseModel ID string `json:"-"` ClusterID string `json:"-"` NetworkType string `json:"networkType"` CiliumVersion string `json:"ciliumVersion"` CiliumTunnelMode string `json:"ciliumTunnelMode"` CiliumNativeRoutingCidr string `json:"ciliumNativeRoutingCidr"` FlannelBackend string `json:"flannelBackend"` CalicoIpv4PoolIpip string `json:"calicoIpv4PoolIpip"` NetworkInterface string `json:"networkInterface"` NetworkCidr string `json:"networkCidr"` Status string `json:"status"` Message string `json:"message" gorm:"type:text(65535)"` }
func (*ClusterSpecNetwork) BeforeCreate ¶
func (s *ClusterSpecNetwork) BeforeCreate() (err error)
type ClusterSpecRuntime ¶
type ClusterSpecRuntime struct { common.BaseModel ID string `json:"-"` ClusterID string `json:"-"` RuntimeType string `json:"runtimeType"` DockerMirrorRegistry string `json:"dockerMirrorRegistry"` DockerRemoteApi string `json:"dockerRemoteApi"` DockerStorageDir string `json:"dockerStorageDir"` ContainerdStorageDir string `json:"containerdStorageDir"` DockerSubnet string `json:"dockerSubnet"` HelmVersion string `json:"helmVersion"` Status string `json:"status"` Message string `json:"message" gorm:"type:text(65535)"` }
func (*ClusterSpecRuntime) BeforeCreate ¶
func (s *ClusterSpecRuntime) BeforeCreate() (err error)
type ClusterStorageProvisioner ¶
type ClusterStorageProvisioner struct { common.BaseModel ID string `json:"id"` Type string `json:"type"` Status string `json:"status"` Name string `json:"name" gorm:"not null;unique"` Namespace string `json:"namespace"` Message string `json:"message" gorm:"type:text(65535)"` Vars string `json:"-" gorm:"type:text(65535)"` ClusterID string `json:"clusterId"` }
func (*ClusterStorageProvisioner) BeforeCreate ¶
func (c *ClusterStorageProvisioner) BeforeCreate() (err error)
type ClusterTool ¶
type ClusterTool struct { common.BaseModel ID string `json:"-" gorm:"type:varchar(64)"` Name string `json:"name"` ClusterID string `json:"cluster_id"` Version string `json:"version"` Describe string `json:"describe"` Status string `json:"status"` Message string `json:"message" gorm:"type:text(65535)"` Logo string `json:"logo" ` Vars string `json:"-" gorm:"type:text(65535)"` Frame bool `json:"frame"` Url string `json:"url"` Architecture string `json:"architecture"` HigherVersion string `json:"higher_version"` ProxyType string `json:"proxyType"` }
func (*ClusterTool) BeforeCreate ¶
func (c *ClusterTool) BeforeCreate() (err error)
type ClusterToolDetail ¶
type ClusterToolDetail struct { common.BaseModel ID string `json:"-" gorm:"type:varchar(64)"` Name string `json:"name"` Version string `json:"version"` ChartVersion string `json:"chart_version"` Architecture string `json:"architecture"` Vars string `json:"-" gorm:"type:text(65535)"` }
func (*ClusterToolDetail) BeforeCreate ¶
func (c *ClusterToolDetail) BeforeCreate() (err error)
type ClusterVelero ¶
type ClusterVelero struct { common.BaseModel ID string `json:"id"` Cluster string `json:"cluster"` BackupAccountName string `json:"backupAccountName"` Bucket string `json:"bucket"` Endpoint string `json:"endpoint"` CpuLimit int `json:"cpuLimit"` MemLimit int `json:"memLimit"` CpuRequest int `json:"cpuRequest"` MemRequest int `json:"memRequest"` }
func (*ClusterVelero) BeforeCreate ¶
func (c *ClusterVelero) BeforeCreate() error
type ComponentDic ¶
type Credential ¶
type Credential struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(256);not null;unique"` Username string `json:"username" gorm:"type:varchar(64)"` Password string `json:"password" gorm:"type:varchar(256)"` PrivateKey string `json:"privateKey" gorm:"type: text(0)"` Type string `json:"type" gorm:"type:varchar(64)"` }
func (*Credential) BeforeCreate ¶
func (c *Credential) BeforeCreate() (err error)
func (*Credential) BeforeDelete ¶
func (c *Credential) BeforeDelete() (err error)
type Demo ¶
func (*Demo) BeforeCreate ¶
func (d *Demo) BeforeCreate()
type Host ¶
type Host struct { common.BaseModel ID string `json:"-"` Name string `json:"name" gorm:"type:varchar(256);not null;unique"` Memory int `json:"memory" gorm:"type:int(64)"` CpuCore int `json:"cpuCore" gorm:"type:int(64)"` Os string `json:"os" gorm:"type:varchar(64)"` OsVersion string `json:"osVersion" gorm:"type:varchar(64)"` GpuNum int `json:"gpuNum" gorm:"type:int(64)"` GpuInfo string `json:"gpuInfo" gorm:"type:varchar(128)"` Ip string `json:"ip" gorm:"type:varchar(128);not null;unique"` FlexIp string `json:"flexIp" gorm:"type:varchar(128);unique"` HasGpu bool `json:"hasGpu" gorm:"type:boolean;default:false"` Port int `json:"port" gorm:"type:varchar(64)"` CredentialID string `json:"credentialId" gorm:"type:varchar(64)"` ClusterID string `json:"clusterId" gorm:"type:varchar(64)"` ZoneID string `json:"zoneId" gorm:"type:varchar(64)"` Zone Zone `json:"-" gorm:"save_associations:false" ` Volumes []Volume `json:"volumes" gorm:"save_associations:false"` Credential Credential `json:"-" gorm:"save_associations:false" ` Cluster Cluster `json:"-" gorm:"save_associations:false" ` Status string `json:"status" gorm:"type:varchar(64)"` Message string `json:"message" gorm:"type:text(65535)"` Datastore string `json:"datastore" gorm:"type:varchar(64)"` Architecture string `json:"architecture" gorm:"type:varchar(64)"` }
func (*Host) BeforeCreate ¶
func (*Host) GetHostConfig ¶
type Ip ¶
type Ip struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Address string `json:"address" gorm:"type:varchar(255)"` Gateway string `json:"gateway" gorm:"type:varchar(255)"` DNS1 string `json:"dns1" gorm:"type:varchar(255)"` DNS2 string `json:"dns2" gorm:"type:varchar(255)"` Status string `json:"status" gorm:"type:varchar(255)"` IpPoolID string `json:"ipPoolId" gorm:"type:varchar(64)"` ClusterID string `json:"clusterId" gorm:"type:varchar(64)"` }
func (*Ip) BeforeCreate ¶
type IpPool ¶
type IpPool struct { common.BaseModel ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Subnet string `json:"subnet"` Ips []Ip `json:"ips"` }
func (*IpPool) BeforeCreate ¶
func (*IpPool) BeforeDelete ¶
type KubepiBind ¶
type KubepiBind struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` SourceType string `json:"sourceType" gorm:"type:varchar(64)"` Project string `json:"project" gorm:"type:varchar(64)"` Cluster string `json:"cluster" gorm:"type:varchar(64)"` BindUser string `json:"bindUser" gorm:"type:varchar(64)"` BindPassword string `json:"bindPassword" gorm:"type:varchar(64)"` }
func (*KubepiBind) BeforeCreate ¶
func (k *KubepiBind) BeforeCreate() (err error)
type License ¶
type License struct { common.BaseModel ID string `json:"-"` Content string `json:"-" gorm:"type:text(65535)"` }
func (*License) BeforeCreate ¶
type Msg ¶
type Msg struct { common.BaseModel ID string `json:"-"` Name string `json:"name"` Content string `json:"content"` Type string `json:"type"` Level string `json:"level"` ResourceId string `json:"resourceId"` }
func (*Msg) BeforeCreate ¶
type MsgAccount ¶
type MsgAccount struct { common.BaseModel ID string `json:"-"` Name string `json:"name"` Status string `json:"status"` Config string `json:"config"` }
func (*MsgAccount) BeforeCreate ¶
func (m *MsgAccount) BeforeCreate() error
type MsgSetting ¶
type MsgSetting struct { DingTalk ReceiveSetting `json:"dingTalk"` Email ReceiveSetting `json:"email"` WorkWeiXin ReceiveSetting `json:"workWeiXin"` Local ReceiveSetting `json:"local"` }
type MsgSubscribe ¶
type MsgSubscribe struct { common.BaseModel ID string `json:"id"` Name string `json:"name"` Config string `json:"-"` Type string `json:"type"` ResourceID string `json:"resourceId"` }
func NewMsgSubscribe ¶
func NewMsgSubscribe(name, scope, resourceId string) MsgSubscribe
func (*MsgSubscribe) BeforeCreate ¶
func (m *MsgSubscribe) BeforeCreate() error
type MsgSubscribeUser ¶
type MsgSubscribeUser struct { ID string `json:"id"` SubscribeID string `json:"subscribeId"` UserID string `json:"userId"` }
func (*MsgSubscribeUser) BeforeCreate ¶
func (m *MsgSubscribeUser) BeforeCreate() (err error)
type MultiClusterRepository ¶
type MultiClusterRepository struct { common.BaseModel ID string `json:"-"` Name string `json:"name"` Source string `json:"source"` Username string `json:"username"` Password string `json:"password"` Status string `json:"status"` Message string `json:"message"` Branch string `json:"branch"` LastSyncHead string `json:"lastSyncHead"` LastSyncTime time.Time `json:"lastSyncTime"` SyncInterval int64 `json:"syncInterval"` GitTimeout int64 `json:"gitTimeout"` SyncEnable bool `json:"syncEnable"` SyncStatus string `json:"syncStatus"` }
func (*MultiClusterRepository) AfterDelete ¶
func (m *MultiClusterRepository) AfterDelete() error
func (*MultiClusterRepository) BeforeCreate ¶
func (m *MultiClusterRepository) BeforeCreate() error
func (*MultiClusterRepository) BeforeDelete ¶
func (m *MultiClusterRepository) BeforeDelete() error
func (*MultiClusterRepository) Pull ¶
func (m *MultiClusterRepository) Pull() error
type MultiClusterSyncClusterLog ¶
type MultiClusterSyncClusterLog struct { common.BaseModel ID string `json:"-"` Status string `json:"status"` Message string `json:"message"` MultiClusterSyncLogID string `json:"multiClusterSyncLogId"` ClusterID string `json:"clusterId"` }
func (*MultiClusterSyncClusterLog) BeforeCreate ¶
func (m *MultiClusterSyncClusterLog) BeforeCreate() error
func (*MultiClusterSyncClusterLog) BeforeDelete ¶
func (m *MultiClusterSyncClusterLog) BeforeDelete() error
type MultiClusterSyncClusterResourceLog ¶
type MultiClusterSyncClusterResourceLog struct { common.BaseModel ID string `json:"-"` SourceFile string `json:"sourceFile"` ResourceName string `json:"resourceName"` Status string `json:"status"` Message string `json:"message"` MultiClusterSyncClusterLogID string `json:"multiClusterSyncLogId"` }
func (*MultiClusterSyncClusterResourceLog) BeforeCreate ¶
func (m *MultiClusterSyncClusterResourceLog) BeforeCreate() error
type MultiClusterSyncLog ¶
type MultiClusterSyncLog struct { common.BaseModel ID string `json:"id"` Status string `json:"status"` Message string `json:"message"` GitCommitId string `json:"gitCommitId"` MultiClusterRepositoryID string `json:"multiClusterRepositoryId"` }
func (*MultiClusterSyncLog) BeforeCreate ¶
func (m *MultiClusterSyncLog) BeforeCreate() error
func (*MultiClusterSyncLog) BeforeDelete ¶
func (m *MultiClusterSyncLog) BeforeDelete() error
type NtpServer ¶
type NtpServer struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(256);not null;unique"` Address string `json:"address"` Status string `json:"status"` }
func (*NtpServer) BeforeCreate ¶
type Plan ¶
type Plan struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(64)"` RegionID string `json:"regionId" grom:"type:varchar(64)"` DeployTemplate string `json:"deployTemplate" grom:"type:varchar(64)"` Vars string `json:"vars" gorm:"type text(65535)"` Zones []Zone `json:"-" gorm:"many2many:plan_zones"` Region Region `json:"-"` }
func (*Plan) BeforeCreate ¶
type PlanZones ¶
type PlanZones struct { ID string `json:"id" grom:"type:varchar(64)"` PlanID string `json:"planId" grom:"type:varchar(64)"` ZoneID string `json:"zoneId" grom:"type:varchar(64)"` }
func (*PlanZones) BeforeCreate ¶
type Project ¶
type Project struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(64);not null;unique"` Description string `json:"description" gorm:"type:varchar(128)"` Clusters []Cluster `json:"-"` }
func (*Project) BeforeCreate ¶
func (*Project) BeforeDelete ¶
type ProjectMember ¶
type ProjectMember struct { common.BaseModel ID string `json:"-" gorm:"type:varchar(64)"` ProjectID string `json:"-" gorm:"type:varchar(64)"` UserID string `json:"-" gorm:"type:varchar(64)"` Role string `json:"role" gorm:"type:varchar(64)"` User User `json:"-" gorm:"save_associations:false"` Project Project `json:"-" gorm:"save_associations:false"` }
func (*ProjectMember) BeforeCreate ¶
func (p *ProjectMember) BeforeCreate() (err error)
type ProjectResource ¶
type ProjectResource struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` ResourceType string `json:"resourceType" gorm:"type:varchar(128)" validate:"required"` ResourceID string `json:"resourceId" gorm:"type:varchar(64)" validate:"required"` ProjectID string `json:"projectId" gorm:"type:varchar(64)" validate:"required"` Project Project `json:"-"` }
func (*ProjectResource) BeforeCreate ¶
func (p *ProjectResource) BeforeCreate() (err error)
type ReceiveSetting ¶
type Region ¶
type Region struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(256);not null;unique"` Datacenter string `json:"datacenter" gorm:"type:varchar(64)"` Provider string `json:"provider" gorm:"type:varchar(64)"` Vars string `json:"vars" gorm:"type text(65535)"` }
func (*Region) BeforeCreate ¶
type StorageProvisionerDic ¶
type StorageProvisionerDic struct { common.BaseModel ID string `json:"id"` Name string `json:"name"` Version string `json:"version"` Architecture string `json:"architecture"` Vars string `json:"-" gorm:"type:text(65535)"` }
func (*StorageProvisionerDic) BeforeCreate ¶
func (c *StorageProvisionerDic) BeforeCreate() (err error)
type SystemLog ¶
type SystemLog struct { common.BaseModel ID string `json:"-" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(256);not null;"` Operation string `json:"operation" gorm:"type:varchar(256);not null;"` OperationInfo string `json:"operationInfo" gorm:"type:varchar(256);"` }
func (*SystemLog) BeforeCreate ¶
type SystemRegistry ¶
type SystemRegistry struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Hostname string `json:"hostname" gorm:"type:varchar(256);not null;unique"` Protocol string `json:"protocol" gorm:"type:varchar(256);not null;"` Architecture string `json:"architecture" gorm:"type:varchar(256);not null;"` RepoPort int `json:"repoPort" gorm:"type:int(64)"` RegistryPort int `json:"registryPort" gorm:"type:int(64)"` RegistryHostedPort int `json:"registryHostedPort" gorm:"type:int(64)"` NexusUser string `json:"nexusUser" gorm:"type:varchar(256);not null;"` NexusPassword string `json:"-" gorm:"type:varchar(256);not null;"` }
func (*SystemRegistry) BeforeCreate ¶
func (s *SystemRegistry) BeforeCreate() (err error)
type SystemSetting ¶
type SystemSetting struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Key string `json:"key" gorm:"type:varchar(256);not null;unique"` Value string `json:"value" gorm:"type:varchar(256);not null;"` Tab string `json:"tab"` }
func (*SystemSetting) BeforeCreate ¶
func (s *SystemSetting) BeforeCreate() (err error)
type TaskLog ¶
type TaskLog struct { common.BaseModel ID string `json:"id"` ClusterID string `json:"clusterID"` Type string `json:"type"` Phase string `json:"phase"` Message string `json:"message" gorm:"type:text(65535)"` StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` Details []TaskLogDetail `json:"details"` }
log + details if apply single
func (*TaskLog) BeforeCreate ¶
type TaskLogDetail ¶
type TaskLogDetail struct { common.BaseModel ID string `json:"id"` Name string `json:"name"` Task string `json:"task"` TaskLogID string `json:"taskLogID"` ClusterID string `json:"clusterID"` LastProbeTime int64 `json:"lastProbeTime"` StartTime int64 `json:"startTime"` EndTime int64 `json:"endTime"` Message string `json:"message" gorm:"type:text(65535)"` Status string `json:"status"` }
detail if apply multi
func (*TaskLogDetail) BeforeCreate ¶
func (n *TaskLogDetail) BeforeCreate() (err error)
type TaskRetryLog ¶
type TaskRetryLog struct { common.BaseModel ID string `json:"id"` TaskLogID string `json:"taskLogID"` ClusterID string `json:"clusterID"` LastFailedTime int64 `json:"lastFailedTime"` RestartTime int64 `json:"restartTime"` Message string `json:"message" gorm:"type:text(65535)"` }
func (*TaskRetryLog) BeforeCreate ¶
func (n *TaskRetryLog) BeforeCreate() (err error)
type TemplateConfig ¶
type TemplateConfig struct { common.BaseModel ID string `json:"-" gorm:"type:varchar(64)"` Name string `json:"name"` Type string `json:"type"` Config string `json:"-"` }
func (*TemplateConfig) BeforeCreate ¶
func (t *TemplateConfig) BeforeCreate() (err error)
type Theme ¶
type Theme struct { common.BaseModel ID string `json:"-" gorm:"type:varchar(64)"` SystemName string `json:"systemName"` LoginImage string `json:"loginImage"` Logo string `json:"logo"` LogoWithText string `json:"logoWithText"` Icon string `json:"icon"` LogoAbout string `json:"logoAbout"` }
func (*Theme) BeforeCreate ¶
type User ¶
type User struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` CurrentProjectID string `json:"-" gorm:"type:varchar(64)"` CurrentProject Project `json:"-" gorm:"save_associations:false"` Name string `json:"name" gorm:"type:varchar(256);not null;unique"` Password string `json:"password" gorm:"type:varchar(256)"` Email string `json:"email" gorm:"type:varchar(256);not null;unique"` Language string `json:"language" gorm:"type:varchar(64)"` IsAdmin bool `json:"-" gorm:"type:boolean;default:false"` IsSuper bool `json:"-" gorm:"type:boolean;default:false"` IsActive bool `json:"-" gorm:"type:boolean;default:true"` Type string `json:"type" gorm:"type:varchar(64)"` }
func (*User) AfterCreate ¶
func (*User) BeforeCreate ¶
func (*User) BeforeDelete ¶
type UserMsg ¶
type UserMsg struct { common.BaseModel ID string `json:"id"` Receive string `json:"receive"` UserID string `json:"userId"` MsgID string `json:"msgId"` SendStatus string `json:"sendStatus"` ReadStatus string `json:"readStatus"` SendType string `json:"sendType"` Msg Msg `json:"msg"` }
func (*UserMsg) BeforeCreate ¶
type UserSetting ¶
type UserSetting struct { common.BaseModel ID string `json:"id"` Msg string `json:"-"` UserID string `json:"userId"` }
func NewUserSetting ¶
func NewUserSetting(userId string) UserSetting
func (*UserSetting) BeforeCreate ¶
func (u *UserSetting) BeforeCreate() error
func (*UserSetting) GetMsgSetting ¶
func (u *UserSetting) GetMsgSetting() MsgSetting
type VersionHelp ¶
type VmConfig ¶
type VmConfig struct { common.BaseModel ID string `json:"-"` Name string `json:"name"` Cpu int `json:"cpu"` Memory int `json:"memory"` Disk int `json:"disk"` Provider string `json:"provider"` }
func (*VmConfig) BeforeCreate ¶
func (*VmConfig) BeforeDelete ¶
type Volume ¶
type Volume struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` HostID string `json:"hostId" gorm:"type:varchar(64)"` Size string `json:"size" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(256)"` }
func (*Volume) BeforeCreate ¶
type Zone ¶
type Zone struct { common.BaseModel ID string `json:"id" gorm:"type:varchar(64)"` Name string `json:"name" gorm:"type:varchar(256);not null;unique"` Vars string `json:"vars" gorm:"type: text(65535)"` Status string `json:"status" gorm:"type:varchar(64)"` RegionID string `json:"regionID" gorm:"type:varchar(64)"` CredentialID string `json:"credentialId" gorm:"type:varchar(64)"` IpPoolID string `json:"ipPoolId"` Message string `json:"message"` Region Region `json:"-"` IpPool IpPool `json:"-"` Credential Credential `json:"-"` }
func (*Zone) BeforeCreate ¶
func (*Zone) BeforeDelete ¶
Source Files ¶
- backup_account.go
- cis_task.go
- cluster.go
- cluster_backup_file.go
- cluster_backup_strategy.go
- cluster_manifest.go
- cluster_member.go
- cluster_multi_cluster_repository.go
- cluster_node.go
- cluster_resource.go
- cluster_secret.go
- cluster_spec.go
- cluster_storage_provisioner.go
- cluster_tool.go
- cluster_tool_detail.go
- cluster_velero.go
- component.go
- credential.go
- demo.go
- host.go
- ip.go
- ip_pool.go
- kubepi_bind.go
- license.go
- msg.go
- msg_account.go
- msg_subscribe.go
- msg_subscribe_user.go
- multi_cluster_repository.go
- multi_cluster_sync_cluster_log.go
- multi_cluster_sync_cluster_resource_log.go
- multi_cluster_sync_log.go
- ntp_server.go
- plan.go
- plan_zones.go
- project.go
- project_member.go
- project_resource.go
- region.go
- storage_provisioner_dic.go
- system_log.go
- system_registry.go
- system_setting.go
- task_log.go
- template_config.go
- theme.go
- user.go
- user_msg.go
- user_setting.go
- vm_config.go
- volume.go
- zone.go
Click to show internal directories.
Click to hide internal directories.