model

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APPModel

type APPModel struct {
	LogSavePath    string
	LogSaveName    string
	LogFileExt     string
	DateStrFormat  string
	DateTimeFormat string
	TimeFormat     string
	DateFormat     string
	ProjectPath    string
}

服务配置

type CustomizationPostData

type CustomizationPostData struct {
	Origin       string    `json:"origin"`
	NetworkModel string    `json:"network_model"`
	Index        string    `json:"index"`
	Icon         string    `json:"icon"`
	Image        string    `json:"image"`
	Envs         EnvArray  `json:"envs"`
	Ports        PortArray `json:"ports"`
	Volumes      PathArray `json:"volumes"`
	Devices      PathArray `json:"devices"`
	//Port         string    `json:"port,omitempty"`
	PortMap     string `json:"port_map"`
	CpuShares   int64  `json:"cpu_shares"`
	Memory      int64  `json:"memory"`
	Restart     string `json:"restart"`
	EnableUPNP  bool   `json:"enable_upnp"`
	Label       string `json:"label"`
	Description string `json:"description"`
	Position    bool   `json:"position"`
}

type Devices

type Devices struct {
	ContainerPath string `json:"container_path"`
	Path          string `json:"path"`
	Desc          string `json:"desc"`
	Type          int    `json:"type"` //  1:必选 2:可选 3:默认值不必显示 4:系统处理 5:container内容也可编辑
}

type Env

type Env struct {
	Name  string `json:"container"`
	Value string `json:"host"`
	Desc  string `json:"desc"`
	Type  int    `json:"type"`
}

type EnvArray

type EnvArray []Env

func (*EnvArray) Scan

func (p *EnvArray) Scan(input interface{}) error

Scan 实现方法

func (EnvArray) Value

func (p EnvArray) Value() (driver.Value, error)

Value 实现方法

type Envs

type Envs struct {
	Name  string `json:"name"`
	Value string `json:"value"`
	Desc  string `json:"desc"`
	Type  int    `json:"type"` //  1:必选 2:可选 3:默认值不必显示 4:系统处理 5:container内容也可编辑
}

type GoDaddyModel

type GoDaddyModel struct {
	Type    uint   `json:"type"`
	ApiHost string `json:"api_host"`
	Key     string `json:"key"`
	Secret  string `json:"secret"`
	Host    string `json:"host"`
}

type IOCountersStat

type IOCountersStat struct {
	Name        string    `json:"name"`        // interface name
	BytesSent   uint64    `json:"bytesSent"`   // number of bytes sent
	BytesRecv   uint64    `json:"bytesRecv"`   // number of bytes received
	PacketsSent uint64    `json:"packetsSent"` // number of packets sent
	PacketsRecv uint64    `json:"packetsRecv"` // number of packets received
	Errin       uint64    `json:"errin"`       // total number of errors while receiving
	Errout      uint64    `json:"errout"`      // total number of errors while sending
	Dropin      uint64    `json:"dropin"`      // total number of incoming packets which were dropped
	Dropout     uint64    `json:"dropout"`     // total number of outgoing packets which were dropped (always 0 on OSX and BSD)
	Fifoin      uint64    `json:"fifoin"`      // total number of FIFO buffers errors while receiving
	Fifoout     uint64    `json:"fifoout"`     // total number of FIFO buffers errors while sending
	State       string    `json:"state"`
	DateTime    time.Time `json:"date_time"`
}

type JSON

type JSON json.RawMessage

type LSBLKModel

type LSBLKModel struct {
	Name        string       `json:"name"`
	FsType      string       `json:"fstype"`
	Size        uint64       `json:"size"`
	FSSize      string       `json:"fssize"`
	Path        string       `json:"path"`
	Model       string       `json:"model"` //设备标识符
	RM          bool         `json:"rm"`    //是否为可移动设备
	RO          bool         `json:"ro"`    //是否为只读设备
	State       string       `json:"state"`
	PhySec      int          `json:"phy-sec"` //物理扇区大小
	Type        string       `json:"type"`
	Vendor      string       `json:"vendor"`  //供应商
	Rev         string       `json:"rev"`     //修订版本
	FSAvail     string       `json:"fsavail"` //可用空间
	FSUse       string       `json:"fsuse%"`  //已用百分比
	MountPoint  string       `json:"mountpoint"`
	Format      string       `json:"format"`
	Health      string       `json:"health"`
	HotPlug     bool         `json:"hotplug"`
	FSUsed      string       `json:"fsused"`
	Tran        string       `json:"tran"`
	MinIO       uint64       `json:"min-io"`
	UsedPercent float64      `json:"used_percent"`
	Children    []LSBLKModel `json:"children"`
	//详情特有
	StartSector uint64 `json:"start_sector,omitempty"`
	EndSector   uint64 `json:"end_sector,omitempty"`
}

type MapStrings

type MapStrings []map[string]string

***************使gorm支持[]string结构******************

func (*MapStrings) Scan

func (c *MapStrings) Scan(input interface{}) error

func (MapStrings) Value

func (c MapStrings) Value() (driver.Value, error)

type Path

type Path struct {
	Name  string `json:"name"`
	Path  string `json:"path"`
	IsDir bool   `json:"is_dir"`
}

type PathArray

type PathArray []PathMap

func (*PathArray) Scan

func (p *PathArray) Scan(input interface{}) error

Scan 实现方法

