Files
reforger_utils/structs.go
Sotirios Pupakis 6d725b9f5f test multiple
2025-09-08 21:30:25 +02:00

103 lines
3.3 KiB
Go

package reforger_utils
import "time"
type AssetsReply []struct {
ID int `json:"id"`
Blocked bool `json:"blocked"`
DeletedAt interface{} `json:"deletedAt"`
Private bool `json:"private"`
GameVersion string `json:"gameVersion"`
PlatformCompatibility string `json:"platformCompatibility"`
PlatformCompatibilityValue int `json:"platformCompatibilityValue"`
Accessible bool `json:"accessible"`
Version string `json:"version"`
TotalFileSize int `json:"totalFileSize"`
Deleted bool `json:"deleted"`
AccessValue int `json:"accessValue"`
Files []struct {
Md5 string `json:"md5"`
Name string `json:"name"`
Size int `json:"size"`
ContentType string `json:"contentType"`
ManifestPath string `json:"manifestPath"`
} `json:"files"`
Asset struct {
ID string `json:"id"`
Meta interface{} `json:"meta"`
Name string `json:"name"`
Type string `json:"type"`
Owned bool `json:"owned"`
Blocked bool `json:"blocked"`
Private bool `json:"private"`
Summary string `json:"summary"`
Unlisted bool `json:"unlisted"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DependencyTree struct {
Access string `json:"access"`
Blocked bool `json:"blocked"`
Private bool `json:"private"`
Unlisted bool `json:"unlisted"`
DeletedAt interface{} `json:"deletedAt"`
AccessValue int `json:"accessValue"`
GameVersion string `json:"gameVersion"`
PlatformCompatibility string `json:"platformCompatibility"`
PlatformCompatibilityValue int `json:"platformCompatibilityValue"`
} `json:"dependencyTree"`
CurrentVersionID int `json:"currentVersionId"`
CurrentVersionSize int `json:"currentVersionSize"`
CurrentVersionNumber string `json:"currentVersionNumber"`
} `json:"asset"`
Dependencies []interface{} `json:"dependencies"`
}
type Manifest struct {
Version int `json:"version"`
Size int `json:"size"`
Sha512 string `json:"sha512"`
Remainder struct {
Sha512 string `json:"sha512"`
Size int `json:"size"`
Offsets []int `json:"offsets"`
} `json:"remainder"`
Fragments []Fragment `json:"fragments"`
}
type Fragment struct {
Sha512 string `json:"sha512"`
Size int `json:"size"`
Offsets []int `json:"offsets"`
}
type RDBHeader struct {
Magic [4]byte // "FORM"
Length uint32
Tag [4]byte // "RDBC"
Version uint32
EntryCount uint32
}
type RDBEntry struct {
Path string
Hash [16]byte
CompressedSize uint32
UncompressedSize uint32
Flags uint32
Offset uint64
}
type Frag struct {
Offset int
Size int
}
type PakEntry struct {
Name string
Offset uint32
Size uint32
OriginalSize uint32
CompressType uint32
UnknownData uint32
}