stocker

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSBillingStocker

type AWSBillingStocker struct {
	Account *inventory.Account

	// List of instances that needs expense updates
	Instances []inventory.Instance
	// contains filtered or unexported fields
}

AWSBillingStocker object to obtain costs and expenses from AWS Cost Explorer API

func NewAWSBillingStocker

func NewAWSBillingStocker(account *inventory.Account, logger *zap.Logger, instances []inventory.Instance) *AWSBillingStocker

NewAWSStocker create and returns a pointer to a new AWSStocker instance

func (*AWSBillingStocker) Connect

func (s *AWSBillingStocker) Connect() error

Connect Initialices the AWS API and CostExplorer sessions and clients

func (AWSBillingStocker) GetResults

func (s AWSBillingStocker) GetResults() inventory.Account

TODO: doc

func (*AWSBillingStocker) MakeStock

func (s *AWSBillingStocker) MakeStock() error

MakeStock TODO

func (AWSBillingStocker) PrintStock

func (s AWSBillingStocker) PrintStock()

TODO: doc

type AWSStocker

type AWSStocker struct {
	Account *inventory.Account
	// contains filtered or unexported fields
}

AWSStocker object to make stock on AWS

func NewAWSStocker

func NewAWSStocker(account *inventory.Account, logger *zap.Logger) *AWSStocker

NewAWSStocker create and returns a pointer to a new AWSStocker instance

func (*AWSStocker) Connect

func (s *AWSStocker) Connect() error

Connect Initialices the AWS API and CostExplorer sessions and clients

func (*AWSStocker) FindOpenshiftConsoleURLs

func (s *AWSStocker) FindOpenshiftConsoleURLs() error

FindOpenshiftConsoleURLs iterates every Cluster and every Route53 HostedZone for looking for the corresponding URLs for the OCP console

func (AWSStocker) GetResults

func (s AWSStocker) GetResults() inventory.Account

TODO: Returns the Account was scanned on this stocker

func (*AWSStocker) MakeStock

func (s *AWSStocker) MakeStock() error

MakeStock Implements the interface Stocker for triggering the entire process of making stock about a AWS account

func (AWSStocker) PrintStock

func (s AWSStocker) PrintStock()

TODO: Prints the Account Stock

type AzureStocker

type AzureStocker struct {
	Account inventory.Account
	// contains filtered or unexported fields
}

AzureStocker object to make stock on Azure

func NewAzureStocker

func NewAzureStocker(account inventory.Account, logger *zap.Logger) *AzureStocker

NewAzureStocker create and returns a pointer to a new AzureStocker instance

func (AzureStocker) GetResults

func (s AzureStocker) GetResults() inventory.Account

GetResults resturns the scanned results on this stocker instance

func (AzureStocker) MakeStock

func (s AzureStocker) MakeStock() error

MakeStock Scans Azure cloud accounts

func (AzureStocker) PrintStock

func (s AzureStocker) PrintStock()

PrintStock prints by stdout the account object belongs to this stocker

type GCPStocker

type GCPStocker struct {
	Account inventory.Account
	// contains filtered or unexported fields
}

GCPStocker object to make stock on GCP

func NewGCPStocker

func NewGCPStocker(account inventory.Account, logger *zap.Logger) *GCPStocker

NewGCPStocker create and returns a pointer to a new GCPStocker instance

func (GCPStocker) GetResults

func (s GCPStocker) GetResults() inventory.Account

GetResults resturns the scanned results on this stocker instance

func (GCPStocker) MakeStock

func (s GCPStocker) MakeStock() error

MakeStock Scans GCP cloud accounts

func (GCPStocker) PrintStock

func (s GCPStocker) PrintStock()

PrintStock prints by stdout the account object belongs to this stocker

type Stocker

type Stocker interface {
	MakeStock() error
	PrintStock()
	GetResults() inventory.Account
}

Stocker interface

Jump to

Keyboard shortcuts

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