operation

package
v3.6.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainAction

type DomainAction = string
const (
	DomainActionAll    DomainAction = "getbizdomain"
	DomainActionBiz    DomainAction = "getbizdomain"
	DomainActionServer DomainAction = "getserverdomain"
)

type FeedbackType

type FeedbackType = uint8
const (
	FeedbackTypeAll          FeedbackType = iota // 全部类型
	FeedbackTypeCannotOpen                       //无法打开小程序
	FeedbackTypeQuit                             //小程序闪退
	FeedbackTypeLags                             //卡顿
	FeedbackTypeBlackOrWhite                     //黑屏白屏
	FeedbackTypeDead                             //死机
	FeedbackTypeUICross                          //界面错位
	FeedbackTypeLoadSlowly                       //界面加载慢
	FeedbackTypeOther                            //其他异常

)

type GetDomainInfoRequest

type GetDomainInfoRequest struct {
	// 查询配置域名的类型, 可选值如下:
	// 1. getbizdomain 返回业务域名
	// 2. getserverdomain 返回服务器域名
	// 3. 不指明返回全部
	Action DomainAction `query:"action"`
}

type GetDomainInfoResponse

type GetDomainInfoResponse struct {
	request.CommonError
	// request合法域名列表
	RequestDomain []string `json:"requestdomain"`
	// socket合法域名列表
	WSRequestDomain []string `json:"wsrequestdomain"`
	// uploadFile合法域名列表
	UploadDomain []string `json:"uploaddomain"`
	// downloadFile合法域名列表
	DownloadDomain []string `json:"downloaddomain"`
	// udp合法域名列表
	UDPDomain []string `json:"udpdomain"`
	// 业务域名列表
	BizDomain []string `json:"bizdomain"`
}

type GetFeedbackMediaRequest

type GetFeedbackMediaRequest struct {
	// 必填	用户反馈信息的 record_id, 可通过 getFeedback 获取
	RecordID int `query:"record_id"`
	// 必填	图片的 mediaId
	MediaId string `query:"media_id"`
}

type GetFeedbackRequest

type GetFeedbackRequest struct {
	// 非必填	反馈的类型,默认拉取全部类型,详细定义见下面
	Type FeedbackType `query:"type"`
	// 必填	分页的页数,从1开始
	Page int `query:"page"`
	// 必填	分页拉取的数据数量
	Num int `query:"num"`
}

type GetGrayReleasePlanResponse

type GetGrayReleasePlanResponse struct {
	request.CommonError
	// 分阶段发布计划详情
	GrayReleaseplan struct {
		//	0:初始状态 1:执行中 2:暂停中 3:执行完毕 4:被删除
		Status int `json:"status"`
		//	分阶段发布计划的创建事件
		CreateTimestamp int `json:"create_timestamp"`
		//	当前的灰度比例
		GrayPercentage int `json:"gray_percentage"`
		//	预计全量时间
		DefaultFinishTimestamp int `json:"default_finish_timestamp"`
	} `json:"gray_release_plan"`
}

type GetJsErrDetailRequest

type GetJsErrDetailRequest struct {
	// 必填	开始时间, 格式 "xxxx-xx-xx"
	StartTime string `json:"startTime"`
	// 必填	结束时间,格式 “xxxx-xx-xx”
	EndTime string `json:"endTime"`
	// 必填	错误列表查询 接口 返回的 errorMsgMd5 字段
	ErrorMsgMd5 string `json:"errorMsgMd5"`
	// 必填	错误列表查询 接口 返回的 errorStackMd5 字段
	ErrorStackMd5 string `json:"errorStackMd5"`
	// 必填	小程序版本 "0"代表全部, 例如:“2.0.18”
	AppVersion string `json:"appVersion"`
	// 必填	基础库版本 "0"表示所有版本,例如 "2.14.1"
	SdkVersion string `json:"sdkVersion"`
	// 必填	系统类型 "0"【全部】,"1" 【安卓】,"2" 【IOS】,"3"【其他】
	OsName string `json:"osName"`
	// 必填	客户端版本 "0"表示所有版本, 例如 "7.0.22"
	ClientVersion string `json:"clientVersion"`
	// 必填	发生错误的用户 openId
	Openid string `json:"openid"`
	// 必填	排序规则 "0" 升序, "1" 降序
	Desc string `json:"desc"`
	// 必填	分页起始值
	Offset int `json:"offset"`
	// 必填	一次拉取最大值
	Limit int `json:"limit"`
}