func (PathArray) Value

func (p PathArray) Value() (driver.Value, error)

Value 实现方法

type PathMap

type PathMap struct {
	ContainerPath string `json:"container"`
	Path          string `json:"host"`
	Type          int    `json:"type"`
	Desc          string `json:"desc"`
}

type PortArray

type PortArray []PortMap

func (*PortArray) Scan

func (p *PortArray) Scan(input interface{}) error

Scan 实现方法

func (PortArray) Value

func (p PortArray) Value() (driver.Value, error)

Value 实现方法

type PortMap

type PortMap struct {
	ContainerPort string `json:"container"`
	CommendPort   string `json:"host"`
	Protocol      string `json:"protocol"`
	Desc          string `json:"desc"`
	Type          int    `json:"type"`
}

type Ports

type Ports struct {
	ContainerPort uint   `json:"container_port"`
	CommendPort   int    `json:"commend_port"`
	Desc          string `json:"desc"`
	Type          int    `json:"type"` //  1:必选 2:可选 3:默认值不必显示 4:系统处理  5:container内容也可编辑
}

type RedisModel

type RedisModel struct {
	Host        string
	Password    string
	MaxIdle     int
	MaxActive   int
	IdleTimeout time.Duration
}

redis配置文件

type Result

type Result struct {
	Success int         `json:"success" example:"200"`
	Message string      `json:"message" example:"ok"`
	Data    interface{} `json:"data" example:"返回结果"`
}

公共返回模型

type SearchFileInfo

type SearchFileInfo struct {
	Path string `json:"path"`
	Name string `json:"name"`
	Type int    `json:"type"`
}

type ServerAppList

type ServerAppList struct {
	Id             uint      `gorm:"column:id;primary_key" json:"id"`
	Title          string    `json:"title"`
	Description    string    `json:"description"`
	Tagline        string    `json:"tagline"`
	Tags           Strings   `gorm:"type:json" json:"tags"`
	Icon           string    `json:"icon"`
	ScreenshotLink Strings   `gorm:"type:json" json:"screenshot_link"`
	Category       string    `json:"category"`
	PortMap        string    `json:"port_map"`
	ImageVersion   string    `json:"image_version"`
	Tip            string    `json:"tip"`
	Envs           EnvArray  `json:"envs"`
	Ports          PortArray `json:"ports"`
	Volumes        PathArray `json:"volumes"`
	Devices        PathArray `json:"devices"`
	NetworkModel   string    `json:"network_model"`
	Image          string    `json:"image"`
	Index          string    `json:"index"`
	CreatedAt      time.Time `json:"created_at"`
	UpdatedAt      time.Time `json:"updated_at"`
	State          string    `json:"state"`
	Author         string    `json:"author"`
	MinMemory      int       `json:"min_memory"`
	MinDisk        int       `json:"min_disk"`
	MaxMemory      uint64    `json:"max_memory"`
	Thumbnail      string    `json:"thumbnail"`
	Healthy        string    `json:"healthy"`
	Plugins        Strings   `json:"plugins"`
	Origin         string    `json:"origin"`
}

type ServerCategoryList

type ServerCategoryList struct {
	Id uint `gorm:"column:id;primary_key" json:"id"`
	//CreatedAt time.Time `json:"created_at"`
	//
	//UpdatedAt time.Time `json:"updated_at"`
	Name  string `json:"name"`
	Count uint   `json:"count"`
}

type ServerModel

type ServerModel struct {
	HttpPort  string
	RunMode   string
	ServerApi string
}

服务配置

type Strings

type Strings []string

***************使gorm支持[]string结构******************

func (*Strings) Scan

func (c *Strings) Scan(input interface{}) error

func (Strings) Value

func (c Strings) Value() (driver.Value, error)

type SysInfoModel

type SysInfoModel struct {
	Name string //系统名称
}

系统配置

type SystemConfig

type SystemConfig struct {
	ConfigStr  string `json:"config_str"`
	WidgetList string `json:"widget_list"`
	ConfigPath string `json:"config_path"`
	SyncPort   string `json:"sync_port"`
	SyncKey    string `json:"sync_key"`
}

type TcpPorts

type TcpPorts struct {
	Desc          string `json:"desc"`
	ContainerPort int    `json:"container_port"`
}

type UdpPorts

type UdpPorts struct {
	Desc          string `json:"desc"`
	ContainerPort int    `json:"container_port"`
}

type UserModel

type UserModel struct {
	UserName    string
	PWD         string
	Token       string
	Head        string
	Email       string
	Description string
	Initialized bool
}

用户相关

type Version

type Version struct {
	Id        uint      `gorm:"column:id;primary_key" json:"id"`
	ChangLog  string    `json:"chang_log"`
	Version   string    `json:"version"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Volume

type Volume struct {
	ContainerPath string `json:"container_path"`
	Path          string `json:"path"`
	Desc          string `json:"desc"`
	Type          int    `json:"type"` //  1:必选 2:可选 3:默认值不必显示 4:系统处理   5:container内容也可编辑
}

type ZeroTierConfig

type ZeroTierConfig struct {
	Private bool `json:"private"`
}

type ZeroTierModel

type ZeroTierModel struct {
	UserName string
	PWD      string
	Token    string
}

zeritier相关

type ZeroTierUpData

type ZeroTierUpData struct {
	Config ZeroTierConfig `json:"config"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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