report

package
v0.0.0-...-9337120 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerErr     int = 10001
	AppParmasErr  int = 10002
	ReportTypeErr int = 10003
)

内置异常

View Source
const (
	DebugToDB    = "1"
	DebugNotToDB = "2"
)

Variables

View Source
var ERROR_TABLE = map[int]string{
	ServerErr:     "服务异常",
	AppParmasErr:  "appid错误或者appkey错误",
	ReportTypeErr: "上报类型错误",
}

内置异常表 TOKEN_ERROR

Functions

func RefreshTableIdMap

func RefreshTableIdMap(t time.Duration)

Types

type EventReport

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

func (*EventReport) GetkafkaData

func (this *EventReport) GetkafkaData() model.KafkaData

func (*EventReport) InflowOfKakfa

func (this *EventReport) InflowOfKakfa() (err error)

func (*EventReport) NewReportType

func (this *EventReport) NewReportType(appid, tableId, debug, timeNow, eventName, ip string, body []byte)

func (*EventReport) Put

func (this *EventReport) Put()

type ReportInterface

type ReportInterface interface {
	NewReportType(appid, tableId, debug, timeNow, eventName, ip string, body []byte)
	GetkafkaData() model.KafkaData
	InflowOfKakfa() (err error)
	Put()
}

func GetReportDuck

func GetReportDuck(typ string) (reportInterface ReportInterface, err error)

func NewEventReport

func NewEventReport() ReportInterface

func NewUserReport

func NewUserReport() ReportInterface

type ReportService

type ReportService struct {
}

func (*ReportService) CantInflowOfKakfa

func (this *ReportService) CantInflowOfKakfa(debug, xwlDistinctId, tableId string) bool

func (*ReportService) GetTableid

func (this *ReportService) GetTableid(appid, appkey string) (table string, err error)

func (*ReportService) InflowOfDebugData

func (this *ReportService) InflowOfDebugData(data map[string]interface{}, eventName string) (err error)

func (*ReportService) IsDebugUser

func (this *ReportService) IsDebugUser(debug, xwlDistinctId, tableId string) bool

type UserReport

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

func (*UserReport) GetkafkaData

func (this *UserReport) GetkafkaData() model.KafkaData

func (*UserReport) InflowOfKakfa

func (this *UserReport) InflowOfKakfa() (err error)

func (*UserReport) NewReportType

func (this *UserReport) NewReportType(appid, tableId, debug, timeNow, eventName, ip string, body []byte)

func (*UserReport) Put

func (this *UserReport) Put()

Jump to

Keyboard shortcuts

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