controller

package
v0.0.0-...-116859e Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SelectionPrompt

func SelectionPrompt(envDetails []api.EnvDetails) string

Selection prompt, to be used in screens requiring selection of single entry from multiple options.

Types

type Controller

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

func (*Controller) Access

func (c *Controller) Access()

needs to be run from a local git repo. it is the parent function for `kinto access` command. Allows to port-forward all services in an env as long as the env has atleast one service belonging to the local git repo.

func (*Controller) Deploy

func (c *Controller) Deploy(envId string, blockName string)

Triggers a deploy action for a given service

func (*Controller) Environment

func (c *Controller) Environment()

Get list of all available environments in an account

func (*Controller) EnvironmentAccess

func (c *Controller) EnvironmentAccess(envId ...string)

sub-function of the `access` command, called when using `kinto env access`. allows port-forwarding whole environments.

func (*Controller) GetAvailableEnvNames

func (c *Controller) GetAvailableEnvNames(enableLocalGitCheck bool) []api.EnvDetails

Get All teleport-able/Accessible Environment names

func (*Controller) GetBlocksToForward

func (c *Controller) GetBlocksToForward(envId string) []api.RemoteConfig

get list of services to port-forward

func (*Controller) GetBlocksToTeleport

func (c *Controller) GetBlocksToTeleport(envId string) ([]api.RemoteConfig, string)

get list of services to teleport

func (*Controller) GetEnvWithId

func (c *Controller) GetEnvWithId(envId string) *types.Environment

get env from its id

func (*Controller) Init

func (c *Controller) Init(kintoCoreHost, kintoCoreSecret string)

Set kintoCoreHost for CLI or reset it to default production host.

func (*Controller) ServiceAccess

func (c *Controller) ServiceAccess(envId string, blockId string)

sub-function of the `access` command called when using `kinto svs access`. allows port-forwarding a particular service.

func (*Controller) Services

func (c *Controller) Services(envId ...string)

get list of all services inside an environment

func (*Controller) Status

func (c *Controller) Status()

Get the list of all environments on which the current local repo is deployed on.

func (*Controller) Teleport

func (c *Controller) Teleport()

allows to teleport a particular service inside an env while port-forwarding the remaining services.

func (Controller) Version

func (c Controller) Version()

type ControllerInterface

type ControllerInterface interface {
	Init(kintoCoreHost, kintoCoreSecret string)
	EnvironmentAccess(envId ...string)
	Services(envId ...string)
	ServiceAccess(envId string, blockId string)
	Deploy(envId string, blockName string)
	Environment()
	Version()
	Access()
	Teleport()
	Status()
}

func NewControllerOrDie

func NewControllerOrDie(api api.ApiInterface) ControllerInterface

Jump to

Keyboard shortcuts

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