Documentation
¶
Index ¶
- type Cache
- func (c *Cache) ClearDefault(defaultType string) error
- func (c Cache) GetApp(appSlugOrID string) (*types.App, error)
- func (c Cache) GetAppByID(appID string) (*types.App, error)
- func (c *Cache) GetDefault(defaultType string) (string, error)
- func (c *Cache) Save() error
- func (c *Cache) SetApp(app *types.App) error
- func (c *Cache) SetDefault(defaultType string, defaultValue string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
DefaultApp string `json:"default_app"`
LastAppRefresh *time.Time `json:"last_app_refresh"`
Apps []types.App `json:"apps"`
}
func (*Cache) ClearDefault ¶
func (Cache) GetAppByID ¶ added in v0.129.13
GetAppByID returns a cached app only for an exact app ID match. Unlike app IDs, slugs cannot be resolved safely from this cache because it is shared across API origins. The same slug can refer to different app IDs in production, staging, and local development environments.
func (*Cache) GetDefault ¶ added in v0.89.0
Click to show internal directories.
Click to hide internal directories.