Documentation ¶
Index ¶
- func AddFilterFlags(flagSet *flag.FlagSet) (*flags.StringArray, *flags.StringArray, *flags.StringArray, *flags.StringArray)
- func AddResourceTableFlags(flagSet *flag.FlagSet) (*flags.StringArray, *bool, *bool, *string, *string, *bool, *string)
- func BackupResource(resource *types.InfraResource, safe *bool, wait *bool) error
- func GetCostsAndUsages(filter *types.CostAndUsageFilter) (map[string]*types.CostAndUsageOutput, error)
- func GetFiltersFromCommandFlags(providerFlag *flags.StringArray, regionFlag *flags.StringArray, ...) *types.InfraFilter
- func GetResources(filter *types.InfraFilter) ([]*types.InfraResource, error)
- func GetTagKeys(resource *types.InfraResource) []string
- func UpdateResourceState(resource *types.InfraResource, safe *bool, wait *bool, ...) error
- func UpdateResourceTag(resource *types.InfraResource, tagKey *string, tagValue *string) error
- type Provider
- type ResourceTable
- func (rt *ResourceTable) Init(showFlag *flags.StringArray, hideHeadersFlag *bool, csvFlag *bool, ...)
- func (rt *ResourceTable) Render(headers map[string]bool, rows []map[string]string) (string, error)
- func (rt *ResourceTable) RenderCostSpikes(costSpikes []*types.CostSpikeOutput) (string, error)
- func (rt *ResourceTable) RenderResources(allResources []*types.InfraResource) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFilterFlags ¶
func AddFilterFlags(flagSet *flag.FlagSet) (*flags.StringArray, *flags.StringArray, *flags.StringArray, *flags.StringArray)
func AddResourceTableFlags ¶
func BackupResource ¶ added in v0.11.0
func BackupResource(resource *types.InfraResource, safe *bool, wait *bool) error
func GetCostsAndUsages ¶
func GetCostsAndUsages(filter *types.CostAndUsageFilter) (map[string]*types.CostAndUsageOutput, error)
func GetFiltersFromCommandFlags ¶
func GetFiltersFromCommandFlags(providerFlag *flags.StringArray, regionFlag *flags.StringArray, typeFlag *flags.StringArray, tagFlag *flags.StringArray) *types.InfraFilter
func GetResources ¶
func GetResources(filter *types.InfraFilter) ([]*types.InfraResource, error)
func GetTagKeys ¶
func GetTagKeys(resource *types.InfraResource) []string
func UpdateResourceState ¶ added in v0.11.0
func UpdateResourceState(resource *types.InfraResource, safe *bool, wait *bool, state *types.InfraResourceState) error
func UpdateResourceTag ¶
func UpdateResourceTag(resource *types.InfraResource, tagKey *string, tagValue *string) error
Types ¶
type Provider ¶
type Provider interface { Init() error GetName() string GetResources(filter *types.InfraFilter) ([]*types.InfraResource, error) GetCostsAndUsages(filter *types.CostAndUsageFilter) (*types.CostAndUsageOutput, error) UpdateResourceTag(resource *types.InfraResource, tagKey *string, tagValue *string) error // Update's a resource's state. // If safe is set to true, then the implementation must guarantee that the resource can be restored // to its previous state. This might mean safely backing up the resource // If wait is set to true, the implementation must block execution until the resource changes state completely UpdateResourceState(resource *types.InfraResource, safe *bool, wait *bool, state *types.InfraResourceState) error // Creates a backup of the resource // If safe is set, the implemtation must guarantee the integrity of the backup. We make an assumption that // guaranteeing the integrity of the backup might temporarily impact the availability of the resource // If wait is set to true, the implementation must block execution until the resource's backup is available BackupResource(resource *types.InfraResource, safe *bool, wait *bool) error }
type ResourceTable ¶
type ResourceTable struct {
// contains filtered or unexported fields
}
ResourceTable is responsible for rendering cloud resources in a table
func (*ResourceTable) Init ¶
func (rt *ResourceTable) Init( showFlag *flags.StringArray, hideHeadersFlag *bool, csvFlag *bool, fieldSeparatorFlag *string, resourceSeparatorFlag *string, listFieldsFlag *bool, defaultFieldValueFlag *string)
func (*ResourceTable) RenderCostSpikes ¶
func (rt *ResourceTable) RenderCostSpikes(costSpikes []*types.CostSpikeOutput) (string, error)
func (*ResourceTable) RenderResources ¶
func (rt *ResourceTable) RenderResources(allResources []*types.InfraResource) (string, error)
Click to show internal directories.
Click to hide internal directories.