model

package
v0.3.7-alpha5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 17:17:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-01 17:08:08 * @FilePath: /CasaOS/service/model/o_connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.

* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-13 10:56:34 * @FilePath: /CasaOS/service/model/o_container.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.

* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-26 11:17:17 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-27 15:25:07 * @FilePath: /CasaOS/service/model/o_shares.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.

Index

Constants

View Source
const CONTAINERTABLENAME = "o_container"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppListDBModel

type AppListDBModel struct {
	CustomId string `gorm:"column:custom_id;primary_key" json:"custom_id"`
	Title    string `json:"title"`
	//	ScreenshotLink model.Strings `gorm:"type:json" json:"screenshot_link,omitempty"`
	ScreenshotLink string `json:"screenshot_link"`
	Slogan         string `json:"slogan"`
	Description    string `json:"description"`
	//Tags           model.Strings `gorm:"type:json" json:"tags"`
	Tags        string `json:"tags"`
	Icon        string `json:"icon"`
	Version     string `json:"version"`
	ContainerId string `json:"container_id,omitempty"`
	Image       string `json:"image,omitempty"`
	Index       string `json:"index"`
	CreatedAt   string `gorm:"<-:create;autoCreateTime" json:"created_at"`
	UpdatedAt   string `gorm:"<-:create;<-:update;autoUpdateTime" json:"updated_at"`
	//Port           string           `json:"port,omitempty"`
	PortMap    string `json:"port_map"`
	Label      string `json:"label"`
	EnableUPNP bool   `json:"enable_upnp"`
	Envs       string `json:"envs"`
	Ports      string `json:"ports"`
	Volumes    string `json:"volumes"`
	Devices    string `json:"devices"`
	//Envs      []model.Env      `json:"envs"`
	//Ports     []model.PortMap  `gorm:"type:json" json:"ports"`
	//Volumes   []model.PathMap  `gorm:"type:json" json:"volumes"`
	//Devices   []model.PathMap  `gorm:"type:json" json:"device"`
	Position  bool   `json:"position"`
	NetModel  string `json:"net_model"`
	CpuShares int64  `json:"cpu_shares"`
	Memory    int64  `json:"memory"`
	Restart   string `json:"restart"`
	//Rely      model.MapStrings `gorm:"type:json" json:"rely"` //[{"mysql":"id"},{"mysql":"id"}]
	Origin     string `json:"origin"`
	HostName   string `json:"host_name"`
	Privileged bool   `json:"privileged"`
	CapAdd     string `json:"cap_add"`
	Cmd        string `gorm:"type:json" json:"cmd"`
}

Soon to be removed

func (*AppListDBModel) TableName

func (p *AppListDBModel) TableName() string

type AppNotify

type AppNotify struct {
	State     int    `json:"state"` //0:一直在变动的未读消息 1:未读  2:已读
	Message   string `json:"message"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	Id        string `json:"id"`
	Type      int    `json:"type"`
	Icon      string `json:"icon"`
	Name      string `json:"name"`
	Class     int    `json:"class"`
	CustomId  string `gorm:"column:custom_id;primary_key" json:"custom_id"`
}

func (*AppNotify) TableName

func (p *AppNotify) TableName() string

type ConnectionsDBModel added in v0.3.5

type ConnectionsDBModel struct {
	ID          uint   `gorm:"column:id;primary_key" json:"id"`
	Updated     int64  `gorm:"autoUpdateTime"`
	Created     int64  `gorm:"autoCreateTime"`
	Username    string `json:"username"`
	Password    string `json:"password"`
	Host        string `json:"host"`
	Port        string `json:"port"`
	Status      string `json:"status"`
	Directories string `json:"directories"` // string array
	MountPoint  string `json:"mount_point"` //parent directory of mount point
}

func (*ConnectionsDBModel) TableName added in v0.3.5

func (p *ConnectionsDBModel) TableName() string

type MyAppList

type MyAppList struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	Icon     string `json:"icon"`
	State    string `json:"state"`
	CustomId string `gorm:"column:custom_id;primary_key" json:"custom_id"`
	Index    string `json:"index"`
	//Order    string `json:"order"`
	Port   string `json:"port"`
	Slogan string `json:"slogan"`
	Type   string `json:"type"`
	//Rely       model.MapStrings `json:"rely"` //[{"mysql":"id"},{"mysql":"id"}]
	Image    string `json:"image"`
	Volumes  string `json:"volumes"`
	Latest   bool   `json:"latest"`
	Host     string `json:"host"`
	Protocol string `json:"protocol"`
}

type MysqlConfigs

type MysqlConfigs docker_base.MysqlConfig

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

func (*MysqlConfigs) Scan

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

func (MysqlConfigs) Value

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

type RelyDBModel

type RelyDBModel struct {
	Id                uint         `gorm:"column:id;primary_key" json:"id"`
	CustomId          string       ` json:"custom_id"`
	ContainerCustomId string       `json:"container_custom_id"`
	Config            MysqlConfigs `json:"config"`
	ContainerId       string       `json:"container_id,omitempty"`
	Type              int          `json:"type"` //目前暂未使用
	CreatedAt         time.Time    `gorm:"<-:create" json:"created_at"`
	UpdatedAt         time.Time    `gorm:"<-:create;<-:update" json:"updated_at"`
}

func (RelyDBModel) TableName

func (p RelyDBModel) TableName() string

type SharesDBModel added in v0.3.5

type SharesDBModel struct {
	ID        uint   `gorm:"column:id;primary_key" json:"id"`
	Anonymous bool   `json:"anonymous"`
	Path      string `json:"path"`
	Name      string `json:"name"`
	Updated   int64  `gorm:"autoUpdateTime"`
	Created   int64  `gorm:"autoCreateTime"`
}

func (*SharesDBModel) TableName added in v0.3.5

func (p *SharesDBModel) TableName() string

Jump to

Keyboard shortcuts

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