leftovers: github.com/genevieve/leftovers/app Index | Files

package app

import "github.com/genevieve/leftovers/app"


Package Files

async_deleter.go env_vars.go logger.go


const (
    AWS       = "aws"
    GCP       = "gcp"
    Azure     = "azure"
    VSphere   = "vsphere"
    NSXT      = "nsxt"
    Openstack = "openstack"

type AsyncDeleter Uses

type AsyncDeleter struct {
    // contains filtered or unexported fields

func NewAsyncDeleter Uses

func NewAsyncDeleter(logger logger) AsyncDeleter

func (AsyncDeleter) Run Uses

func (a AsyncDeleter) Run(deletables [][]common.Deletable) error

type Logger Uses

type Logger struct {
    // contains filtered or unexported fields

func NewLogger Uses

func NewLogger(writer io.Writer, reader io.Reader, noConfirm bool, debug bool) *Logger

NewLogger returns a new Logger with the provided writer, reader, and value of noConfirm.

func (*Logger) Debugf Uses

func (l *Logger) Debugf(message string, a ...interface{})

Debugf handles arguments in the manner of fmt.Fprintf. It only prints output in debug mode.

func (*Logger) Debugln Uses

func (l *Logger) Debugln(message string)

Debugln handles the argument in the manner of fmt.Fprintln. It only prints output in debug mode.

func (*Logger) NoConfirm Uses

func (l *Logger) NoConfirm()

func (*Logger) Printf Uses

func (l *Logger) Printf(message string, a ...interface{})

Printf handles arguments in the manner of fmt.Fprintf.

func (*Logger) Println Uses

func (l *Logger) Println(message string)

Println handles the argument in the manner of fmt.Fprintln.

func (*Logger) PromptWithDetails Uses

func (l *Logger) PromptWithDetails(resourceType, resourceName string) bool

PromptWithDetails will block all other goroutines attempting to print the prompt to the logger for a given resource type and resource name, while waiting for user input.

type Options Uses

type Options struct {
    Version bool `short:"v"  long:"version"                     description:"Print version."`

    IAAS      string `short:"i"  long:"iaas"        env:"BBL_IAAS"  description:"The IaaS for clean up."  `
    NoConfirm bool   `short:"n"  long:"no-confirm"                  description:"Destroy resources without prompting. This is dangerous, make good choices!"`
    DryRun    bool   `short:"d"  long:"dry-run"                     description:"List all resources without deleting any."`
    Filter    string `short:"f"  long:"filter"                      description:"Filtering resources by an environment name."`
    Type      string `short:"t"  long:"type"                        description:"Type of resource to delete."`
    Debug     bool   `           long:"debug"                       description:"Print debug information."`

    AWSAccessKeyID       string `long:"aws-access-key-id"        env:"BBL_AWS_ACCESS_KEY_ID"        description:"AWS access key id."`
    AWSSecretAccessKey   string `long:"aws-secret-access-key"    env:"BBL_AWS_SECRET_ACCESS_KEY"    description:"AWS secret access key."`
    AWSSessionToken      string `long:"aws-session-token"        env:"BBL_AWS_SESSION_TOKEN"        description:"AWS session token."`
    AWSRegion            string `long:"aws-region"               env:"BBL_AWS_REGION"               description:"AWS region."`
    AzureClientID        string `long:"azure-client-id"          env:"BBL_AZURE_CLIENT_ID"          description:"Azure client id."`
    AzureClientSecret    string `long:"azure-client-secret"      env:"BBL_AZURE_CLIENT_SECRET"      description:"Azure client secret."`
    AzureTenantID        string `long:"azure-tenant-id"          env:"BBL_AZURE_TENANT_ID"          description:"Azure tenant id."`
    AzureSubscriptionID  string `long:"azure-subscription-id"    env:"BBL_AZURE_SUBSCRIPTION_ID"    description:"Azure subscription id."`
    GCPServiceAccountKey string `long:"gcp-service-account-key"  env:"BBL_GCP_SERVICE_ACCOUNT_KEY"  description:"GCP service account key path."`
    VSphereIP            string `long:"vsphere-vcenter-ip"       env:"BBL_VSPHERE_VCENTER_IP"       description:"vSphere vCenter IP address."`
    VSpherePassword      string `long:"vsphere-vcenter-password" env:"BBL_VSPHERE_VCENTER_PASSWORD" description:"vSphere vCenter password."`
    VSphereUser          string `long:"vsphere-vcenter-user"     env:"BBL_VSPHERE_VCENTER_USER"     description:"vSphere vCenter username."`
    VSphereDC            string `long:"vsphere-vcenter-dc"       env:"BBL_VSPHERE_VCENTER_DC"       description:"vSphere vCenter datacenter."`
    NSXTManagerHost      string `long:"nsxt-manager-host"        env:"BBL_NSXT_MANAGER_HOST"        description:"NSX-T manager IP address or domain name."`
    NSXTUser             string `long:"nsxt-username"            env:"BBL_NSXT_USERNAME"            description:"NSX-T manager username."`
    NSXTPassword         string `long:"nsxt-password"            env:"BBL_NSXT_PASSWORD"            description:"NSX-T manager password."`
    OpenstackAuthUrl     string `long:"openstack-auth-url"       env:"BBL_OPENSTACK_AUTH_URL"       description:"Openstack auth URL."`
    OpenstackUsername    string `long:"openstack-username"       env:"BBL_OPENSTACK_USERNAME"       description:"Openstack username."`
    OpenstackPassword    string `long:"openstack-password"       env:"BBL_OPENSTACK_PASSWORD"       description:"Openstack password."`
    OpenstackDomain      string `long:"openstack-domain-name"    env:"BBL_OPENSTACK_DOMAIN"         description:"Openstack domain name."`
    OpenstackTenant      string `long:"openstack-project-name"   env:"BBL_OPENSTACK_PROJECT"        description:"Openstack project name."`
    OpenstackRegion      string `long:"openstack-region-name"    env:"BBL_OPENSTACK_REGION"         description:"Openstack region name."`

type OtherEnvVars Uses

type OtherEnvVars struct {

func NewOtherEnvVars Uses

func NewOtherEnvVars() OtherEnvVars

func (OtherEnvVars) LoadConfig Uses

func (e OtherEnvVars) LoadConfig(o *Options)

Package app imports 8 packages (graph) and is imported by 12 packages. Updated 2019-11-21. Refresh now. Tools for package owners.