aklogin

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 8 Imported by: 0

README

CF Login tool Build Status Go Report Card codecov

A tool that will allow switching between CF environments with a single command.

Install
$ cf install-plugin -r CF-Community "cf-aklogin"

Download the latest plugin and run:

$ cf install-plugin ~/Downloads/cf-aklogin.darwin

Note: If you get persmission denied, run chmod +x ~/Downloads/cf-aklogin.darwin.

Usage
Login

Create ~/.cflogin.yml:

include: //optional
- ~/bar.yml
foo:
  target: api.run.pivotal.io
  username: <username>
  password: <password>
  org: <org>
  space: <space>

Note: leave password/org/space blank for os.Stdin input.

And then run:

$ cf aklogin foo

Or with your own foo.yml:

include: //optional
- ~/bar.yml
foo:
  target: api.run.pivotal.io
  username: <username>
  password: <password> // optional
  org: <org> // optional
  space: <space> // optional

$ cf aklogin -f foo.yml bar
SSO Target

You may wish to have an sso target, to do so, you can use the same config as above, but instead of username and password use sso.

include: //optional
- ~/bar.yml
foo:
  target: api.run.pivotal.io
  sso: true
  org: <org>
  space: <space>
List
$ cf aklogin -h
NAME:
   aklogin - CF login via profiles

USAGE:
   cf aklogin [options] <profile>

OPTIONS:
   --filename       YML config file path
   --list           List available profiles
   --version        Print version

$ cf aklogin --list
Available profiles:
0. ak
1. bar
2. foo
Select profile: _
Build and install
$ make && make install
Tests
$ make test
Release
$ GITHUB_TOKEN=<your-token-here> make release

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFPlugin added in v1.2.9

type CFPlugin struct{}

CFPlugin is the runnable plugin for `cf`

func (*CFPlugin) GetMetadata added in v1.2.9

func (ak *CFPlugin) GetMetadata() plugin.PluginMetadata

GetMetadata returns the plugin's version and the min `cf-cli` version

func (*CFPlugin) Run added in v1.2.9

func (ak *CFPlugin) Run(cliConnection plugin.CliConnection, args []string)

Run is the function invoked by the `cf-cli`

type Profile

type Profile struct {
	Target, Username, Password, Org, Space string
	SSO                                    bool
}

Profile matches a YML profile

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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