pkilist

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 5 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 pkilist is osapi pki list: each key and each certificate of osapi on this host, in one list.

Index

Constants

View Source
const (
	// KindKey is a key, as osapi pki key list shows it.
	KindKey = "key"
	// KindCert is a certificate, as osapi pki cert list shows it.
	KindCert = "cert"
)

The kinds of item.

Variables

View Source
var Group = command.Register(command.Define(
	"pki", "List each key and each certificate of osapi on this host",
	command.Under(command.ParentPKI),
	command.Flat(),
	command.Uses[Deps](),
	command.Method[ListInput, ListOutput]("list").
		Short("List each key and each certificate of osapi on this host").
		Long("Run this on the host. It reads what osapi pki key list and osapi pki cert\n"+
			"list read, in one list: the kind, the name, the component, the state, the\n"+
			"algorithm, the fingerprint, or the ID of a secret key, and the expiry of a\n"+
			"certificate.").
		Example("").
		Prints(sampleList).
		Handle(List),
))

Group is the list group's definition. It adds no word: its method is osapi pki list.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Keys  func() []pkikey.Key
	Certs func() []pki.Cert
}

Deps is what list uses: the keys and the certificates of osapi on this host, as osapi pki key list and osapi pki cert list read them.

type Item

type Item struct {
	Kind        string     `json:"kind"                  doc:"key or cert."`
	Name        string     `json:"name"`
	Component   string     `json:"component"             doc:"The component that uses it: controller, agent, nats or vault."`
	State       string     `json:"state"                 doc:"ok; not made; off, for a JetStream store with no key; or unreadable, with the reason."`
	File        string     `` /* 137-byte string literal not displayed */
	Algorithm   string     `` /* 127-byte string literal not displayed */
	Fingerprint string     `` /* 137-byte string literal not displayed */
	Expires     *time.Time `json:"expires,omitempty"     doc:"When a certificate expires."`
}

Item is a key or a certificate of osapi on this host.

type ListInput

type ListInput struct{}

ListInput is the input of list, which has none.

type ListOutput

type ListOutput struct {
	Items []Item `                              json:"items"`
	// contains filtered or unexported fields
}

ListOutput is each key and each certificate.

func List

func List(
	_ context.Context,
	d Deps,
	_ ListInput,
) (ListOutput, error)

List is each key, then each certificate, of osapi on this host.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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