Documentation ¶
Index ¶
- type DBClient
- func (client *DBClient) CreateBlacklist(blacklist *PublishItemBlackList) error
- func (client *DBClient) CreateErase(erase *PublishItemErase) error
- func (client *DBClient) CreateH5Targets(target *PublishItemH5Targets) error
- func (client *DBClient) CreatePublishItem(publishItem *PublishItem) error
- func (client *DBClient) CreatePublishItemVersion(itemVersion *PublishItemVersion) error
- func (client *DBClient) DeleteBlacklist(blacklist *PublishItemBlackList) error
- func (client *DBClient) DeleteErase(erase *PublishItemErase) 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) GeneratePublishItemKey() string
- func (client *DBClient) GetALLItem() ([]PublishItem, 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) GetH5VersionByItemID(itemID int64) ([]PublishItemVersion, error)
- func (client *DBClient) GetH5VersionsByTarget(itemID uint64, mobileType apistructs.ResourceType, ...) ([]*PublishItemVersion, 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) GetTargetsByH5Version(versionID uint64) ([]PublishItemH5Targets, error)
- func (client *DBClient) ListPublishItemVersionByNames(orgId int64, itemID int64, versions []string, ...) ([]PublishItemVersion, error)
- func (client *DBClient) MigrationFordice320(itemID int64) error
- func (client *DBClient) QueryPublishItem(request *pb.QueryPublishItemRequest) (*pb.QueryPublishItemData, error)
- func (client *DBClient) QueryPublishItemVersions(request *pb.QueryPublishItemVersionRequest) (*pb.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) UpdateErase(erase *PublishItemErase) 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
- type PublishItem
- type PublishItemBlackList
- type PublishItemErase
- type PublishItemH5Targets
- type PublishItemVersion
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) CreateH5Targets ¶
func (client *DBClient) CreateH5Targets(target *PublishItemH5Targets) error
CreateH5Targets 创建h5目标app版本关系
func (*DBClient) CreatePublishItem ¶
func (client *DBClient) CreatePublishItem(publishItem *PublishItem) error
func (*DBClient) CreatePublishItemVersion ¶
func (client *DBClient) CreatePublishItemVersion(itemVersion *PublishItemVersion) error
func (*DBClient) DeleteBlacklist ¶
func (client *DBClient) DeleteBlacklist(blacklist *PublishItemBlackList) error
CreateBlacklist 移除出黑名单
func (*DBClient) DeleteErase ¶
func (client *DBClient) DeleteErase(erase *PublishItemErase) error
DeleteErase 移除数据擦除
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) GeneratePublishItemKey ¶
GeneratePublishItemKey 生成itemKey
func (*DBClient) GetALLItem ¶
func (client *DBClient) GetALLItem() ([]PublishItem, error)
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) 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) 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 *pb.VersionInfo) (*PublishItemVersion, error)
func (*DBClient) GetTargetsByH5Version ¶
func (client *DBClient) GetTargetsByH5Version(versionID uint64) ([]PublishItemH5Targets, error)
GetTargetsByH5Version 返回H5包版本的目标版本信息
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) QueryPublishItem ¶
func (client *DBClient) QueryPublishItem(request *pb.QueryPublishItemRequest) (*pb.QueryPublishItemData, error)
func (*DBClient) QueryPublishItemVersions ¶
func (client *DBClient) QueryPublishItemVersions(request *pb.QueryPublishItemVersionRequest) (*pb.QueryPublishItemVersionData, error)
func (*DBClient) SetPublishItemVersionDefault ¶
func (*DBClient) SetPublishItemVersionPublic ¶
func (*DBClient) SetPublishItemVersionUnPublic ¶
func (*DBClient) UpdateErase ¶
func (client *DBClient) UpdateErase(erase *PublishItemErase) error
UpdateErase 更新数据擦除状态
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
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() *pb.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 string `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() *pb.PublishItemVersion