Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ModMaphackIdentifier is the identifier we use to look for installs of maphack. ModMaphackIdentifier = "BH.dll" // ModHDIdentifier is the identifier we use to look for installs of hd mod. ModHDIdentifier = "D2HD.dll" )
View Source
const ( Name = int(core.Qt__UserRole) + 1<<iota D2Path RemoteCRC LocalCRC FileAction )
Model Roles.
Variables ¶
View Source
var ( // ErrCRCFileNotFound is used when the file to be hashed didn't exist. ErrCRCFileNotFound = errors.New("file not found") )
Functions ¶
This section is empty.
Types ¶
type File ¶ added in v1.1.0
type File struct { core.QObject Name string D2Path string RemoteCRC string LocalCRC string FileAction string }
File ...
type FileModel ¶ added in v1.1.0
type FileModel struct { core.QAbstractListModel // contains filtered or unexported fields }
FileModel represents a patch file.
type Manifest ¶
type Manifest struct {
Files []PatchFile `json:"files"`
}
Manifest represents the current patch.
type PatchAction ¶ added in v1.1.0
PatchAction is performed while patching.
type PatchFile ¶
type PatchFile struct { Name string `json:"name"` CRC string `json:"crc"` LastModified time.Time `json:"last_modified"` ContentLength int64 `json:"content_length"` IgnoreCRC bool `json:"ignore_crc"` Deprecated bool `json:"deprecated"` }
PatchFile represents a file that should be patched.
type PatchState ¶
PatchState represents the state given on every patch cycle.
type Service ¶
type Service interface { // Exec is responsible for executing the Diablo II game. Exec() error // ValidateGameVersions will make sure the game is up to date with expected patch. ValidateGameVersions() (bool, error) // Patch will patch Diablo II to the correct version. Patch(done chan bool) (<-chan float32, <-chan PatchState) // ApplyDEP will apply Windows specific fix for DEP. ApplyDEP(path string) error // SetLaunchDelay is responsible for setting the delay between each game launch. SetLaunchDelay(delay int) error }
Service is responsible for all things related to the Slashdiablo ladder.
func NewService ¶
func NewService( slashdiabloClient slashdiablo.Client, configuration config.Service, logger log.Logger, patchFileModel *FileModel, ) Service
NewService returns a service with all the dependencies.
type WriteCounter ¶
type WriteCounter struct { Total float32 Written float32 // contains filtered or unexported fields }
WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.
Click to show internal directories.
Click to hide internal directories.