Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedData ¶
type CachedData[T EnkaCacheAble] struct { // contains filtered or unexported fields }
func NewCachedData ¶
func NewCachedData[T EnkaCacheAble](data T) CachedData[T]
func (*CachedData[T]) GetData ¶
func (c *CachedData[T]) GetData() T
func (*CachedData[T]) IsExpired ¶
func (c *CachedData[T]) IsExpired() bool
type EnkaCacheAble ¶
type EnkaCacheAble interface {
GetTtl() int
}
type EnkaHttpCache ¶ added in v0.4.0
type EnkaHttpCache interface {
AddGenshinUser(*genshin.RawUser)
GetGenshinUser(string) *genshin.RawUser
AddHSRUser(*starrail.RawUser)
GetHsrUser(string) *starrail.RawUser
}
func Default ¶ added in v0.2.3
func Default(log zerolog.Logger) EnkaHttpCache
func ExternalCacheWrapper ¶ added in v0.4.0
func ExternalCacheWrapper(ext ExternalCache, log zerolog.Logger) EnkaHttpCache
Click to show internal directories.
Click to hide internal directories.