fill

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParamFiller

type ParamFiller interface {
	// Project fills the projectID if it is empty by asking user to select a project
	Project(projectID *string) (changed bool, err error)
	// ProjectCreatePreferred fills the projectID if it is empty by asking user to select a project
	// and makes "Create New Project…" the prioritized option
	ProjectCreatePreferred(projectID *string) (changed bool, err error)
	// ProjectByName makes sure either projectID or projectName is not empty
	// if necessary, it will ask user to select a project first
	ProjectByName(projectID, projectName *string) (changed bool, err error)
	// Environment fills the environmentID if it is empty by asking user to select an environment,
	// when the projectID is not empty, it will ask user to select a project first
	Environment(projectID, environmentID *string) (changed bool, err error)
	// Service fills the serviceID if it is empty by asking user to select a service,
	// when the projectID is not empty, it will ask user to select a project first
	Service(projectID, serviceID *string) (changed bool, err error)
	// ServiceByName makes sure either serviceID or serviceName is not empty by asking user to select a service,
	// if necessary, it will ask user to select a project first
	ServiceByName(options ServiceByNameOptions) (changed bool, err error)
	// ServiceWithEnvironment fills the serviceID and environmentID if they are empty by asking user to select a service and an environment,
	// when the projectID is not empty, it will ask user to select a project first
	ServiceWithEnvironment(projectID, serviceID, environmentID *string) (changed bool, err error)
	// ServiceByNameWithEnvironment behaves like ServiceByName, but it will also fill the environmentID if it is empty
	ServiceByNameWithEnvironment(options ServiceByNameWithEnvironmentOptions) (changed bool, err error)
}

func NewParamFiller

func NewParamFiller(selector selector.Selector) ParamFiller

type ServiceByNameOptions

type ServiceByNameOptions struct {
	ProjectCtx  zcontext.Context
	ServiceID   *string
	ServiceName *string
	CreateNew   bool
	FilterFunc  func(service *model.Service) bool
}

type ServiceByNameWithEnvironmentOptions

type ServiceByNameWithEnvironmentOptions struct {
	ProjectCtx    zcontext.Context
	ServiceID     *string
	ServiceName   *string
	EnvironmentID *string
	CreateNew     bool
	FilterFunc    func(service *model.Service) bool
}

Jump to

Keyboard shortcuts

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