refreshcmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package refreshcmd orchestrates `keryx auth refresh` (spec 0010): it builds the configured write-back + notifier backends, fans out across the enabled platforms' refreshers, fires alerts, and reports per-platform status. keryx- specific glue around the pkg/refresh seam (mirrors internal/postcmd).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatResults

func FormatResults(w io.Writer, results []refresh.Status)

FormatResults renders the statuses for the CLI.

Types

type Runner

type Runner struct {
	Store *config.Store
	// Accounts is the credentials store (~/.keryx/accounts.yaml). The unattended
	// refresh path rotates tokens, so it must name where they go rather than let
	// config routing pick the highest-precedence writable layer (spec 0042 §3.4).
	Accounts *config.Store
	WB       oauth.WriteBack
	Notifier notify.Notifier
}

Runner refreshes platform tokens with a chosen write-back + notifier.

func New

func New(store *config.Store, accounts ...*config.Store) (Runner, error)

New builds a Runner from config (write-back + alert backends are config-selected).

func (Runner) Refresh

func (r Runner) Refresh(ctx context.Context, platform string, dryRun bool) ([]refresh.Status, error)

Refresh refreshes a single platform.

func (Runner) RefreshAll

func (r Runner) RefreshAll(ctx context.Context, dryRun bool) ([]refresh.Status, error)

RefreshAll refreshes every enabled platform that has a refresher.

Jump to

Keyboard shortcuts

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