// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. package model import ( "time" "git.kmsign.ru/royalcat/tstor/daemons/torrent" "git.kmsign.ru/royalcat/tstor/src/vfs" torrent1 "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/types" ) type Dir interface { IsFsEntry() IsDir() GetName() string GetEntries() []FsEntry } type File interface { IsFsEntry() IsFile() GetName() string GetSize() int64 } type FsEntry interface { IsFsEntry() GetName() string } type Progress interface { IsProgress() GetCurrent() int64 GetTotal() int64 } type ArchiveFs struct { Name string `json:"name"` Entries []FsEntry `json:"entries"` Size int64 `json:"size"` FS *vfs.ArchiveFS `json:"-"` } func (ArchiveFs) IsDir() {} func (this ArchiveFs) GetName() string { return this.Name } func (this ArchiveFs) GetEntries() []FsEntry { if this.Entries == nil { return nil } interfaceSlice := make([]FsEntry, 0, len(this.Entries)) for _, concrete := range this.Entries { interfaceSlice = append(interfaceSlice, concrete) } return interfaceSlice } func (ArchiveFs) IsFsEntry() {} type BooleanFilter struct { Eq *bool `json:"eq,omitempty"` } type CleanupResponse struct { Count int64 `json:"count"` List []string `json:"list"` } type DateTimeFilter struct { Eq *time.Time `json:"eq,omitempty"` Gt *time.Time `json:"gt,omitempty"` Lt *time.Time `json:"lt,omitempty"` Gte *time.Time `json:"gte,omitempty"` Lte *time.Time `json:"lte,omitempty"` } type DownloadTorrentResponse struct { Task *Task `json:"task,omitempty"` } type IntFilter struct { Eq *int64 `json:"eq,omitempty"` Gt *int64 `json:"gt,omitempty"` Lt *int64 `json:"lt,omitempty"` Gte *int64 `json:"gte,omitempty"` Lte *int64 `json:"lte,omitempty"` In []int64 `json:"in,omitempty"` } type Mutation struct { } type Pagination struct { Offset int64 `json:"offset"` Limit int64 `json:"limit"` } type QBitCleanupResponse struct { Count int64 `json:"count"` Hashes []string `json:"hashes"` } type QBitTorrentDaemonMutation struct { Cleanup *QBitCleanupResponse `json:"cleanup"` } type QBitTorrentDaemonQuery struct { Torrents []*QTorrent `json:"torrents"` } type QTorrent struct { Name string `json:"name"` Hash string `json:"hash"` SourceFiles []string `json:"sourceFiles"` } type Query struct { } type ResolverFs struct { Name string `json:"name"` Entries []FsEntry `json:"entries"` FS *vfs.ResolverFS `json:"-"` } func (ResolverFs) IsDir() {} func (this ResolverFs) GetName() string { return this.Name } func (this ResolverFs) GetEntries() []FsEntry { if this.Entries == nil { return nil } interfaceSlice := make([]FsEntry, 0, len(this.Entries)) for _, concrete := range this.Entries { interfaceSlice = append(interfaceSlice, concrete) } return interfaceSlice } func (ResolverFs) IsFsEntry() {} type Schema struct { Query *Query `json:"query,omitempty"` Mutation *Mutation `json:"mutation,omitempty"` } type SimpleDir struct { Name string `json:"name"` Entries []FsEntry `json:"entries"` FS vfs.Filesystem `json:"-"` Path string `json:"-"` } func (SimpleDir) IsDir() {} func (this SimpleDir) GetName() string { return this.Name } func (this SimpleDir) GetEntries() []FsEntry { if this.Entries == nil { return nil } interfaceSlice := make([]FsEntry, 0, len(this.Entries)) for _, concrete := range this.Entries { interfaceSlice = append(interfaceSlice, concrete) } return interfaceSlice } func (SimpleDir) IsFsEntry() {} type SimpleFile struct { Name string `json:"name"` Size int64 `json:"size"` } func (SimpleFile) IsFile() {} func (this SimpleFile) GetName() string { return this.Name } func (this SimpleFile) GetSize() int64 { return this.Size } func (SimpleFile) IsFsEntry() {} type StringFilter struct { Eq *string `json:"eq,omitempty"` Substr *string `json:"substr,omitempty"` In []string `json:"in,omitempty"` } type Subscription struct { } type Task struct { ID string `json:"id"` } type Torrent struct { Name string `json:"name"` Infohash string `json:"infohash"` BytesCompleted int64 `json:"bytesCompleted"` TorrentFilePath string `json:"torrentFilePath"` BytesMissing int64 `json:"bytesMissing"` Priority types.PiecePriority `json:"priority"` Files []*TorrentFile `json:"files"` ExcludedFiles []*TorrentFile `json:"excludedFiles"` Peers []*TorrentPeer `json:"peers"` T *torrent.Controller `json:"-"` } type TorrentClientStats struct { BytesWritten int64 `json:"bytesWritten"` BytesWrittenData int64 `json:"bytesWrittenData"` BytesRead int64 `json:"bytesRead"` BytesReadData int64 `json:"bytesReadData"` BytesReadUsefulData int64 `json:"bytesReadUsefulData"` BytesReadUsefulIntendedData int64 `json:"bytesReadUsefulIntendedData"` ChunksWritten int64 `json:"chunksWritten"` ChunksRead int64 `json:"chunksRead"` ChunksReadUseful int64 `json:"chunksReadUseful"` ChunksReadWasted int64 `json:"chunksReadWasted"` MetadataChunksRead int64 `json:"metadataChunksRead"` PiecesDirtiedGood int64 `json:"piecesDirtiedGood"` PiecesDirtiedBad int64 `json:"piecesDirtiedBad"` } type TorrentDaemonMutation struct { ValidateTorrent bool `json:"validateTorrent"` SetTorrentPriority bool `json:"setTorrentPriority"` Cleanup *CleanupResponse `json:"cleanup"` } type TorrentDaemonQuery struct { Torrents []*Torrent `json:"torrents"` ClientStats *TorrentClientStats `json:"clientStats"` StatsHistory []*TorrentStats `json:"statsHistory"` } type TorrentFs struct { Name string `json:"name"` Torrent *Torrent `json:"torrent"` Entries []FsEntry `json:"entries"` FS *torrent.TorrentFS `json:"-"` } func (TorrentFs) IsDir() {} func (this TorrentFs) GetName() string { return this.Name } func (this TorrentFs) GetEntries() []FsEntry { if this.Entries == nil { return nil } interfaceSlice := make([]FsEntry, 0, len(this.Entries)) for _, concrete := range this.Entries { interfaceSlice = append(interfaceSlice, concrete) } return interfaceSlice } func (TorrentFs) IsFsEntry() {} type TorrentFile struct { Filename string `json:"filename"` Size int64 `json:"size"` BytesCompleted int64 `json:"bytesCompleted"` Priority types.PiecePriority `json:"priority"` F *torrent.FileController `json:"-"` } type TorrentFileEntry struct { Name string `json:"name"` Torrent *Torrent `json:"torrent"` Size int64 `json:"size"` } func (TorrentFileEntry) IsFile() {} func (this TorrentFileEntry) GetName() string { return this.Name } func (this TorrentFileEntry) GetSize() int64 { return this.Size } func (TorrentFileEntry) IsFsEntry() {} type TorrentFilter struct { Everything *bool `json:"everything,omitempty"` Infohash *string `json:"infohash,omitempty"` } type TorrentPeer struct { IP string `json:"ip"` DownloadRate float64 `json:"downloadRate"` Discovery string `json:"discovery"` Port int64 `json:"port"` ClientName string `json:"clientName"` F *torrent1.PeerConn `json:"-"` } type TorrentPriorityFilter struct { Eq *types.PiecePriority `json:"eq,omitempty"` Gt *types.PiecePriority `json:"gt,omitempty"` Lt *types.PiecePriority `json:"lt,omitempty"` Gte *types.PiecePriority `json:"gte,omitempty"` Lte *types.PiecePriority `json:"lte,omitempty"` In []types.PiecePriority `json:"in,omitempty"` } type TorrentProgress struct { Torrent *Torrent `json:"torrent"` Current int64 `json:"current"` Total int64 `json:"total"` } func (TorrentProgress) IsProgress() {} func (this TorrentProgress) GetCurrent() int64 { return this.Current } func (this TorrentProgress) GetTotal() int64 { return this.Total } type TorrentStats struct { Timestamp time.Time `json:"timestamp"` DownloadedBytes uint `json:"downloadedBytes"` UploadedBytes uint `json:"uploadedBytes"` TotalPeers uint `json:"totalPeers"` ActivePeers uint `json:"activePeers"` ConnectedSeeders uint `json:"connectedSeeders"` } type TorrentsFilter struct { Infohash *StringFilter `json:"infohash,omitempty"` Name *StringFilter `json:"name,omitempty"` BytesCompleted *IntFilter `json:"bytesCompleted,omitempty"` BytesMissing *IntFilter `json:"bytesMissing,omitempty"` PeersCount *IntFilter `json:"peersCount,omitempty"` Priority *TorrentPriorityFilter `json:"priority,omitempty"` }