models

package
v0.0.0-...-1abbe61 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShortURL

type ShortURL struct {
	ID              primitive.ObjectID `bson:"_id"`
	Key             string             `bson:"key"`
	Value           string             `bson:"value"`
	Title           string             `bson:"title"`
	CreatedAt       int64              `bson:"created_at"` // unix timestamp
	LastTimeVisited time.Time          `bson:"last_time_visited"`
	Clicks          int                `bson:"clicks"`
	Visits          []Visit            `bson:"visits"`
}

type UserAgent

type UserAgent struct {
	Mobile         bool
	Platform       string
	OS             string
	Browser        string
	BrowserVersion string
}

type UserInput

type UserInput struct {
	URL string `bson:"url"`
}

type Visit

type Visit struct {
	Clicks        int
	Date          int64 // unix timestamp
	UserAgent     []UserAgent
	Language      []string
	RemoteAddr    []string
	XForwardedFor []string
	CountryCode   []string
}

Jump to

Keyboard shortcuts

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