Documentation ¶
Overview ¶
* @Author: LinkLeong link@icewhale.org * @Date: 2022-07-27 10:30:43 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-04 20:06:04 * @FilePath: /CasaOS/model/connections.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-20 16:27:12 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-09 18:18:46 * @FilePath: /CasaOS/model/file.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:12:12 * @LastEditors: LinkLeong * @LastEditTime: 2022-07-27 14:58:55 * @FilePath: /CasaOS/model/share.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-09-02 22:12:34 * @FilePath: /CasaOS/model/sys_common.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
* @Author: LinkLeong link@icewhale.org * @Date: 2022-05-13 18:15:46 * @LastEditors: LinkLeong * @LastEditTime: 2022-08-01 18:32:57 * @FilePath: /CasaOS/model/zima.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
Index ¶
- Constants
- func ExtractFolder(objs []Obj, extractFolder string)
- func GetThumb(obj Obj) (thumb string, ok bool)
- func GetUrl(obj Obj) (url string, ok bool)
- func SortFiles(objs []Obj, orderBy, orderDirection string)
- func WrapObjsName(objs []Obj)
- type APPModel
- type BaseInfo
- type CasaOSHeart
- type CommonModel
- type Connections
- type DeviceInfo
- type Drive
- type FileItem
- type FileOperate
- type FileSetting
- type FileStream
- type FileStreamer
- type FileUpdate
- type FsOtherArgs
- type GoDaddyModel
- type IOCountersStat
- type Link
- type LinkArgs
- type ListArgs
- type NotifyMssage
- type Obj
- type ObjMerge
- type ObjThumb
- type ObjThumbURL
- type ObjWrapName
- type Object
- type ObjectURL
- type OtherArgs
- type PageReq
- type PageResp
- type Path
- type Proxy
- type RedisModel
- type Result
- type SearchEngine
- type ServerModel
- type SetPath
- type SettingItem
- type Shares
- type Sort
- type StorageA
- type SysInfoModel
- type SystemConfig
- type Thumb
- type Thumbnail
- type URL
- type UnwrapObj
- type Url
- type UserInfo
- type Version
Constants ¶
const ( SINGLE = iota SITE STYLE PREVIEW GLOBAL ARIA2 INDEX GITHUB )
const ( PUBLIC = iota PRIVATE READONLY DEPRECATED )
const MaxInt = int(MaxUint >> 1)
const MaxUint = ^uint(0)
const MinInt = -MaxInt - 1
const MinUint = 0
Variables ¶
This section is empty.
Functions ¶
func ExtractFolder ¶ added in v0.4.2
func WrapObjsName ¶ added in v0.4.2
func WrapObjsName(objs []Obj)
Types ¶
type APPModel ¶
type APPModel struct { LogPath string LogSaveName string LogFileExt string DateStrFormat string DateTimeFormat string UserDataPath string TimeFormat string DateFormat string DBPath string ShellPath string }
服务配置
type CasaOSHeart ¶ added in v0.2.9
type CommonModel ¶ added in v0.3.6
type CommonModel struct {
RuntimePath string
}
type Connections ¶ added in v0.3.5
type DeviceInfo ¶ added in v0.4.5
type DeviceInfo struct { LanIpv4 []string `json:"lan_ipv4"` Port int `json:"port"` DeviceName string `json:"device_name"` DeviceModel string `json:"device_model"` DeviceSN string `json:"device_sn"` Initialized bool `json:"initialized"` OS_Version string `json:"os_version"` Hash string `json:"hash"` }
type FileOperate ¶ added in v0.3.2
type FileOperate struct { Type string `json:"type" binding:"required"` Item []FileItem `json:"item" binding:"required"` TotalSize int64 `json:"total_size"` ProcessedSize int64 `json:"processed_size"` To string `json:"to" binding:"required"` Style string `json:"style"` Finished bool `json:"finished"` }
type FileSetting ¶ added in v0.3.0
type FileSetting struct { DownloadDir string `json:"download_dir"` }
type FileStream ¶ added in v0.4.2
func (*FileStream) GetMimetype ¶ added in v0.4.2
func (f *FileStream) GetMimetype() string
func (*FileStream) GetOld ¶ added in v0.4.2
func (f *FileStream) GetOld() Obj
func (*FileStream) GetReadCloser ¶ added in v0.4.2
func (f *FileStream) GetReadCloser() io.ReadCloser
func (*FileStream) NeedStore ¶ added in v0.4.2
func (f *FileStream) NeedStore() bool
func (*FileStream) SetReadCloser ¶ added in v0.4.2
func (f *FileStream) SetReadCloser(rc io.ReadCloser)
type FileStreamer ¶ added in v0.4.2
type FileStreamer interface { io.ReadCloser Obj GetMimetype() string SetReadCloser(io.ReadCloser) NeedStore() bool GetReadCloser() io.ReadCloser GetOld() Obj }
type FileUpdate ¶ added in v0.3.2
type FsOtherArgs ¶ added in v0.4.2
type GoDaddyModel ¶
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"` Time int64 `json:"time"` }
type Link ¶ added in v0.4.2
type Link struct { URL string `json:"url"` Header http.Header `json:"header"` // needed header Data io.ReadCloser // return file reader directly Status int // status maybe 200 or 206, etc FilePath *string // local file, return the filepath Expiration *time.Duration // url expiration time Method string `json:"method"` // http method }
type NotifyMssage ¶ added in v0.2.9
type Obj ¶ added in v0.4.2
type Obj interface { GetSize() int64 GetName() string ModTime() time.Time IsDir() bool // The internal information of the driver. // If you want to use it, please understand what it means GetID() string GetPath() string }
func UnwrapObjs ¶ added in v0.4.2
type ObjMerge ¶ added in v0.4.2
type ObjMerge struct {
// contains filtered or unexported fields
}
func (*ObjMerge) InitHideReg ¶ added in v0.4.2
type ObjThumbURL ¶ added in v0.4.2
type ObjWrapName ¶ added in v0.4.2
func (*ObjWrapName) GetName ¶ added in v0.4.2
func (o *ObjWrapName) GetName() string
func (*ObjWrapName) Unwrap ¶ added in v0.4.2
func (o *ObjWrapName) Unwrap() Obj
type Object ¶ added in v0.4.2
type PageResp ¶ added in v0.4.2
type PageResp struct { Content interface{} `json:"content"` Total int64 `json:"total"` }
type Path ¶
type Path struct { Name string `json:"name"` //File name or document name Path string `json:"path"` //Full path to file or folder IsDir bool `json:"is_dir"` //Is it a folder Date time.Time `json:"date"` Size int64 `json:"size"` //File Size Type string `json:"type,omitempty"` Label string `json:"label,omitempty"` Write bool `json:"write"` Extensions map[string]interface{} `json:"extensions"` }
type Proxy ¶ added in v0.4.2
type Proxy struct { WebProxy bool `json:"web_proxy"` WebdavPolicy string `json:"webdav_policy"` DownProxyUrl string `json:"down_proxy_url"` }
func (Proxy) WebdavNative ¶ added in v0.4.2
func (Proxy) WebdavProxy ¶ added in v0.4.2
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 SearchEngine ¶ added in v0.4.2
type ServerModel ¶
type ServerModel struct { HttpPort string RunMode string ServerApi string LockAccount bool Token string USBAutoMount string UpdateUrl string }
服务配置
type SettingItem ¶ added in v0.4.2
type SettingItem struct { Key string `json:"key" gorm:"primaryKey" binding:"required"` // unique key Value string `json:"value"` // value Help string `json:"help"` // help message Type string `json:"type"` // string, number, bool, select Options string `json:"options"` // values for select Group int `json:"group"` // use to group setting in frontend Flag int `json:"flag"` // 0 = public, 1 = private, 2 = readonly, 3 = deprecated, etc. }
func (SettingItem) IsDeprecated ¶ added in v0.4.2
func (s SettingItem) IsDeprecated() bool
type StorageA ¶ added in v0.4.3
type StorageA struct { ID uint `json:"id" gorm:"primaryKey"` // unique key MountPath string `json:"mount_path" gorm:"unique" binding:"required"` // must be standardized Order int `json:"order"` // use to sort Driver string `json:"driver"` // driver used CacheExpiration int `json:"cache_expiration"` // cache expire time Status string `json:"status"` Addition string `json:"addition" gorm:"type:text"` // Additional information, defined in the corresponding driver Remark string `json:"remark"` Modified time.Time `json:"modified"` Disabled bool `json:"disabled"` // if disabled Sort Proxy }
func (*StorageA) GetStorage ¶ added in v0.4.3
func (*StorageA) SetStorage ¶ added in v0.4.3
type SystemConfig ¶
type SystemConfig struct {
ConfigPath string `json:"config_path"`
}
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-26 14:21:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-02 11:14:15 * @FilePath: /CasaOS/model/notify/file.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
|
* @Author: LinkLeong link@icewhale.com * @Date: 2022-05-26 14:21:57 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-02 11:14:15 * @FilePath: /CasaOS/model/notify/file.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved. |
* @Author: LinkLeong link@icewhale.com * @Date: 2022-06-15 11:30:47 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-23 18:40:40 * @FilePath: /CasaOS/model/system_model/verify_information.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved.
|
* @Author: LinkLeong link@icewhale.com * @Date: 2022-06-15 11:30:47 * @LastEditors: LinkLeong * @LastEditTime: 2022-06-23 18:40:40 * @FilePath: /CasaOS/model/system_model/verify_information.go * @Description: * @Website: https://www.casaos.io * Copyright (c) 2022 by icewhale, All Rights Reserved. |