lxthinkingdatas

package
v0.0.0-...-53c7397 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: AFL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLUSTER_BY_DYNAMIC_CONDITION = "cluster_by_dynamic_condition" //动态条件更新用户群
	CLUSTER_BY_STATIC_CONDITION  = "cluster_by_static_condition"  //静态条件用户群
	CLUSTER_BY_RESULT            = "cluster_by_result"            //结果分群
	CLUSTER_BY_IMPORT            = "cluster_by_import"            //自定义上传 ID 分群
	CLUSTER_BY_DYNAMIC_SQL       = "cluster_by_dynamic_sql"       //动态SQL分群
	CLUSTER_BY_STATIC_SQL        = "cluster_by_static_sql"        //静态SQL分群
	TAG_BY_DYNAMIC_CONDITION     = "tag_by_dynamic_condition"     //动态条件更新用户标签
	TAG_BY_STATIC_CONDITION      = "tag_by_static_condition"      //静态条件用户标签
	TAG_BY_IMPORT                = "tag_by_import"                //自定义上传 ID 标签
	TAG_BY_DYNAMIC_SQL           = "tag_by_dynamic_sql"           //动态SQL标签
	TAG_BY_STATIC_SQL            = "tag_by_static_sql"            //静态SQL标签
)
View Source
const (
	DEFAULT_FORMAT  = "csv"
	DEFAULT_TIMEOUT = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MQueryConfig

type MQueryConfig struct {
	ApiUrl         string
	SQL            string // 查询密钥
	Token          string // 查询的 SQL 语句
	Format         string //行数据格式默认 json (json,csv,csv_header,tsv,tsv_header,json_object)
	TimeOutSeconds int    //请求超时参数,超时则取消查询任务
}

type MQueryResp

type MQueryResp struct {
	BodyByte []byte
}

func QuerySql

func QuerySql(config MQueryConfig) (info MQueryResp, err error)

QuerySql 查询

type MRequestClusterList

type MRequestClusterList struct {
	ClusterCatalog string                     `json:"clusterCatalog"`
	ClusterName    string                     `json:"clusterName"`
	ClusterTypes   []string                   `json:"clusterTypes"`
	PagerHeader    MRequestClusterPagerHeader `json:"pagerHeader"`
	ProjectID      int                        `json:"projectId"`
}

type MRequestClusterPagerHeader

type MRequestClusterPagerHeader struct {
	PageNum  int `json:"pageNum"`
	PageSize int `json:"pageSize"`
}

type MRespClusterListInfo

type MRespClusterListInfo struct {
	Data struct {
		PagerResult struct {
			PageNum  int `json:"pageNum"`
			PageSize int `json:"pageSize"`
			TotalNum int `json:"totalNum"`
		} `json:"pagerResult"`
		UserClusters []MUserClusters `json:"userClusters"`
	} `json:"data"`
	ReturnCode       int    `json:"return_code"`
	ReturnMessage    string `json:"return_message"`
	ShowStackMessage bool   `json:"showStackMessage"`
}

func UserClusterList

func UserClusterList(jsonBody MRequestClusterList, config MQueryConfig) (info MRespClusterListInfo, bodys []byte, err error)

UserClusterList 分群和标签列表查询

type MUserClusters

type MUserClusters struct {
	ClusterCatalog           string `json:"clusterCatalog"`
	ClusterName              string `json:"clusterName"`
	ClusterType              string `json:"clusterType"`
	DisplayName              string `json:"displayName"`
	EntityColumnName         string `json:"entityColumnName"`
	EntityID                 int    `json:"entityId"`
	EntityName               string `json:"entityName"`
	HistoryDataStatus        int    `json:"historyDataStatus"`
	ID                       int    `json:"id"`
	MainColumnName           string `json:"mainColumnName"`
	Progress                 int    `json:"progress"`
	ProjectID                int    `json:"projectId"`
	RefreshDelay             int    `json:"refreshDelay"`
	RefreshTime              string `json:"refreshTime"`
	Remarks                  string `json:"remarks"`
	SelectType               string `json:"selectType"`
	Status                   int    `json:"status"`
	SubConditionTabType      string `json:"subConditionTabType,omitempty"`
	UploadFileName           string `json:"uploadFileName"`
	UserID                   int    `json:"userId"`
	UserName                 string `json:"userName"`
	UsersNum                 int    `json:"usersNum"`
	ImportIDClusterAddRspDTO struct {
		ClusterID       int `json:"clusterId"`
		TagValueNullNum int `json:"tagValueNullNum"`
		UnmatchedNum    int `json:"unmatchedNum"`
		UploadNum       int `json:"uploadNum"`
		UserNum         int `json:"userNum"`
	} `json:"importIdClusterAddRspDTO,omitempty"`
	TagStats []struct {
		TagValue string `json:"tagValue"`
		UserNum  int    `json:"userNum"`
	} `json:"tagStats,omitempty"`
}

Jump to

Keyboard shortcuts

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