unlocks

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Download

type Download struct {
	Url      string
	Filename string
	Progress chan DownloadInfo
	// contains filtered or unexported fields
}

func Fetch

func Fetch(url, filename string) *Download

func (*Download) Cancel

func (download *Download) Cancel()

type DownloadInfo

type DownloadInfo struct {
	TotalSize  int64
	Downloaded int64
	Error      error
}

type DownloadStatus

type DownloadStatus int
const (
	NotDownloaded DownloadStatus = iota
	Downloading
	Downloaded
)

type Manager

type Manager struct {
	DownloadDir string
	Unlocks     []*Unlock
	// contains filtered or unexported fields
}

func NewManager

func NewManager(cacheDir string) (*Manager, error)

func (*Manager) AddUnlock

func (manager *Manager) AddUnlock(questTitle, url, rpgName, profileName string, songDescriptions []string)

func (*Manager) ClearCache added in v1.2.0

func (manager *Manager) ClearCache() error

func (*Manager) GetCacheSize added in v1.2.0

func (manager *Manager) GetCacheSize() (int64, error)

func (*Manager) HasPending

func (manager *Manager) HasPending() bool

func (*Manager) SetUpdateCallback

func (manager *Manager) SetUpdateCallback(callback func(*Unlock))

type Unlock

type Unlock struct {
	DownloadUrl      string
	RpgName          string
	QuestTitle       string
	SongDescriptions []string
	DownloadStatus   DownloadStatus
	DownloadError    error
	DownloadSize     int64
	DownloadProgress int64
	Users            []*UserData
	// contains filtered or unexported fields
}

func (*Unlock) QueueDownload

func (unlock *Unlock) QueueDownload()

func (*Unlock) QueueRefresh

func (unlock *Unlock) QueueRefresh()

func (*Unlock) QueueUnpack

func (unlock *Unlock) QueueUnpack(user *UserData)

type UnpackStatus

type UnpackStatus int
const (
	NotUnpacked UnpackStatus = iota
	Unpacking
	Unpacked
)

type UserData

type UserData struct {
	ProfileName  string
	UnpackStatus UnpackStatus
	UnpackError  error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL