simple

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	ID       uint
	Name     string
	Versions []*VersionItem
}

Item is a parentless OS or browser family. Versions are the child rows.

type SimpleClient

type SimpleClient struct {
	BrowserList []*Item
	OSList      []*Item
}

SimpleClient represents a simple implementation of the Client interface that uses the mileusna/useragent package for user-agent parsing.

func New

func New(browsers, os []*Item) *SimpleClient

New returns a SimpleClient with the given catalog lists.

func (*SimpleClient) Detect

func (s *SimpleClient) Detect(ctx context.Context, req *udetect.Request) (*udetect.Response, error)

type VersionItem

type VersionItem struct {
	ID  uint
	Min types.Version
	Max types.Version
}

VersionItem is one catalog version row. Min/Max come from match_ver_min_exp and match_ver_max_exp. There is no further nesting.

Jump to

Keyboard shortcuts

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