models

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OS

type OS struct {
	ID uint64 `json:"id" gorm:"primaryKey"`

	Name        string        `json:"name"`
	Version     types.Version `json:"version,omitempty"`
	Description string        `json:"description,omitempty"`

	YearRelease    int `json:"year_release,omitempty"`
	YearEndSupport int `json:"year_end_support,omitempty"`

	// Match expressions
	MatchNameExp       string `json:"match_name_exp,omitempty"`
	MatchUserAgentExp  string `json:"match_ua_exp,omitempty"`
	MatchVersionMinExp string `json:"match_ver_min_exp,omitempty"`
	MatchVersionMaxExp string `json:"match_ver_max_exp,omitempty"`

	Active types.ActiveStatus `gorm:"type:ActiveStatus" json:"active,omitempty"`

	ParentID sql.Null[uint64] `json:"parent_id,omitempty"`
	Parent   *OS              `json:"parent,omitempty" gorm:"foreignKey:ParentID;references:ID"`
	Versions []*OS            `json:"versions,omitempty" gorm:"foreignKey:ParentID;references:ID"`

	// Time marks
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty"`
}

OS model description

func (*OS) RBACResourceName

func (m *OS) RBACResourceName() string

RBACResourceName returns the name of the resource for the RBAC

func (*OS) TableName

func (m *OS) TableName() string

TableName in database

Jump to

Keyboard shortcuts

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