model

package
v1.29.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateModels

func MigrateModels() []any

Types

type AuditLog

type AuditLog struct {
	ID        uint      `gorm:"primaryKey" json:"id"`
	Action    string    `gorm:"size:64;index" json:"action"`
	Summary   string    `gorm:"size:512" json:"summary"`
	Actor     string    `gorm:"size:128" json:"actor"`
	ClientIP  string    `gorm:"size:64" json:"clientIp"`
	Diff      string    `gorm:"type:text" json:"diff,omitempty"`
	CreatedAt time.Time `json:"createdAt"`
}

AuditLog records admin actions.

type ConfigRevision

type ConfigRevision struct {
	ID        uint      `gorm:"primaryKey" json:"id"`
	CreatedAt time.Time `gorm:"index" json:"createdAt"`
	Actor     string    `gorm:"size:128" json:"actor"`
	ClientIP  string    `gorm:"size:64" json:"clientIp"`
	Summary   string    `gorm:"size:512" json:"summary"`
	YAML      string    `gorm:"type:text" json:"yaml"`
	BytesSize int       `json:"bytesSize"`
}

ConfigRevision is a snapshot of the YAML config saved on each PUT. Restoring a revision creates a new revision; history is append-only.

type MetricSnapshot

type MetricSnapshot struct {
	ID            uint      `gorm:"primaryKey" json:"id"`
	UploadBytes   int64     `json:"uploadBytes"`
	DownloadBytes int64     `json:"downloadBytes"`
	Requests      int64     `json:"requests"`
	Connections   int64     `json:"connections"`
	SessionCount  int       `json:"sessionCount"`
	CreatedAt     time.Time `gorm:"index" json:"createdAt"`
}

MetricSnapshot stores periodic traffic aggregates.

Jump to

Keyboard shortcuts

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