Documentation
¶
Overview ¶
Package session persists values captured from responses between apic invocations, so `apic run login` followed by `apic run get-user` works the way it does in a GUI client. State lives in .apic/session.json under the project root; the directory ignores itself via .apic/.gitignore.
Index ¶
Constants ¶
const ( Dir = ".apic" File = "session.json" DefaultEnv = "default" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
Envs map[string]map[string]string `json:"envs"`
// contains filtered or unexported fields
}
Store is the on-disk session.
func NewMemory ¶
func NewMemory() *Store
NewMemory returns a session that is never written to disk. Captured values and cached tokens still work within the process.
func (*Store) Save ¶
Save writes the session to disk, creating .apic/ and its .gitignore. A memory-only store is a no-op.