model

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package model Date: 2022/11/9 10:18 Author: Amu Description:

Package model Date: 2024/3/6 11:06 Author: Amu Description:

Package model Date: 2024/3/6 11:05 Author: Amu Description:

Package model Date: 2024/3/6 11:05 Author: Amu Description:

Package model Date: 2024/3/27 16:49 Author: Amu Description:

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Audit

type Audit struct {
	gorm.Model
	Username string `gorm:"type:varchar(255);not null"`
	Operate  string `gorm:"type:varchar(255);not null"`
}

func (*Audit) TableName

func (d *Audit) TableName() string

type Audits

type Audits []Audit

type CPU

type CPU struct {
	gorm.Model
	Timestamp  time.Time
	CPUPercent float64
}

func (*CPU) TableName

func (d *CPU) TableName() string

type Container

type Container struct {
	gorm.Model
	Timestamp   time.Time
	ContainerID string
	Name        string
	Image       string
	IP          string
	State       string
	Uptime      string
	CPUPercent  float64
	MemPercent  float64
	MemUsage    float64
	MemLimit    float64
}

func (*Container) TableName

func (d *Container) TableName() string

type Containers

type Containers []Container

type Disk

type Disk struct {
	gorm.Model
	Timestamp   time.Time
	Device      string
	DiskPercent float64
	DiskTotal   float64
	DiskUsed    float64
	DiskRead    float64
	DiskWrite   float64
}

func (*Disk) TableName

func (d *Disk) TableName() string

type Docker

type Docker struct {
	gorm.Model
	Timestamp     time.Time
	DockerVersion string
	APIVersion    string
	MinAPIVersion string
	GitCommit     string
	GoVersion     string
	Os            string
	Arch          string
}

func (*Docker) TableName

func (d *Docker) TableName() string

type Host

type Host struct {
	gorm.Model
	Timestamp       time.Time
	Uptime          string
	Hostname        string
	Os              string
	Platform        string
	PlatformVersion string
	KernelVersion   string
	KernelArch      string
}

func (*Host) TableName

func (d *Host) TableName() string

type Image

type Image struct {
	gorm.Model
	Timestamp time.Time
	ImageID   string
	Name      string
	Tag       string
	Created   string
	Size      string
	Number    int
}

func (*Image) TableName

func (i *Image) TableName() string

type Images

type Images []Image

type Memory

type Memory struct {
	gorm.Model
	Timestamp  time.Time
	MemPercent float64
	MemTotal   float64
	MemUsed    float64
}

func (*Memory) TableName

func (d *Memory) TableName() string

type Models

type Models struct{}

func NewModels

func NewModels() *Models

func (*Models) GetAllModels

func (a *Models) GetAllModels() []interface{}

type Net

type Net struct {
	gorm.Model
	Timestamp time.Time
	Ethernet  string
	NetRecv   float64
	NetSend   float64
}

func (*Net) TableName

func (d *Net) TableName() string

type User

type User struct {
	ID        uuid.UUID `gorm:"type:uuid;primaryKey;comment:唯一标识"`
	CreatedAt time.Time `gorm:"comment:创建时间"`
	UpdatedAt time.Time `gorm:"comment:更新时间"`
	Username  string    `gorm:"size:255;uniqueIndex;not null;comment:用户名"`
	Password  string    `gorm:"size:128;not null;comment:密码"`
	Remark    *string   `gorm:"size:200;comment:备注"`
	IsAdmin   string    `gorm:"default:'0';comment:是否是管理员('1':是 '0':否)"`
	Status    int       `gorm:"index;default:0;comment:状态(1:启用 0:停用)"`
}

func (User) TableName

func (a User) TableName() string

type Users

type Users []*User

Jump to

Keyboard shortcuts

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