domains

package
v0.0.0-...-65d0c02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationData

type AuthenticationData struct {
	UserID                string `json:"user_id"`
	AuthenticationSuccess bool   `json:"authentication_success"`
	UserAgent             string `json:"user_agent"`
	IP                    string `json:"ip"`
	Country               string `json:"country"`
	Region                string `json:"region"`
	OS                    string `json:"os"`
	Browser               string `json:"browser"`
	DeviceType            string `json:"device_type"`
}

type Risk

type Risk struct {
	Score          float32
	Classification RiskClassification
}

func (*Risk) AddScore

func (r *Risk) AddScore(score float32)

type RiskClassification

type RiskClassification string
const (
	HIGH   RiskClassification = "HIGH"
	MEDIUM RiskClassification = "MEDIUM"
	LOW    RiskClassification = "LOW"
)

type RiskProfile

type RiskProfile struct {
	Name          string
	CountryFactor int
	RegionFactor  int
}

func NewDefaultRisckWeight

func NewDefaultRisckWeight() *RiskProfile

func (*RiskProfile) TotalWeight

func (rp *RiskProfile) TotalWeight() int

type UserProfile

type UserProfile struct {
	UserID    string                  `json:"user_id"`
	Countries []UserProfileStatistics `json:"countries"`
	Regions   []UserProfileStatistics `json:"regions"`
}

func (*UserProfile) GetCountryPercentage

func (up *UserProfile) GetCountryPercentage(entry string) float32

func (*UserProfile) GetRegionPercentage

func (up *UserProfile) GetRegionPercentage(entry string) float32

type UserProfileStatistics

type UserProfileStatistics struct {
	Entry string `json:"entry"`
	Total int    `json:"total"`
}

Jump to

Keyboard shortcuts

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