cache

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package cache provides a lightweight in-memory app title→slug and workspace name→slug cache for CLI lookups. Entries live for the duration of a single command invocation.

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
}

Cache is an in-memory app title→slug and workspace name→slug mapping. All lookups and mutations are case-insensitive (keys are stored lowercase).

func New

func New() *Cache

New returns an empty, ready-to-use Cache.

func (*Cache) LookupApp

func (c *Cache) LookupApp(title string) (string, bool)

LookupApp returns the app slug stored for the given title, if any.

func (*Cache) LookupWorkspace

func (c *Cache) LookupWorkspace(name string) (string, bool)

LookupWorkspace returns the workspace slug stored for the given name, if any.

func (*Cache) SetApp

func (c *Cache) SetApp(title, slug string)

SetApp stores a title→slug mapping.

func (*Cache) SetWorkspace

func (c *Cache) SetWorkspace(name, slug string)

SetWorkspace stores a name→slug mapping.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL