Documentation
¶
Overview ¶
Package profiles stores local registrations of vendor-owned account roots. It never reads, copies, or refreshes credentials. Remote registrations contain public metadata.
Index ¶
- func DecodeRegistrations(b []byte) ([]agent.RuntimeProfile, error)
- func ID() string
- func RootID(endpoint string, a agent.ID, root string) string
- func Tags(values []string) ([]string, error)
- type Store
- func (s Store) Edit(id, name string, tags []string, generation int) error
- func (s Store) Forget(id string, generation int) error
- func (s Store) ImportObservation(id string, remote agent.RuntimeProfile) error
- func (s Store) List() ([]agent.RuntimeProfile, error)
- func (s Store) Observe(id string, account *agent.Account, problem string) (agent.RuntimeProfile, error)
- func (s Store) Register(p agent.RuntimeProfile) (agent.RuntimeProfile, error)
- func (s Store) SetDefault(endpoint string, id agent.ID, selected string) error
- func (s Store) Update(fn func(*[]agent.RuntimeProfile) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeRegistrations ¶
func DecodeRegistrations(b []byte) ([]agent.RuntimeProfile, error)
DecodeRegistrations reads a peer's known non-secret registry. Its tags and login labels are excluded; public observation fingerprints preserve the owner's binding.
Types ¶
type Store ¶
type Store struct{ Dir string }
func (Store) ImportObservation ¶
func (s Store) ImportObservation(id string, remote agent.RuntimeProfile) error
ImportObservation accepts newer metadata from the endpoint that owns the root. Local labels and tags stay local, and a failed or stale remote read cannot reset them.
func (Store) Observe ¶
func (s Store) Observe(id string, account *agent.Account, problem string) (agent.RuntimeProfile, error)
Observe records public login metadata and rotates the opaque binding after an observable account change. Limited metadata never upgrades to verified identity.
func (Store) Register ¶
func (s Store) Register(p agent.RuntimeProfile) (agent.RuntimeProfile, error)
func (Store) SetDefault ¶
SetDefault tracks the vendor's currently configured root, without changing profile identity. Switching that root invalidates plans which could launch the desktop app.