Documentation ¶
Overview ¶
Package arkres provides functions to retrieve resources of the game Arknights. This package only do fetching, unzipping, unpacking and decrypting resources. To do other works, such as parsing BSON or JSON tables or processing graphics assets, use the subpackages.
tools/extractor is required.
Index ¶
- Constants
- func Get(ctx context.Context, resVersion string, dst string, filter ...*regexp.Regexp) error
- func GetIncrementally(ctx context.Context, oldResVer string, newResVer string, dst string, ...) error
- func GetRes(ctx context.Context, infos []Info, dst string) error
- func GetResURL(resVersion string, res string) string
- func GetResVersion() (string, error)
- func SetChatMask(newChatMask []byte)
- type AbInfo
- type FullPack
- type HotUpdateList
- type Info
- type PackInfo
- type Version
Constants ¶
const ( KeySize = 16 IVSize = 16 MagicOffsetSize = 128 )
const (
DefaultPrefix = "assets/torappu/dynamicassets"
)
Variables ¶
This section is empty.
Functions ¶
func GetIncrementally ¶
func GetResURL ¶
GetResURL gets the URL to download the specified asset with specified resource version.
func GetResVersion ¶
GetResVersion gets the current resource version.
func SetChatMask ¶
func SetChatMask(newChatMask []byte)
Types ¶
type HotUpdateList ¶
type HotUpdateList struct { FullPack FullPack `json:"fullPack"` VersionID string `json:"versionId"` AbInfos []AbInfo `json:"abInfos"` CountOfTypedRes int `json:"countOfTypedRes"` PackInfos []PackInfo `json:"packInfos"` }
HotUpdateList represents a raw response of "https://ak.hycdn.cn/assetbundle/official/Android/assets/{resVersion}/hot_update_list.json"
func GetRawResources ¶
func GetRawResources(resVersion string) (HotUpdateList, error)
GetRawResources gets the raw response of Arknights resource API with specified resource version.
type Info ¶
func FilterResInfos ¶
FilterResInfos returns a slice containing all Info matching the specified predicate.
func FilterResInfosRegexp ¶
FilterResInfosRegexp returns a slice containing all Info matching the specified regexp.
func GetResInfos ¶
GetResInfos gets the resource infos of specified resource version.
type Version ¶
type Version struct { ResVersion string `json:"resVersion"` ClientVersion string `json:"clientVersion"` }
Version represents a raw response of "https://ak-conf.hypergryph.com/config/prod/official/Android/version".
func GetRawVersion ¶
GetRawVersion gets the raw response from Arknights version API.