Documentation ¶
Index ¶
- func SelectionPrompt(envDetails []api.EnvDetails) string
- type Controller
- func (c *Controller) Access()
- func (c *Controller) Deploy(envId string, blockName string)
- func (c *Controller) Environment()
- func (c *Controller) EnvironmentAccess(envId ...string)
- func (c *Controller) GetAvailableEnvNames(enableLocalGitCheck bool) []api.EnvDetails
- func (c *Controller) GetBlocksToForward(envId string) []api.RemoteConfig
- func (c *Controller) GetBlocksToTeleport(envId string) ([]api.RemoteConfig, string)
- func (c *Controller) GetEnvWithId(envId string) *types.Environment
- func (c *Controller) Init(kintoCoreHost string)
- func (c *Controller) ServiceAccess(envId string, blockId string)
- func (c *Controller) Services(envId ...string)
- func (c *Controller) Status()
- func (c *Controller) Teleport()
- func (c Controller) Version()
- type ControllerInterface
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 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 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