Documentation ¶
Overview ¶
Package dbclient 数据库相关操作
Index ¶
- type DBClient
- func (db *DBClient) Close() error
- func (client *DBClient) CreateBlacklist(blacklist *PublishItemBlackList) error
- func (client *DBClient) CreateErase(erase *PublishItemErase) error
- func (client *DBClient) CreateExtension(extension *Extension) error
- func (client *DBClient) CreateExtensionVersion(version *ExtensionVersion) error
- func (client *DBClient) CreateH5Targets(target *PublishItemH5Targets) error
- func (client *DBClient) CreatePipelineTemplate(template *DicePipelineTemplate) error
- func (client *DBClient) CreatePipelineTemplateVersion(version *DicePipelineTemplateVersion) error
- func (client *DBClient) CreatePublishItem(publishItem *PublishItem) error
- func (client *DBClient) CreatePublishItemVersion(itemVersion *PublishItemVersion) error
- func (client *DBClient) CreateRelease(release *Release) error
- func (client *DBClient) DeleteBlacklist(blacklist *PublishItemBlackList) error
- func (client *DBClient) DeleteErase(erase *PublishItemErase) error
- func (client *DBClient) DeleteExtension(name string) error
- func (client *DBClient) DeleteExtensionVersion(name, version string) error
- func (client *DBClient) DeletePublishItem(publishItem *PublishItem) error
- func (client *DBClient) DeletePublishItemVersion(itemVersion *PublishItemVersion) error
- func (client *DBClient) DeletePublishItemVersionsByItemID(itemID int64) error
- func (client *DBClient) DeleteRelease(releaseID string) error
- func (client *DBClient) GeneratePublishItemKey() string
- func (client *DBClient) GetALLItem() ([]PublishItem, error)
- func (client *DBClient) GetAppIDsByProjectAndVersion(projectID int64, version string) ([]int64, error)
- func (client *DBClient) GetBlacklistByDeviceNo(publishItemID uint64, deviceNo string) ([]*PublishItemBlackList, error)
- func (client *DBClient) GetBlacklistByID(id uint64) (*PublishItemBlackList, error)
- func (client *DBClient) GetBlacklistByUserID(userID string, publishItemID uint64) ([]*PublishItemBlackList, error)
- func (client *DBClient) GetBlacklists(pageNo, pageSize, publishItemID uint64) (uint64, *[]PublishItemBlackList, error)
- func (client *DBClient) GetEraseByDeviceNo(publishItemID uint64, deviceNo string) (*PublishItemErase, error)
- func (client *DBClient) GetErases(pageNo, pageSize, artifactID uint64) (uint64, *[]PublishItemErase, error)
- func (client *DBClient) GetExtension(name string) (*Extension, error)
- func (client *DBClient) GetExtensionDefaultVersion(name string) (*ExtensionVersion, error)
- func (client *DBClient) GetExtensionVersion(name string, version string) (*ExtensionVersion, error)
- func (client *DBClient) GetExtensionVersionCount(name string) (int64, error)
- func (client *DBClient) GetH5VersionByItemID(itemID int64) ([]PublishItemVersion, error)
- func (client *DBClient) GetH5VersionsByTarget(itemID uint64, mobileType apistructs.ResourceType, ...) ([]*PublishItemVersion, error)
- func (client *DBClient) GetLatestReleaseByAppAndVersion(appID int64, version string) (*Release, error)
- func (client *DBClient) GetPipelineTemplate(name string, scopeType string, scopeId string) (*DicePipelineTemplate, error)
- func (client *DBClient) GetPipelineTemplateVersion(version string, templateId uint64) (*DicePipelineTemplateVersion, error)
- func (client *DBClient) GetPublicVersion(itemID int64, mobileType apistructs.ResourceType, packageName string) (int, []PublishItemVersion, error)
- func (client *DBClient) GetPublishItem(id int64) (*PublishItem, error)
- func (client *DBClient) GetPublishItemByAKAI(ak, ai string) (*PublishItem, error)
- func (client *DBClient) GetPublishItemCountByPublisher(publisherId int64) (int64, error)
- func (client *DBClient) GetPublishItemVersion(id int64) (*PublishItemVersion, error)
- func (client *DBClient) GetPublishItemVersionByName(orgId int64, itemID int64, mobileType apistructs.ResourceType, ...) (*PublishItemVersion, error)
- func (client *DBClient) GetRelease(releaseID string) (*Release, error)
- func (client *DBClient) GetReleaseNamesByApp(orgID, appID int64) ([]string, error)
- func (client *DBClient) GetReleasesByAppAndVersion(orgID, projectID, appID int64, version string) ([]Release, error)
- func (client *DBClient) GetReleasesByParams(orgID, projectID, applicationID int64, ...) (int64, []Release, error)
- func (client *DBClient) GetTargetsByH5Version(versionID uint64) ([]PublishItemH5Targets, error)
- func (client *DBClient) GetUnReferedReleasesBefore(before time.Time) ([]Release, error)
- func (client *DBClient) ListPublishItemVersionByNames(orgId int64, itemID int64, versions []string, ...) ([]PublishItemVersion, error)
- func (client *DBClient) MigrationFordice320(itemID int64) error
- func (client *DBClient) QueryByPipelineTemplates(template *DicePipelineTemplate, pageSize int, pageNo int) ([]DicePipelineTemplate, int, error)
- func (client *DBClient) QueryExtensionVersions(name string, all string) ([]ExtensionVersion, error)
- func (client *DBClient) QueryExtensions(all string, typ string, labels string) ([]Extension, error)
- func (client *DBClient) QueryPipelineTemplateVersions(version *DicePipelineTemplateVersion) ([]DicePipelineTemplateVersion, error)
- func (client *DBClient) QueryPublishItem(request *apistructs.QueryPublishItemRequest) (*apistructs.QueryPublishItemData, error)
- func (client *DBClient) QueryPublishItemVersions(request *apistructs.QueryPublishItemVersionRequest) (*apistructs.QueryPublishItemVersionData, error)
- func (client *DBClient) SetPublishItemVersionDefault(itemID, itemVersionID int64) error
- func (client *DBClient) SetPublishItemVersionPublic(id, itemID int64) error
- func (client *DBClient) SetPublishItemVersionUnPublic(id, itemID int64) error
- func (client *DBClient) SetUnDefaultVersion(name string) error
- func (client *DBClient) UpdateErase(erase *PublishItemErase) error
- func (client *DBClient) UpdatePipelineTemplate(template *DicePipelineTemplate) error
- func (client *DBClient) UpdatePipelineTemplateVersion(version *DicePipelineTemplateVersion) error
- func (client *DBClient) UpdatePublicVersionByID(versionID int64, fileds map[string]interface{}) error
- func (client *DBClient) UpdatePublishItem(publishItem *PublishItem) error
- func (client *DBClient) UpdatePublishItemUpdateTime(publishItem *PublishItem) error
- func (client *DBClient) UpdatePublishItemVersion(itemVersion *PublishItemVersion) error
- func (client *DBClient) UpdateRelease(release *Release) error
- type DicePipelineTemplate
- type DicePipelineTemplateVersion
- type Extension
- type ExtensionVersion
- type PublishItem
- type PublishItemBlackList
- type PublishItemErase
- type PublishItemH5Targets
- type PublishItemVersion
- type Release
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBClient ¶
func (*DBClient) CreateBlacklist ¶
func (client *DBClient) CreateBlacklist(blacklist *PublishItemBlackList) error
CreateBlacklist 添加黑名单
func (*DBClient) CreateErase ¶
func (client *DBClient) CreateErase(erase *PublishItemErase) error
CreateErase 添加数据擦除
func (*DBClient) CreateExtension ¶
func (*DBClient) CreateExtensionVersion ¶
func (client *DBClient) CreateExtensionVersion(version *ExtensionVersion) error
func (*DBClient) CreateH5Targets ¶
func (client *DBClient) CreateH5Targets(target *PublishItemH5Targets) error
CreateH5Targets 创建h5目标app版本关系
func (*DBClient) CreatePipelineTemplate ¶
func (client *DBClient) CreatePipelineTemplate(template *DicePipelineTemplate) error
func (*DBClient) CreatePipelineTemplateVersion ¶
func (client *DBClient) CreatePipelineTemplateVersion(version *DicePipelineTemplateVersion) error
func (*DBClient) CreatePublishItem ¶
func (client *DBClient) CreatePublishItem(publishItem *PublishItem) error
func (*DBClient) CreatePublishItemVersion ¶
func (client *DBClient) CreatePublishItemVersion(itemVersion *PublishItemVersion) error
func (*DBClient) CreateRelease ¶
CreateRelease 创建Release
func (*DBClient) DeleteBlacklist ¶
func (client *DBClient) DeleteBlacklist(blacklist *PublishItemBlackList) error
CreateBlacklist 移除出黑名单
func (*DBClient) DeleteErase ¶
func (client *DBClient) DeleteErase(erase *PublishItemErase) error
DeleteErase 移除数据擦除
func (*DBClient) DeleteExtension ¶
func (*DBClient) DeleteExtensionVersion ¶
func (*DBClient) DeletePublishItem ¶
func (client *DBClient) DeletePublishItem(publishItem *PublishItem) error
func (*DBClient) DeletePublishItemVersion ¶
func (client *DBClient) DeletePublishItemVersion(itemVersion *PublishItemVersion) error
func (*DBClient) DeletePublishItemVersionsByItemID ¶
func (*DBClient) DeleteRelease ¶
DeleteRelease 删除Release
func (*DBClient) GeneratePublishItemKey ¶
GeneratePublishItemKey 生成itemKey
func (*DBClient) GetALLItem ¶
func (client *DBClient) GetALLItem() ([]PublishItem, error)
func (*DBClient) GetAppIDsByProjectAndVersion ¶
func (client *DBClient) GetAppIDsByProjectAndVersion(projectID int64, version string) ([]int64, error)
GetAppIDsByProjectAndVersion 根据projectID & version 获取 appID 列表
func (*DBClient) GetBlacklistByDeviceNo ¶
func (client *DBClient) GetBlacklistByDeviceNo(publishItemID uint64, deviceNo string) ([]*PublishItemBlackList, error)
GetBlacklistByDeviceNo 根据设备号,publishItemKey查询
func (*DBClient) GetBlacklistByID ¶
func (client *DBClient) GetBlacklistByID(id uint64) (*PublishItemBlackList, error)
GetBlacklistByID 根据ID查询
func (*DBClient) GetBlacklistByUserID ¶
func (client *DBClient) GetBlacklistByUserID(userID string, publishItemID uint64) ([]*PublishItemBlackList, error)
GetBlacklistByUserIDAndDeviceNo 根据用户ID,设备号,publishItemKey查询
func (*DBClient) GetBlacklists ¶
func (client *DBClient) GetBlacklists(pageNo, pageSize, publishItemID uint64) (uint64, *[]PublishItemBlackList, error)
GetBlacklists 根据publishItemKey查询黑名单
func (*DBClient) GetEraseByDeviceNo ¶
func (client *DBClient) GetEraseByDeviceNo(publishItemID uint64, deviceNo string) (*PublishItemErase, error)
GetEraseByDeviceNo 根据设备号,publishItemID查询
func (*DBClient) GetErases ¶
func (client *DBClient) GetErases(pageNo, pageSize, artifactID uint64) (uint64, *[]PublishItemErase, error)
GetErases 根据artifactID查询数据擦除
func (*DBClient) GetExtension ¶
func (*DBClient) GetExtensionDefaultVersion ¶
func (client *DBClient) GetExtensionDefaultVersion(name string) (*ExtensionVersion, error)
func (*DBClient) GetExtensionVersion ¶
func (client *DBClient) GetExtensionVersion(name string, version string) (*ExtensionVersion, error)
func (*DBClient) GetExtensionVersionCount ¶
func (*DBClient) GetH5VersionByItemID ¶
func (client *DBClient) GetH5VersionByItemID(itemID int64) ([]PublishItemVersion, error)
GetH5VersionByItemID 获取H5的包名列表
func (*DBClient) GetH5VersionsByTarget ¶
func (client *DBClient) GetH5VersionsByTarget(itemID uint64, mobileType apistructs.ResourceType, appVersion, packageName string) ([]*PublishItemVersion, error)
GetH5VersionsByTarget 根据移动应用版本获取对应的H5版本
func (*DBClient) GetLatestReleaseByAppAndVersion ¶
func (client *DBClient) GetLatestReleaseByAppAndVersion(appID int64, version string) (*Release, error)
GetLatestReleaseByAppAndVersion 获取应用下最新release
func (*DBClient) GetPipelineTemplate ¶
func (*DBClient) GetPipelineTemplateVersion ¶
func (client *DBClient) GetPipelineTemplateVersion(version string, templateId uint64) (*DicePipelineTemplateVersion, error)
func (*DBClient) GetPublicVersion ¶
func (client *DBClient) GetPublicVersion(itemID int64, mobileType apistructs.ResourceType, packageName string) (int, []PublishItemVersion, error)
GetPublicVersion 获取已上架的版本信息
func (*DBClient) GetPublishItem ¶
func (client *DBClient) GetPublishItem(id int64) (*PublishItem, error)
func (*DBClient) GetPublishItemByAKAI ¶
func (client *DBClient) GetPublishItemByAKAI(ak, ai string) (*PublishItem, error)
GetPublishItemByAKAI 通过离线包的AKAI获取publishItem信息
func (*DBClient) GetPublishItemCountByPublisher ¶
func (*DBClient) GetPublishItemVersion ¶
func (client *DBClient) GetPublishItemVersion(id int64) (*PublishItemVersion, error)
func (*DBClient) GetPublishItemVersionByName ¶
func (client *DBClient) GetPublishItemVersionByName(orgId int64, itemID int64, mobileType apistructs.ResourceType, versionInfo apistructs.VersionInfo) (*PublishItemVersion, error)
func (*DBClient) GetRelease ¶
GetRelease 获取Release
func (*DBClient) GetReleaseNamesByApp ¶
GetReleaseNamesByApp 根据 appID 获取 releaseName 列表
func (*DBClient) GetReleasesByAppAndVersion ¶
func (client *DBClient) GetReleasesByAppAndVersion(orgID, projectID, appID int64, version string) ([]Release, error)
GetReleasesByAppAndVersion 根据 appID & version获取 Release列表
func (*DBClient) GetReleasesByParams ¶
func (client *DBClient) GetReleasesByParams( orgID, projectID, applicationID int64, keyword, releaseName, branch, cluster string, crossCluster *bool, isVersion bool, crossClusterOrSpecifyCluster *string, startTime, endTime time.Time, pageNum, pageSize int64) (int64, []Release, error)
GetReleasesByParams 根据参数过滤Release
func (*DBClient) GetTargetsByH5Version ¶
func (client *DBClient) GetTargetsByH5Version(versionID uint64) ([]PublishItemH5Targets, error)
GetTargetsByH5Version 返回H5包版本的目标版本信息
func (*DBClient) GetUnReferedReleasesBefore ¶
GetUnReferedReleasesBefore 获取给定时间点前未引用的 Release
func (*DBClient) ListPublishItemVersionByNames ¶
func (client *DBClient) ListPublishItemVersionByNames(orgId int64, itemID int64, versions []string, mobileType apistructs.ResourceType) ([]PublishItemVersion, error)
func (*DBClient) MigrationFordice320 ¶
MigrationFordice320 3.20灰度逻辑迁移,待所有的 is_migration 都等于1时代码可删
func (*DBClient) QueryByPipelineTemplates ¶
func (client *DBClient) QueryByPipelineTemplates(template *DicePipelineTemplate, pageSize int, pageNo int) ([]DicePipelineTemplate, int, error)
func (*DBClient) QueryExtensionVersions ¶
func (client *DBClient) QueryExtensionVersions(name string, all string) ([]ExtensionVersion, error)
func (*DBClient) QueryExtensions ¶
func (*DBClient) QueryPipelineTemplateVersions ¶
func (client *DBClient) QueryPipelineTemplateVersions(version *DicePipelineTemplateVersion) ([]DicePipelineTemplateVersion, error)
func (*DBClient) QueryPublishItem ¶
func (client *DBClient) QueryPublishItem(request *apistructs.QueryPublishItemRequest) (*apistructs.QueryPublishItemData, error)
func (*DBClient) QueryPublishItemVersions ¶
func (client *DBClient) QueryPublishItemVersions(request *apistructs.QueryPublishItemVersionRequest) (*apistructs.QueryPublishItemVersionData, error)
func (*DBClient) SetPublishItemVersionDefault ¶
func (*DBClient) SetPublishItemVersionPublic ¶
func (*DBClient) SetPublishItemVersionUnPublic ¶
func (*DBClient) SetUnDefaultVersion ¶
func (*DBClient) UpdateErase ¶
func (client *DBClient) UpdateErase(erase *PublishItemErase) error
UpdateErase 更新数据擦除状态
func (*DBClient) UpdatePipelineTemplate ¶
func (client *DBClient) UpdatePipelineTemplate(template *DicePipelineTemplate) error
func (*DBClient) UpdatePipelineTemplateVersion ¶
func (client *DBClient) UpdatePipelineTemplateVersion(version *DicePipelineTemplateVersion) error
func (*DBClient) UpdatePublicVersionByID ¶
func (client *DBClient) UpdatePublicVersionByID(versionID int64, fileds map[string]interface{}) error
UpdatePublicVersionByID 根据id更新PublicVersion
func (*DBClient) UpdatePublishItem ¶
func (client *DBClient) UpdatePublishItem(publishItem *PublishItem) error
func (*DBClient) UpdatePublishItemUpdateTime ¶
func (client *DBClient) UpdatePublishItemUpdateTime(publishItem *PublishItem) error
func (*DBClient) UpdatePublishItemVersion ¶
func (client *DBClient) UpdatePublishItemVersion(itemVersion *PublishItemVersion) error
func (*DBClient) UpdateRelease ¶
UpdateRelease 更新Release
type DicePipelineTemplate ¶
type DicePipelineTemplate struct { dbengine.BaseModel Name string `json:"name" gorm:"type:varchar(255)"` LogoUrl string `json:"logoUrl" gorm:"type:varchar(255)"` Desc string `json:"desc" gorm:"type:varchar(255)"` ScopeType string `json:"scope_type" gorm:"type:varchar(255)"` ScopeId string `json:"scope_id" gorm:"type:bigint(20)"` DefaultVersion string `json:"default_version" gorm:"type:varchar(255)"` }
func (*DicePipelineTemplate) ToApiData ¶
func (ext *DicePipelineTemplate) ToApiData() *apistructs.PipelineTemplate
type DicePipelineTemplateVersion ¶
type DicePipelineTemplateVersion struct { dbengine.BaseModel TemplateId uint64 `json:"template_id"` Name string `json:"name" gorm:"type:varchar(255);"` Version string `json:"version" gorm:"type:varchar(128);"` Spec string `json:"spec" gorm:"type:text"` Readme string `json:"readme" gorm:"type:longtext"` }
func (*DicePipelineTemplateVersion) ToApiData ¶
func (ext *DicePipelineTemplateVersion) ToApiData() *apistructs.PipelineTemplateVersion
type Extension ¶
type Extension struct { dbengine.BaseModel Type string `json:"type" gorm:"type:varchar(128)"` // 类型 addon|action Name string `json:"name" grom:"type:varchar(128);unique_index"` Category string `json:"category" grom:"type:varchar(128)"` DisplayName string `json:"displayName" grom:"type:varchar(128)"` LogoUrl string `json:"logoUrl" grom:"type:varchar(128)"` Desc string `json:"desc" grom:"type:text"` Labels string `json:"labels" grom:"type:labels"` Public bool `json:"public" ` //是否在服务市场展示 }
func (*Extension) ToApiData ¶
func (ext *Extension) ToApiData() *apistructs.Extension
type ExtensionVersion ¶
type ExtensionVersion struct { dbengine.BaseModel ExtensionId uint64 `json:"extensionId"` Name string `gorm:"type:varchar(128);index:idx_name"` Version string `json:"version" gorm:"type:varchar(128);index:idx_version"` Spec string `gorm:"type:text"` Dice string `gorm:"type:text"` Swagger string `gorm:"type:longtext"` Readme string `gorm:"type:longtext"` Public bool `json:"public"` IsDefault bool `json:"is_default"` }
func (ExtensionVersion) TableName ¶
func (ExtensionVersion) TableName() string
func (*ExtensionVersion) ToApiData ¶
func (ext *ExtensionVersion) ToApiData(typ string, yamlFormat bool) *apistructs.ExtensionVersion
type PublishItem ¶
type PublishItem struct { dbengine.BaseModel Name string PublisherID int64 Type string Logo string Public bool DisplayName string OrgID int64 // 应用关联组织Id Desc string Creator string AK string AI string NoJailbreak bool // 是否禁止越狱设置 GeofenceLon float64 // 地理围栏,坐标经度 GeofenceLat float64 // 地理围栏,坐标纬度 GeofenceRadius float64 // 地理围栏,合理半径 GrayLevelPercent int // 灰度百分比,0-100 IsMigration bool // 灰度逻辑是否已迁移到最新版本(default --> release/beta) PreviewImages string `gorm:"column:preview_images"` // 预览图 BackgroundImage string `gorm:"gorm:background_image"` // 背景图 }
PublishItem 发布
func (*PublishItem) ToApiData ¶
func (publishItem *PublishItem) ToApiData() *apistructs.PublishItem
type PublishItemBlackList ¶
type PublishItemBlackList struct { dbengine.BaseModel UserID string PublishItemID uint64 PublishItemKey string UserName string Operator string DeviceNo string }
PublishItemBlackList 发布内容黑名单
func (PublishItemBlackList) TableName ¶
func (PublishItemBlackList) TableName() string
TableName 设置模型对应数据库表名称
type PublishItemErase ¶
type PublishItemErase struct { dbengine.BaseModel PublishItemID uint64 PublishItemKey string DeviceNo string Operator string EraseStatus string }
PublishItemErase 数据擦除
func (PublishItemErase) TableName ¶
func (PublishItemErase) TableName() string
TableName 设置模型对应数据库表名称
type PublishItemH5Targets ¶
type PublishItemH5Targets struct { dbengine.BaseModel H5VersionID uint64 `gorm:"column:h5_version_id"` TargetVersion string `gorm:"column:target_version"` TargetBuildID string `gorm:"column:target_build_id"` TargetMobileType string `gorm:"column:target_mobile_type"` }
PublishItemH5Targets H5的目标版本记录表
func (PublishItemH5Targets) TableName ¶
func (PublishItemH5Targets) TableName() string
TableName 设置模型对应数据库表名称
type PublishItemVersion ¶
type PublishItemVersion struct { dbengine.BaseModel Version string BuildID string `gorm:"column:build_id"` PackageName string `gorm:"column:package_name"` Public bool IsDefault bool Logo string Spec string `gorm:"type:longtext"` Swagger string `gorm:"type:longtext"` Readme string `gorm:"type:longtext"` Desc string //版本描述信息 Resources string //版本资源信息 Meta string // 元信息,应用 项目 release id等 OrgID int64 PublishItemID int64 MobileType string `gorm:"column:mobile_type"` // ios, android, h5 Creator string VersionStates apistructs.PublishItemVersionStates `gorm:"column:version_states"` GrayLevelPercent int `gorm:"column:gray_level_percent"` // 灰度百分比,0-100 }
PublishItemVersion 发布版本
func (*PublishItemVersion) IsLater ¶
func (publishItemVersion *PublishItemVersion) IsLater(version *PublishItemVersion) bool
IsLater 校验两个版本新旧
func (PublishItemVersion) TableName ¶
func (PublishItemVersion) TableName() string
TableName 设置模型对应数据库表名称
func (*PublishItemVersion) ToApiData ¶
func (publishItemVersion *PublishItemVersion) ToApiData() *apistructs.PublishItemVersion
type Release ¶
type Release struct { // ReleaseID 唯一标识release, 创建时由服务端生成 ReleaseID string `json:"releaseId" gorm:"type:varchar(64);primary_key"` // ReleaseName 任意字符串,便于用户识别,最大长度255,必填 ReleaseName string `json:"releaseName" gorm:"index:idx_release_name;not null"` // Desc 详细描述此release功能, 选填 Desc string `json:"desc" gorm:"type:text"` // Dice 资源类型为diceyml时, 存储dice.yml内容, 选填 Dice string `json:"dice" gorm:"type:text"` // dice.yml // Addon 资源类型为addonyml时,存储addon.yml内容,选填 Addon string `json:"addon" gorm:"type:text"` // Labels 用于release分类,描述release类别,map类型, 最大长度1000, 选填 Labels string `json:"labels" gorm:"type:varchar(1000)"` // Version 存储release版本信息, 同一企业同一项目同一应用下唯一,最大长度100,选填 Version string `json:"version" gorm:"type:varchar(100)"` // 版本,打标签的Release不可删除 // OrgID 企业标识符,描述release所属企业,选填 OrgID int64 `json:"orgId" gorm:"index:idx_org_id"` // 所属企业 // ProjectID 项目标识符,描述release所属项目,选填 ProjectID int64 `json:"projectId"` // ApplicationID 应用标识符,描述release所属应用,选填 ApplicationID int64 `json:"applicationId"` // ProjectName 项目名称,描述release所属项目,选填 ProjectName string `json:"projectName" gorm:"type:varchar(80)"` // ApplicationName 应用名称,描述release所属应用,选填 ApplicationName string `json:"applicationName" gorm:"type:varchar(80)"` // UserID 用户标识符, 描述release所属用户,最大长度50,选填 UserID string `json:"userId" gorm:"type:varchar(50)"` // ClusterName 集群名称,描述release所属集群,最大长度80,选填 ClusterName string `json:"clusterName" gorm:"type:varchar(80)"` // 所属集群 // Resources 指定release资源类型及资源存储路径, 为兼容现有diceyml,先选填 Resources string `json:"resources,omitempty" gorm:"type:text"` // Reference release被部署次数,当为0时,可清除 Reference int64 `json:"reference"` // 被部署次数,当为0时,表示可清除 // CrossCluster 表示当前 release 是否可以跨集群,无集群限制 CrossCluster bool `json:"crossCluster"` // CreatedAt release创建时间,创建时由服务端生成 CreatedAt time.Time `json:"createdAt"` // UpdatedAt release更新时间, 更新时由服务端更新 UpdatedAt time.Time `json:"updatedAt"` }