Documentation
¶
Index ¶
- type Archive
- type ArchiveManifest
- type Cache
- func (cache *Cache) ArchiveCount() int
- func (cache *Cache) GetArchive(id int) (*Archive, error)
- func (cache *Cache) GetArchiveManifest(archiveId int) (*ArchiveManifest, error)
- func (cache *Cache) GetFolder(archiveId, folderId int, keySet [4]int) (*Folder, error)
- func (cache *Cache) GetFolderManifest(archiveId, folderId int) (*FolderManifest, error)
- func (cache *Cache) GetFolderManifestByName(archiveId int, target string) (*FolderManifest, error)
- func (cache *Cache) GetFolderPages(archiveId, folderId int) ([]byte, error)
- func (cache *Cache) GetReleaseManifest() (*ReleaseManifest, error)
- func (cache *Cache) GetUnencryptedFolder(archive, folderId int) (*Folder, error)
- func (cache *Cache) IndexCount() int
- type FileBundle
- type Folder
- type FolderManifest
- type Pack
- type PackManifest
- type ReleaseManifest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct { Id int // contains filtered or unexported fields }
Archive is an aggregate of folders of packs of assets.
type ArchiveManifest ¶
type ArchiveManifest struct { Id int Format uint8 Version uint32 Directive uint8 FolderReferences []*FolderManifest }
ArchiveManifest contains metadata about an archive.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a file store that can serve information found within the contents of the FileBundle.
func LoadCache ¶
LoadCache loads a FileBundle from the specified path and wraps it into an instance of a Cache.
func NewCache ¶
func NewCache(bundle *FileBundle) (*Cache, error)
NewCache constructs a new file store for the given file bundle. May return an error.
func (*Cache) ArchiveCount ¶
ArchiveCount returns the amount of archives this storage has available. This does not include the release manifest file as an index, unlike its IndexCount() variant.
func (*Cache) GetArchiveManifest ¶
func (cache *Cache) GetArchiveManifest(archiveId int) (*ArchiveManifest, error)
func (*Cache) GetFolderManifest ¶
func (cache *Cache) GetFolderManifest(archiveId, folderId int) (*FolderManifest, error)
func (*Cache) GetFolderManifestByName ¶
func (cache *Cache) GetFolderManifestByName(archiveId int, target string) (*FolderManifest, error)
func (*Cache) GetFolderPages ¶
func (*Cache) GetReleaseManifest ¶
func (cache *Cache) GetReleaseManifest() (*ReleaseManifest, error)
func (*Cache) GetUnencryptedFolder ¶
func (*Cache) IndexCount ¶
IndexCount returns the amount of index files this store has available. This may include the release manifest file as an index.
type FileBundle ¶
type FileBundle struct {
// contains filtered or unexported fields
}
FileBundle is the bundle of binary resource files.
func LoadFileBundle ¶
func LoadFileBundle(rootPath string, indexCount int) (*FileBundle, error)
LoadFileBundle attempts to load a specific collection of resource files located in in the specified root path. May also return an error.
func NewFileBundle ¶
func NewFileBundle(data []byte, indices [][]byte, manifest []byte) *FileBundle
NewFileBundle constructs a new FileBundle using the given resources.
type FolderManifest ¶
type FolderManifest struct { Index int Id int LabelHash uint32 Version uint32 Checksum uint32 PackReferences []*PackManifest }
FolderManifest contains metadata about a folder in an archive.
type PackManifest ¶
type PackManifest struct { }
PackManifest contains metadata about a pack in a folder.
type ReleaseManifest ¶
ReleaseManifest contains metadata about every archive in a storage.
func (*ReleaseManifest) Encode ¶
func (manifest *ReleaseManifest) Encode() []byte
Encode encodes the checksums and versions of this manifest into byte array.