keeper

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, name string) (secrets.Keeper, error)

Build creates a secret keeper from the configuration in the context.

func CheckConfig

func CheckConfig(ctx context.Context, c *config.Config) error

CheckConfig validates the configuration for all of ghost.

func Decode

func Decode(ctx context.Context, name string) (any, error)

Decode decodes the configuration for the named secret keeper into its preferred configuration type. This is useful for tools that want to manipulate the configuration directly. This will have any secret references resolved and lookups performed.

func Exists

func Exists(ctx context.Context, name string) bool

Exists checks if the named secret keeper exists in the configuration in the context.

func PinEntry

func PinEntry(title, desc, prompt, ok string) (string, error)

PinEntry is a tool that makes it easier to display a dialog prompting the user for a password.

func StartServer

func StartServer(logger *log.Logger, kpr secrets.Keeper) error

StartServer starts the keeper server. As of this writing, it will always be configured to run in an automatically named unix socket in the system's temp directory. It will also write a pid file to the same directory.

func StopServer

func StopServer(immediacy StopImmediacy) error

StopServer stops the keeper server. The given immediacy indicates how quickly the server should be stopped.

func Validate

func Validate(ctx context.Context, name string) error

Validate checks that the configuration int he context is correct for the named secret keeper.

func WithBuilder

func WithBuilder(ctx context.Context, c *config.Config) context.Context

WithBuilder adds the secret keeper builder to the context.

Types

type StopImmediacy

type StopImmediacy int

StopImmediacy is used to indicate how quickly the server should be stopped.

const (
	StopGraceful StopImmediacy = iota // stop eventually (SIGHUP)
	StopQuick                         // stop soon (SIGQUIT)
	StopNow                           // stop now (SIGKILL)
)

Jump to

Keyboard shortcuts

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