selectors

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByName added in v1.0.0

func ByName[T Nameable](ask question.Asker, list []T, message string) (T, error)

func Channel added in v0.2.1

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

func EnvironmentSelect added in v0.2.1

func EnvironmentSelect(ask question.Asker, getAllEnvironmentsCallback GetAllEnvironmentsCallback, message string) (*environments.Environment, error)

func EnvironmentsMultiSelect added in v0.2.0

func EnvironmentsMultiSelect(ask question.Asker, getAllEnvironmentsCallback GetAllEnvironmentsCallback, 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, projectIdentifier string) (*projects.Project, error)

func GetAllEnvironments added in v0.6.0

func GetAllEnvironments(client *client.Client) ([]*environments.Environment, 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 GetAllEnvironmentsCallback added in v0.6.0

type GetAllEnvironmentsCallback func() ([]*environments.Environment, error)

type Nameable added in v1.0.0

type Nameable interface {
	GetName() string
}

type SelectOption added in v0.5.0

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

func NewSelectOption added in v1.3.0

func NewSelectOption[T any](value any, display string) *SelectOption[T]

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