Documentation
¶
Index ¶
- type CliPrompter
- func (p *CliPrompter) FormatNonInteractiveError(missing *entities.GrantSet) error
- func (p *CliPrompter) IsInteractive() bool
- func (p *CliPrompter) PromptForCapabilities(reqs []entities.CapabilityRequest) (*entities.GrantSet, error)
- func (p *CliPrompter) PromptForCapability(req entities.CapabilityRequest) (granted bool, always bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CliPrompter ¶
type CliPrompter struct {
// contains filtered or unexported fields
}
CliPrompter implements ports.Prompter for CLI environments.
func NewCliPrompter ¶
func NewCliPrompter(in io.Reader, out io.Writer) *CliPrompter
NewCliPrompter creates a new CliPrompter.
func (*CliPrompter) FormatNonInteractiveError ¶
func (p *CliPrompter) FormatNonInteractiveError(missing *entities.GrantSet) error
FormatNonInteractiveError creates a helpful error.
func (*CliPrompter) IsInteractive ¶
func (p *CliPrompter) IsInteractive() bool
IsInteractive checks if the input is a terminal.
func (*CliPrompter) PromptForCapabilities ¶
func (p *CliPrompter) PromptForCapabilities(reqs []entities.CapabilityRequest) (*entities.GrantSet, error)
PromptForCapabilities prompts for multiple capabilities.
func (*CliPrompter) PromptForCapability ¶
func (p *CliPrompter) PromptForCapability(req entities.CapabilityRequest) (granted bool, always bool, err error)
PromptForCapability asks the user to grant a single capability.
Click to show internal directories.
Click to hide internal directories.