Documentation ¶
Index ¶
- func AddFile(id string, fname string, savedir string, fsize int64, packet int64) error
- func AddPacket(fid string, sort int, packetpath string) error
- func CountRemoteSendLogByStatus(status int) int64
- func DeleteUser(id string) error
- func DisableYserver(id string) error
- func Filecount() (int64, error)
- func FinshFile(id string, status int) error
- func Init(dir string, initUser string, initPwd string)
- func InitYservefunc()
- func Localdb() *xorm.Engine
- func MailServerInit() error
- func NewLog(tid string, localfilepath string, status string) (string, error)
- func NowTime() int64
- func RemoteStorageDeleteALL(rid string) error
- func RemoteStorageToTaskCheck(tid, rid string) (bool, error)
- func RemoteStorageToTaskFunc(tid string, rids []string) error
- func TaskCount(typestr string) (int64, error)
- func TaskDeleteALL(tid string) error
- func UserChangePwd(id, oldpassword, password string) error
- func UserInit(username string, password string) error
- type Host
- type Log
- type MailSend
- type MailServer
- type RemoteStorage
- type RemoteStorageToTask
- type Rlog
- type SshTask
- type Task
- type User
- type YsPacket
- type YsUploadFile
- type Yserver
- type YserverFile
- type YserverPacket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoteStorageDeleteALL ¶
RemoteStorageDeleteALL 删除远程存储 单例
func RemoteStorageToTaskCheck ¶
RemoteStorageToTaskCheck 远程存储和任务关联 查重
func RemoteStorageToTaskFunc ¶
RemoteStorageToTaskFunc 添加远程存储和任务关联
Types ¶
type Host ¶
type Host struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Protocol string `json:"protocol" xorm:"'protocol'"` Name string `json:"name" xorm:"'name'"` HostAddr string `json:"hostaddr" xorm:"'hostaddr'"` Port string `json:"port" xorm:"'port'"` Username string `json:"username" xorm:"'username'"` Password string `json:"password" xorm:"'password'"` Created int64 `json:"created" xorm:"'created'"` }
type Log ¶
type Log struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Tid string `json:"tid" xorm:"notnull 'tid'"` Dbtype string `json:"dbtype" xorm:"_"` Status int `json:"status" xorm:"notnull 'status'"` Localfilepath string `json:"localfilepath" xorm:"'localfilepath'"` Msg string `json:"msg" xorm:"msg"` Created int64 `json:"created" xorm:"'created'"` Deleted int64 `json:"deleted" xorm:"'deleted'"` DBInfo Task `json:"dbinfo" xorm:"-"` RS []RemoteStorage `json:"rs" xorm:"-"` Errors error `json:"errors" xorm:"-"` }
Log 日志结构体
type MailSend ¶
type MailSend struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Created int64 `json:"created" xorm:"'created'"` Subject string `json:"subject" xorm:"'subject'"` Body string `json:"body" xorm:"'body'"` ToUsers []string `json:"tousers" xorm:"json 'tousers'"` FromUser string `json:"fromuser" xorm:"'fromuser'"` FromPasswd string `json:"frompasswd" xorm:"-"` Host string `json:"host" xorm:"-"` Port int `json:"port" xorm:"-"` Status int `json:"status" xorm:"'status'"` }
MailSend ...
type MailServer ¶
type MailServer struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Host string `json:"host" xorm:"'host'"` Port int `json:"port" xorm:"'port'"` Status int `json:"status" xorm:"'status'"` FromUser string `json:"fromuser" xorm:"'fromuser'"` FromPasswd string `json:"frompassword" xorm:"'frompassword'"` Created int64 `json:"created" xorm:"'created'"` MailTos []string `json:"mailtos" xorm:"json 'mailtos'"` }
MailServer ...
type RemoteStorage ¶
type RemoteStorage struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Name string `json:"name" xorm:"'name'"` Types string `json:"types" xorm:"'types'"` Username string `json:"username" xorm:" 'username' comment('用户名')"` Password string `json:"password" xorm:" 'password' comment('密码')"` Host string `json:"host" xorm:" 'host' comment('ip地址')"` Path string `json:"path" xorm:"'path' comment('路径')"` Port int `json:"port" xorm:"'port' comment('端口')"` Created int64 `json:"created" xorm:"notnull 'created'"` ReLink int `json:"relink" xorm:"'relink'"` }
RemoteStorage ...
func TaskFindRemote ¶
func TaskFindRemote(tid string) ([]RemoteStorage, error)
TaskFindRemote 查询远程存储 单例
type RemoteStorageToTask ¶
type RemoteStorageToTask struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Rid string `json:"rid" xorm:"'rid' comment('远程存储ID')"` Tid string `json:"tid" xorm:"'tid' comment('任务ID')"` Created int64 `json:"created" xorm:"notnull 'created'"` }
RemoteStorageToTask ...
type Rlog ¶
type Rlog struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Lid string `json:"lid" xorm:"'lid'"` Rid string `json:"rid" xorm:"'rid'"` Tid string `json:"tid" xorm:"'tid'"` Localfilepath string `json:"localfilepath" xorm:"'localfilepath'"` Created int64 `json:"created" xorm:"'created'"` Status int `json:"status" xorm:"'status'"` Msg string `json:"msg" xorm:"'msg'"` DBInfo Task `json:"dbinfo" xorm:"-"` RSInfo RemoteStorage `json:"rsinfo" xorm:"-"` LogInfo Log `json:"loginfo" xorm:"-"` YsUploadFile YsUploadFile `json:"ysuploadfile" xorm:"-"` }
Rlog ...
func AddNewRemoteSendLog ¶
AddNewRemoteSendLog ...
func RemoteSendLogFindAll ¶
RlogAll ...
type SshTask ¶
type SshTask struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` TaskType string `json:"tasktype" xorm:"'tasktype'"` Host string `json:"host" xorm:"'host'"` SshUser string `json:"sshuser" xorm:"'sshuser'"` SshPort string `json:"sshport" xorm:"'sshport'"` SshPwd string `json:"sshpwd" xorm:"'sshpwd'"` DbHost string `json:"dbhost" xorm:"'dbhost'"` DbPort string `json:"dbport" xorm:"'dbport'"` DbName string `json:"dbname" xorm:"'dbname'"` DbUser string `json:"dbuser" xorm:"'dbuser'"` DbPwd string `json:"dbpwd" xorm:"'dbpwd'"` Char string `json:"char" xorm:"'char'"` SavePath string `json:"savepath" xorm:"'savepath'"` Zippwd string `json:"zippwd" xorm:"'zippwd'"` RS []string `json:"rs" xorm:"-"` Crontab string `json:"crontab" xorm:"'crontab'"` Expire int `json:"expire" xorm:"'expire'"` Created int64 `json:"created" xorm:"'created'"` }
type Task ¶
type Task struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` DBType string `json:"dbtype" xorm:" 'dbtype'"` Host string `json:"host" xorm:" 'host'"` Port string `json:"port" xorm:" 'port'"` User string `json:"user" xorm:" 'user'"` Password string `json:"password" xorm:" 'password'"` DBname string `json:"dbname" xorm:" 'dbname'"` DBnames []string `json:"dbnames" xorm:"-"` Char string `json:"char" xorm:" 'char'"` DBpath string `json:"dbpath" xorm:" 'dbpath'"` Created int64 `json:"created" xorm:"notnull 'created'"` Pause string `json:"pause" xorm:" 'pause'"` Status string `json:"status" xorm:" 'status'"` Crontab string `json:"crontab" xorm:"notnull 'crontab'"` SavePath string `json:"savepath" xorm:"notnull 'savepath'"` RS []string `json:"rs" xorm:"-"` Zippwd string `json:"zippwd" xorm:"'zippwd'"` Expire int `json:"expire" xorm:"'expire'"` }
Task ...
type User ¶
type User struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Name string `json:"name" xorm:"unique 'name'"` Passwrod string `json:"password" xorm:"'password'"` IPlist []string `json:"iplist" xorm:"json 'iplist'"` Created int64 `json:"created" xorm:"'created'"` }
User ...
type YsPacket ¶
type YsPacket struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Yid string `json:"yid" xorm:"'yid'"` SortID int `json:"sortid" xorm:"'sortid'"` SrcPacketPath string `json:"srcpacketpath" xorm:"'srcpacketpath'"` Offset int64 `json:"offset" xorm:"'offset'"` UploadPacketURL string `json:"uploadpacketurl" xorm:"'uploadpacketurl'"` Status int `json:"status" xorm:"'status'"` Msg string `json:"msg" xorm:"'msg'"` }
YsPackets ...
type YsUploadFile ¶
type YsUploadFile struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Lid string `json:"lid" xorm:"'lid'"` UploadFileServerID string `json:"ufsid" xorm:"'ufsid'"` SrcFilePath string `json:"srcfilepath" xorm:"'srcfilepath'"` Created int64 `json:"created" xorm:"'created'"` Size int64 `json:"size" xorm:"'size'"` PacketNum int64 `json:"packetnum" xorm:"'packetnum'"` Status int `json:"status" xorm:"'status'"` Msg string `json:"msg" xorm:"'msg'"` YsPackets []YsPacket `json:"packets" xorm:"-"` }
YsUploadFile ...
func (*YsUploadFile) AddYsFileLog ¶
func (ysuploadfile *YsUploadFile) AddYsFileLog(err error) error
AddYsFileLog ...
func (*YsUploadFile) AddYsPacketLog ¶
func (yuf *YsUploadFile) AddYsPacketLog(ysp YsPacket) error
AddYsPacketLog ...
func (*YsUploadFile) UpdateYspacketLog ¶
func (yuf *YsUploadFile) UpdateYspacketLog(sortid int, err error) error
UpdateYspacketLog ...
type Yserver ¶
type Yserver struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` SavePath string `json:"savepath" xorm:"'savepath'"` Enable bool `json:"enable" xorm:"'enable'"` Username string `json:"username" xorm:"'username'"` Password string `json:"password" xorm:"'password'"` Port int `json:"port" xorm:"-"` }
Yserver ...
type YserverFile ¶
type YserverFile struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` FileName string `json:"filename" xorm:"'filename'"` FileSize int64 `json:"filesize" xorm:"'filesize'"` Packet int64 `json:"packet" xorm:"packet"` Created int64 `json:"created" xorm:"'created'"` Status int `json:"status" xorm:"'status'"` YserverPackets []YserverPacket `json:"yps" xorm:"-"` }
YserverFile ...
type YserverPacket ¶
type YserverPacket struct { ID string `json:"id" xorm:"pk notnull unique 'id'"` Fid string `json:"fid" xorm:"'fid'"` PacketPath string `json:"packetpath" xorm:"'packetpath'"` Sort int `json:"sort" xorm:"'sort'"` Created int64 `json:"created" xorm:"'created'"` }
YserverPacket ...
Click to show internal directories.
Click to hide internal directories.