type GetJsErrDetailResponse

type GetJsErrDetailResponse struct {
	request.CommonError

	Openid  string `json:"openid"`
	Success bool   `json:"success"`
	// 总条数
	TotalCount int `json:"totalCount"`
	// 错误列表
	Data []struct {
		Count         int    `json:"Count"`
		SdkVersion    string `json:"sdkVersion"`
		ClientVersion string `json:"clientVersion"`
		ErrorStackMd5 string `json:"errorStackMd5"`
		TimeStamp     string `json:"TimeStamp"`
		AppVersion    string `json:"appVersion"`
		ErrorMsgMd5   string `json:"errorMsgMd5"`
		ErrorMsg      string `json:"errorMsg"`
		ErrorStack    string `json:"errorStack"`
		Ds            string `json:"Ds"`
		OsName        string `json:"osName"`
		Openid        string `json:"openid"`
		Pluginversion string `json:"pluginversion"`
		AppId         string `json:"appId"`
		DeviceModel   string `json:"DeviceModel"`
		Source        string `json:"source"`
		Route         string `json:"route"`
		Uin           string `json:"Uin"`
		Nickname      string `json:"nickname"`
	} `json:"data"`
}

type GetJsErrListRequest

type GetJsErrListRequest struct {
	// 必填	小程序版本 "0"代表全部, 例如:“2.0.18”
	AppVersion string `json:"appVersion"`
	// 必填	错误类型 "0"【全部】,"1"【业务代码错误】,"2"【插件错误】,"3"【系统框架错误】
	ErrType string `json:"errType"`
	// 必填	开始时间, 格式 "xxxx-xx-xx"
	StartTime string `json:"startTime"`
	// 必填	结束时间,格式 “xxxx-xx-xx”
	EndTime string `json:"endTime"`
	// 必填	从错误中搜索关键词,关键词过滤
	Keyword string `json:"keyword"`
	// 必填	发生错误的用户 openId
	Openid string `json:"openid"`
	// 必填	排序字段 "uv", "pv" 二选一
	Orderby string `json:"orderby"`
	// 必填	排序规则 "1" orderby字段降序,"2" orderby字段升序
	Desc string `json:"desc"`
	// 必填	分页起始值
	Offset int64 `json:"offset"`
	// 必填	一次拉取最大值, 最大 30
	Limit int64 `json:"limit"`
}

type GetPerformanceRequest

type GetPerformanceRequest struct {
	// 必填 可选值 1(启动总耗时), 2(下载耗时),3(初次渲染耗时)
	CostTimeType int `json:"cost_time_type"`
	// 必填 查询开始时间
	DefaultStartTime int `json:"default_start_time"`
	// 必填 查询结束时间
	DefaultEndTime int `json:"default_end_time"`
	// 必填 系统平台,可选值 "@_all:"(全部),1(IOS), 2(android)
	Device string `json:"device"`
	// 必填 是否下载代码包,当 type 为 1 的时候才生效,可选值 "@_all:"(全部),1(是), 2(否)
	IsDownloadCode string `json:"is_download_code"`
	// 必填 访问来源,当 type 为 1 或者 2 的时候才生效,通过 getSceneList 接口获取
	Scene string `json:"scene"`
	// 必填 网络环境, 当 type 为 2 的时候才生效,可选值 "@_all:",wifi, 4g, 3g, 2g
	Networktype string `json:"networktype"`
}

type GetPerformanceResponse

type GetPerformanceResponse struct {
	request.CommonError
	//	错误查询数据(json字符串,结构如下所述的 strbody)
	DefaultTimeData string `json:"default_time_data"`
	//	比较数据
	CompareTimeData string `json:"compare_time_data"`
}

type GetSceneListResponse

type GetSceneListResponse struct {
	request.CommonError
	// 访问来源
	Scene []struct {
		// 来源中文名
		Name  string `json:"name"`
		Value string `json:"value"`
	} `json:"scene"`
}

type GetVersionListResponse

type GetVersionListResponse struct {
	request.CommonError
	// 版本列表
	CVList []struct {
		// 查询类型 1 代表客户端,2 代表服务直达
		Type uint8 `json:"type"`
		// 版本列表
		ClientVersionList []string `json:"client_version_list"`
	} `json:"cvlist"`
}

type Operation

type Operation struct {
	// contains filtered or unexported fields
}

func NewOperation

func NewOperation(request *request.Request, conbineURI func(url string, req interface{}, withToken bool) (string, error)) *Operation

