Documentation ¶
Index ¶
- Variables
- func Average(arr []uint64, cardinality uint64) uint64
- func AverageFloat(arr []float64, cardinality uint64) float64
- func ErrTrendInfo(ak, ai string) (*apistructs.PublishItemStatisticsErrTrendResponse, error)
- func GenerateInstallPlist(info *IosAppInfo, downloadUrl string) string
- func GenrateTmpImagePath(id string) string
- func GetUserList(ak, ai string, req *apistructs.PublishItemCertificationListRequest) ([]*apistructs.PublishItemCertificationResponse, error)
- func Growth(last, recent float64) float64
- func MetricsTotal(resp *query.MetricQueryResponse) (uint64, error)
- func Round(x float64) uint64
- func SaveImageToFile(icon image.Image, path string) error
- func SevenDayAvg(resp *query.MetricQueryResponse) (uint64, float64, error)
- func SevenDayUserRetension(firstResp, secondResp *query.MetricQueryResponse) (string, float64, error)
- func Smaller(a, b float64) bool
- func VersionChannelList(groupKey, ak, ai string, end time.Time) ([]*apistructs.PublishItemStatisticsDetailResponse, error)
- type AndroidAppInfo
- type CFBundleIcons
- type CFBundlePrimaryIcon
- type IOSPlist
- type IosAppInfo
- type Option
- type PKGInfo
- type PublishItem
- func (i *PublishItem) AddBlacklist(req *apistructs.PublishItemUserlistRequest) (error, *dbclient.PublishItem)
- func (i *PublishItem) AddErase(req *apistructs.PublishItemUserlistRequest) (error, *dbclient.PublishItem)
- func (i *PublishItem) CrashRate(point uint64, start, end time.Time, av string, mk *apistructs.MonitorKeys) (*apistructs.CardinalityResultsInterface, error)
- func (i *PublishItem) CreateOffLineVersion(param apistructs.CreateOffLinePublishItemVersionRequest) (string, error)
- func (i *PublishItem) CreatePublishItem(req *apistructs.CreatePublishItemRequest) (*apistructs.PublishItem, error)
- func (i *PublishItem) CumulativeUsers(point uint64, start, end time.Time, mk *apistructs.MonitorKeys) (*apistructs.CardinalityResults, error)
- func (i *PublishItem) DeletePublishItem(id int64) error
- func (i *PublishItem) DeletePublishItemVersion(id int64) error
- func (i *PublishItem) EffactUsersRate(point uint64, start, end time.Time, av string, mk *apistructs.MonitorKeys) (*apistructs.CardinalityResultsInterface, error)
- func (i *PublishItem) GetBlacklists(req *apistructs.PublishItemUserlistRequest) (*apistructs.PublishItemUserlistData, error)
- func (i *PublishItem) GetCertificationlist(req *apistructs.PublishItemCertificationListRequest, ...) ([]*apistructs.PublishItemCertificationResponse, error)
- func (i *PublishItem) GetEraselists(req *apistructs.PublishItemUserlistRequest) (*apistructs.PublishItemUserlistData, error)
- func (i *PublishItem) GetErrList(start, end time.Time, av string, mk *apistructs.MonitorKeys) ([]*apistructs.PublishItemStatisticsErrListResponse, error)
- func (i *PublishItem) GetErrTrend(mk *apistructs.MonitorKeys) (*apistructs.PublishItemStatisticsErrTrendResponse, error)
- func (i *PublishItem) GetH5PackageName(itemID int64) ([]string, error)
- func (i *PublishItem) GetMonitorkeys(req *apistructs.QueryAppPublishItemRelationRequest) ([]apistructs.MonitorKeys, error)
- func (i *PublishItem) GetPublicPublishItemLaststVersion(ctx context.Context, r *http.Request, ...) (*apistructs.GetPublishItemLatestVersionData, error)
- func (i *PublishItem) GetPublicPublishItemVersion(itemID int64, mobileType, packageName string) (*apistructs.QueryPublishItemVersionData, error)
- func (i *PublishItem) GetPublishItem(id int64) (*apistructs.PublishItem, error)
- func (i *PublishItem) GetPublishItemByAKAI(AK, AI string) (*dbclient.PublishItem, error)
- func (i *PublishItem) GetPublishItemDistribution(id int64, mobileType apistructs.ResourceType, packageName string, ...) (*apistructs.PublishItemDistributionData, error)
- func (i *PublishItem) GetSecurityStatus(request apistructs.PublishItemSecurityStatusRequest) (*apistructs.PublishItemSecurityStatusResponse, error)
- func (i *PublishItem) GetStatisticsChannelInfo(end time.Time, mk *apistructs.MonitorKeys) ([]*apistructs.PublishItemStatisticsDetailResponse, error)
- func (i *PublishItem) GetStatisticsTrend(mk *apistructs.MonitorKeys) (*apistructs.PublishItemStatisticsTrendResponse, error)
- func (i *PublishItem) GetStatisticsVersionInfo(end time.Time, mk *apistructs.MonitorKeys) ([]*apistructs.PublishItemStatisticsDetailResponse, error)
- func (i *PublishItem) GrayDistribution(w http.ResponseWriter, r *http.Request, publisherItem dbclient.PublishItem, ...) error
- func (i *PublishItem) Migration320()
- func (i *PublishItem) PublicPublishItemVersion(req apistructs.UpdatePublishItemVersionStatesRequset, ...) error
- func (i *PublishItem) PublishItemVersion(req *apistructs.CreatePublishItemVersionRequest) (*apistructs.PublishItemVersion, error)
- func (i *PublishItem) QueryPublishItemVersions(req *apistructs.QueryPublishItemVersionRequest) (*apistructs.QueryPublishItemVersionData, error)
- func (i *PublishItem) QueryPublishItems(req *apistructs.QueryPublishItemRequest) (*apistructs.QueryPublishItemData, error)
- func (i *PublishItem) RemoveBlacklist(blacklistID, publishItemID uint64) (error, *dbclient.PublishItemBlackList, *dbclient.PublishItem)
- func (i *PublishItem) SetPublishItemVersionDefault(itemVersionID, itemID int64) error
- func (i *PublishItem) SetPublishItemVersionPublic(id, itemID int64) error
- func (i *PublishItem) SetPublishItemVersionUnPublic(id, itemID int64) error
- func (i *PublishItem) UpdateErase(request *apistructs.PublishItemEraseRequest) error
- func (i *PublishItem) UpdatePublishItem(req *apistructs.UpdatePublishItemRequest) error
- func (i *PublishItem) UploadFileFromFile(filePath string) (*apistructs.File, error)
- func (i *PublishItem) UploadFileFromReader(fileHeader *multipart.FileHeader) (*apistructs.File, error)
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoIcon = errors.New("icon not found")
)
Functions ¶
func AverageFloat ¶
func ErrTrendInfo ¶
func ErrTrendInfo(ak, ai string) (*apistructs.PublishItemStatisticsErrTrendResponse, error)
func GenerateInstallPlist ¶
func GenerateInstallPlist(info *IosAppInfo, downloadUrl string) string
func GenrateTmpImagePath ¶
func GetUserList ¶
func GetUserList(ak, ai string, req *apistructs.PublishItemCertificationListRequest) ([]*apistructs.PublishItemCertificationResponse, error)
func MetricsTotal ¶
func MetricsTotal(resp *query.MetricQueryResponse) (uint64, error)
func SevenDayAvg ¶
func SevenDayAvg(resp *query.MetricQueryResponse) (uint64, float64, error)
func SevenDayUserRetension ¶
func SevenDayUserRetension(firstResp, secondResp *query.MetricQueryResponse) (string, float64, error)
func VersionChannelList ¶
func VersionChannelList(groupKey, ak, ai string, end time.Time) ([]*apistructs.PublishItemStatisticsDetailResponse, error)
Types ¶
type AndroidAppInfo ¶
type AndroidAppInfo struct { PackageName string Version string VersionCode int32 Icon image.Image DisplayName string }
func GetAndoridInfo ¶
func GetAndoridInfo(fileHeader *multipart.FileHeader) (*AndroidAppInfo, error)
type CFBundleIcons ¶
type CFBundleIcons struct {
CFBundlePrimaryIcon *CFBundlePrimaryIcon `plist:"CFBundlePrimaryIcon"`
}
type CFBundlePrimaryIcon ¶
type IOSPlist ¶
type IOSPlist struct { CFBundleName string `plist:"CFBundleName"` CFBundleDisplayName string `plist:"CFBundleDisplayName"` CFBundleVersion string `plist:"CFBundleVersion"` CFBundleShortVersion string `plist:"CFBundleShortVersionString"` CFBundleIdentifier string `plist:"CFBundleIdentifier"` CFBundleIcons *CFBundleIcons `plist:"CFBundleIcons"` }
type IosAppInfo ¶
type IosAppInfo struct { Name string BundleId string Version string Build string Icon image.Image Size int64 IconName string }
func GetIosInfo ¶
func GetIosInfo(fileHeader *multipart.FileHeader) (*IosAppInfo, error)
type PublishItem ¶
type PublishItem struct {
// contains filtered or unexported fields
}
PublishItem
func (*PublishItem) AddBlacklist ¶
func (i *PublishItem) AddBlacklist(req *apistructs.PublishItemUserlistRequest) (error, *dbclient.PublishItem)
AddBlacklist 添加黑名单
func (*PublishItem) AddErase ¶
func (i *PublishItem) AddErase(req *apistructs.PublishItemUserlistRequest) (error, *dbclient.PublishItem)
AddErase 添加数据擦除
func (*PublishItem) CrashRate ¶
func (i *PublishItem) CrashRate(point uint64, start, end time.Time, av string, mk *apistructs.MonitorKeys) (*apistructs.CardinalityResultsInterface, error)
崩溃率
func (*PublishItem) CreateOffLineVersion ¶
func (i *PublishItem) CreateOffLineVersion(param apistructs.CreateOffLinePublishItemVersionRequest) (string, error)
CreateOffLineVersion 创建离线包版本
func (*PublishItem) CreatePublishItem ¶
func (i *PublishItem) CreatePublishItem(req *apistructs.CreatePublishItemRequest) (*apistructs.PublishItem, error)
CreatePublishItem 创建发布内容
func (*PublishItem) CumulativeUsers ¶
func (i *PublishItem) CumulativeUsers(point uint64, start, end time.Time, mk *apistructs.MonitorKeys) (*apistructs.CardinalityResults, error)
func (*PublishItem) DeletePublishItem ¶
func (i *PublishItem) DeletePublishItem(id int64) error
DeletePublishItem 删除发布内容
func (*PublishItem) DeletePublishItemVersion ¶
func (i *PublishItem) DeletePublishItemVersion(id int64) error
DeletePublishItem 删除发布版本
func (*PublishItem) EffactUsersRate ¶
func (i *PublishItem) EffactUsersRate(point uint64, start, end time.Time, av string, mk *apistructs.MonitorKeys) (*apistructs.CardinalityResultsInterface, error)
影响用户占比
func (*PublishItem) GetBlacklists ¶
func (i *PublishItem) GetBlacklists(req *apistructs.PublishItemUserlistRequest) (*apistructs.PublishItemUserlistData, error)
GetBlacklists 获取黑名单列表,分页
func (*PublishItem) GetCertificationlist ¶
func (i *PublishItem) GetCertificationlist(req *apistructs.PublishItemCertificationListRequest, mk *apistructs.MonitorKeys) ([]*apistructs.PublishItemCertificationResponse, error)
GetCertificationlist 获取验证列表
func (*PublishItem) GetEraselists ¶
func (i *PublishItem) GetEraselists(req *apistructs.PublishItemUserlistRequest) (*apistructs.PublishItemUserlistData, error)
GetEraselists 获取数据擦除列表,分页
func (*PublishItem) GetErrList ¶
func (i *PublishItem) GetErrList(start, end time.Time, av string, mk *apistructs.MonitorKeys) ([]*apistructs.PublishItemStatisticsErrListResponse, error)
GetErrList 获取错误报告,错误列表
func (*PublishItem) GetErrTrend ¶
func (i *PublishItem) GetErrTrend(mk *apistructs.MonitorKeys) (*apistructs.PublishItemStatisticsErrTrendResponse, error)
GetErrTrend 获取错误报告,错误趋势
func (*PublishItem) GetH5PackageName ¶
func (i *PublishItem) GetH5PackageName(itemID int64) ([]string, error)
GetH5PackageName 获取H5的包名列表
func (*PublishItem) GetMonitorkeys ¶
func (i *PublishItem) GetMonitorkeys(req *apistructs.QueryAppPublishItemRelationRequest) ([]apistructs.MonitorKeys, error)
func (*PublishItem) GetPublicPublishItemLaststVersion ¶
func (i *PublishItem) GetPublicPublishItemLaststVersion(ctx context.Context, r *http.Request, req apistructs.GetPublishItemLatestVersionRequest) (*apistructs.GetPublishItemLatestVersionData, error)
GetPublicPublishItemLaststVersion 获取线上最新版本的包
func (*PublishItem) GetPublicPublishItemVersion ¶
func (i *PublishItem) GetPublicPublishItemVersion(itemID int64, mobileType, packageName string) (*apistructs.QueryPublishItemVersionData, error)
GetPublicPublishItemVersion 获取线上已发布的版本
func (*PublishItem) GetPublishItem ¶
func (i *PublishItem) GetPublishItem(id int64) (*apistructs.PublishItem, error)
GetPublishItem 获取发布内容详情
func (*PublishItem) GetPublishItemByAKAI ¶
func (i *PublishItem) GetPublishItemByAKAI(AK, AI string) (*dbclient.PublishItem, error)
func (*PublishItem) GetPublishItemDistribution ¶
func (i *PublishItem) GetPublishItemDistribution(id int64, mobileType apistructs.ResourceType, packageName string, w http.ResponseWriter, r *http.Request) (*apistructs.PublishItemDistributionData, error)
GetPublishItem
func (*PublishItem) GetSecurityStatus ¶
func (i *PublishItem) GetSecurityStatus(request apistructs.PublishItemSecurityStatusRequest) (*apistructs.PublishItemSecurityStatusResponse, error)
GetSecurityStatus 获取客户安全信息状态
func (*PublishItem) GetStatisticsChannelInfo ¶
func (i *PublishItem) GetStatisticsChannelInfo(end time.Time, mk *apistructs.MonitorKeys) ([]*apistructs.PublishItemStatisticsDetailResponse, error)
GetStatisticsChannelInfo 获取渠道详情,明细数据
func (*PublishItem) GetStatisticsTrend ¶
func (i *PublishItem) GetStatisticsTrend(mk *apistructs.MonitorKeys) (*apistructs.PublishItemStatisticsTrendResponse, error)
GetStatisticsTrend 获取统计大盘,整体趋势
func (*PublishItem) GetStatisticsVersionInfo ¶
func (i *PublishItem) GetStatisticsVersionInfo(end time.Time, mk *apistructs.MonitorKeys) ([]*apistructs.PublishItemStatisticsDetailResponse, error)
GetStatisticsVersionInfo 获取版本详情,明细数据
func (*PublishItem) GrayDistribution ¶
func (i *PublishItem) GrayDistribution(w http.ResponseWriter, r *http.Request, publisherItem dbclient.PublishItem, distribution *apistructs.PublishItemDistributionData, mobileType apistructs.ResourceType, packageName string) error
GrayDistribution 根据用户身份进行和灰度设置进行灰度分发
func (*PublishItem) Migration320 ¶
func (i *PublishItem) Migration320()
Migration320 3.20 灰度逻辑迁移,3.21删除
func (*PublishItem) PublicPublishItemVersion ¶
func (i *PublishItem) PublicPublishItemVersion(req apistructs.UpdatePublishItemVersionStatesRequset, local *i18n.LocaleResource) error
PublicPublishItemVersion 上架或下架版本
func (*PublishItem) PublishItemVersion ¶
func (i *PublishItem) PublishItemVersion(req *apistructs.CreatePublishItemVersionRequest) (*apistructs.PublishItemVersion, error)
PublishItemVersion 创建发布版本
func (*PublishItem) QueryPublishItemVersions ¶
func (i *PublishItem) QueryPublishItemVersions(req *apistructs.QueryPublishItemVersionRequest) (*apistructs.QueryPublishItemVersionData, error)
QueryPublishItemVersions 查询发布版本
func (*PublishItem) QueryPublishItems ¶
func (i *PublishItem) QueryPublishItems(req *apistructs.QueryPublishItemRequest) (*apistructs.QueryPublishItemData, error)
QueryPublishItems 查询发布内容
func (*PublishItem) RemoveBlacklist ¶
func (i *PublishItem) RemoveBlacklist(blacklistID, publishItemID uint64) (error, *dbclient.PublishItemBlackList, *dbclient.PublishItem)
RemoveBlacklist 移除黑名单
func (*PublishItem) SetPublishItemVersionDefault ¶
func (i *PublishItem) SetPublishItemVersionDefault(itemVersionID, itemID int64) error
SetPublishItemVersionDefault 设置发布版本默认状态
func (*PublishItem) SetPublishItemVersionPublic ¶
func (i *PublishItem) SetPublishItemVersionPublic(id, itemID int64) error
SetPublishItemVersionPublic 设置发布版本为公开
func (*PublishItem) SetPublishItemVersionUnPublic ¶
func (i *PublishItem) SetPublishItemVersionUnPublic(id, itemID int64) error
SetPublishItemVersionUnPublic 设置发布版本为公开
func (*PublishItem) UpdateErase ¶
func (i *PublishItem) UpdateErase(request *apistructs.PublishItemEraseRequest) error
UpdateErase 更新数据擦除
func (*PublishItem) UpdatePublishItem ¶
func (i *PublishItem) UpdatePublishItem(req *apistructs.UpdatePublishItemRequest) error
UpdatePublishItem 更新发布内容
func (*PublishItem) UploadFileFromFile ¶
func (i *PublishItem) UploadFileFromFile(filePath string) (*apistructs.File, error)
func (*PublishItem) UploadFileFromReader ¶
func (i *PublishItem) UploadFileFromReader(fileHeader *multipart.FileHeader) (*apistructs.File, error)