Documentation ¶
Index ¶
- Constants
- func AfterEnvironmentCreateOrUpdate(tx *gorm.DB, obj client.Object) error
- func AfterEnvironmentDelete(tx *gorm.DB, obj client.Object) error
- func AfterProjectDelete(tx *gorm.DB, obj client.Object) error
- func AfterRegistryCreateOrUpdate(tx *gorm.DB, obj client.Object) error
- func AfterRegistryDelete(tx *gorm.DB, obj client.Object) error
- func AfterTenantDelete(tx *gorm.DB, obj client.Object) error
- func AfterTenantResourceQuotaCreateOrUpdate(tx *gorm.DB, obj client.Object) error
- func AfterTenantResourceQuotaDelete(tx *gorm.DB, obj client.Object) error
- func BeforeRegistryCreateOrUpdate(tx *gorm.DB, obj client.Object) error
- func ExecuteMigrate(opts *MySQLOptions) error
- func Migrate(db *gorm.DB) error
- func NewDatabaseInstance(opts *MySQLOptions) (*gorm.DB, error)
- func ParseFields()
- type Application
- type ApplicationList
- func (objList *ApplicationList) DataPtr() interface{}
- func (objList *ApplicationList) GetKind() *string
- func (objList *ApplicationList) GetPageSize() (*int64, *int64)
- func (objList *ApplicationList) GetTotal() *int64
- func (obj *ApplicationList) PrimaryKeyField() *string
- func (objList *ApplicationList) SetPageSize(page, size int64)
- func (objList *ApplicationList) SetTotal(total int64)
- type AuditLog
- type AuditLogList
- func (objList *AuditLogList) DataPtr() interface{}
- func (objList *AuditLogList) GetKind() *string
- func (objList *AuditLogList) GetPageSize() (*int64, *int64)
- func (objList *AuditLogList) GetTotal() *int64
- func (obj *AuditLogList) PrimaryKeyField() *string
- func (objList *AuditLogList) SetPageSize(page, size int64)
- func (objList *AuditLogList) SetTotal(total int64)
- type AuthSource
- type AuthSourceList
- func (objList *AuthSourceList) DataPtr() interface{}
- func (objList *AuthSourceList) GetKind() *string
- func (objList *AuthSourceList) GetPageSize() (*int64, *int64)
- func (objList *AuthSourceList) GetTotal() *int64
- func (obj *AuthSourceList) PrimaryKeyField() *string
- func (objList *AuthSourceList) SetPageSize(page, size int64)
- func (objList *AuthSourceList) SetTotal(total int64)
- type BaseList
- type ChartRepo
- type ChartRepoList
- func (objList *ChartRepoList) DataPtr() interface{}
- func (objList *ChartRepoList) GetKind() *string
- func (objList *ChartRepoList) GetPageSize() (*int64, *int64)
- func (objList *ChartRepoList) GetTotal() *int64
- func (obj *ChartRepoList) PrimaryKeyField() *string
- func (objList *ChartRepoList) SetPageSize(page, size int64)
- func (objList *ChartRepoList) SetTotal(total int64)
- type Client
- func (c *Client) Count(ctx context.Context, o client.ObjectTypeIface, t *int64, opts ...client.Option) error
- func (c *Client) Create(ctx context.Context, obj client.Object, opts ...client.Option) error
- func (c *Client) CreateInBatches(ctx context.Context, obj client.ObjectListIface, opts ...client.Option) error
- func (c *Client) Delete(ctx context.Context, obj client.Object, opts ...client.Option) error
- func (c *Client) Get(ctx context.Context, obj client.Object, opts ...client.Option) error
- func (c *Client) GetByName(name string) (agentAddr, mode string, agentcert, agentkey, agentca, kubeconfig []byte, ...)
- func (c *Client) GetManagerCluster(ctx context.Context) (string, error)
- func (c *Client) List(ctx context.Context, olist client.ObjectListIface, opts ...client.Option) error
- func (c *Client) ListCluster() []string
- func (c *Client) RegistHooks()
- func (c *Client) Update(ctx context.Context, obj client.Object, opts ...client.Option) error
- type Cluster
- type ClusterList
- func (objList *ClusterList) DataPtr() interface{}
- func (objList *ClusterList) GetKind() *string
- func (objList *ClusterList) GetPageSize() (*int64, *int64)
- func (objList *ClusterList) GetTotal() *int64
- func (obj *ClusterList) PrimaryKeyField() *string
- func (objList *ClusterList) SetPageSize(page, size int64)
- func (objList *ClusterList) SetTotal(total int64)
- type Container
- type ContainerList
- func (objList *ContainerList) DataPtr() interface{}
- func (objList *ContainerList) GetKind() *string
- func (objList *ContainerList) GetPageSize() (*int64, *int64)
- func (objList *ContainerList) GetTotal() *int64
- func (obj *ContainerList) PrimaryKeyField() *string
- func (objList *ContainerList) SetPageSize(page, size int64)
- func (objList *ContainerList) SetTotal(total int64)
- type Environment
- type EnvironmentList
- func (objList *EnvironmentList) DataPtr() interface{}
- func (objList *EnvironmentList) GetKind() *string
- func (objList *EnvironmentList) GetPageSize() (*int64, *int64)
- func (objList *EnvironmentList) GetTotal() *int64
- func (obj *EnvironmentList) PrimaryKeyField() *string
- func (objList *EnvironmentList) SetPageSize(page, size int64)
- func (objList *EnvironmentList) SetTotal(total int64)
- type EnvironmentResource
- type EnvironmentResourceList
- func (objList *EnvironmentResourceList) DataPtr() interface{}
- func (objList *EnvironmentResourceList) GetKind() *string
- func (objList *EnvironmentResourceList) GetPageSize() (*int64, *int64)
- func (objList *EnvironmentResourceList) GetTotal() *int64
- func (obj *EnvironmentResourceList) PrimaryKeyField() *string
- func (objList *EnvironmentResourceList) SetPageSize(page, size int64)
- func (objList *EnvironmentResourceList) SetTotal(total int64)
- type EnvironmentUserRel
- type EnvironmentUserRelList
- func (objList *EnvironmentUserRelList) DataPtr() interface{}
- func (objList *EnvironmentUserRelList) GetKind() *string
- func (objList *EnvironmentUserRelList) GetPageSize() (*int64, *int64)
- func (objList *EnvironmentUserRelList) GetTotal() *int64
- func (obj *EnvironmentUserRelList) PrimaryKeyField() *string
- func (objList *EnvironmentUserRelList) SetPageSize(page, size int64)
- func (objList *EnvironmentUserRelList) SetTotal(total int64)
- type LogQueryHistory
- type LogQueryHistoryList
- func (objList *LogQueryHistoryList) DataPtr() interface{}
- func (objList *LogQueryHistoryList) GetKind() *string
- func (objList *LogQueryHistoryList) GetPageSize() (*int64, *int64)
- func (objList *LogQueryHistoryList) GetTotal() *int64
- func (obj *LogQueryHistoryList) PrimaryKeyField() *string
- func (objList *LogQueryHistoryList) SetPageSize(page, size int64)
- func (objList *LogQueryHistoryList) SetTotal(total int64)
- type LogQuerySnapshot
- type LogQuerySnapshotList
- func (objList *LogQuerySnapshotList) DataPtr() interface{}
- func (objList *LogQuerySnapshotList) GetKind() *string
- func (objList *LogQuerySnapshotList) GetPageSize() (*int64, *int64)
- func (objList *LogQuerySnapshotList) GetTotal() *int64
- func (obj *LogQuerySnapshotList) PrimaryKeyField() *string
- func (objList *LogQuerySnapshotList) SetPageSize(page, size int64)
- func (objList *LogQuerySnapshotList) SetTotal(total int64)
- type Message
- type MessageList
- func (objList *MessageList) DataPtr() interface{}
- func (objList *MessageList) GetKind() *string
- func (objList *MessageList) GetPageSize() (*int64, *int64)
- func (objList *MessageList) GetTotal() *int64
- func (obj *MessageList) PrimaryKeyField() *string
- func (objList *MessageList) SetPageSize(page, size int64)
- func (objList *MessageList) SetTotal(total int64)
- type MySQLOptions
- type OpenAPP
- type OpenAPPList
- func (objList *OpenAPPList) DataPtr() interface{}
- func (objList *OpenAPPList) GetKind() *string
- func (objList *OpenAPPList) GetPageSize() (*int64, *int64)
- func (objList *OpenAPPList) GetTotal() *int64
- func (obj *OpenAPPList) PrimaryKeyField() *string
- func (objList *OpenAPPList) SetPageSize(page, size int64)
- func (objList *OpenAPPList) SetTotal(total int64)
- type Project
- type ProjectList
- func (objList *ProjectList) DataPtr() interface{}
- func (objList *ProjectList) GetKind() *string
- func (objList *ProjectList) GetPageSize() (*int64, *int64)
- func (objList *ProjectList) GetTotal() *int64
- func (obj *ProjectList) PrimaryKeyField() *string
- func (objList *ProjectList) SetPageSize(page, size int64)
- func (objList *ProjectList) SetTotal(total int64)
- type ProjectUserRel
- type ProjectUserRelList
- func (objList *ProjectUserRelList) DataPtr() interface{}
- func (objList *ProjectUserRelList) GetKind() *string
- func (objList *ProjectUserRelList) GetPageSize() (*int64, *int64)
- func (objList *ProjectUserRelList) GetTotal() *int64
- func (obj *ProjectUserRelList) PrimaryKeyField() *string
- func (objList *ProjectUserRelList) SetPageSize(page, size int64)
- func (objList *ProjectUserRelList) SetTotal(total int64)
- type Registry
- type RegistryList
- func (objList *RegistryList) DataPtr() interface{}
- func (objList *RegistryList) GetKind() *string
- func (objList *RegistryList) GetPageSize() (*int64, *int64)
- func (objList *RegistryList) GetTotal() *int64
- func (obj *RegistryList) PrimaryKeyField() *string
- func (objList *RegistryList) SetPageSize(page, size int64)
- func (objList *RegistryList) SetTotal(total int64)
- type SystemRole
- type SystemRoleList
- func (objList *SystemRoleList) DataPtr() interface{}
- func (objList *SystemRoleList) GetKind() *string
- func (objList *SystemRoleList) GetPageSize() (*int64, *int64)
- func (objList *SystemRoleList) GetTotal() *int64
- func (obj *SystemRoleList) PrimaryKeyField() *string
- func (objList *SystemRoleList) SetPageSize(page, size int64)
- func (objList *SystemRoleList) SetTotal(total int64)
- type Tenant
- type TenantList
- func (objList *TenantList) DataPtr() interface{}
- func (objList *TenantList) GetKind() *string
- func (objList *TenantList) GetPageSize() (*int64, *int64)
- func (objList *TenantList) GetTotal() *int64
- func (obj *TenantList) PrimaryKeyField() *string
- func (objList *TenantList) SetPageSize(page, size int64)
- func (objList *TenantList) SetTotal(total int64)
- type TenantResourceQuota
- type TenantResourceQuotaApply
- func (obj *TenantResourceQuotaApply) GetKind() *string
- func (obj *TenantResourceQuotaApply) PreloadFields() *[]string
- func (obj *TenantResourceQuotaApply) PrimaryKeyField() *string
- func (obj *TenantResourceQuotaApply) PrimaryKeyValue() interface{}
- func (obj *TenantResourceQuotaApply) TableName() *string
- type TenantResourceQuotaApplyList
- func (objList *TenantResourceQuotaApplyList) DataPtr() interface{}
- func (objList *TenantResourceQuotaApplyList) GetKind() *string
- func (objList *TenantResourceQuotaApplyList) GetPageSize() (*int64, *int64)
- func (objList *TenantResourceQuotaApplyList) GetTotal() *int64
- func (obj *TenantResourceQuotaApplyList) PrimaryKeyField() *string
- func (objList *TenantResourceQuotaApplyList) SetPageSize(page, size int64)
- func (objList *TenantResourceQuotaApplyList) SetTotal(total int64)
- type TenantResourceQuotaList
- func (objList *TenantResourceQuotaList) DataPtr() interface{}
- func (objList *TenantResourceQuotaList) GetKind() *string
- func (objList *TenantResourceQuotaList) GetPageSize() (*int64, *int64)
- func (objList *TenantResourceQuotaList) GetTotal() *int64
- func (obj *TenantResourceQuotaList) PrimaryKeyField() *string
- func (objList *TenantResourceQuotaList) SetPageSize(page, size int64)
- func (objList *TenantResourceQuotaList) SetTotal(total int64)
- type TenantUserRel
- type TenantUserRelList
- func (objList *TenantUserRelList) DataPtr() interface{}
- func (objList *TenantUserRelList) GetKind() *string
- func (objList *TenantUserRelList) GetPageSize() (*int64, *int64)
- func (objList *TenantUserRelList) GetTotal() *int64
- func (obj *TenantUserRelList) PrimaryKeyField() *string
- func (objList *TenantUserRelList) SetPageSize(page, size int64)
- func (objList *TenantUserRelList) SetTotal(total int64)
- type User
- type UserList
- func (objList *UserList) DataPtr() interface{}
- func (objList *UserList) GetKind() *string
- func (objList *UserList) GetPageSize() (*int64, *int64)
- func (objList *UserList) GetTotal() *int64
- func (obj *UserList) PrimaryKeyField() *string
- func (objList *UserList) SetPageSize(page, size int64)
- func (objList *UserList) SetTotal(total int64)
- type UserMessageStatus
- type UserMessageStatusList
- func (objList *UserMessageStatusList) DataPtr() interface{}
- func (objList *UserMessageStatusList) GetKind() *string
- func (objList *UserMessageStatusList) GetPageSize() (*int64, *int64)
- func (objList *UserMessageStatusList) GetTotal() *int64
- func (obj *UserMessageStatusList) PrimaryKeyField() *string
- func (objList *UserMessageStatusList) SetPageSize(page, size int64)
- func (objList *UserMessageStatusList) SetTotal(total int64)
- type VirtualDomain
- type VirtualDomainList
- func (objList *VirtualDomainList) DataPtr() interface{}
- func (objList *VirtualDomainList) GetKind() *string
- func (objList *VirtualDomainList) GetPageSize() (*int64, *int64)
- func (objList *VirtualDomainList) GetTotal() *int64
- func (obj *VirtualDomainList) PrimaryKeyField() *string
- func (objList *VirtualDomainList) SetPageSize(page, size int64)
- func (objList *VirtualDomainList) SetTotal(total int64)
- type VirtualSpace
- type VirtualSpaceList
- func (objList *VirtualSpaceList) DataPtr() interface{}
- func (objList *VirtualSpaceList) GetKind() *string
- func (objList *VirtualSpaceList) GetPageSize() (*int64, *int64)
- func (objList *VirtualSpaceList) GetTotal() *int64
- func (obj *VirtualSpaceList) PrimaryKeyField() *string
- func (objList *VirtualSpaceList) SetPageSize(page, size int64)
- func (objList *VirtualSpaceList) SetTotal(total int64)
- type VirtualSpaceUserRel
- type VirtualSpaceUserRelList
- func (objList *VirtualSpaceUserRelList) DataPtr() interface{}
- func (objList *VirtualSpaceUserRelList) GetKind() *string
- func (objList *VirtualSpaceUserRelList) GetPageSize() (*int64, *int64)
- func (objList *VirtualSpaceUserRelList) GetTotal() *int64
- func (obj *VirtualSpaceUserRelList) PrimaryKeyField() *string
- func (objList *VirtualSpaceUserRelList) SetPageSize(page, size int64)
- func (objList *VirtualSpaceUserRelList) SetTotal(total int64)
- type Workload
- type WorkloadList
- func (objList *WorkloadList) DataPtr() interface{}
- func (objList *WorkloadList) GetKind() *string
- func (objList *WorkloadList) GetPageSize() (*int64, *int64)
- func (objList *WorkloadList) GetTotal() *int64
- func (obj *WorkloadList) PrimaryKeyField() *string
- func (objList *WorkloadList) SetPageSize(page, size int64)
- func (objList *WorkloadList) SetTotal(total int64)
Constants ¶
const ( TenantRoleAdmin = "admin" TenantRoleOrdinary = "ordinary" ResTenant = "tenant" )
const (
ResRegistry = "registry"
)
Variables ¶
This section is empty.
Functions ¶
func ExecuteMigrate ¶
func ExecuteMigrate(opts *MySQLOptions) error
func NewDatabaseInstance ¶
func NewDatabaseInstance(opts *MySQLOptions) (*gorm.DB, error)
func ParseFields ¶
func ParseFields()
Types ¶
type Application ¶
type Application struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex:uniq_idx_project_application;<-:create"` CreatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` UpdatedAt *time.Time Environment *Environment `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` EnvironmentID *uint `gorm:"uniqueIndex:uniq_idx_project_applicationname;"` Project *Project `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` ProjectID uint `gorm:"uniqueIndex:uniq_idx_project_applicationname"` Manifest datatypes.JSON Remark string Kind string Enabled bool Images datatypes.JSON Labels datatypes.JSON Creator string }
+gen type:object pkcolume:id pkfield:ID preloads:Environment
func (*Application) GetKind ¶
func (obj *Application) GetKind() *string
func (*Application) PreloadFields ¶
func (obj *Application) PreloadFields() *[]string
func (*Application) PrimaryKeyField ¶
func (obj *Application) PrimaryKeyField() *string
func (*Application) PrimaryKeyValue ¶
func (obj *Application) PrimaryKeyValue() interface{}
func (*Application) TableName ¶
func (obj *Application) TableName() *string
type ApplicationList ¶
type ApplicationList struct { Items []*Application BaseList }
func (*ApplicationList) DataPtr ¶
func (objList *ApplicationList) DataPtr() interface{}
func (*ApplicationList) GetKind ¶
func (objList *ApplicationList) GetKind() *string
func (*ApplicationList) GetPageSize ¶
func (objList *ApplicationList) GetPageSize() (*int64, *int64)
func (*ApplicationList) GetTotal ¶
func (objList *ApplicationList) GetTotal() *int64
func (*ApplicationList) PrimaryKeyField ¶
func (obj *ApplicationList) PrimaryKeyField() *string
func (*ApplicationList) SetPageSize ¶
func (objList *ApplicationList) SetPageSize(page, size int64)
func (*ApplicationList) SetTotal ¶
func (objList *ApplicationList) SetTotal(total int64)
type AuditLog ¶
type AuditLog struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(512)"` CreatedAt *time.Time `gorm:"index"` UpdatedAt *time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Username string `gorm:"type:varchar(50)"` Tenant string `gorm:"type:varchar(50)"` Module string `gorm:"type:varchar(512)"` Action string `gorm:"type:varchar(255)"` Success bool ClientIP string `gorm:"type:varchar(255)"` Labels datatypes.JSON RawData datatypes.JSON }
+gen type:object kind:auditlog pkcolume:id pkfield:ID
func (*AuditLog) PreloadFields ¶
func (*AuditLog) PrimaryKeyField ¶
func (*AuditLog) PrimaryKeyValue ¶
func (obj *AuditLog) PrimaryKeyValue() interface{}
type AuditLogList ¶
func (*AuditLogList) DataPtr ¶
func (objList *AuditLogList) DataPtr() interface{}
func (*AuditLogList) GetKind ¶
func (objList *AuditLogList) GetKind() *string
func (*AuditLogList) GetPageSize ¶
func (objList *AuditLogList) GetPageSize() (*int64, *int64)
func (*AuditLogList) GetTotal ¶
func (objList *AuditLogList) GetTotal() *int64
func (*AuditLogList) PrimaryKeyField ¶
func (obj *AuditLogList) PrimaryKeyField() *string
func (*AuditLogList) SetPageSize ¶
func (objList *AuditLogList) SetPageSize(page, size int64)
func (*AuditLogList) SetTotal ¶
func (objList *AuditLogList) SetTotal(total int64)
type AuthSource ¶
type AuthSource struct { ID uint Name string `gorm:"unique"` Kind string Config datatypes.JSON TokenType string Enabled bool CreatedAt *time.Time UpdatedAt *time.Time // 创建时间 }
AuthSource 认证插件 +gen type:object pkcolume:id pkfield:ID
func (*AuthSource) GetKind ¶
func (obj *AuthSource) GetKind() *string
func (*AuthSource) PreloadFields ¶
func (obj *AuthSource) PreloadFields() *[]string
func (*AuthSource) PrimaryKeyField ¶
func (obj *AuthSource) PrimaryKeyField() *string
func (*AuthSource) PrimaryKeyValue ¶
func (obj *AuthSource) PrimaryKeyValue() interface{}
func (*AuthSource) TableName ¶
func (obj *AuthSource) TableName() *string
type AuthSourceList ¶
type AuthSourceList struct { Items []*AuthSource BaseList }
func (*AuthSourceList) DataPtr ¶
func (objList *AuthSourceList) DataPtr() interface{}
func (*AuthSourceList) GetKind ¶
func (objList *AuthSourceList) GetKind() *string
func (*AuthSourceList) GetPageSize ¶
func (objList *AuthSourceList) GetPageSize() (*int64, *int64)
func (*AuthSourceList) GetTotal ¶
func (objList *AuthSourceList) GetTotal() *int64
func (*AuthSourceList) PrimaryKeyField ¶
func (obj *AuthSourceList) PrimaryKeyField() *string
func (*AuthSourceList) SetPageSize ¶
func (objList *AuthSourceList) SetPageSize(page, size int64)
func (*AuthSourceList) SetTotal ¶
func (objList *AuthSourceList) SetTotal(total int64)
type ChartRepo ¶
type ChartRepo struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex"` URL string `gorm:"type:varchar(255)"` LastSync *time.Time SyncStatus string SyncMessage string }
+gen type:object kind:chartrepo pkcolume:id pkfield:ID
func (*ChartRepo) PreloadFields ¶
func (*ChartRepo) PrimaryKeyField ¶
func (*ChartRepo) PrimaryKeyValue ¶
func (obj *ChartRepo) PrimaryKeyValue() interface{}
type ChartRepoList ¶
func (*ChartRepoList) DataPtr ¶
func (objList *ChartRepoList) DataPtr() interface{}
func (*ChartRepoList) GetKind ¶
func (objList *ChartRepoList) GetKind() *string
func (*ChartRepoList) GetPageSize ¶
func (objList *ChartRepoList) GetPageSize() (*int64, *int64)
func (*ChartRepoList) GetTotal ¶
func (objList *ChartRepoList) GetTotal() *int64
func (*ChartRepoList) PrimaryKeyField ¶
func (obj *ChartRepoList) PrimaryKeyField() *string
func (*ChartRepoList) SetPageSize ¶
func (objList *ChartRepoList) SetPageSize(page, size int64)
func (*ChartRepoList) SetTotal ¶
func (objList *ChartRepoList) SetTotal(total int64)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(opt *MySQLOptions) (*Client, error)
func NewOrmClient ¶
func (*Client) CreateInBatches ¶
func (*Client) GetManagerCluster ¶
func (*Client) ListCluster ¶
func (*Client) RegistHooks ¶
func (c *Client) RegistHooks()
type Cluster ¶
type Cluster struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex"` APIServer string `gorm:"type:varchar(250);uniqueIndex"` KubeConfig datatypes.JSON Version string AgentAddr string AgentCA string AgentCert string AgentKey string Mode string Runtime string // docker or containerd Primary bool // is primary cluster OversoldConfig datatypes.JSON // cluster oversold configuration Environments []*Environment TenantResourceQuotas []*TenantResourceQuota ClusterResourceQuota datatypes.JSON }
+gen type:object kind:cluster pkcolume:id pkfield:ID preloads:TenantResourceQuotas
func (*Cluster) PreloadFields ¶
func (*Cluster) PrimaryKeyField ¶
func (*Cluster) PrimaryKeyValue ¶
func (obj *Cluster) PrimaryKeyValue() interface{}
type ClusterList ¶
func (*ClusterList) DataPtr ¶
func (objList *ClusterList) DataPtr() interface{}
func (*ClusterList) GetKind ¶
func (objList *ClusterList) GetKind() *string
func (*ClusterList) GetPageSize ¶
func (objList *ClusterList) GetPageSize() (*int64, *int64)
func (*ClusterList) GetTotal ¶
func (objList *ClusterList) GetTotal() *int64
func (*ClusterList) PrimaryKeyField ¶
func (obj *ClusterList) PrimaryKeyField() *string
func (*ClusterList) SetPageSize ¶
func (objList *ClusterList) SetPageSize(page, size int64)
func (*ClusterList) SetTotal ¶
func (objList *ClusterList) SetTotal(total int64)
type Container ¶
type Container struct { ID uint `gorm:"primarykey"` Name string PodName string CPULimitCore float64 MemoryLimitBytes int64 CPUUsageCore float64 CPUPercent float64 MemoryUsageBytes float64 MemoryPercent float64 WorkloadID uint Workload *Workload `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` }
+gen type:object pkcolume:id pkfield:ID
func (*Container) PreloadFields ¶
func (*Container) PrimaryKeyField ¶
func (*Container) PrimaryKeyValue ¶
func (obj *Container) PrimaryKeyValue() interface{}
type ContainerList ¶
func (*ContainerList) DataPtr ¶
func (objList *ContainerList) DataPtr() interface{}
func (*ContainerList) GetKind ¶
func (objList *ContainerList) GetKind() *string
func (*ContainerList) GetPageSize ¶
func (objList *ContainerList) GetPageSize() (*int64, *int64)
func (*ContainerList) GetTotal ¶
func (objList *ContainerList) GetTotal() *int64
func (*ContainerList) PrimaryKeyField ¶
func (obj *ContainerList) PrimaryKeyField() *string
func (*ContainerList) SetPageSize ¶
func (objList *ContainerList) SetPageSize(page, size int64)
func (*ContainerList) SetTotal ¶
func (objList *ContainerList) SetTotal(total int64)
type Environment ¶
type Environment struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex:uniq_idx_project_env;index:environment_uniq,unique"` Namespace string `gorm:"type:varchar(50)"` Remark string MetaType string DeletePolicy string `sql:"DEFAULT:'delNamespace'"` Creator *User Cluster *Cluster `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` Project *Project `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` ResourceQuota datatypes.JSON LimitRange datatypes.JSON ProjectID uint `gorm:"uniqueIndex:uniq_idx_project_env"` ClusterID uint CreatorID uint Applications []*Application `gorm:"many2many:application_environment_rels;"` Users []*User `gorm:"many2many:environment_user_rels;"` VirtualSpaceID *uint VirtualSpace *VirtualSpace `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:SET NULL;"` }
+gen type:object pkcolume:id pkfield:ID preloads:Cluster,Creator,Project,Applications,VirtualSpace
func (*Environment) GetKind ¶
func (obj *Environment) GetKind() *string
func (*Environment) PreloadFields ¶
func (obj *Environment) PreloadFields() *[]string
func (*Environment) PrimaryKeyField ¶
func (obj *Environment) PrimaryKeyField() *string
func (*Environment) PrimaryKeyValue ¶
func (obj *Environment) PrimaryKeyValue() interface{}
func (*Environment) TableName ¶
func (obj *Environment) TableName() *string
type EnvironmentList ¶
type EnvironmentList struct { Items []*Environment BaseList }
func (*EnvironmentList) DataPtr ¶
func (objList *EnvironmentList) DataPtr() interface{}
func (*EnvironmentList) GetKind ¶
func (objList *EnvironmentList) GetKind() *string
func (*EnvironmentList) GetPageSize ¶
func (objList *EnvironmentList) GetPageSize() (*int64, *int64)
func (*EnvironmentList) GetTotal ¶
func (objList *EnvironmentList) GetTotal() *int64
func (*EnvironmentList) PrimaryKeyField ¶
func (obj *EnvironmentList) PrimaryKeyField() *string
func (*EnvironmentList) SetPageSize ¶
func (objList *EnvironmentList) SetPageSize(page, size int64)
func (*EnvironmentList) SetTotal ¶
func (objList *EnvironmentList) SetTotal(total int64)
type EnvironmentResource ¶
type EnvironmentResource struct { ID uint `gorm:"primarykey"` CreatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` Cluster string Tenant string Project string Environment string MaxCPUUsageCore float64 MaxMemoryUsageByte float64 MinCPUUsageCore float64 MinMemoryUsageByte float64 AvgCPUUsageCore float64 AvgMemoryUsageByte float64 NetworkReceiveByte float64 NetworkSendByte float64 MaxPVCUsageByte float64 MinPVCUsageByte float64 AvgPVCUsageByte float64 }
+gen type:object pkcolume:id pkfield:ID
func (*EnvironmentResource) GetKind ¶
func (obj *EnvironmentResource) GetKind() *string
func (*EnvironmentResource) PreloadFields ¶
func (obj *EnvironmentResource) PreloadFields() *[]string
func (*EnvironmentResource) PrimaryKeyField ¶
func (obj *EnvironmentResource) PrimaryKeyField() *string
func (*EnvironmentResource) PrimaryKeyValue ¶
func (obj *EnvironmentResource) PrimaryKeyValue() interface{}
func (*EnvironmentResource) TableName ¶
func (obj *EnvironmentResource) TableName() *string
type EnvironmentResourceList ¶
type EnvironmentResourceList struct { Items []*EnvironmentResource BaseList }
func (*EnvironmentResourceList) DataPtr ¶
func (objList *EnvironmentResourceList) DataPtr() interface{}
func (*EnvironmentResourceList) GetKind ¶
func (objList *EnvironmentResourceList) GetKind() *string
func (*EnvironmentResourceList) GetPageSize ¶
func (objList *EnvironmentResourceList) GetPageSize() (*int64, *int64)
func (*EnvironmentResourceList) GetTotal ¶
func (objList *EnvironmentResourceList) GetTotal() *int64
func (*EnvironmentResourceList) PrimaryKeyField ¶
func (obj *EnvironmentResourceList) PrimaryKeyField() *string
func (*EnvironmentResourceList) SetPageSize ¶
func (objList *EnvironmentResourceList) SetPageSize(page, size int64)
func (*EnvironmentResourceList) SetTotal ¶
func (objList *EnvironmentResourceList) SetTotal(total int64)
type EnvironmentUserRel ¶
type EnvironmentUserRel struct { ID uint `gorm:"primarykey"` User *User Environment *Environment `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` UserID uint `gorm:"uniqueIndex:uniq_idx_env_user_rel"` EnvironmentID uint `gorm:"uniqueIndex:uniq_idx_env_user_rel"` // 环境级角色("reader", "operator") Role string `binding:"required,eq=reader|eq=operator"` }
+gen type:objectrel pkcolume:id pkfield:ID preloads:User,Environment
func (*EnvironmentUserRel) GetKind ¶
func (obj *EnvironmentUserRel) GetKind() *string
func (*EnvironmentUserRel) PreloadFields ¶
func (obj *EnvironmentUserRel) PreloadFields() *[]string
func (*EnvironmentUserRel) PrimaryKeyField ¶
func (obj *EnvironmentUserRel) PrimaryKeyField() *string
func (*EnvironmentUserRel) PrimaryKeyValue ¶
func (obj *EnvironmentUserRel) PrimaryKeyValue() interface{}
func (*EnvironmentUserRel) TableName ¶
func (obj *EnvironmentUserRel) TableName() *string
type EnvironmentUserRelList ¶
type EnvironmentUserRelList struct { Items []*EnvironmentUserRel BaseList }
func (*EnvironmentUserRelList) DataPtr ¶
func (objList *EnvironmentUserRelList) DataPtr() interface{}
func (*EnvironmentUserRelList) GetKind ¶
func (objList *EnvironmentUserRelList) GetKind() *string
func (*EnvironmentUserRelList) GetPageSize ¶
func (objList *EnvironmentUserRelList) GetPageSize() (*int64, *int64)
func (*EnvironmentUserRelList) GetTotal ¶
func (objList *EnvironmentUserRelList) GetTotal() *int64
func (*EnvironmentUserRelList) PrimaryKeyField ¶
func (obj *EnvironmentUserRelList) PrimaryKeyField() *string
func (*EnvironmentUserRelList) SetPageSize ¶
func (objList *EnvironmentUserRelList) SetPageSize(page, size int64)
func (*EnvironmentUserRelList) SetTotal ¶
func (objList *EnvironmentUserRelList) SetTotal(total int64)
type LogQueryHistory ¶
type LogQueryHistory struct { ID uint `gorm:"primarykey"` Cluster *Cluster `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` ClusterID uint LabelJSON string `gorm:"type:varchar(1024)"` FilterJSON string `gorm:"type:varchar(1024)"` LogQL string `gorm:"type:varchar(1024)"` CreateAt *time.Time `sql:"DEFAULT:'current_timestamp'"` Creator *User CreatorID uint }
+gen type:object pkcolume:id pkfield:ID preloads:Cluster,Creator
func (*LogQueryHistory) GetKind ¶
func (obj *LogQueryHistory) GetKind() *string
func (*LogQueryHistory) PreloadFields ¶
func (obj *LogQueryHistory) PreloadFields() *[]string
func (*LogQueryHistory) PrimaryKeyField ¶
func (obj *LogQueryHistory) PrimaryKeyField() *string
func (*LogQueryHistory) PrimaryKeyValue ¶
func (obj *LogQueryHistory) PrimaryKeyValue() interface{}
func (*LogQueryHistory) TableName ¶
func (obj *LogQueryHistory) TableName() *string
type LogQueryHistoryList ¶
type LogQueryHistoryList struct { Items []*LogQueryHistory BaseList }
func (*LogQueryHistoryList) DataPtr ¶
func (objList *LogQueryHistoryList) DataPtr() interface{}
func (*LogQueryHistoryList) GetKind ¶
func (objList *LogQueryHistoryList) GetKind() *string
func (*LogQueryHistoryList) GetPageSize ¶
func (objList *LogQueryHistoryList) GetPageSize() (*int64, *int64)
func (*LogQueryHistoryList) GetTotal ¶
func (objList *LogQueryHistoryList) GetTotal() *int64
func (*LogQueryHistoryList) PrimaryKeyField ¶
func (obj *LogQueryHistoryList) PrimaryKeyField() *string
func (*LogQueryHistoryList) SetPageSize ¶
func (objList *LogQueryHistoryList) SetPageSize(page, size int64)
func (*LogQueryHistoryList) SetTotal ¶
func (objList *LogQueryHistoryList) SetTotal(total int64)
type LogQuerySnapshot ¶
type LogQuerySnapshot struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(128)"` Cluster *Cluster `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` ClusterID uint SourceFile string `gorm:"type:varchar(128)"` SnapshotCount int // file line count DownloadURL string `gorm:"type:varchar(512)"` StartTime *time.Time EndTime *time.Time CreateAt *time.Time `sql:"DEFAULT:'current_timestamp'"` Creator *User CreatorID uint }
+gen type:object pkcolume:id pkfield:ID preloads:Cluster,Creator
func (*LogQuerySnapshot) GetKind ¶
func (obj *LogQuerySnapshot) GetKind() *string
func (*LogQuerySnapshot) PreloadFields ¶
func (obj *LogQuerySnapshot) PreloadFields() *[]string
func (*LogQuerySnapshot) PrimaryKeyField ¶
func (obj *LogQuerySnapshot) PrimaryKeyField() *string
func (*LogQuerySnapshot) PrimaryKeyValue ¶
func (obj *LogQuerySnapshot) PrimaryKeyValue() interface{}
func (*LogQuerySnapshot) TableName ¶
func (obj *LogQuerySnapshot) TableName() *string
type LogQuerySnapshotList ¶
type LogQuerySnapshotList struct { Items []*LogQuerySnapshot BaseList }
func (*LogQuerySnapshotList) DataPtr ¶
func (objList *LogQuerySnapshotList) DataPtr() interface{}
func (*LogQuerySnapshotList) GetKind ¶
func (objList *LogQuerySnapshotList) GetKind() *string
func (*LogQuerySnapshotList) GetPageSize ¶
func (objList *LogQuerySnapshotList) GetPageSize() (*int64, *int64)
func (*LogQuerySnapshotList) GetTotal ¶
func (objList *LogQuerySnapshotList) GetTotal() *int64
func (*LogQuerySnapshotList) PrimaryKeyField ¶
func (obj *LogQuerySnapshotList) PrimaryKeyField() *string
func (*LogQuerySnapshotList) SetPageSize ¶
func (objList *LogQuerySnapshotList) SetPageSize(page, size int64)
func (*LogQuerySnapshotList) SetTotal ¶
func (objList *LogQuerySnapshotList) SetTotal(total int64)
type Message ¶
type Message struct { ID uint `gorm:"primarykey"` MessageType string `gorm:"type:varchar(50);"` Title string `gorm:"type:varchar(255);"` Content datatypes.JSON CreatedAt *time.Time `gorm:"index" sql:"DEFAULT:'current_timestamp'"` ToUsers map[uint]struct{} `gorm:"-" json:"-"` }
+gen type:object pkcolume:id pkfield:ID
func (*Message) PreloadFields ¶
func (*Message) PrimaryKeyField ¶
func (*Message) PrimaryKeyValue ¶
func (obj *Message) PrimaryKeyValue() interface{}
type MessageList ¶
func (*MessageList) DataPtr ¶
func (objList *MessageList) DataPtr() interface{}
func (*MessageList) GetKind ¶
func (objList *MessageList) GetKind() *string
func (*MessageList) GetPageSize ¶
func (objList *MessageList) GetPageSize() (*int64, *int64)
func (*MessageList) GetTotal ¶
func (objList *MessageList) GetTotal() *int64
func (*MessageList) PrimaryKeyField ¶
func (obj *MessageList) PrimaryKeyField() *string
func (*MessageList) SetPageSize ¶
func (objList *MessageList) SetPageSize(page, size int64)
func (*MessageList) SetTotal ¶
func (objList *MessageList) SetTotal(total int64)
type MySQLOptions ¶
type MySQLOptions struct { Addr string `yaml:"addr" default:"127.0.0.1" help:"mysql host"` Username string `yaml:"username" default:"root" help:"mysql username"` Password string `yaml:"password" default:"root_password" help:"mysql password"` Database string `yaml:"database" default:"localdb" help:"mysql database"` }
type OpenAPP ¶
type OpenAPP struct { Name string `gorm:"unique"` ID uint AppID string AppSecret string // 系统权限范围,空则表示什么操作都不行,默认是ReadWorkload PermScopes string `sql:"DEFAULT:'ReadWorkload'"` // 可操作租户范围,通过id列表表示,逗号分隔,可以用通配符 *,表示所有, 默认* TenantScope string `sql:"DEFAULT:'*'"` // 访问频率限制,空则表示不限制,表示每分钟可以访问的次数,默认30 RequestLimiter int `sql:"DEFAULT:30"` }
+gen type:object pkcolume:id pkfield:ID
func (*OpenAPP) PreloadFields ¶
func (*OpenAPP) PrimaryKeyField ¶
func (*OpenAPP) PrimaryKeyValue ¶
func (obj *OpenAPP) PrimaryKeyValue() interface{}
type OpenAPPList ¶
func (*OpenAPPList) DataPtr ¶
func (objList *OpenAPPList) DataPtr() interface{}
func (*OpenAPPList) GetKind ¶
func (objList *OpenAPPList) GetKind() *string
func (*OpenAPPList) GetPageSize ¶
func (objList *OpenAPPList) GetPageSize() (*int64, *int64)
func (*OpenAPPList) GetTotal ¶
func (objList *OpenAPPList) GetTotal() *int64
func (*OpenAPPList) PrimaryKeyField ¶
func (obj *OpenAPPList) PrimaryKeyField() *string
func (*OpenAPPList) SetPageSize ¶
func (objList *OpenAPPList) SetPageSize(page, size int64)
func (*OpenAPPList) SetTotal ¶
func (objList *OpenAPPList) SetTotal(total int64)
type Project ¶
type Project struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex:uniq_idx_tenant_project_name"` CreatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` ProjectAlias string `gorm:"type:varchar(50)"` Remark string ResourceQuota datatypes.JSON Applications []*Application Environments []*Environment Users []*User `gorm:"many2many:project_user_rels;"` Tenant *Tenant `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` TenantID uint `gorm:"uniqueIndex:uniq_idx_tenant_project_name"` }
+gen type:object pkcolume:id pkfield:ID preloads:Tenant,Createor,Tenant,Environments
func (*Project) PreloadFields ¶
func (*Project) PrimaryKeyField ¶
func (*Project) PrimaryKeyValue ¶
func (obj *Project) PrimaryKeyValue() interface{}
type ProjectList ¶
func (*ProjectList) DataPtr ¶
func (objList *ProjectList) DataPtr() interface{}
func (*ProjectList) GetKind ¶
func (objList *ProjectList) GetKind() *string
func (*ProjectList) GetPageSize ¶
func (objList *ProjectList) GetPageSize() (*int64, *int64)
func (*ProjectList) GetTotal ¶
func (objList *ProjectList) GetTotal() *int64
func (*ProjectList) PrimaryKeyField ¶
func (obj *ProjectList) PrimaryKeyField() *string
func (*ProjectList) SetPageSize ¶
func (objList *ProjectList) SetPageSize(page, size int64)
func (*ProjectList) SetTotal ¶
func (objList *ProjectList) SetTotal(total int64)
type ProjectUserRel ¶
type ProjectUserRel struct { ID uint `gorm:"primarykey"` User *User `json:",omitempty" gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` Project *Project `json:",omitempty" gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` UserID uint `gorm:"uniqueIndex:uniq_idx_project_user_rel" binding:"required"` ProjectID uint `gorm:"uniqueIndex:uniq_idx_project_user_rel" binding:"required"` Role string `gorm:"type:varchar(30)" binding:"required,eq=admin|eq=test|eq=dev|eq=ops"` }
+gen type:objectrel pkcolume:id pkfield:ID preloads:User,Project
func (*ProjectUserRel) GetKind ¶
func (obj *ProjectUserRel) GetKind() *string
func (*ProjectUserRel) PreloadFields ¶
func (obj *ProjectUserRel) PreloadFields() *[]string
func (*ProjectUserRel) PrimaryKeyField ¶
func (obj *ProjectUserRel) PrimaryKeyField() *string
func (*ProjectUserRel) PrimaryKeyValue ¶
func (obj *ProjectUserRel) PrimaryKeyValue() interface{}
func (*ProjectUserRel) TableName ¶
func (obj *ProjectUserRel) TableName() *string
type ProjectUserRelList ¶
type ProjectUserRelList struct { Items []*ProjectUserRel BaseList }
func (*ProjectUserRelList) DataPtr ¶
func (objList *ProjectUserRelList) DataPtr() interface{}
func (*ProjectUserRelList) GetKind ¶
func (objList *ProjectUserRelList) GetKind() *string
func (*ProjectUserRelList) GetPageSize ¶
func (objList *ProjectUserRelList) GetPageSize() (*int64, *int64)
func (*ProjectUserRelList) GetTotal ¶
func (objList *ProjectUserRelList) GetTotal() *int64
func (*ProjectUserRelList) PrimaryKeyField ¶
func (obj *ProjectUserRelList) PrimaryKeyField() *string
func (*ProjectUserRelList) SetPageSize ¶
func (objList *ProjectUserRelList) SetPageSize(page, size int64)
func (*ProjectUserRelList) SetTotal ¶
func (objList *ProjectUserRelList) SetTotal(total int64)
type Registry ¶
type Registry struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex:uniq_idx_project_registry;"` Address string `gorm:"type:varchar(512)"` Username string `gorm:"type:varchar(50)"` Password string `gorm:"type:varchar(512)"` Creator *User UpdateTime *time.Time CreatorID uint Project *Project `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` ProjectID uint `grom:"uniqueIndex:uniq_idx_project_registry;"` IsDefault bool }
+gen type:object pkcolume:id pkfield:ID preloads:Project
func (*Registry) PreloadFields ¶
func (*Registry) PrimaryKeyField ¶
func (*Registry) PrimaryKeyValue ¶
func (obj *Registry) PrimaryKeyValue() interface{}
type RegistryList ¶
func (*RegistryList) DataPtr ¶
func (objList *RegistryList) DataPtr() interface{}
func (*RegistryList) GetKind ¶
func (objList *RegistryList) GetKind() *string
func (*RegistryList) GetPageSize ¶
func (objList *RegistryList) GetPageSize() (*int64, *int64)
func (*RegistryList) GetTotal ¶
func (objList *RegistryList) GetTotal() *int64
func (*RegistryList) PrimaryKeyField ¶
func (obj *RegistryList) PrimaryKeyField() *string
func (*RegistryList) SetPageSize ¶
func (objList *RegistryList) SetPageSize(page, size int64)
func (*RegistryList) SetTotal ¶
func (objList *RegistryList) SetTotal(total int64)
type SystemRole ¶
type SystemRole struct { ID uint `gorm:"primary_key"` Name string Code string `gorm:"type:varchar(30)" binding:"required;eq=admin|eq=ordinary"` Users []*User }
+gen type:object pkcolume:id pkfield:ID preloads:Users
func (*SystemRole) GetKind ¶
func (obj *SystemRole) GetKind() *string
func (*SystemRole) PreloadFields ¶
func (obj *SystemRole) PreloadFields() *[]string
func (*SystemRole) PrimaryKeyField ¶
func (obj *SystemRole) PrimaryKeyField() *string
func (*SystemRole) PrimaryKeyValue ¶
func (obj *SystemRole) PrimaryKeyValue() interface{}
func (*SystemRole) TableName ¶
func (obj *SystemRole) TableName() *string
type SystemRoleList ¶
type SystemRoleList struct { Items []*SystemRole BaseList }
func (*SystemRoleList) DataPtr ¶
func (objList *SystemRoleList) DataPtr() interface{}
func (*SystemRoleList) GetKind ¶
func (objList *SystemRoleList) GetKind() *string
func (*SystemRoleList) GetPageSize ¶
func (objList *SystemRoleList) GetPageSize() (*int64, *int64)
func (*SystemRoleList) GetTotal ¶
func (objList *SystemRoleList) GetTotal() *int64
func (*SystemRoleList) PrimaryKeyField ¶
func (obj *SystemRoleList) PrimaryKeyField() *string
func (*SystemRoleList) SetPageSize ¶
func (objList *SystemRoleList) SetPageSize(page, size int64)
func (*SystemRoleList) SetTotal ¶
func (objList *SystemRoleList) SetTotal(total int64)
type Tenant ¶
type Tenant struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex"` Remark string IsActive bool CreatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` UpdatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` ResourceQuotas []*TenantResourceQuota Users []*User `gorm:"many2many:tenant_user_rels;"` Projects []*Project }
+gen type:object pkcolume:id pkfield:ID preloads:Users,Projects
func (*Tenant) PreloadFields ¶
func (*Tenant) PrimaryKeyField ¶
func (*Tenant) PrimaryKeyValue ¶
func (obj *Tenant) PrimaryKeyValue() interface{}
type TenantList ¶
func (*TenantList) DataPtr ¶
func (objList *TenantList) DataPtr() interface{}
func (*TenantList) GetKind ¶
func (objList *TenantList) GetKind() *string
func (*TenantList) GetPageSize ¶
func (objList *TenantList) GetPageSize() (*int64, *int64)
func (*TenantList) GetTotal ¶
func (objList *TenantList) GetTotal() *int64
func (*TenantList) PrimaryKeyField ¶
func (obj *TenantList) PrimaryKeyField() *string
func (*TenantList) SetPageSize ¶
func (objList *TenantList) SetPageSize(page, size int64)
func (*TenantList) SetTotal ¶
func (objList *TenantList) SetTotal(total int64)
type TenantResourceQuota ¶
type TenantResourceQuota struct { ID uint Content datatypes.JSON TenantID uint `gorm:"uniqueIndex:uniq_tenant_cluster"` ClusterID uint `gorm:"uniqueIndex:uniq_tenant_cluster"` Tenant *Tenant `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` Cluster *Cluster `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` }
TenantResourceQuota 租户集群资源限制表(限制一个租户在一个集群的资源使用量) +gen type:object pkcolume:id pkfield:ID preloads:Tenant,Cluster,TenantResourceQuotaApply
func (*TenantResourceQuota) GetKind ¶
func (obj *TenantResourceQuota) GetKind() *string
func (*TenantResourceQuota) PreloadFields ¶
func (obj *TenantResourceQuota) PreloadFields() *[]string
func (*TenantResourceQuota) PrimaryKeyField ¶
func (obj *TenantResourceQuota) PrimaryKeyField() *string
func (*TenantResourceQuota) PrimaryKeyValue ¶
func (obj *TenantResourceQuota) PrimaryKeyValue() interface{}
func (*TenantResourceQuota) TableName ¶
func (obj *TenantResourceQuota) TableName() *string
type TenantResourceQuotaApply ¶
type TenantResourceQuotaApply struct { ID uint Content datatypes.JSON Status string `gorm:"type:varchar(30);"` CreateAt *time.Time `sql:"DEFAULT:'current_timestamp'"` TenantID uint `gorm:"uniqueIndex:uniq_tenant_cluster_quota_apply"` ClusterID uint `gorm:"uniqueIndex:uniq_tenant_cluster_quota_apply"` Tenant *Tenant `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` Cluster *Cluster `gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` Creator *User CreatorID uint }
TenantResourceQuotaApply 租户集群资源申请表 +gen type:object pkcolume:id pkfield:ID
func (*TenantResourceQuotaApply) GetKind ¶
func (obj *TenantResourceQuotaApply) GetKind() *string
func (*TenantResourceQuotaApply) PreloadFields ¶
func (obj *TenantResourceQuotaApply) PreloadFields() *[]string
func (*TenantResourceQuotaApply) PrimaryKeyField ¶
func (obj *TenantResourceQuotaApply) PrimaryKeyField() *string
func (*TenantResourceQuotaApply) PrimaryKeyValue ¶
func (obj *TenantResourceQuotaApply) PrimaryKeyValue() interface{}
func (*TenantResourceQuotaApply) TableName ¶
func (obj *TenantResourceQuotaApply) TableName() *string
type TenantResourceQuotaApplyList ¶
type TenantResourceQuotaApplyList struct { Items []*TenantResourceQuotaApply BaseList }
func (*TenantResourceQuotaApplyList) DataPtr ¶
func (objList *TenantResourceQuotaApplyList) DataPtr() interface{}
func (*TenantResourceQuotaApplyList) GetKind ¶
func (objList *TenantResourceQuotaApplyList) GetKind() *string
func (*TenantResourceQuotaApplyList) GetPageSize ¶
func (objList *TenantResourceQuotaApplyList) GetPageSize() (*int64, *int64)
func (*TenantResourceQuotaApplyList) GetTotal ¶
func (objList *TenantResourceQuotaApplyList) GetTotal() *int64
func (*TenantResourceQuotaApplyList) PrimaryKeyField ¶
func (obj *TenantResourceQuotaApplyList) PrimaryKeyField() *string
func (*TenantResourceQuotaApplyList) SetPageSize ¶
func (objList *TenantResourceQuotaApplyList) SetPageSize(page, size int64)
func (*TenantResourceQuotaApplyList) SetTotal ¶
func (objList *TenantResourceQuotaApplyList) SetTotal(total int64)
type TenantResourceQuotaList ¶
type TenantResourceQuotaList struct { Items []*TenantResourceQuota BaseList }
func (*TenantResourceQuotaList) DataPtr ¶
func (objList *TenantResourceQuotaList) DataPtr() interface{}
func (*TenantResourceQuotaList) GetKind ¶
func (objList *TenantResourceQuotaList) GetKind() *string
func (*TenantResourceQuotaList) GetPageSize ¶
func (objList *TenantResourceQuotaList) GetPageSize() (*int64, *int64)
func (*TenantResourceQuotaList) GetTotal ¶
func (objList *TenantResourceQuotaList) GetTotal() *int64
func (*TenantResourceQuotaList) PrimaryKeyField ¶
func (obj *TenantResourceQuotaList) PrimaryKeyField() *string
func (*TenantResourceQuotaList) SetPageSize ¶
func (objList *TenantResourceQuotaList) SetPageSize(page, size int64)
func (*TenantResourceQuotaList) SetTotal ¶
func (objList *TenantResourceQuotaList) SetTotal(total int64)
type TenantUserRel ¶
type TenantUserRel struct { ID uint `gorm:"primarykey"` Tenant *Tenant `json:",omitempty" gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` TenantID uint `gorm:"uniqueIndex:uniq_idx_tenant_user_rel"` User *User `json:",omitempty" gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` UserID uint `gorm:"uniqueIndex:uniq_idx_tenant_user_rel"` Role string `gorm:"type:varchar(30)" binding:"required"` }
+gen type:objectrel pkcolume:id pkfield:ID preloads:User,Tenant leftfield:Tenant rightfield:User
func (*TenantUserRel) GetKind ¶
func (obj *TenantUserRel) GetKind() *string
func (*TenantUserRel) PreloadFields ¶
func (obj *TenantUserRel) PreloadFields() *[]string
func (*TenantUserRel) PrimaryKeyField ¶
func (obj *TenantUserRel) PrimaryKeyField() *string
func (*TenantUserRel) PrimaryKeyValue ¶
func (obj *TenantUserRel) PrimaryKeyValue() interface{}
func (*TenantUserRel) TableName ¶
func (obj *TenantUserRel) TableName() *string
type TenantUserRelList ¶
type TenantUserRelList struct { Items []*TenantUserRel BaseList }
func (*TenantUserRelList) DataPtr ¶
func (objList *TenantUserRelList) DataPtr() interface{}
func (*TenantUserRelList) GetKind ¶
func (objList *TenantUserRelList) GetKind() *string
func (*TenantUserRelList) GetPageSize ¶
func (objList *TenantUserRelList) GetPageSize() (*int64, *int64)
func (*TenantUserRelList) GetTotal ¶
func (objList *TenantUserRelList) GetTotal() *int64
func (*TenantUserRelList) PrimaryKeyField ¶
func (obj *TenantUserRelList) PrimaryKeyField() *string
func (*TenantUserRelList) SetPageSize ¶
func (objList *TenantUserRelList) SetPageSize(page, size int64)
func (*TenantUserRelList) SetTotal ¶
func (objList *TenantUserRelList) SetTotal(total int64)
type User ¶
type User struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex"` Email string `gorm:"type:varchar(50)"` Phone string `gorm:"type:varchar(255)"` Password string `gorm:"type:varchar(255)"` Source string `gorm:"type:varchar(255)"` IsActive *bool `sql:"DEFAULT:true"` CreatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` LastLoginAt *time.Time `sql:"DEFAULT:'current_timestamp'"` Tenants []*Tenant `gorm:"many2many:tenant_user_rels;"` SystemRole *SystemRole SystemRoleID uint Role string `sql:"-"` }
User 用户表 +gen type:object pkcolume:id pkfield:ID preloads:SystemRole
func (*User) PreloadFields ¶
func (*User) PrimaryKeyField ¶
func (*User) PrimaryKeyValue ¶
func (obj *User) PrimaryKeyValue() interface{}
type UserList ¶
func (*UserList) GetPageSize ¶
func (*UserList) PrimaryKeyField ¶
func (*UserList) SetPageSize ¶
type UserMessageStatus ¶
type UserMessageStatus struct { ID uint UserID uint User *User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` MessageID uint Message *Message `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` IsRead bool }
+gen type:object pkcolume:id pkfield:ID
func (*UserMessageStatus) GetKind ¶
func (obj *UserMessageStatus) GetKind() *string
func (*UserMessageStatus) PreloadFields ¶
func (obj *UserMessageStatus) PreloadFields() *[]string
func (*UserMessageStatus) PrimaryKeyField ¶
func (obj *UserMessageStatus) PrimaryKeyField() *string
func (*UserMessageStatus) PrimaryKeyValue ¶
func (obj *UserMessageStatus) PrimaryKeyValue() interface{}
func (*UserMessageStatus) TableName ¶
func (obj *UserMessageStatus) TableName() *string
type UserMessageStatusList ¶
type UserMessageStatusList struct { Items []*UserMessageStatus BaseList }
func (*UserMessageStatusList) DataPtr ¶
func (objList *UserMessageStatusList) DataPtr() interface{}
func (*UserMessageStatusList) GetKind ¶
func (objList *UserMessageStatusList) GetKind() *string
func (*UserMessageStatusList) GetPageSize ¶
func (objList *UserMessageStatusList) GetPageSize() (*int64, *int64)
func (*UserMessageStatusList) GetTotal ¶
func (objList *UserMessageStatusList) GetTotal() *int64
func (*UserMessageStatusList) PrimaryKeyField ¶
func (obj *UserMessageStatusList) PrimaryKeyField() *string
func (*UserMessageStatusList) SetPageSize ¶
func (objList *UserMessageStatusList) SetPageSize(page, size int64)
func (*UserMessageStatusList) SetTotal ¶
func (objList *UserMessageStatusList) SetTotal(total int64)
type VirtualDomain ¶
type VirtualDomain struct { ID uint `gorm:"primarykey"` Name string `gorm:"type:varchar(50);uniqueIndex"` CreatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` UpdatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` IsActive bool CreatedBy string }
+gen type:object pkcolume:id pkfield:ID
func (*VirtualDomain) GetKind ¶
func (obj *VirtualDomain) GetKind() *string
func (*VirtualDomain) PreloadFields ¶
func (obj *VirtualDomain) PreloadFields() *[]string
func (*VirtualDomain) PrimaryKeyField ¶
func (obj *VirtualDomain) PrimaryKeyField() *string
func (*VirtualDomain) PrimaryKeyValue ¶
func (obj *VirtualDomain) PrimaryKeyValue() interface{}
func (*VirtualDomain) TableName ¶
func (obj *VirtualDomain) TableName() *string
type VirtualDomainList ¶
type VirtualDomainList struct { Items []*VirtualDomain BaseList }
func (*VirtualDomainList) DataPtr ¶
func (objList *VirtualDomainList) DataPtr() interface{}
func (*VirtualDomainList) GetKind ¶
func (objList *VirtualDomainList) GetKind() *string
func (*VirtualDomainList) GetPageSize ¶
func (objList *VirtualDomainList) GetPageSize() (*int64, *int64)
func (*VirtualDomainList) GetTotal ¶
func (objList *VirtualDomainList) GetTotal() *int64
func (*VirtualDomainList) PrimaryKeyField ¶
func (obj *VirtualDomainList) PrimaryKeyField() *string
func (*VirtualDomainList) SetPageSize ¶
func (objList *VirtualDomainList) SetPageSize(page, size int64)
func (*VirtualDomainList) SetTotal ¶
func (objList *VirtualDomainList) SetTotal(total int64)
type VirtualSpace ¶
+gen type:object pkcolume:id pkfield:ID
func (*VirtualSpace) GetKind ¶
func (obj *VirtualSpace) GetKind() *string
func (*VirtualSpace) PreloadFields ¶
func (obj *VirtualSpace) PreloadFields() *[]string
func (*VirtualSpace) PrimaryKeyField ¶
func (obj *VirtualSpace) PrimaryKeyField() *string
func (*VirtualSpace) PrimaryKeyValue ¶
func (obj *VirtualSpace) PrimaryKeyValue() interface{}
func (*VirtualSpace) TableName ¶
func (obj *VirtualSpace) TableName() *string
type VirtualSpaceList ¶
type VirtualSpaceList struct { Items []*VirtualSpace BaseList }
func (*VirtualSpaceList) DataPtr ¶
func (objList *VirtualSpaceList) DataPtr() interface{}
func (*VirtualSpaceList) GetKind ¶
func (objList *VirtualSpaceList) GetKind() *string
func (*VirtualSpaceList) GetPageSize ¶
func (objList *VirtualSpaceList) GetPageSize() (*int64, *int64)
func (*VirtualSpaceList) GetTotal ¶
func (objList *VirtualSpaceList) GetTotal() *int64
func (*VirtualSpaceList) PrimaryKeyField ¶
func (obj *VirtualSpaceList) PrimaryKeyField() *string
func (*VirtualSpaceList) SetPageSize ¶
func (objList *VirtualSpaceList) SetPageSize(page, size int64)
func (*VirtualSpaceList) SetTotal ¶
func (objList *VirtualSpaceList) SetTotal(total int64)
type VirtualSpaceUserRel ¶
type VirtualSpaceUserRel struct { ID uint `gorm:"primarykey"` VirtualSpaceID uint `gorm:"uniqueIndex:uniq_idx_virtual_space_user_rel"` VirtualSpace *VirtualSpace `json:",omitempty" gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` UserID uint `gorm:"uniqueIndex:uniq_idx_virtual_space_user_rel"` User *User `json:",omitempty" gorm:"constraint:OnUpdate:RESTRICT,OnDelete:CASCADE;"` Role string `gorm:"type:varchar(30)" binding:"required,eq=admin|eq=normal"` }
+gen type:objectrel pkcolume:id pkfield:ID
func (*VirtualSpaceUserRel) GetKind ¶
func (obj *VirtualSpaceUserRel) GetKind() *string
func (*VirtualSpaceUserRel) PreloadFields ¶
func (obj *VirtualSpaceUserRel) PreloadFields() *[]string
func (*VirtualSpaceUserRel) PrimaryKeyField ¶
func (obj *VirtualSpaceUserRel) PrimaryKeyField() *string
func (*VirtualSpaceUserRel) PrimaryKeyValue ¶
func (obj *VirtualSpaceUserRel) PrimaryKeyValue() interface{}
func (*VirtualSpaceUserRel) TableName ¶
func (obj *VirtualSpaceUserRel) TableName() *string
type VirtualSpaceUserRelList ¶
type VirtualSpaceUserRelList struct { Items []*VirtualSpaceUserRel BaseList }
func (*VirtualSpaceUserRelList) DataPtr ¶
func (objList *VirtualSpaceUserRelList) DataPtr() interface{}
func (*VirtualSpaceUserRelList) GetKind ¶
func (objList *VirtualSpaceUserRelList) GetKind() *string
func (*VirtualSpaceUserRelList) GetPageSize ¶
func (objList *VirtualSpaceUserRelList) GetPageSize() (*int64, *int64)
func (*VirtualSpaceUserRelList) GetTotal ¶
func (objList *VirtualSpaceUserRelList) GetTotal() *int64
func (*VirtualSpaceUserRelList) PrimaryKeyField ¶
func (obj *VirtualSpaceUserRelList) PrimaryKeyField() *string
func (*VirtualSpaceUserRelList) SetPageSize ¶
func (objList *VirtualSpaceUserRelList) SetPageSize(page, size int64)
func (*VirtualSpaceUserRelList) SetTotal ¶
func (objList *VirtualSpaceUserRelList) SetTotal(total int64)
type Workload ¶
type Workload struct { ID uint `gorm:"primarykey"` Name string Cluster string Namespace string Type string CPULimitStdvar float64 MemoryLimitStdvar float64 CreatedAt *time.Time `sql:"DEFAULT:'current_timestamp'"` Containers []*Container `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"` }
Workload workload resource stastics(for workload resoure suggestion) +gen type:object pkcolume:id pkfield:ID preloads:Containers
func (*Workload) PreloadFields ¶
func (*Workload) PrimaryKeyField ¶
func (*Workload) PrimaryKeyValue ¶
func (obj *Workload) PrimaryKeyValue() interface{}
type WorkloadList ¶
func (*WorkloadList) DataPtr ¶
func (objList *WorkloadList) DataPtr() interface{}
func (*WorkloadList) GetKind ¶
func (objList *WorkloadList) GetKind() *string
func (*WorkloadList) GetPageSize ¶
func (objList *WorkloadList) GetPageSize() (*int64, *int64)
func (*WorkloadList) GetTotal ¶
func (objList *WorkloadList) GetTotal() *int64
func (*WorkloadList) PrimaryKeyField ¶
func (obj *WorkloadList) PrimaryKeyField() *string
func (*WorkloadList) SetPageSize ¶
func (objList *WorkloadList) SetPageSize(page, size int64)
func (*WorkloadList) SetTotal ¶
func (objList *WorkloadList) SetTotal(total int64)
Source Files ¶
- base.go
- client.go
- client_clustergetter.go
- client_extra.go
- client_hooks.go
- m_applications.go
- m_auditlog.go
- m_auth.go
- m_chartrepo.go
- m_cluster.go
- m_environments.go
- m_image_registry.go
- m_logquery.go
- m_message.go
- m_openapi.go
- m_projects.go
- m_statistics.go
- m_systemrole.go
- m_tenant_quota.go
- m_tenants.go
- m_users.go
- m_virtualspace.go
- utils.go
- zz_generated.go