Documentation ¶
Index ¶
- Constants
- func CMD() *cobra.Command
- func Collect(args []string)
- func GetDownloadLink(id *ParsedID) string
- func GetFilePath(id *ParsedID, fullID string) (string, error)
- func NewParsedIndex() *stats.FileIndex
- func ParseIDs(data string) []string
- func RemoveIndex(prefix string)
- func Status()
- type ConfigRecord
- type FileIndex
- func (i *FileIndex) AddIDs(ids []string) int
- func (i *FileIndex) AddStat(v *pstats.Record) bool
- func (i *FileIndex) Check(id string) bool
- func (i *FileIndex) CountDownloaded() int
- func (i *FileIndex) CreateZip(file string) *FileInfos
- func (i *FileIndex) Get(id string) *FileInfo
- func (i *FileIndex) Len() int
- func (i *FileIndex) Load() error
- func (i *FileIndex) Save() error
- func (i *FileIndex) SetError(id string) *FileInfo
- func (i *FileIndex) SetFile(parent *FileInfos, id string, file string) *FileInfo
- func (i *FileIndex) SetRootFile(id string, file string) *FileInfo
- func (i *FileIndex) Validate() ([]string, error)
- func (i *FileIndex) ValidateNames() []*FileInfo
- func (i *FileIndex) Visit(f func(info *FileInfo, opener Opener) error) error
- type FileInfo
- type FileInfoMap
- type FileInfos
- type Opener
- type ParsedID
- type ZipIndex
Constants ¶
View Source
const (
Location = "tenhou/logs/"
)
View Source
const (
XmlUrlPrefix = "https://tenhou.net/0/log/?"
)
Variables ¶
This section is empty.
Functions ¶
func GetDownloadLink ¶
func NewParsedIndex ¶
func RemoveIndex ¶
func RemoveIndex(prefix string)
Types ¶
type ConfigRecord ¶
type FileIndex ¶
type FileIndex struct { utils.JSONGZFile // contains filtered or unexported fields }
func NewFileIndex ¶
func (*FileIndex) CountDownloaded ¶
func (*FileIndex) ValidateNames ¶
type FileInfo ¶
type FileInfo struct { ID string `json:"id"` File string `json:"file,omitempty"` Failed int `json:"failed,omitempty"` LogNames []string `json:"log-names,omitempty"` StatNames []string `json:"stat-names,omitempty"` // Special flag for cleanup Remove bool `json:"remove,omitempty"` // contains filtered or unexported fields }
func (*FileInfo) IsInsideZip ¶
type FileInfoMap ¶
type FileInfos ¶
type FileInfos struct { File string `json:"file,omitempty"` Files []*FileInfo `json:"files,omitempty"` Zips []*FileInfos `json:"zips,omitempty"` // contains filtered or unexported fields }
func (*FileInfos) Index ¶
func (f *FileInfos) Index() FileInfoMap
type Opener ¶
type Opener interface {
Open() (io.ReadCloser, error)
}
Click to show internal directories.
Click to hide internal directories.