Documentation ¶
Overview ¶
应用启动引擎层
Index ¶
- Constants
- Variables
- func Count(curd Curd) (count int, err error)
- func DownloadConfigFile(fname string) (err error)
- func SearchList(curd Curd, page, limit int, columns string, list interface{}) (err error)
- type App
- type BatchConfig
- type ClickHouseConfig
- type Config
- type Curd
- type DebugDevice
- type EventData
- type GmOperaterLog
- func (this *GmOperaterLog) Insert() (err error)
- func (this *GmOperaterLog) ProcessSqlInsert(sqlA db.InsertBuilder) db.InsertBuilder
- func (this *GmOperaterLog) ProcessSqlUpdate(id int, sqlA db.UpdateBuilder) db.UpdateBuilder
- func (this *GmOperaterLog) ProcessSqlWhere(sqlA db.SelectBuilder) db.SelectBuilder
- func (this *GmOperaterLog) TableName() string
- type GmRoleModel
- type GmUserModel
- func (this GmUserModel) Delete() (err error)
- func (this GmUserModel) Exsit() (b bool)
- func (this GmUserModel) GetPassword() string
- func (this GmUserModel) GetUserById() (gmUser GmUserModel, err error)
- func (this GmUserModel) GetUserByUP() (gmUser GmUserModel, err error)
- func (this GmUserModel) Insert() (id int64, err error)
- func (this GmUserModel) Select(appid string) (gmUser []GmUserModel, err error)
- func (this GmUserModel) Update() (err error)
- func (this GmUserModel) UpdatePassById() (err error)
- type InputMessage
- type KafkaCfg
- type KafkaData
- type LogConfig
- type ManagerConfig
- type MysqlConfig
- type Pannel
- type PannelFolder
- type RedisConfig
- type ReportConfig
- type ReportTable
- type SinkerConfig
- type UserGroup
- func (this *UserGroup) DeleteUserGroupById(managerUid int32, appid int) (err error)
- func (this *UserGroup) GetSelectOptions(managerUid int32, appid int) (list []UserGroup, err error)
- func (this *UserGroup) Insert(managerUid int32, appid int, userCount int, userList []byte) (err error)
- func (this *UserGroup) List(managerUid int32, appid int) (list []UserGroup, err error)
- func (this *UserGroup) ModifyUserGroup(managerUid int32, appid int) (err error)
Constants ¶
View Source
const ( UserReportType = 1 EventReportType = 2 Debug = 1 Release = 0 )
Variables ¶
View Source
var CmdName string
Functions ¶
Types ¶
type App ¶
type App struct { Page uint64 `json:"page" db:"-"` Limit uint64 `json:"limit" db:"-"` IsClose *int `db:"is_close" json:"is_close"` Id int `db:"id" json:"id"` CreateBy int `db:"create_by" json:"create_by"` UpdateBy int `db:"update_by" json:"update_by"` SaveMonth int `db:"save_mouth" json:"save_mouth"` AppName string `db:"app_name" json:"app_name"` Descibe string `db:"descibe" json:"descibe"` AppId string `db:"app_id" json:"app_id"` AppKey string `db:"app_key" json:"app_key"` CreateTime string `db:"create_time" json:"create_time"` UpdateTime string `db:"update_time" json:"update_time"` AppManager string `db:"app_manager" json:"app_manager"` }
type BatchConfig ¶
type ClickHouseConfig ¶
type ClickHouseConfig struct { Username string `json:"username"` Pwd string `json:"pwd"` IP string `json:"ip"` Port string `json:"port"` DbName string `json:"dbName"` MaxOpenConns int `json:"maxOpenConns"` MaxIdleConns int `json:"maxIdleConns"` MacrosShardKeyName string `json:"macrosShardKeyName"` MacrosReplicaKeyName string `json:"macrosReplicaKeyName"` ClusterName string `json:"clusterName"` }
type Config ¶
type Config struct { Manager ManagerConfig `json:"manager"` Report ReportConfig `json:"report"` Sinker SinkerConfig `json:"sinker"` Comm struct { Log LogConfig `json:"log"` Mysql MysqlConfig `json:"mysql"` ClickHouse ClickHouseConfig `json:"clickhouse"` Kafka KafkaCfg `json:"kafka"` Redis RedisConfig `json:"redis"` } `json:"comm"` }
全局配置结构体
var GlobConfig Config
func (*Config) GetCkQueryExpiration ¶
func (*Config) GetCkQueryLimit ¶
func (*Config) GetKafkaCfgProducerType ¶
type Curd ¶
type Curd interface { ProcessSqlWhere(sqlA db.SelectBuilder) db.SelectBuilder TableName() string ProcessSqlInsert(sqlA db.InsertBuilder) db.InsertBuilder ProcessSqlUpdate(id int, sqlA db.UpdateBuilder) db.UpdateBuilder }
type DebugDevice ¶
type EventData ¶
type EventData struct { AccountId string `json:"xwl_account_id"` XwlDistinctId string `json:"xwl_distinct_id"` XwlUserId string `json:"xwl_user_id"` XwlPartEvent string `json:"xwl_part_event"` XwlPartDate string `json:"xwl_part_date"` XwlMpPlatform string `json:"xwl_mp_platform"` XwlLibVersion string `json:"xwl_lib_version"` XwlOs string `json:"xwl_os"` XwlScreenWidth string `json:"xwl_screen_width"` XwlCountryCode string `json:"xwl_country_code"` XwlScreenHeight string `json:"xwl_screen_height"` XwlDeviceId string `json:"xwl_device_id"` XwlNetworkType string `json:"xwl_network_type"` XwlDeviceModel string `json:"xwl_device_model"` XwlCity string `json:"xwl_city"` XwlProvince string `json:"xwl_province"` XwlLib string `json:"xwl_lib"` XwlScene string `json:"xwl_scene"` XwlManufacturer string `json:"xwl_manufacturer"` XwlOsVersion string `json:"xwl_os_version"` XwlKafkaOffset int64 `json:"xwl_kafka_offset"` XwlIp string `json:"xwl_ip"` TableId string `json:"table_id"` Properties map[string]interface{} `json:"properties"` }
type GmOperaterLog ¶
type GmOperaterLog struct { Id int `db:"id" json:"id"` OperaterName string `db:"operater_name" json:"operater_name"` //操作者id OperaterId int `db:"operater_id" json:"operater_id"` //操作者id OperaterAction string `db:"operater_action" json:"operater_action"` //请求路由 Created string `db:"created" json:"created"` Method string `db:"method" json:"method"` //请求方法 Body []byte `db:"body" json:"-"` //请求body OperaterRoleId int `db:"operater_role_id" json:"operater_role_id"` FilterDate []string `db:"-" json:"date"` BodyStr string `db:"-" json:"body_str"` //请求body }
func (*GmOperaterLog) Insert ¶
func (this *GmOperaterLog) Insert() (err error)
func (*GmOperaterLog) ProcessSqlInsert ¶
func (this *GmOperaterLog) ProcessSqlInsert(sqlA db.InsertBuilder) db.InsertBuilder
func (*GmOperaterLog) ProcessSqlUpdate ¶
func (this *GmOperaterLog) ProcessSqlUpdate(id int, sqlA db.UpdateBuilder) db.UpdateBuilder
func (*GmOperaterLog) ProcessSqlWhere ¶
func (this *GmOperaterLog) ProcessSqlWhere(sqlA db.SelectBuilder) db.SelectBuilder
func (*GmOperaterLog) TableName ¶
func (this *GmOperaterLog) TableName() string
type GmRoleModel ¶
type GmRoleModel struct { ID int `json:"id" db:"id"` RoleName string `json:"name" db:"role_name"` Description string `json:"description" db:"description"` RoleList string `json:"routes" db:"role_list"` }
GmRoleModel
func (*GmRoleModel) GetById ¶
func (this *GmRoleModel) GetById(roleId int) (model GmRoleModel, err error)
GetById
func (*GmRoleModel) Select ¶
func (this *GmRoleModel) Select() (model []GmRoleModel, err error)
Select
type GmUserModel ¶
type GmUserModel struct { ID int32 `json:"id" db:"id"` RoleId int32 `json:"role_id" db:"role_id"` Username string `json:"username" db:"username"` Password string `json:"password" db:"password"` Realname string `json:"realname" db:"realname"` CreateTime string `db:"create_time" json:"create_time"` UpdateTime string `db:"update_time" json:"update_time"` LastLoginTime string `db:"last_login_time" json:"last_login_time"` IsDel int8 `db:"is_del" json:"is_del"` //是否禁止该账号 }
GmUserModel BI用户
func (GmUserModel) GetUserById ¶
func (this GmUserModel) GetUserById() (gmUser GmUserModel, err error)
通过id查询用户信息
func (GmUserModel) GetUserByUP ¶
func (this GmUserModel) GetUserByUP() (gmUser GmUserModel, err error)
登录
func (GmUserModel) Select ¶
func (this GmUserModel) Select(appid string) (gmUser []GmUserModel, err error)
Select
type InputMessage ¶
type KafkaCfg ¶
type KafkaCfg struct { NumPartitions int32 `json:"numPartitions"` Addresses []string `json:"addresses"` Username string `json:"username"` Password string `json:"password"` ReportTopicName string `json:"reportTopicName"` ConsumerGroupName string `json:"consumerGroupName"` RealTimeDataGroup string `json:"realTimeDataGroup"` ReportData2CKGroup string `json:"reportData2CKGroup"` DebugDataTopicName string `json:"debugDataTopicName"` DebugDataGroup string `json:"debugDataGroup"` ProducerType string `json:"producer_type"` }
type KafkaData ¶
type KafkaData struct { APPID string `json:"appid"` DistinctId string `json:"distinct_id"` TableId string `json:"table_id"` Ip string `json:"ip"` ReportType int `json:"report_type"` Debug string `json:"debug"` ReqData []byte `json:"req_data"` ReportTime string `json:"report_time"` ConsumptionTime string `json:"consumption_time"` EventName string `json:"event_name"` Offset int64 `json:"offset"` }
func (*KafkaData) GetReportTypeErr ¶
func (*KafkaData) GetTableName ¶
type ManagerConfig ¶
type MysqlConfig ¶
type Pannel ¶
type Pannel struct { Id int `db:"id" json:"id"` FolderId int `db:"folder_id" json:"folder_id"` PannelName string `db:"pannel_name" json:"pannel_name"` Managers string `db:"managers" json:"managers"` CreateBy int `db:"create_by" json:"create_by"` CreateTime int64 `db:"create_time" json:"create_time"` UpdateTime int64 `db:"update_time" json:"update_time"` ReportTables string `db:"report_tables" json:"report_tables"` }
type PannelFolder ¶
type PannelFolder struct { Id int `db:"id" json:"id"` FolderName string `db:"folder_name" json:"folder_name"` FolderType int8 `db:"folder_type" json:"folder_type"` //0为自己创建的 CreateBy int `db:"create_by" json:"create_by"` CreateTime string `db:"create_time" json:"create_time"` UpdateTime string `db:"update_time" json:"update_time"` Appid int `db:"appid" json:"appid"` }
type RedisConfig ¶
type ReportConfig ¶
type ReportConfig struct { ReportPort uint16 `json:"reportPort"` //上报程序启动端口 ReadTimeout int `json:"readTimeout"` WriteTimeout int `json:"writeTimeout"` MaxConnsPerIP int `json:"maxConnsPerIP"` MaxRequestsPerConn int `json:"maxRequestsPerConn"` IdleTimeout int `json:"idleTimeout"` UserAgentBanList []string `json:"userAgentBanList"` }
type ReportTable ¶
type ReportTable struct { Id int `db:"id" json:"id"` Appid int `db:"appid" json:"appid"` UserId int `db:"user_id" json:"user_id"` Name string `db:"name" json:"name"` RtType int8 `db:"rt_type" json:"rt_type"` Data string `db:"data" json:"data"` CreateTime string `db:"create_time" json:"create_time"` UpdateTime string `db:"update_time" json:"update_time"` Remark string `db:"remark" json:"remark"` }
func (*ReportTable) InsertOrUpdate ¶
func (this *ReportTable) InsertOrUpdate() (err error)
type SinkerConfig ¶
type SinkerConfig struct { ReportAcceptStatus BatchConfig `json:"reportAcceptStatus"` ReportData2CK BatchConfig `json:"reportData2CK"` RealTimeWarehousing BatchConfig `json:"realTimeWarehousing"` PprofHttpPort uint16 `json:"pprofHttpPort"` }
type UserGroup ¶
type UserGroup struct { Id int `db:"id" json:"id"` GroupName string `db:"group_name" json:"group_name"` GroupRemark string `db:"group_remark" json:"group_remark"` CreateBy int `db:"create_by" json:"create_by"` UserCount int `db:"user_count" json:"user_count"` UserList []byte `db:"user_list" json:"-"` UserListData []string `db:"-" json:"user_list"` CreateTime string `db:"create_time" json:"create_time"` UpdateTime string `db:"update_time" json:"update_time"` }
func (*UserGroup) DeleteUserGroupById ¶
func (*UserGroup) GetSelectOptions ¶
Click to show internal directories.
Click to hide internal directories.