Help us shape the future of Go! Take the 2026 Go Developer Survey

refreshcmd

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 13 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) RefreshAll

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

RefreshAll refreshes every enabled platform that has a refresher.

func (Runner) RefreshTargets added in v0.28.0

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

RefreshTargets refreshes the named platforms, or every enabled one when the targets are empty or just "all". Every name is checked before any token is touched, so a typo in a scheduled job cannot leave a rotation half-run.

Jump to

Keyboard shortcuts

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