Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Simple in-memory Cache with TTL (Time to Live) support. Intended to be used to store static information e.g., HoYoWiki data.
func (*Cache) Get ¶
Get an item from the cache. Returns the value or nil, and a bool indicating if the value is found, or if it has expired.
func (*Cache) Set ¶
Adds an item to the cache using the default TTL. Replaces existing item if the key exists.
func (*Cache) SetCacheDuration ¶
Set the default TTL of the cache.
type Cookie ¶
type Cookie struct {
// contains filtered or unexported fields
}
Cookie data class that stores tokens required for calling HoYoLab endpoints.
func (Cookie) ParseCookie ¶
Converts cookie tokens into a string to be added into a request header. Each token is separated by semicolons. Similar to http.Request.AddCookie().
Click to show internal directories.
Click to hide internal directories.