validate

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package validate checks that managed keypairs parse, that the public key matches the private key, and that perms are correct. Ported from facade.validate_keys + _validate_one. Read-only: it never mutates ~/.ssh.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyCheck

type KeyCheck struct {
	KeyName     string
	Profile     string
	Fingerprint *string
	OK          bool
	Issues      []string
	Notes       []string
}

KeyCheck is the validation result for one managed key.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service validates the manifest's managed keys against ~/.ssh.

func New

func New(m *manifest.Manifest, sshDir string) *Service

New builds a validate service over the given manifest and ~/.ssh directory.

func (*Service) ValidateKeys

func (s *Service) ValidateKeys(selector string) ([]KeyCheck, error)

ValidateKeys validates every managed key, one check per profile+name pair. selector filters by profile, key name, or the composite "profile/key" form (empty means all); an unmatched selector is an error. A bare key name used by several profiles validates every one of them - checking only the first would report a broken key as clean.

Jump to

Keyboard shortcuts

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