selectors

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Account

func Account(ask question.Asker, list []accounts.IAccount, message string) (accounts.IAccount, error)

func ByNameOrID

func ByNameOrID[T NameOrID](ask question.Asker, list []T, message string) (T, error)

func Channel added in v0.2.1

func Channel(octopus *octopusApiClient.Client, ask question.Asker, questionText string, project *projects.Project) (*channels.Channel, error)

func EnvironmentSelect added in v0.2.1

func EnvironmentSelect(ask question.Asker, client *client.Client, message string) (*environments.Environment, error)

func EnvironmentsMultiSelect added in v0.2.0

func EnvironmentsMultiSelect(ask question.Asker, client *client.Client, message string, required bool) ([]*environments.Environment, error)

func FindChannel added in v0.2.1

func FindChannel(octopus *octopusApiClient.Client, project *projects.Project, channelName string) (*channels.Channel, error)

func FindEnvironment added in v0.2.1

func FindEnvironment(octopus *client.Client, environmentName string) (*environments.Environment, error)

func FindProject added in v0.2.1

func FindProject(octopus *octopusApiClient.Client, projectName string) (*projects.Project, error)

func GitCredentialStorage added in v0.5.0

func GitCredentialStorage(questionText string, ask question.Asker) (string, error)

func Lifecycle added in v0.5.0

func Lifecycle(questionText string, octopus *client.Client, ask question.Asker) (*lifecycles.Lifecycle, error)

func Project added in v0.2.1

func Project(questionText string, octopus *octopusApiClient.Client, ask question.Asker) (*projects.Project, error)

func Select added in v0.5.0

func Select[T any](ask question.Asker, questionText string, itemsCallback func() ([]*T, error), getKey func(item *T) string) (*T, error)

func SelectOrNew added in v0.5.0

func SelectOrNew[T any](ask question.Asker, questionText string, itemsCallback func() ([]*T, error), getKey func(item *T) string) (*T, bool, error)

SelectOrNew is the same as Select but show a create new option at the bottom of the list When create new is selected the returned bool will be true

Types

type NameOrID

type NameOrID interface {
	GetName() string
	GetID() string
}

type SelectOption added in v0.5.0

type SelectOption[T any] struct {
	Value   T
	Display string
}

func SelectOptions added in v0.5.0

func SelectOptions[T any](ask question.Asker, questionText string, itemsCallback func() []*SelectOption[T]) (*SelectOption[T], error)

Jump to

Keyboard shortcuts

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