func (*Operation) GetDomainInfo

func (cli *Operation) GetDomainInfo(req *GetDomainInfoRequest) (*GetDomainInfoResponse, error)

查询域名配置

func (*Operation) GetFeedback

func (cli *Operation) GetFeedback(req *GetFeedbackRequest) (*request.CommonError, error)

获取用户反馈列表

func (*Operation) GetFeedbackMedia

func (cli *Operation) GetFeedbackMedia(req *GetFeedbackMediaRequest) (*http.Response, *request.CommonError, error)

获取 mediaId 图片

func (*Operation) GetGrayReleasePlan

func (cli *Operation) GetGrayReleasePlan() (*GetGrayReleasePlanResponse, error)

查询当前分阶段发布详情

func (*Operation) GetJsErrDetail

func (cli *Operation) GetJsErrDetail(req *GetJsErrDetailRequest) (*GetJsErrDetailResponse, error)

错误查询详情

func (*Operation) GetJsErrList

func (cli *Operation) GetJsErrList(req *GetJsErrListRequest) (*request.CommonError, error)

错误查询列表

func (*Operation) GetPerformance

func (cli *Operation) GetPerformance(req *GetPerformanceRequest) (*GetPerformanceResponse, error)

性能监控

func (*Operation) GetSceneList

func (cli *Operation) GetSceneList() (*GetSceneListResponse, error)

获取访问来源

func (*Operation) GetVersionList

func (cli *Operation) GetVersionList() (*GetVersionListResponse, error)

获取客户端版本

func (*Operation) RealtimelogSearch

func (cli *Operation) RealtimelogSearch(req *RealtimelogSearchRequest) (*RealtimelogSearchResponse, error)

实时日志查询

type RealtimelogSearchRequest

type RealtimelogSearchRequest struct {
	// 必填 YYYYMMDD格式的日期,仅支持最近7天
	Date string `query:"date"`
	// 必填 开始时间,必须是date指定日期的时间
	Begintime int64 `query:"begintime"`
	// 必填 结束时间,必须是date指定日期的时间
	Endtime int64 `query:"endtime"`
	// 非必填 开始返回的数据下标,用作分页,默认为0
	Start int `query:"start"`
	// 非必填 返回的数据条数,用作分页,默认为20
	Limit int `query:"limit"`
	// 非必填 小程序启动的唯一ID,按TraceId查询会展示该次小程序启动过程的所有页面的日志。
	TraceId string `query:"traceId"`
	// 非必填 小程序页面路径,例如pages/index/index
	Url string `query:"url"`
	// 非必填 用户微信号或者OpenId
	Id string `query:"id"`
	// 非必填 开发者通过setFileterMsg/addFilterMsg指定的filterMsg字段
	FilterMsg string `query:"filterMsg"`
	// 非必填 日志等级,返回大于等于level等级的日志,level的定义为2(Info)、4(Warn)、8(Error),如果指定为4,则返回大于等于4的日志,即返回Warn和Error日志。
	Level uint8 `query:"level"`
}

type RealtimelogSearchResponse

type RealtimelogSearchResponse struct {
	request.CommonError
	// 返回的日志数据列表
	List []struct {
		// 日志等级,是msg数组里面的所有level字段的或操作得到的结果。例如msg数组里有两条日志,Info(值为2)和Warn(值为4),则level值为6
		Level uint8 `json:"level"`
		// 基础库版本
		LibraryVersion string `json:"libraryVersion"`
		// 客户端版本
		ClientVersion string `json:"clientVersion"`
		// 微信用户OpenID
		Id string `json:"id"`
		// 打日志的Unix时间戳
		Timestamp int64 `json:"timestamp"`
		// 1 安卓 2 IOS
		Platform uint8 `json:"platform"`
		// 小程序页面链接
		Url string `json:"url"`
		// 日志内容数组,log.info等的内容存在这里
		Msg []struct {
			// log.info调用的时间
			Time int64 `json:"time"`
			// log.info调用的内容,每个参数分别是数组的一项
			Msg []string `json:"msg"`
			// log.info调用的日志等级
			Level uint8 `json:"level"`
		} `json:"msg"`
		// 小程序启动的唯一ID,按TraceId查询会展示该次小程序启动过程的所有页面的日志。
		TraceId string `json:"traceid"`
		// 微信用户OpenID
		FilterMsg string `json:"filterMsg"`
	} `json:"list"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL