models

package
v0.0.0-...-c290b82 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	bun.BaseModel `bun:"config"`

	ID    string `bun:",pk"`
	Value string
}

type Request

type Request struct {
	bun.BaseModel

	ID         string `bun:",pk"`
	Time       time.Time
	IPAddr     string
	Host       string
	RawURI     string
	URI        string
	Referer    string
	UserAgent  string
	StatusCode int

	Session   *Session `bun:"rel:belongs-to,join:session_id=id"`
	SessionID string   `bun:",nullzero"`
}

type Session

type Session struct {
	bun.BaseModel

	ID        string `bun:",pk"`
	UserAgent string `bun:"type:VARCHAR COLLATE NOCASE"`
	IPAddr    string

	LastSeen time.Time `bun:",scanonly"`
}

func (*Session) String

func (s *Session) String() string

Jump to

Keyboard shortcuts

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