login

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package login provides the defined CLI login actions for Vela.

Usage:

import "github.com/go-vela/cli/action/login"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Action   string
	Username string
	Password string
	OTP      string
	Retry    bool
}

Config represents the configuration necessary to perform login related requests with Vela.

func (*Config) Login

func (c *Config) Login(client *vela.Client) error

Login authenticates and logs in to Vela via the API based off the provided configuration.

func (*Config) PromptOTP

func (c *Config) PromptOTP(in io.ReadCloser) error

PromptOTP asks the user to provide a OTP via terminal input based off the provided configuration.

func (*Config) PromptPassword

func (c *Config) PromptPassword(in io.ReadCloser) error

PromptPassword asks the user to provide a password via terminal input based off the provided configuration.

func (*Config) PromptUsername

func (c *Config) PromptUsername(in io.ReadCloser) error

PromptUsername asks the user to provide a username via terminal input based off the provided configuration.

func (*Config) Validate

func (c *Config) Validate() error

Validate verifies the configuration provided.

Jump to

Keyboard shortcuts

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