testutil

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAgeSetupUIStubAborted = errors.New("age setup ui stub aborted")

Functions

This section is empty.

Types

type AgeSetupUIStub

type AgeSetupUIStub[T any] struct {
	Overwrite bool
	Drafts    []*T
	AddMore   []bool
	AbortErr  error

	OverwriteCalls int
	CollectCalls   int
	AddCalls       int
}

AgeSetupUIStub is a reusable scripted UI double for age recipient setup flows.

func (*AgeSetupUIStub[T]) CollectRecipientDraft

func (u *AgeSetupUIStub[T]) CollectRecipientDraft(ctx context.Context, recipientPath string) (*T, error)

func (*AgeSetupUIStub[T]) ConfirmAddAnotherRecipient

func (u *AgeSetupUIStub[T]) ConfirmAddAnotherRecipient(ctx context.Context, currentCount int) (bool, error)

func (*AgeSetupUIStub[T]) ConfirmOverwriteExistingRecipient

func (u *AgeSetupUIStub[T]) ConfirmOverwriteExistingRecipient(ctx context.Context, recipientPath string) (bool, error)

Jump to

Keyboard shortcuts

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