Documentation ¶
Index ¶
- Variables
- func GetCache[T any](key string) (T, error)
- func InvalidateCache[T any](key string) error
- func PersistChanges()
- func SetCache[T any](key string, ttl int64, value T) error
- func SetCacheRaw[T any](key string, value T) error
- func SetCacheWithExp[T any](key string, exp int64, value T) error
- type Entry
- type Settings
- func (s *Settings) GetAutoupdate() string
- func (s *Settings) GetBaseURL() string
- func (s *Settings) GetLastUpdateCheck() int64
- func (s *Settings) GetToken() string
- func (s *Settings) GetUsername() string
- func (s *Settings) Organization() string
- func (s *Settings) RegisterUse(cmd string) bool
- func (s *Settings) SetAutoupdate(autoupdate string)
- func (s *Settings) SetLastUpdateCheck(t int64)
- func (s *Settings) SetOrganization(org string)
- func (s *Settings) SetToken(token string)
- func (s *Settings) SetUsername(username string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExpired = errors.New("cache entry expired")
Functions ¶
func InvalidateCache ¶
func PersistChanges ¶
func PersistChanges()
func SetCacheRaw ¶
Types ¶
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
func ReadSettings ¶
func (*Settings) GetAutoupdate ¶
func (*Settings) GetBaseURL ¶
func (*Settings) GetLastUpdateCheck ¶
func (*Settings) GetUsername ¶
func (*Settings) Organization ¶
func (*Settings) RegisterUse ¶
func (*Settings) SetAutoupdate ¶
func (*Settings) SetLastUpdateCheck ¶
func (*Settings) SetOrganization ¶
func (*Settings) SetUsername ¶
Click to show internal directories.
Click to hide internal directories.