credentials

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package credentials stores the operator's API token + identity hints.

Two backends:

  • keyring (preferred): OS Keychain / Secret Service / Credential Manager
  • file fallback: ~/.config/yomiro/credentials, mode 0600

The store auto-selects keyring if available and silently falls back to file.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("credentials not found")

ErrNotFound is returned when no credentials are stored.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	APIURL string `json:"api_url"`
	Token  string `json:"token"`
	User   string `json:"user,omitempty"`
	Tenant string `json:"tenant,omitempty"`
}

Credentials are the persisted operator identity + token.

type Store

type Store interface {
	Save(Credentials) error
	Load() (Credentials, error)
	Clear() error
}

Store abstracts the persistence layer.

func New

func New() (Store, error)

New returns the default store: keyring if available, else file.

Jump to

Keyboard shortcuts

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