role

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *cobra.Command

New returns a cobra command instance based on Handler.

Types

type Handler

type Handler struct {
	handler.IO

	// Auth acquires credentials from a cage/cli/handler/mixin/aws/auth.Provider implementation.
	Auth auth.Mixin

	// Exec runs a local command AWS credentials set in environment variables .
	Exec cmd_mixin.Exec

	// RoleChain defines/collects the CLI flags and provides the implementation for Handler.Auth.
	RoleChain auth_role.Mixin
}

Handler defines the sub-command flags and logic.

func (*Handler) BindFlags

func (h *Handler) BindFlags(cmd *cobra.Command) []string

BindFlags binds the flags to Handler fields.

It implements cli/handler/cobra.Handler.

func (*Handler) Init

func (h *Handler) Init() handler_cobra.Init

Init defines the command, its environment variable prefix, etc.

It implements cli/handler/cobra.Handler.

func (*Handler) Run

func (h *Handler) Run(ctx context.Context, args []string)

Run performs the sub-command logic.

It implements cli/handler/cobra.Handler.

It delegates most logic to the Work method for testability.

Jump to

Keyboard shortcuts

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