Help us shape the future of Go! Take the 2026 Go Developer Survey

predictor

package
v1.41.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSecretPathPredictor

func NewSecretPathPredictor(
	authenticatorFunc func() auth.Authenticator,
	requestClientFunc func() requests.Client,
) complete.Predictor

NewSecretPathPredictor returns a new SecretPathPredictor

func NewSecretPathPredictorDefault

func NewSecretPathPredictorDefault() complete.Predictor

NewSecretPathPredictorDefault returns a new SecretPathPredictor

Types

type ActionTypePredictor

type ActionTypePredictor struct{}

func (ActionTypePredictor) Predict

func (p ActionTypePredictor) Predict(a complete.Args) (prediction []string)

type AuthProviderTypePredictor

type AuthProviderTypePredictor struct{}

func (AuthProviderTypePredictor) Predict

func (p AuthProviderTypePredictor) Predict(a complete.Args) (prediction []string)

type AuthTypePredictor

type AuthTypePredictor struct{}

func (AuthTypePredictor) Predict

func (p AuthTypePredictor) Predict(a complete.Args) (prediction []string)

type EffectTypePredictor

type EffectTypePredictor struct{}

func (EffectTypePredictor) Predict

func (p EffectTypePredictor) Predict(a complete.Args) (prediction []string)

type EncodingTypePredictor

type EncodingTypePredictor struct{}

func (EncodingTypePredictor) Predict

func (p EncodingTypePredictor) Predict(a complete.Args) (prediction []string)

type FlagValue

type FlagValue struct {
	Val          string
	FlagType     string
	DefaultValue string
}

FlagValue is a generalized storage for a flag's value.

func (*FlagValue) Set

func (f *FlagValue) Set(value string) error

func (*FlagValue) String

func (f *FlagValue) String() string

func (*FlagValue) Type

func (f *FlagValue) Type() string

type GcpAuthTypePredictor

type GcpAuthTypePredictor struct{}

func (GcpAuthTypePredictor) Predict

func (p GcpAuthTypePredictor) Predict(a complete.Args) (prediction []string)

type OutputTypePredictor

type OutputTypePredictor struct{}

func (OutputTypePredictor) Predict

func (p OutputTypePredictor) Predict(a complete.Args) (prediction []string)

type Params

type Params struct {
	Name      string
	Shorthand string
	Usage     string
	Default   string
	ValueType string
	Global    bool
	Hidden    bool
	Predictor complete.Predictor
}

type PrefixFilePredictor

type PrefixFilePredictor struct {
	// contains filtered or unexported fields
}

func NewPrefixFilePredictor

func NewPrefixFilePredictor(pattern string) *PrefixFilePredictor

func (PrefixFilePredictor) Predict

func (p PrefixFilePredictor) Predict(a complete.Args) (prediction []string)

type Wrapper

type Wrapper struct {
	Predictor    complete.Predictor
	Val          *FlagValue
	Name         string
	FriendlyName string
	Shorthand    string
	Usage        string
	Global       bool
	Hidden       bool
}

Wrapper merges a flag with its predictor.

func New

func New(params *Params) *Wrapper

Jump to

Keyboard shortcuts

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