shared

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: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagTenantedDeployment = "tenanted-mode"
	FlagTenant             = "tenant"
	FlagTenantTag          = "tenant-tag"

	Untenanted           = "Untenanted"
	Tenanted             = "Tenanted"
	TenantedOrUntenanted = "TenantedOrUntenanted"
)
View Source
const (
	FlagEnvironment = "environment"
)
View Source
const (
	FlagRole = "role"
)
View Source
const FlagWorkerPool = "worker-pool"

Variables

This section is empty.

Functions

func ContributeAccount

func ContributeAccount(opts *ViewOptions, accountID string) ([]*output.DataRow, error)

func ContributeProxy

func ContributeProxy(opts *ViewOptions, proxyID string) ([]*output.DataRow, error)

func FindWorkerPoolId

func FindWorkerPoolId(getAllWorkerPools GetAllWorkerPoolsCallback, nameOrId string) (string, error)

func GetAllTargets

func GetAllTargets(client client.Client, query machines.MachinesQuery) ([]*machines.DeploymentTarget, error)

func GetEnvironmentMap

func GetEnvironmentMap(opts *ViewOptions) (map[string]string, error)

func GetTenantMap

func GetTenantMap(opts *ViewOptions) (map[string]string, error)

func PromptForRoles

func PromptForRoles(opts *CreateTargetRoleOptions, flags *CreateTargetRoleFlags) error

func PromptForTenant

func PromptForTenant(opts *CreateTargetTenantOptions, flags *CreateTargetTenantFlags) error

func PromptForWorkerPool

func PromptForWorkerPool(opts *WorkerPoolOptions, flags *WorkerPoolFlags) error

func RegisterCreateTargetEnvironmentFlags

func RegisterCreateTargetEnvironmentFlags(cmd *cobra.Command, flags *CreateTargetEnvironmentFlags)

func RegisterCreateTargetRoleFlags

func RegisterCreateTargetRoleFlags(cmd *cobra.Command, commonFlags *CreateTargetRoleFlags)

func RegisterCreateTargetTenantFlags

func RegisterCreateTargetTenantFlags(cmd *cobra.Command, flags *CreateTargetTenantFlags)

func RegisterCreateTargetWorkerPoolFlags

func RegisterCreateTargetWorkerPoolFlags(cmd *cobra.Command, flags *WorkerPoolFlags)

func ViewRun

func ViewRun(opts *ViewOptions, contributeEndpoint ContributeEndpointCallback, description string) error

Types

type ContributeEndpointCallback

type ContributeEndpointCallback func(opts *ViewOptions, endpoint machines.IEndpoint) ([]*output.DataRow, error)

type CreateTargetEnvironmentFlags

type CreateTargetEnvironmentFlags struct {
	Environments *flag.Flag[[]string]
}

func NewCreateTargetEnvironmentFlags

func NewCreateTargetEnvironmentFlags() *CreateTargetEnvironmentFlags

type CreateTargetEnvironmentOptions

type CreateTargetEnvironmentOptions struct {
	*cmd.Dependencies
	selectors.GetAllEnvironmentsCallback
}

func NewCreateTargetEnvironmentOptions

func NewCreateTargetEnvironmentOptions(dependencies *cmd.Dependencies) *CreateTargetEnvironmentOptions

type CreateTargetRoleFlags

type CreateTargetRoleFlags struct {
	Roles *flag.Flag[[]string]
}

func NewCreateTargetRoleFlags

func NewCreateTargetRoleFlags() *CreateTargetRoleFlags

type CreateTargetRoleOptions

type CreateTargetRoleOptions struct {
	*cmd.Dependencies
	GetAllRolesCallback
}

func NewCreateTargetRoleOptions

func NewCreateTargetRoleOptions(dependencies *cmd.Dependencies) *CreateTargetRoleOptions

type CreateTargetTenantFlags

type CreateTargetTenantFlags struct {
	TenantedDeploymentMode *flag.Flag[string]
	Tenants                *flag.Flag[[]string]
	TenantTags             *flag.Flag[[]string]
}

func NewCreateTargetTenantFlags

func NewCreateTargetTenantFlags() *CreateTargetTenantFlags

type CreateTargetTenantOptions

type CreateTargetTenantOptions struct {
	*cmd.Dependencies

	GetAllTagsCallback
	sharedTenants.GetAllTenantsCallback
}

func NewCreateTargetTenantOptions

func NewCreateTargetTenantOptions(dependencies *cmd.Dependencies) *CreateTargetTenantOptions

type GetAllRolesCallback

type GetAllRolesCallback func() ([]string, error)

type GetAllTagsCallback

type GetAllTagsCallback func() ([]*tagsets.Tag, error)

type GetAllWorkerPoolsCallback

type GetAllWorkerPoolsCallback func() ([]*workerpools.WorkerPoolListResult, error)

type GetTargetsCallback

type GetTargetsCallback func() ([]*machines.DeploymentTarget, error)

type GetTargetsOptions

type GetTargetsOptions struct {
	GetTargetsCallback
}

func NewGetTargetsOptions

func NewGetTargetsOptions(dependencies *cmd.Dependencies, query machines.MachinesQuery) *GetTargetsOptions

func NewGetTargetsOptionsForAllTargets

func NewGetTargetsOptionsForAllTargets(dependencies *cmd.Dependencies) *GetTargetsOptions

type ViewFlags

type ViewFlags struct {
	*machinescommon.WebFlags
}

func NewViewFlags

func NewViewFlags() *ViewFlags

type ViewOptions

type ViewOptions struct {
	*cmd.Dependencies
	IdOrName string
	*ViewFlags
}

func NewViewOptions

func NewViewOptions(viewFlags *ViewFlags, dependencies *cmd.Dependencies, args []string) *ViewOptions

type WorkerPoolFlags

type WorkerPoolFlags struct {
	WorkerPool *flag.Flag[string]
}

func NewWorkerPoolFlags

func NewWorkerPoolFlags() *WorkerPoolFlags

type WorkerPoolOptions

type WorkerPoolOptions struct {
	*cmd.Dependencies
	GetAllWorkerPoolsCallback
}

func NewWorkerPoolOptionsForCreateTarget

func NewWorkerPoolOptionsForCreateTarget(dependencies *cmd.Dependencies) *WorkerPoolOptions

Jump to

Keyboard shortcuts

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