Documentation ¶
Index ¶
- Variables
- type Client
- type DummyClient
- type Item
- type Person
- type PredictPriceRequest
- type PredictPriceResponse
- type PredictRequest
- type PredictResponse
- type Properties
- type Signature
- type SimpleClient
- type UserInfo
- func (i *UserInfo) Ages() (from, to int)
- func (i *UserInfo) CarrierInfo() *udetect.Carrier
- func (i *UserInfo) Country() *udetect.Geo
- func (i *UserInfo) DeviceInfo() *udetect.Device
- func (i *UserInfo) ETag() string
- func (i *UserInfo) Fingerprint() string
- func (i *UserInfo) GeoInfo() *udetect.Geo
- func (i *UserInfo) Keywords() string
- func (i *UserInfo) MostPossibleSex() int
- func (i *UserInfo) SessionID() string
- func (i *UserInfo) UUID() string
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyPerson = &person{ userInfo: UserInfo{ User: &udetect.User{}, Device: &udetect.DeviceDefault, Geo: &udetect.GeoDefault, }, }
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Detect(ctx context.Context, req *udetect.Request) (*udetect.Response, error)
}
Client interface
type DummyClient ¶
type DummyClient struct { }
type Person ¶
type Person interface { // User info data UserInfo() *UserInfo // IsInited person in database IsInited() bool // Properties for domain Properties(name string) Properties // Predict what does he likes? Predict(req *PredictRequest) (*PredictResponse, error) // PredictPrice what minimal PredictPrice(req *PredictPriceRequest) (*PredictPriceResponse, error) }
Person information block
type Properties ¶
type Properties interface { // Get property by key Get(key string) any // GetString property by key GetString(key string) string // GetIntSlice property by key GetIntSlice(key string) []int // Set property Set(key string, prop any) // Delete property by key Delete(key string) // Synchronise properties Synchronise() error }
Properties accessor
type Signature ¶
type Signature struct { UUIDName string SessidName string SessidLifetime time.Duration Detector Client }
Signature provides the builder of cookie assigned to the user by HTTP
func (*Signature) SignCookie ¶
func (sign *Signature) SignCookie(resp Person, req *fasthttp.RequestCtx)
SignCookie do sign request by traking response
type SimpleClient ¶
Click to show internal directories.
Click to hide internal directories.