prefs

package
v0.0.0-...-dbfa471 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAll

func DeleteAll(pfs whfs.FS) error

func Save

func Save(pfs whfs.FS, p *GlobalPrefs) error

Types

type GlobalPrefs

type GlobalPrefs struct {
	Namespaces map[Namespace]Prefs `json:"namespaces"`
}

func Load

func Load(pfs whfs.FS) (*GlobalPrefs, error)

func (*GlobalPrefs) ClearNS

func (p *GlobalPrefs) ClearNS(namespace string)

func (*GlobalPrefs) GetNS

func (p *GlobalPrefs) GetNS(namespace string) Prefs

func (*GlobalPrefs) SetNS

func (p *GlobalPrefs) SetNS(namespace string, prefs Prefs)

type Namespace

type Namespace string

type Prefs

type Prefs struct {
	AuthToken  types.AuthToken    `json:"auth_token"`
	Email      string             `json:"email"`
	CurrentOrg types.Organization `json:"current_org"`
}

func (Prefs) ChangeOrg

func (p Prefs) ChangeOrg(org types.Organization) Prefs

Jump to

Keyboard shortcuts

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