provider

package
v0.0.0-...-6783019 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHTTPClientRequired = errors.New("http client required")
)

Functions

func DefaultItemSelection

func DefaultItemSelection(promptMessage string, items map[string]string) (string, error)

Types

type ConfigurationItemsFunc

type ConfigurationItemsFunc func(scopeTo string) (config.ConfigurationSet, error)

ConfigurationItemsFunc is a function type that gets configuration items. The scopeTo will indicate if there is additional scope that is needed

type Plugin

type Plugin interface {
	// Name returns the name of the plugin
	Name() string
}

Plugin is an interface that can be implemented for returned usage information

type PluginCreationInput

type PluginCreationInput struct {
	Logger        *zap.SugaredLogger
	IsInteractice bool
	ItemSelector  SelectItemFunc
	ScopedTo      *string
	HTTPClient    khttp.Client
}

PluginCreationInput is the input to plugin Init

type PluginPreReqs

type PluginPreReqs interface {
	ListPreReqs() []*PreReq
	CheckPreReqs() error
}

PluginPreReqs is an interface that providers have implement to indicate that they have pre-requisites that they can check for

type PreReq

type PreReq interface {
	Name() string
	Help() string
	Check() error
}

PreReq represents a pre-requisite

type SelectItemFunc

type SelectItemFunc func(prompt string, items map[string]string) (string, error)

SelectItemFunc is a function that is used abstract the method for selecting an item from the a list of possible values. Providers shouldn't directly ask the user for input and instead should use this.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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