Back to godoc.org

Package azure

v0.55.0
Latest Go to latest

The latest major version is .

Published: Aug 4, 2019 | License: Apache-2.0 | Module: github.com/genevievelesperance/leftovers

Index

type Group

type Group struct {
	// contains filtered or unexported fields
}

func NewGroup

func NewGroup(client groupsClient, name *string) Group

Group represents an Azure resource group.

func (Group) Delete

func (g Group) Delete() error

Delete deletes an Azure resource group and all other Azure resources in the resource group.

func (Group) Name

func (g Group) Name() string

func (Group) Type

func (g Group) Type() string

type Groups

type Groups struct {
	// contains filtered or unexported fields
}

func NewGroups

func NewGroups(client groupsClient, logger logger) Groups

func (Groups) List

func (g Groups) List(filter string) ([]common.Deletable, error)

func (Groups) Type

func (g Groups) Type() string

type Leftovers

type Leftovers struct {
	// contains filtered or unexported fields
}

func NewLeftovers

func NewLeftovers(logger logger, clientId, clientSecret, subscriptionId, tenantId string) (Leftovers, error)

NewLeftovers returns a new Leftovers for Azure that can be used to list resources, list types, or delete resources for the provided account. It returns an error if the credentials provided are invalid.

func (Leftovers) Delete

func (l Leftovers) Delete(filter string) error

Delete will collect all resources that contain the provided filter in the resource's identifier, prompt you to confirm deletion (if enabled), and delete those that are selected.

func (Leftovers) DeleteByType

func (l Leftovers) DeleteByType(filter, rType string) error

DeleteByType will collect all resources of the provied type that contain the provided filter in the resource's identifier, prompt you to confirm deletion (if enabled), and delete those that are selected.

func (Leftovers) List

func (l Leftovers) List(filter string)

List will print all of the resources that match the provided filter.

func (Leftovers) ListByType

func (l Leftovers) ListByType(filter, rType string)

ListByType defaults to List as there is only one resource type.

func (Leftovers) Types

func (l Leftovers) Types()

Types will print all the resource types that can be deleted on this IaaS.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier