Documentation ¶
Overview ¶
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-05-30 17:33:21 * @FilePath: /CasaOS/service/model/o_container.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
Index ¶
- Constants
- type AppListDBModel
- type AppNotify
- type ApplicationModel
- type DDNSCoreList
- type DDNSList
- type DDNSTypeDBModel
- type DDNSUpdateDBModel
- type FriendModel
- type MyAppList
- type MysqlConfigs
- type PersonDownRecordDBModel
- type PersonDownloadDBModel
- type RelyDBModel
- type SerialDisk
- type ShareDirDBModel
- type ShortcutsDBModel
- type TaskDBModel
Constants ¶
View Source
const CONTAINERTABLENAME = "o_container"
View Source
const DDNSLISTTABLENAME = "o_ddns"
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"` 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"` }
type ApplicationModel ¶ added in v0.3.1
type ApplicationModel struct { Id int `gorm:"column:id;primary_key" json:"id"` Name string `json:"name"` Icon string `json:"icon"` State int `json:"state"` Type string `json:"type"` Order int `json:"order"` CreatedAt time.Time `gorm:"<-:create" json:"created_at"` UpdatedAt time.Time `gorm:"<-:create;<-:update" json:"updated_at"` }
func (*ApplicationModel) TableName ¶ added in v0.3.1
func (p *ApplicationModel) TableName() string
type DDNSCoreList ¶
type DDNSCoreList struct { Id uint `gorm:"column:id;primary_key" json:"id"` Domain string `json:"domain" form:"domain"` Name string `json:"name" form:"name"` Type uint `json:"type"` Key string `json:"key"` Message string `json:"message"` State bool `json:"state"` Secret string `json:"secret" form:"secret"` UserName string `json:"user_name" form:"user_name"` Password string `json:"password" form:"password"` ApiHost string `json:"api_host"` Host string `json:"host"` IPV4 string `json:"ipv_4" gorm:"-"` IPV6 string `json:"ipv_6" gorm:"-"` }
定时任务使用
type DDNSList ¶
type DDNSList struct { Id uint `gorm:"column:id;primary_key" json:"id"` Name string `json:"name"` Domain string `json:"domain" form:"domain"` Host string `json:"host" form:"host"` IPV4 string `json:"ipv_4" gorm:"-"` IPV6 string `json:"ipv_6" gorm:"-"` Message string `json:"message"` State bool `json:"state"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
返回给前台使用
type DDNSTypeDBModel ¶
type DDNSTypeDBModel struct { Id uint `gorm:"column:id;primary_key" json:"id"` Name string `json:"name"` ApiHost string `json:"api_host"` }
func (*DDNSTypeDBModel) TableName ¶
func (p *DDNSTypeDBModel) TableName() string
type DDNSUpdateDBModel ¶ added in v0.2.3
type DDNSUpdateDBModel struct { Id uint `gorm:"column:id;primary_key" json:"id"` Ipv4 string `gorm:"-"` Ipv6 string `gorm:"-"` Type uint `json:"type" form:"type"` Domain string `json:"domain" form:"domain"` Host string `json:"host" form:"host"` Key string `json:"key" form:"key"` Secret string `json:"secret" form:"secret"` UserName string `json:"user_name" form:"user_name"` Password string `json:"password" form:"password"` CreatedAt time.Time `gorm:"<-:create" json:"created_at"` UpdatedAt time.Time `gorm:"<-:create;<-:update" json:"updated_at"` }
func (*DDNSUpdateDBModel) TableName ¶ added in v0.2.3
func (p *DDNSUpdateDBModel) TableName() string
type FriendModel ¶ added in v0.3.0
type FriendModel struct { State int `json:"state"` CreatedAt int64 `gorm:"autoCreateTime" json:"created_at"` UpdatedAt int64 `gorm:"autoCreateTime;autoUpdateTime" json:"updated_at"` NickName string `json:"nick_name"` Mark string `json:"mark"` //Remarks Block bool `json:"block"` //Disable or not Avatar string `json:"avatar"` //User avatar Token string `gorm:"column:token;primary_key" json:"token"` Profile string `json:"profile"` //Description OnLine bool `json:"on_line" gorm:"-"` Version int `json:"version"` Write bool `json:"write"` LocalIP string `json:"local_ip"` }
func (*FriendModel) TableName ¶ added in v0.3.0
func (p *FriendModel) 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"` UpTime string `json:"up_time"` 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"` NewVersion bool `json:"new_version"` 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
type PersonDownRecordDBModel ¶ added in v0.3.1
type PersonDownRecordDBModel struct { UUID string `gorm:"column:uuid;primary_key" json:"uuid"` Name string `json:"name"` //file name Type int `json:"type"` Size int64 `json:"size"` //file size Downloader string `json:"downloader"` //Error message Path string `json:"path"` Created int64 `gorm:"autoCreateTime" json:"created"` Updated int64 `gorm:"autoCreateTime;autoUpdateTime" json:"updated"` }
func (*PersonDownRecordDBModel) TableName ¶ added in v0.3.1
func (p *PersonDownRecordDBModel) TableName() string
type PersonDownloadDBModel ¶ added in v0.3.0
type PersonDownloadDBModel struct { UUID string `gorm:"column:uuid;primary_key" json:"uuid"` State int `json:"state"` // Type int `json:"type"` //defult 0 Name string `json:"name"` //file name Size int64 `json:"size"` //file size BlockSize int `json:"block_size"` //Size of each file block Length int `json:"length"` //slice length Hash string `json:"hash"` //File hash value Error string `json:"error"` // From string `json:"from"` //Error message Path string `json:"path"` //Full path to the file Already int `json:"already" gorm:"-"` //Folder blocks that have been downloaded LocalPath string `json:"local_path"` //The address where the file is saved after download Duration int64 `json:"duration" gorm:"-"` //Length of time Created int64 `gorm:"autoCreateTime" json:"created"` Updated int64 `gorm:"autoCreateTime;autoUpdateTime" json:"updated"` }
func (*PersonDownloadDBModel) TableName ¶ added in v0.3.0
func (p *PersonDownloadDBModel) TableName() string
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 SerialDisk ¶ added in v0.2.3
type SerialDisk struct { Id uint `gorm:"column:id;primary_key" json:"id"` UUID string `json:"uuid"` Path string `json:"path"` State int `json:"state"` MountPoint string `json:"mount_point"` CreatedAt int64 `json:"created_at"` }
SerialAdvanced Technology Attachment (STAT)
func (*SerialDisk) TableName ¶ added in v0.2.3
func (p *SerialDisk) TableName() string
type ShareDirDBModel ¶
type ShareDirDBModel struct {}
func (*ShareDirDBModel) TableName ¶
func (p *ShareDirDBModel) TableName() string
type ShortcutsDBModel ¶
type ShortcutsDBModel struct { Id uint `gorm:"column:id;primary_key" json:"id"` Title string `json:"title"` Url string `json:"url"` Icon string `json:"icon"` Sort int `json:"sort"` CreatedAt time.Time `gorm:"<-:create" json:"created_at"` UpdatedAt time.Time `gorm:"<-:create;<-:update" json:"updated_at"` }
func (*ShortcutsDBModel) TableName ¶
func (p *ShortcutsDBModel) TableName() string
type TaskDBModel ¶
type TaskDBModel struct { Id uint `gorm:"column:id;primary_key" json:"id"` Title string `gorm:"size:200" json:"title"` ImageUrl string `json:"image_url"` Content string `gorm:"size:255" json:"content"` Url string `json:"url"` State int `json:"state"` // 0:未阅读,1:已阅读 Type int `json:"type"` CreatedAt string `gorm:"<-:create;autoCreateTime" json:"created_at"` UpdatedAt string `gorm:"<-:create;<-:update;autoUpdateTime" json:"updated_at"` }
func (*TaskDBModel) TableName ¶
func (p *TaskDBModel) TableName() string
Click to show internal directories.
Click to hide internal directories.