query

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddQueryFlags

func AddQueryFlags(flagSet *flag.FlagSet, commandFlags map[string]interface{})

AddQueryFlags returns the flags required to query expired infrastructure in the order:

  • Infrastructure filter tags, in the order needed by infra.AddFilterFlags
  • Maximum age flag
  • Expiry tag flag
  • Expiry tag not applicable value
  • Expiry tag format flag

func GetExpiredResources

func GetExpiredResources(commandFlags map[string]interface{}, expiredResourceHandler ExpiredResourceHandler) error

GetExpiredResources returns a list of expired resources

Types

type ExpiredResourceHandler

type ExpiredResourceHandler func(resource *types.InfraResource, hasExpired bool, expiryTime time.Time, err error)

type Query

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

Query queries then notifies (using configured notification channels) infrastructure that has expired

func (*Query) GetDescription

func (query *Query) GetDescription() string

GetDescription returns the description for the query command

func (*Query) GetFlagSet

func (query *Query) GetFlagSet() *flag.FlagSet

GetFlagSet returns a pointer to the flag.FlagSet associated to the command

func (*Query) GetHelpFlag

func (query *Query) GetHelpFlag() *bool

GetHelpFlag returns a pointer to the initialized help flag for the command

func (*Query) GetName

func (query *Query) GetName() string

GetName returns the value of the name constant

func (*Query) GetSubCommands

func (query *Query) GetSubCommands() []cli.Command

GetSubCommands returns a slice of subcommands under the query command (expect empty slice if none)

func (*Query) Init

func (query *Query) Init(helpFlagName string, helpFlagDescription string)

Init initializes the command object

func (*Query) Process

func (query *Query) Process()

Process fetches the list of infrastructure that matches the criteria provided by the user and that has expired and sends notifications to the configured notification channels

Jump to

Keyboard shortcuts

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