azurerm

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "azurerm"

ProviderName is the provider that this package implements

View Source
const RegistryName = "registry.terraform.io/hashicorp/azurerm"

RegistryName is the fully qualified name under which this provider is stored in the registry.

Variables

View Source
var (
	// ErrNotSupportedService reports that the service is not supported
	ErrNotSupportedService = errors.New("not supported service")
)
View Source
var TerraformProviderInitializer = terraform.ProviderInitializer{
	MatchNames: []string{ProviderName, RegistryName},
	Provider: func(values map[string]interface{}) (terraform.Provider, error) {
		return azurermtf.NewProvider(ProviderName)
	},
}

TerraformProviderInitializer is a terraform.ProviderInitializer that initializes the default GCP provider.

Functions

func DefaultFilter

func DefaultFilter(_ *price.WithProduct) bool

DefaultFilter ingests all the records without filtering.

func MinimalFilter

func MinimalFilter(pp *price.WithProduct) bool

MinimalFilter only ingests the supported records, skipping those that would never be used.

func ServiceStrings

func ServiceStrings() []string

ServiceStrings returns a slice of all String values of the enum

Types

type Ingester

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

Ingester is the entity that will manage the ingestion process from AzureRM

func NewIngester

func NewIngester(ctx context.Context, service, region string, opts ...Option) (*Ingester, error)

NewIngester returns a new Ingester for AzureRM for the specified service and region (ex: francecentral) with the given options

func (*Ingester) Err

func (ing *Ingester) Err() error

Err returns any error that might have happened during the ingestion.

func (*Ingester) Ingest

func (ing *Ingester) Ingest(ctx context.Context, chSize int) <-chan *price.WithProduct

Ingest will initialize the process of ingesting and it'll push the price.WithProduct found to the returned channel

type IngestionFilter

type IngestionFilter func(pp *price.WithProduct) bool

IngestionFilter allows control over what pricing data is ingested. Given a price.WithProduct the function returns true if the record should be ingested, false if it should be skipped.

type Option

type Option func(ing *Ingester)

Option is used to configure the Ingester.

func WithEndpoint

func WithEndpoint(endpoint string) Option

WithEndpoint sets a custom endpoint to user for the api calls

func WithIngestionFilter

func WithIngestionFilter(filter IngestionFilter) Option

WithIngestionFilter sets a custom IngestionFilter to control which pricing data records should be ingested.

type Service

type Service uint8

Service is the type defining the services

const (
	VirtualMachines Service = iota // Virtual Machines
)

List of all the supported services

func ServiceString

func ServiceString(s string) (Service, error)

ServiceString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ServiceValues

func ServiceValues() []Service

ServiceValues returns all values of the enum

func (Service) IsAService

func (i Service) IsAService() bool

IsAService returns "true" if the value is listed in the enum definition. "false" otherwise

func (Service) String

func (i Service) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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