Documentation ¶
Index ¶
- Constants
- Variables
- func BuildFilter(qs orm.QuerySeter, query map[string]interface{}) orm.QuerySeter
- func BuildGroupBy(qb orm.QueryBuilder, groupby []string) orm.QueryBuilder
- func BuildOrder(qb orm.QueryBuilder, order []string) orm.QueryBuilder
- func BuildQuery(qb orm.QueryBuilder, query map[string]interface{}) (orm.QueryBuilder, []interface{})
- func GetAll(queryTable interface{}, list interface{}, q *common.QueryParam) error
- func GetAppIdByFilter(queryTable string, filter map[string]interface{}) (err error, id int64)
- func GetTotal(queryTable interface{}, q *common.QueryParam) (int64, error)
- func ListTemplate(list interface{}, q *common.QueryParam, table string, resourceType PublishType, ...) (total int64, err error)
- func Ormer() orm.Ormer
- type APIKey
- type APIKeyType
- type ActionPermission
- type App
- type AppStar
- type AppStarred
- type AppStatistics
- type AppUser
- type AuditLog
- type AuditLogLevel
- type AuditLogType
- type AuthModel
- type Charge
- type Cluster
- type ClusterMeta
- type ClusterMetaData
- type ClusterRobinMetaData
- type ClusterStatus
- type Config
- type ConfigKey
- type ConfigMap
- type ConfigMapTemplate
- type Cronjob
- type CronjobMetaData
- type CronjobTemplate
- type DaemonSet
- type DaemonSetMetaData
- type DaemonSetTemplate
- type DeployCount
- type Deployment
- type DeploymentMetaData
- type DeploymentTemplate
- type Group
- type GroupType
- type Invoice
- type KubeApiType
- type LdapConf
- type LdapUser
- type Namespace
- type NamespaceDetail
- type NamespaceMetaData
- type NamespaceUser
- type Notification
- type NotificationLevel
- type NotificationLog
- type NotificationType
- type Permission
- type PersistentVolumeClaim
- type PersistentVolumeClaimTemplate
- type PublishHistory
- type PublishStatus
- type PublishType
- type ReleaseStatus
- type ResourceName
- type ResourcesLimit
- type Secret
- type SecretTemplate
- type Service
- type ServiceTemplate
- type Statefulset
- type StatefulsetMetaData
- type StatefulsetTemplate
- type TypePermission
- type User
- type UserStatistics
- type UserType
- type WebHook
- type WebHookScope
Constants ¶
View Source
const ( AuditLogLevelNormal AuditLogLevel = "Normal" AuditLogLevelWarning AuditLogLevel = "Warning" AuditLogLevelCritical AuditLogLevel = "Critical" // CURD AuditLogTypeUnknown AuditLogType = "Unknown" AuditLogTypeCreate AuditLogType = "Create" AuditLogTypeUpdate AuditLogType = "Update" AuditLogTypeRead AuditLogType = "Read" AuditLogTypeDelete AuditLogType = "Delete" )
View Source
const ( AuthTypeDB = "db" AuthTypeOAuth2 = "oauth2" AuthTypeLDAP = "ldap" )
View Source
const ( GroupAdmin = "管理员" GroupViewer = "访客" GroupDeveloper = "项目开发" )
View Source
const ( DefaultNamespace = "demo" TableNameNamespace = "namespace" )
View Source
const ( TableNamePermission = "permission" PermissionCreate = "CREATE" PermissionUpdate = "UPDATE" PermissionRead = "READ" PermissionDelete = "DELETE" PermissionDeploy = "DEPLOY" PermissionOffline = "OFFLINE" PermissionTypeApp = "APP" PermissionTypeAppUser = "APPUSER" PermissionTypeDeployment = "DEPLOYMENT" PermissionTypeSecret = "SECRET" PermissionTypeService = "SERVICE" PermissionTypeConfigMap = "CONFIGMAP" PermissionTypeCronjob = "CRONJOB" PermissionTypePersistentVolumeClaim = "PVC" PermissionTypeNamespace = "NAMESPACE" PermissionTypeNamespaceUser = "NAMESPACEUSER" PermissionTypeWebHook = "WEBHOOK" PermissionTypeStatefulset = "STATEFULSET" PermissionTypeDaemonSet = "DAEMONSET" PermissionBill = "BILL" PermissionTypeAPIKey = "APIKEY" PermissionBlank = "_" )
View Source
const (
TableNameApp = "app"
)
View Source
const (
TableNameAppStarred = "app_starred"
)
View Source
const (
TableNameAppUser = "app_user"
)
View Source
const (
TableNameAuditLog = "audit_log"
)
View Source
const (
TableNameConfigMap = "config_map"
)
View Source
const (
TableNameConfigMapTemplate = "config_map_template"
)
View Source
const (
TableNameCronjob = "cronjob"
)
View Source
const (
TableNameCronjobTemplate = "cronjob_template"
)
View Source
const (
TableNameDaemonSet = "daemon_set"
)
View Source
const (
TableNameDaemonSetTemplate = "daemon_set_template"
)
View Source
const (
TableNameDeployment = "deployment"
)
View Source
const (
TableNameDeploymentTemplate = "deployment_template"
)
View Source
const (
TableNameInvoice = "invoice"
)
View Source
const (
TableNameNamespaceUser = "namespace_user"
)
View Source
const (
TableNameNotification = "notification"
)
View Source
const (
TableNameNotificationLog = "notification_log"
)
View Source
const (
TableNamePersistentVolumeClaim = "persistent_volume_claim"
)
View Source
const (
TableNamePersistentVolumeClaimTemplate = "persistent_volume_claim_template"
)
View Source
const (
TableNameSecret = "secret"
)
View Source
const (
TableNameSecretTemplate = "secret_template"
)
View Source
const (
TableNameService = "service"
)
View Source
const (
TableNameServiceTemplate = "service_template"
)
View Source
const (
TableNameStatefulset = "statefulset"
)
View Source
const (
TableNameStatefulsetTemplate = "statefulset_template"
)
Variables ¶
View Source
var ( UserModel *userModel AppModel *appModel AppUserModel *appUserModel AppStarredModel *appStarredModel NamespaceUserModel *namespaceUserModel ClusterModel *clusterModel DeploymentModel *deploymentModel DeploymentTplModel *deploymentTplModel PermissionModel *permissionModel GroupModel *groupModel NamespaceModel *namespaceModel ConfigMapModel *configMapModel ConfigMapTplModel *configMapTplModel CronjobModel *cronjobModel CronjobTplModel *cronjobTplModel SecretModel *secretModel SecretTplModel *secretTplModel PublishStatusModel *publishStatusModel PublishHistoryModel *publishHistoryModel PersistentVolumeClaimModel *persistentVolumeClaimModel PersistentVolumeClaimTplModel *persistentVolumeClaimTplModel AuditLogModel *auditLogModel ApiKeyModel *apiKeyModel WebHookModel *webHookModel StatefulsetModel *statefulsetModel StatefulsetTplModel *statefulsetTplModel ConfigModel *configModel DaemonSetModel *daemonSetModel DaemonSetTplModel *daemonSetTplModel ChargeModel *chargeModel InvoiceModel *invoiceModel NotificationModel *notificationModel NotificationLogModel *notificationLogModel )
View Source
var ( APIKeyUser = User{ Id: 0, Name: "OpenAPI", Type: APIUser, Display: "OpenAPI", } AnonymousUser = User{ Id: 0, Name: "Anonymous", Type: DefaultUser, Display: "Anonymous", } )
View Source
var TableToKubeApiTypeMap = map[string]KubeApiType{ TableNameDeployment: KubeApiTypeDeployment, TableNameCronjob: KubeApiTypeCronJob, TableNameStatefulset: KubeApiTypeStatefulSet, TableNameDaemonSet: KubeApiTypeDaemonSet, TableNameService: KubeApiTypeService, TableNameConfigMap: KubeApiTypeConfigMap, TableNameSecret: KubeApiTypeSecret, TableNamePersistentVolumeClaim: KubeApiTypePersistentVolumeClaim, }
Functions ¶
func BuildFilter ¶
func BuildFilter(qs orm.QuerySeter, query map[string]interface{}) orm.QuerySeter
func BuildGroupBy ¶
func BuildGroupBy(qb orm.QueryBuilder, groupby []string) orm.QueryBuilder
func BuildOrder ¶
func BuildOrder(qb orm.QueryBuilder, order []string) orm.QueryBuilder
func BuildQuery ¶
func BuildQuery(qb orm.QueryBuilder, query map[string]interface{}) (orm.QueryBuilder, []interface{})
func GetAll ¶
func GetAll(queryTable interface{}, list interface{}, q *common.QueryParam) error
func GetAppIdByFilter ¶
func ListTemplate ¶
func ListTemplate(list interface{}, q *common.QueryParam, table string, resourceType PublishType, isOnline bool) (total int64, err error)
Types ¶
type APIKey ¶
type APIKey struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"index;size(128)" json:"name,omitempty"` Token string `orm:"type(text)" json:"token,omitempty"` // 0:全局 1:命名空间 2:项目 Type APIKeyType `orm:"type(integer)" json:"type"` ResourceId int64 `orm:"null;type(bigint)" json:"resourceId,omitempty"` // TODO beego 默认删除规则为级联删除,可选项 do_nothing on_delete Group *Group `orm:"null;rel(fk);on_delete(set_null)" json:"group,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` ExpireIn int64 `orm:"type(bigint)" json:"expireIn"` // 过期时间,单位:秒 Deleted bool `orm:"default(false)" json:"deleted,omitempty"` // 是否生效 CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` }
type APIKeyType ¶
type APIKeyType int32
const ( TableNameAPIKey = "api_key" GlobalAPIKey APIKeyType = 0 NamespaceAPIKey APIKeyType = 1 ApplicationAPIKey APIKeyType = 2 )
type ActionPermission ¶
type ActionPermission struct { PermissionRead bool `json:"read" mapstructure:"READ"` PermissionCreate bool `json:"create" mapstructure:"CREATE"` PermissionUpdate bool `json:"update" mapstructure:"UPDATE"` PermissionDelete bool `json:"delete" mapstructure:"DELETE"` PermissionDeploy bool `json:"deploy" mapstructure:"DEPLOY"` PermissionOffline bool `json:"offline" mapstructure:"OFFLINE"` }
type App ¶
type App struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` Namespace *Namespace `orm:"index;column(namespace_id);rel(fk)" json:"namespace"` /* { "mode": "beta", "system.api-name-generate-rule":"none" // refers to models.Config ConfigKeyApiNameGenerateRule } */ MetaData string `orm:"type(text)" json:"metaData,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` // 用于权限的关联查询 AppUsers []*AppUser `orm:"reverse(many)" json:"-"` // 关注的关联查询 AppStars []*AppStarred `orm:"reverse(many)" json:"-"` }
type AppStar ¶
type AppStar struct { App CreateTime time.Time `json:"createTime"` NamespaceId int64 `json:"namespaceId"` NamespaceName string `json:"namespaceName"` Starred bool `json:"starred"` }
由于beego已注册的model columns会缓存,而标记为orm:"-"的column不会缓存进去 会导致orm:"-"的column 使用QueryRows无法查询 具体代码:astaxie/beego/orm/orm_raw.go QueryRows
type AppStarred ¶
type AppStarred struct { Id int64 `orm:"auto" json:"id,omitempty"` App *App `orm:"index;rel(fk);column(app_id)" json:"app,omitempty"` User *User `orm:"index;rel(fk);column(user_id)" json:"user,omitempty"` }
func (*AppStarred) TableName ¶
func (*AppStarred) TableName() string
func (*AppStarred) TableUnique ¶
func (*AppStarred) TableUnique() [][]string
type AppStatistics ¶
type AppStatistics struct { Total int64 `json:"total,omitempty"` Details *[]NamespaceDetail `json:"details,omitempty"` }
type AppUser ¶
type AppUser struct { Id int64 `orm:"auto" json:"id,omitempty"` App *App `orm:"index;rel(fk);column(app_id)" json:"app,omitempty"` User *User `orm:"index;rel(fk);column(user_id)" json:"user,omitempty"` Group *Group `orm:"index;rel(fk)" json:"group,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` Groups []*Group `orm:"-" json:"groups,omitempty"` GroupsName string `orm:"-" json:"groupsName,omitempty"` }
type AuditLog ¶
type AuditLog struct { Id int64 `orm:"auto" json:"id,omitempty"` SubjectId int64 `orm:"type(bigint)" json:"subjectId,omitempty"` LogType AuditLogType `orm:"index;size(128)" json:"logType,omitempty"` LogLevel AuditLogLevel `orm:"index;size(128)" json:"logLevel,omitempty"` Action string `orm:"index;size(256)" json:"action,omitempty"` Message string `orm:"type(text);null" json:"message,omitempty"` UserIp string `orm:"size(200)" json:"userIp,omitempty"` User string `orm:"index;size(128)" json:"user,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime);null" json:"createTime,omitempty"` }
type AuditLogLevel ¶
type AuditLogLevel string
type AuditLogType ¶
type AuditLogType string
type AuthModel ¶
type AuthModel struct { Username string Password string // oauth2 name ex. google github OAuth2Name string OAuth2Code string }
AuthModel holds information used to authenticate.
type Charge ¶
type Charge struct { Id int64 `orm:"auto" json:"id,omitempty"` Namespace string `orm:"size(1024)" json:"namespace,omitempty"` App string `orm:"index;size(1024)" json:"app,omitempty"` Name string `orm:"size(1024)" json:"name,omitempty"` Type string `orm:"index;size(1024)" json:"type,omitempty"` UnitPrice float64 `orm:"digits(12);decimals(4)" json:"unitPrice,omitempty"` Quantity int `orm:"int(11)" json:"quantity,omitempty"` Amount float64 `orm:"digits(12);decimals(4)" json:"amount,omitempty"` ResourceName ResourceName `orm:"size(1024)" json:"resourceName,omitempty"` StartTime *time.Time `orm:"type(datetime)" json:"startTime,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` }
type Cluster ¶
type Cluster struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` /* { "robin": { "token": "robin token", "url":"http://10.10.10.10:8080", "sftpPort": 2022, "passwordDesKey": "Dhg4YuMn" // change one or more character,the length must be 8. }, "rbd": { // rbd默认配置,创建或修改RBD类型的PV时会使用此配置填充 "monitors": [ "10.10.10.1:6789", "10.10.10.2:6789", "10.10.10.3:6789" ], "fsType": "xfs", "pool": "k8s_pool", "user": "search", "keyring": "/etc/ceph/ceph.client.search.keyring" }, "cephfs": { // cephfs默认配置,创建或修改cephfs类型的PV时会使用此配置填充 "monitors": [ "10.10.10.4:6789", "10.10.10.5:6789", "10.10.10.6:6789" ], "user": "search", "secretRef": { "name": "infra-cephfs" } } } */ MetaData string `orm:"null;type(text)" json:"metaData,omitempty"` Master string `orm:"size(128)" json:"master,omitempty"` // apiserver地址,示例: https://10.172.189.140 KubeConfig string `orm:"null;type(text)" json:"kubeConfig,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` // the cluster status Status ClusterStatus `orm:"default(0)" json:"status"` MetaDataObj ClusterMetaData `orm:"-" json:"-"` }
type ClusterMeta ¶
type ClusterMeta struct {
ResourcesLimit ResourcesLimit `json:"resourcesLimit"`
}
type ClusterMetaData ¶
type ClusterMetaData struct { // robin plugin Robin *ClusterRobinMetaData `json:"robin"` // kubetool log source LogSource string `json:"logSource"` // rbd默认配置,创建或修改RBD类型的PV时会使用此配置填充 RBD *v1.RBDVolumeSource `json:"rbd"` // cephfs默认配置,创建或修改cephfs类型的PV时会使用此配置填充 CephFS *v1.CephFSVolumeSource `json:"cephfs"` // 默认添加环境变量,会在发布资源时在每个Container添加此环境变量, will be overwrite by namespace's ImagePullSecrets Env []v1.EnvVar // current cluster image pull secrets, will be overwrite by namespace's ImagePullSecrets ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets"` }
type ClusterRobinMetaData ¶
type ClusterStatus ¶
type ClusterStatus int32
const ( ClusterStatusNormal ClusterStatus = 0 ClusterStatusMaintaining ClusterStatus = 1 TableNameCluster = "cluster" )
type Config ¶
type ConfigKey ¶
type ConfigKey string
const ( ConfigKeyTitile ConfigKey = "system.title" ConfigKeyImageNamePrefix ConfigKey = "system.image-prefix" ConfigKeyAffinity ConfigKey = "system.affinity" // redirect to monitor uri config // will be replace {{app.name}} to app's name // e.g https://github.com/{{app.name}}, if the app name is wayne, will redirect to https://github.com/wayne ConfigKeyMonitorUri ConfigKey = "system.monitor-uri" // Option Values : join none // join: means ApiName will join with app name e.g. app name is wayne, deployment name is foo, the final name is wayne-foo // none: do nothing with the ApiName ConfigKeyApiNameGenerateRule ConfigKey = "system.api-name-generate-rule" TableNameConfig = "config" )
type ConfigMap ¶
type ConfigMap struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;size(128)" json:"name,omitempty"` MetaData string `orm:"type(text)" json:"metaData,omitempty"` App *App `orm:"index;rel(fk)" json:"app,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` OrderId int64 `orm:"index;default(0)" json:"order"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` AppId int64 `orm:"-" json:"appId,omitempty"` }
type ConfigMapTemplate ¶
type ConfigMapTemplate struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"size(128)" json:"name,omitempty"` Template string `orm:"type(text)" json:"template,omitempty"` ConfigMap *ConfigMap `orm:"index;rel(fk);column(config_map_id)" json:"configMap,omitempty"` // 存储模版可上线机房 // 例如{"clusters":["K8S"]} MetaData string `orm:"type(text)" json:"metaData,omitempty"` Description string `orm:"size(512)" json:"description,omitempty"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` Status []*PublishStatus `orm:"-" json:"status,omitempty"` ConfigMapId int64 `orm:"-" json:"configMapId,omitempty"` }
func (*ConfigMapTemplate) TableName ¶
func (*ConfigMapTemplate) TableName() string
type Cronjob ¶
type Cronjob struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;size(128)" json:"name,omitempty"` // 存储模版可上线机房,已挂起的机房 /* { "replicas": { "K8S": 1 }, } */ MetaData string `orm:"type(text)" json:"metaData,omitempty"` MetaDataObj CronjobMetaData `orm:"-" json:"-"` App *App `orm:"index;rel(fk)" json:"app,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` OrderId int64 `orm:"index;default(0)" json:"order"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` AppId int64 `orm:"-" json:"appId,omitempty"` }
type CronjobMetaData ¶
type CronjobTemplate ¶
type CronjobTemplate struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"size(128)" json:"name,omitempty"` Template string `orm:"type(text)" json:"template,omitempty"` Cronjob *Cronjob `orm:"index;rel(fk);column(cronjob_id)" json:"cronjob,omitempty"` MetaData string `orm:"type(text)" json:"metaData,omitempty"` Description string `orm:"size(512)" json:"description,omitempty"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` Status []*PublishStatus `orm:"-" json:"status,omitempty"` CronjobId int64 `orm:"-" json:"cronjobId,omitempty"` }
func (*CronjobTemplate) TableName ¶
func (*CronjobTemplate) TableName() string
type DaemonSet ¶
type DaemonSet struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` /* 存储元数据 { "privileged":{"nginx",true}, "affinity": { "podAntiAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": [ { "labelSelector": { "matchExpressions": [ { "operator": "In", "values": [ "xxx" ], "key": "app" } ] }, "topologyKey": "kubernetes.io/hostname" } ] } }, "resources":{ "cpuRequestLimitPercent": "50%", // cpu request和limit百分比,默认50% "memoryRequestLimitPercent": "100%", // memory request和limit百分比,默认100% "cpuLimit":"12", // cpu限制,默认12个核 "memoryLimit":"64" // 内存限制,默认64G "replicaLimit":"32" // 份数限制,默认32份 } } */ MetaData string `orm:"type(text)" json:"metaData,omitempty"` MetaDataObj DaemonSetMetaData `orm:"-" json:"-"` App *App `orm:"index;rel(fk)" json:"app,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` OrderId int64 `orm:"index;default(0)" json:"order"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` AppId int64 `orm:"-" json:"appId,omitempty"` }
type DaemonSetMetaData ¶
type DaemonSetTemplate ¶
type DaemonSetTemplate struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"size(128)" json:"name,omitempty"` Template string `orm:"type(text)" json:"template,omitempty"` DaemonSet *DaemonSet `orm:"index;rel(fk)" json:"daemonSet,omitempty"` Description string `orm:"size(512)" json:"description,omitempty"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` DaemonSetId int64 `orm:"-" json:"daemonSetId,omitempty"` Status []*PublishStatus `orm:"-" json:"status,omitempty"` }
func (*DaemonSetTemplate) TableName ¶
func (*DaemonSetTemplate) TableName() string
type DeployCount ¶
type Deployment ¶
type Deployment struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` /* 存储部署元数据 { "replicas": { "K8S": 1 }, "privileged":{"nginx",true}, "affinity": { "podAntiAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": [ { "labelSelector": { "matchExpressions": [ { "operator": "In", "values": [ "xxx" ], "key": "app" } ] }, "topologyKey": "kubernetes.io/hostname" } ] } }, "resources":{ "cpuRequestLimitPercent": "50%", // cpu request和limit百分比,默认50% "memoryRequestLimitPercent": "100%", // memory request和limit百分比,默认100% "cpuLimit":"12", // cpu限制,默认12个核 "memoryLimit":"64" // 内存限制,默认64G "replicaLimit":"32" // 部署份数限制,默认32份 } } */ MetaData string `orm:"type(text)" json:"metaData,omitempty"` MetaDataObj DeploymentMetaData `orm:"-" json:"-"` App *App `orm:"index;rel(fk)" json:"app,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` OrderId int64 `orm:"index;default(0)" json:"order"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` AppId int64 `orm:"-" json:"appId,omitempty"` }
func (*Deployment) TableName ¶
func (*Deployment) TableName() string
type DeploymentMetaData ¶
type DeploymentTemplate ¶
type DeploymentTemplate struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"size(128)" json:"name,omitempty"` Template string `orm:"type(text)" json:"template,omitempty"` Deployment *Deployment `orm:"index;rel(fk);column(deployment_id)" json:"deployment,omitempty"` Description string `orm:"size(512)" json:"description,omitempty"` // TODO // 如果使用指针类型auto_now_add和auto_now可以自动生效,但是orm QueryRows无法对指针类型的time正常赋值, // 不使用指针类型创建时需要手动把创建时间设置为当前时间,更新时也需要处理创建时间 CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` DeploymentId int64 `orm:"-" json:"deploymentId,omitempty"` Status []*PublishStatus `orm:"-" json:"status,omitempty"` }
func (*DeploymentTemplate) TableName ¶
func (*DeploymentTemplate) TableName() string
type Group ¶
type Group struct { Id int64 `orm:"pk;auto" json:"id,omitempty"` Name string `orm:"index;size(200)" json:"name,omitempty"` Comment string `orm:"type(text)" json:"comment,omitempty"` Type GroupType `orm:"type(integer)" json:"type"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` // 用于权限的关联查询 Permissions []*Permission `orm:"rel(m2m);rel_table(group_permissions)" json:"permissions,omitempty"` AppUsers []*AppUser `orm:"reverse(many)" json:"appUsers,omitempty"` NamespaceUsers []*NamespaceUser `orm:"reverse(many)" json:"namespaceUsers,omitempty"` }
type Invoice ¶
type Invoice struct { Id int64 `orm:"auto" json:"id,omitempty"` Namespace string `orm:"size(1024)" json:"namespace,omitempty"` App string `orm:"index;size(1024)" json:"app,omitempty"` Amount float64 `orm:"digits(12);decimals(4)" json:"amount,omitempty"` StartDate *time.Time `orm:"type(datetime)" json:"startDate,omitempty"` EndDate *time.Time `orm:"type(datetime)" json:"endDate,omitempty"` BillDate *time.Time `orm:"type(datetime)" json:"billDate,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` }
type KubeApiType ¶
type KubeApiType string
const ( KubeApiTypeDeployment KubeApiType = "Deployment" KubeApiTypeCronJob KubeApiType = "CronJob" KubeApiTypeStatefulSet KubeApiType = "StatefulSet" KubeApiTypeDaemonSet KubeApiType = "DaemonSet" KubeApiTypeService KubeApiType = "Service" KubeApiTypeConfigMap KubeApiType = "ConfigMap" KubeApiTypeSecret KubeApiType = "Secret" KubeApiTypePersistentVolumeClaim KubeApiType = "PersistentVolumeClaim" KubeApiTypeJob KubeApiType = "Job" KubeApiTypeReplicaSet KubeApiType = "ReplicaSet" )
type LdapConf ¶
type LdapConf struct { LdapURL string `json:"ldap_url"` LdapSearchDn string `json:"ldap_search_dn"` LdapSearchPassword string `json:"ldap_search_password"` LdapBaseDn string `json:"ldap_base_dn"` LdapFilter string `json:"ldap_filter"` LdapUID string `json:"ldap_uid"` LdapScope int `json:"ldap_scope"` LdapConnectionTimeout int `json:"ldap_connection_timeout"` }
type LdapUser ¶
type LdapUser struct { Username string `json:"ldap_username"` Email string `json:"ldap_email"` Realname string `json:"ldap_realname"` DN string `json:"-"` }
LdapUser ...
type Namespace ¶
type Namespace struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"index;unique;size(128)" json:"name,omitempty"` // 配置对应Kubernetes的namespace {"namespace":"default"} // 配置对应namespace可使用的集群 {"clusters":"K8S"} MetaData string `orm:"type(text)" json:"metaData,omitempty"` MetaDataObj NamespaceMetaData `orm:"-" json:"-"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` // 用于权限的关联查询 NamespaceUsers []*NamespaceUser `orm:"reverse(many)" json:"-"` }
type NamespaceDetail ¶
type NamespaceMetaData ¶
type NamespaceMetaData struct { // kubernetes' namespace Namespace string `json:"namespace,omitempty"` // key is cluster name, if the key not exist on clusterMeta // means this namespace could't use the cluster ClusterMetas map[string]ClusterMeta `json:"clusterMeta,omitempty"` // current namespace env, will overwrite cluster's Env Env []v1.EnvVar `json:"env,omitempty"` // current namespace image pull secrets, will overwrite cluster's ImagePullSecrets ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets"` }
type NamespaceUser ¶
type NamespaceUser struct { Id int64 `orm:"auto" json:"id,omitempty"` Namespace *Namespace `orm:"index;rel(fk);column(namespace_id)" json:"namespace,omitempty"` User *User `orm:"index;rel(fk);column(user_id)" json:"user,omitempty"` Group *Group `orm:"index;rel(fk)" json:"group,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` Groups []*Group `orm:"-" json:"groups,omitempty"` GroupsName string `orm:"-" json:"groupsName,omitempty"` }
func (*NamespaceUser) TableName ¶
func (*NamespaceUser) TableName() string
type Notification ¶
type Notification struct { Id int64 `orm:"auto" json:"id,omitempty"` Type NotificationType `orm:"index;size(128)" json:"type,omitempty"` Title string `orm:"size(2000)" json:"title,omitempty"` Message string `orm:"type(text)" json:"message,omitempty"` FromUser *User `orm:"index;rel(fk)" json:"from,omitempty"` Level NotificationLevel `orm:"int" json:"level,omitempty"` IsPublished bool `orm:"bool" json:"is_published"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` }
func (*Notification) TableName ¶
func (*Notification) TableName() string
type NotificationLevel ¶
type NotificationLevel int
const ( LowNotification NotificationLevel = iota MiddleNotification HighNotification )
type NotificationLog ¶
type NotificationLog struct { Id int64 `orm:"auto" json:"id,omitempty"` UserId int64 `orm:"int" json:"user_id,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` IsReaded bool `orm:"bool" json:"is_readed"` Notification *Notification `orm:"index;column(notification_id);rel(fk)" json:"notification"` }
func (*NotificationLog) TableName ¶
func (*NotificationLog) TableName() string
type NotificationType ¶
type NotificationType string
const ( NoticeNotification NotificationType = "公告" WarningNotification NotificationType = "警告" )
type Permission ¶
type Permission struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"index;size(200)" json:"name,omitempty"` Comment string `orm:"type(text)" json:"comment,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` Groups []*Group `orm:"reverse(many)" json:"groups,omitempty"` }
func (*Permission) TableName ¶
func (*Permission) TableName() string
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` MetaData string `orm:"type(text)" json:"metaData,omitempty"` App *App `orm:"index;rel(fk)" json:"app,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` OrderId int64 `orm:"index;default(0)" json:"order"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` AppId int64 `orm:"-" json:"appId,omitempty"` }
func (*PersistentVolumeClaim) TableName ¶
func (*PersistentVolumeClaim) TableName() string
type PersistentVolumeClaimTemplate ¶
type PersistentVolumeClaimTemplate struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"size(128)" json:"name,omitempty"` Template string `orm:"type(text)" json:"template,omitempty"` PersistentVolumeClaim *PersistentVolumeClaim `orm:"index;rel(fk)" json:"persistentVolumeClaim,omitempty"` // 存储模版可上线机房 // 例如{"clusters":["K8S"]} MetaData string `orm:"type(text)" json:"metaData,omitempty"` Description string `orm:"size(512)" json:"description,omitempty"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` Status []*PublishStatus `orm:"-" json:"status,omitempty"` PersistentVolumeClaimId int64 `orm:"-" json:"persistentVolumeClaimId,omitempty"` }
func (*PersistentVolumeClaimTemplate) TableName ¶
func (*PersistentVolumeClaimTemplate) TableName() string
type PublishHistory ¶
type PublishHistory struct { Id int64 `orm:"auto" json:"id,omitempty"` Type PublishType `orm:"index;type(integer)" json:"type,omitempty"` ResourceId int64 `orm:"index" json:"resourceId,omitempty"` ResourceName string `orm:"size(128)" json:"resourceName,omitempty"` TemplateId int64 `orm:"index;column(template_id)" json:"templateId,omitempty"` Cluster string `orm:"size(128)" json:"cluster,omitempty"` Status ReleaseStatus `orm:"type(integer)" json:"status,omitempty"` Message string `orm:"type(text)" json:"message,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` }
func (*PublishHistory) TableName ¶
func (*PublishHistory) TableName() string
type PublishStatus ¶
type PublishStatus struct { Id int64 `orm:"auto" json:"id,omitempty"` Type PublishType `orm:"index;type(integer)" json:"type,omitempty"` ResourceId int64 `orm:"index;column(resource_id)" json:"resourceId,omitempty"` TemplateId int64 `orm:"index;column(template_id);" json:"templateId,omitempty"` Cluster string `orm:"size(128);column(cluster)" json:"cluster,omitempty"` }
记录已发布模版信息
func (*PublishStatus) TableName ¶
func (*PublishStatus) TableName() string
type PublishType ¶
type PublishType int32
const ( PublishTypeDeployment PublishType = iota PublishTypeService PublishTypeConfigMap PublishTypeSecret PublishTypePersistentVolumeClaim PublishTypeCronJob PublishTypeStatefulSet PublishTypeDaemonSet TableNamePublishStatus = "publish_status" )
type ReleaseStatus ¶
type ReleaseStatus int32
const ( ReleaseFailure ReleaseStatus = iota ReleaseSuccess TableNamePublishHistory = "publish_history" )
type ResourceName ¶
type ResourceName string
const ( Mem ResourceName = "mem" Cpu ResourceName = "cpu" TableNameCharge = "charge" )
type ResourcesLimit ¶
type Secret ¶
type Secret struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` MetaData string `orm:"type(text)" json:"metaData,omitempty"` App *App `orm:"index;rel(fk)" json:"app,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` OrderId int64 `orm:"index;default(0)" json:"order"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` AppId int64 `orm:"-" json:"appId,omitempty"` }
type SecretTemplate ¶
type SecretTemplate struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"size(128)" json:"name,omitempty"` Template string `orm:"type(text)" json:"template,omitempty"` Secret *Secret `orm:"index;rel(fk);column(secret_map_id)" json:"secret,omitempty"` // 存储模版可上线机房 // 例如{"clusters":["K8S"]} MetaData string `orm:"type(text)" json:"metaData,omitempty"` Description string `orm:"size(512)" json:"description,omitempty"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` Status []*PublishStatus `orm:"-" json:"status,omitempty"` SecretId int64 `orm:"-" json:"secretId,omitempty"` }
func (*SecretTemplate) TableName ¶
func (*SecretTemplate) TableName() string
type Service ¶
type Service struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` MetaData string `orm:"type(text)" json:"metaData,omitempty"` App *App `orm:"index;rel(fk)" json:"app,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` OrderId int64 `orm:"index;default(0)" json:"order"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` AppId int64 `orm:"-" json:"appId,omitempty"` }
type ServiceTemplate ¶
type ServiceTemplate struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"size(128)" json:"name,omitempty"` Template string `orm:"type(text)" json:"template,omitempty"` Service *Service `orm:"index;rel(fk);column(service_id)" json:"service,omitempty"` Description string `orm:"size(512)" json:"description,omitempty"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` Status []*PublishStatus `orm:"-" json:"status,omitempty"` ServiceId int64 `orm:"-" json:"serviceId,omitempty"` }
func (*ServiceTemplate) TableName ¶
func (*ServiceTemplate) TableName() string
type Statefulset ¶
type Statefulset struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"unique;index;size(128)" json:"name,omitempty"` /* 存储元数据 { "replicas": { "K8S": 1 }, "privileged":{"nginx",true}, "affinity": { "podAntiAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": [ { "labelSelector": { "matchExpressions": [ { "operator": "In", "values": [ "xxx" ], "key": "app" } ] }, "topologyKey": "kubernetes.io/hostname" } ] } }, "resources":{ "cpuRequestLimitPercent": "50%", // cpu request和limit百分比,默认50% "memoryRequestLimitPercent": "100%", // memory request和limit百分比,默认100% "cpuLimit":"12", // cpu限制,默认12个核 "memoryLimit":"64" // 内存限制,默认64G "replicaLimit":"32" // 份数限制,默认32份 } } */ MetaData string `orm:"type(text)" json:"metaData,omitempty"` MetaDataObj StatefulsetMetaData `orm:"-" json:"-"` App *App `orm:"index;rel(fk)" json:"app,omitempty"` Description string `orm:"null;size(512)" json:"description,omitempty"` OrderId int64 `orm:"index;default(0)" json:"order"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` AppId int64 `orm:"-" json:"appId,omitempty"` }
func (*Statefulset) TableName ¶
func (*Statefulset) TableName() string
type StatefulsetMetaData ¶
type StatefulsetTemplate ¶
type StatefulsetTemplate struct { Id int64 `orm:"auto" json:"id,omitempty"` Name string `orm:"size(128)" json:"name,omitempty"` Template string `orm:"type(text)" json:"template,omitempty"` Statefulset *Statefulset `orm:"index;rel(fk);column(statefulset_id)" json:"statefulset,omitempty"` Description string `orm:"size(512)" json:"description,omitempty"` CreateTime time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` User string `orm:"size(128)" json:"user,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` StatefulsetId int64 `orm:"-" json:"statefulsetId,omitempty"` Status []*PublishStatus `orm:"-" json:"status,omitempty"` }
func (*StatefulsetTemplate) TableName ¶
func (*StatefulsetTemplate) TableName() string
type TypePermission ¶
type TypePermission struct { PermissionTypeApp ActionPermission `json:"app" mapstructure:"APP"` PermissionTypeAppUser ActionPermission `json:"appUser" mapstructure:"APPUSER"` PermissionTypeNamespace ActionPermission `json:"namespace" mapstructure:"NAMESPACE"` PermissionTypeNamespaceUser ActionPermission `json:"namespaceUser" mapstructure:"NAMESPACEUSER"` PermissionTypeDeployment ActionPermission `json:"deployment" mapstructure:"DEPLOYMENT"` PermissionTypeSecret ActionPermission `json:"secret" mapstructure:"SECRET"` PermissionTypeService ActionPermission `json:"service" mapstructure:"SERVICE"` PermissionTypeConfigMap ActionPermission `json:"configmap" mapstructure:"CONFIGMAP"` PermissionTypeCronjob ActionPermission `json:"cronjob" mapstructure:"CRONJOB"` PermissionTypePersistentVolumeClaim ActionPermission `json:"pvc" mapstructure:"PVC"` PermissionTypeWebHook ActionPermission `json:"webHook" mapstructure:"WEBHOOK"` PermissionTypeApiKey ActionPermission `json:"apiKey" mapstructure:"APIKEY"` PermissionTypeStatefulset ActionPermission `json:"statefulset" mapstructure:"STATEFULSET"` PermissionTypeDaemonSet ActionPermission `json:"daemonSet" mapstructure:"DAEMONSET"` PermissionTypeBILL ActionPermission `json:"bill" mapstructure:"BILL"` }
type User ¶
type User struct { Id int64 `orm:"pk;auto" json:"id,omitempty"` Name string `orm:"index;unique;size(200)" json:"name,omitempty"` Password string `orm:"size(255)" json:"-"` Salt string `orm:"size(32)" json:"-"` Email string `orm:"unique;size(200)" json:"email,omitempty"` Display string `orm:"size(200)" json:"display,omitempty"` Comment string `orm:"type(text)" json:"comment,omitempty"` Type UserType `orm:"type(integer)" json:"type"` Admin bool `orm:"default(False)" json:"admin"` LastLogin *time.Time `orm:"auto_now_add;type(datetime)" json:"lastLogin,omitempty"` LastIp string `orm:"size(200)" json:"lastIp,omitempty"` Deleted bool `orm:"default(false)" json:"deleted,omitempty"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"` Namespaces []*Namespace `orm:"-" json:"namespaces,omitempty"` }
func (*User) GetTypeName ¶
type UserStatistics ¶
type UserStatistics struct {
Total int64 `json:"total,omitempty"`
}
type WebHook ¶
type WebHook struct { Id int64 `orm:"auto" json:"id"` Name string `orm:"index;size(128)" json:"name"` Scope WebHookScope `json:"scope"` ObjectId int64 `json:"objectId"` Url string `orm:"null;size(512)" json:"url"` Secret string `orm:"null;size(512)" json:"secret"` Events string `orm:"type(text)" json:"events"` CreateTime *time.Time `orm:"auto_now_add;type(datetime)" json:"createTime"` UpdateTime *time.Time `orm:"auto_now;type(datetime)" json:"updateTime"` User string `orm:"size(128)" json:"user"` Enabled bool `orm:"default(false)" json:"enabled"` }
func (*WebHook) GetHookEvents ¶
func (*WebHook) TableUnique ¶
type WebHookScope ¶
type WebHookScope int64
const ( WebHookScopeNamespace WebHookScope = iota WebHookScopeApp TableNameWebHook = "web_hook" )
Source Files ¶
- apikey.go
- app.go
- app_starred.go
- app_user.go
- auditlog.go
- authmodel.go
- build_sql.go
- charge.go
- cluster.go
- config.go
- configmap.go
- configmap_template.go
- const.go
- cronjob.go
- cronjob_template.go
- daemonset.go
- daemonset_template.go
- deployment.go
- deployment_template.go
- group.go
- init.go
- invoice.go
- ldap.go
- namespace.go
- namespace_user.go
- notification.go
- notification_log.go
- permission.go
- publish_history.go
- publish_status.go
- pvc.go
- pvc_template.go
- secret.go
- secret_template.go
- service.go
- service_template.go
- statefulset.go
- statefulset_template.go
- user.go
- util.go
- webhook.go
Click to show internal directories.
Click to hide internal directories.