support

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GeoLite2_City_file = "geoLite2/GeoLite2-City.mmdb"

const GeoLite2_City_file = "geoLite2/GeoLite2-City.mmdb"

View Source
const GeoLite2_Country_file = "geoLite2/GeoLite2-Country.mmdb"

Variables

This section is empty.

Functions

func GetGeo

func GetGeo() *geoLite

func Log

func Log(data ...interface{})

func SetConfig

func SetConfig(data *TrackingConfig)

Types

type TrackingConfig

type TrackingConfig struct {
	EnableTracking     bool `json:"enableTracking"`     // 是否开启跟踪
	EnableTrackingPage bool `json:"enableTrackingPage"` // 是否开启跟踪页面
	SessionTimeOut     int  `json:"sessionTimeOut"`     // 会话时长  30分钟  1800

	DSN     string `json:"dsn"` // mysql DSN 信息
	MaxOpen int    `json:"maxOpen"`
	GeoCity string `json:"geoCity"`
}

*

需要用到再说

func Config

func Config() *TrackingConfig

func (*TrackingConfig) IsTracking

func (this *TrackingConfig) IsTracking() bool

func (*TrackingConfig) SetDsn

func (this *TrackingConfig) SetDsn(dsn string)

func (*TrackingConfig) SetEnableTracking

func (this *TrackingConfig) SetEnableTracking(enable bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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