discovery

package
v0.0.0-...-b9d5f24 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindResourceManagerServices

func FindResourceManagerServices(directory string, logger hclog.Logger) (*map[string]ResourceManagerService, error)

func FindServices

func FindServices(input FindServiceInput, terraformConfig definitions.Config) (*[]ServiceInput, error)

func FindServicesByName

func FindServicesByName(input FindServiceInput, terraformConfig definitions.Config, servicesToFind []string) (*[]ServiceInput, error)

func SwaggerFilesInDirectory

func SwaggerFilesInDirectory(directory string) (*[]string, error)

Types

type FindServiceInput

type FindServiceInput struct {
	ConfigFilePath   string
	OutputDirectory  string
	SwaggerDirectory string
	Logger           hclog.Logger
}

type ResourceManagerService

type ResourceManagerService struct {
	Name             string
	ApiVersionPaths  map[string][]string
	ResourceProvider string
}

type ResourceManagerServiceInput

type ResourceManagerServiceInput struct {
	ServiceName                string
	ApiVersion                 string
	OutputDirectoryJson        string
	ResourceProvider           *string
	ResourceProviderToFilterTo *string
	SwaggerDirectory           string
	SwaggerFiles               []string
	TerraformServiceDefinition *definitions.ServiceDefinition
}

ResourceManagerServiceInput provides a Resource Manager specific wrapper around a ServiceInput

func (ResourceManagerServiceInput) ToRunInput

func (rmi ResourceManagerServiceInput) ToRunInput() ServiceInput

type ServiceInput

type ServiceInput struct {
	// ServiceName is the name of the Service (e.g. `Compute`).
	ServiceName string

	// ApiVersion is the version of the API (e.g. `2020-10-01`).
	ApiVersion string

	// OutputDirectoryJson is the directory where the generated JSON files should be output.
	OutputDirectoryJson string

	// ResourceProvider is the ResourceProvider associated with this Service (for example `Microsoft.Compute`)
	// parsed from the Resource ID.
	ResourceProvider *string

	// ResourceProviderToFilterTo allows filtering the operations for the given Service/API Version to only
	// operations contained within this Resource Provider. Whilst the majority of the time this can be left
	// unset, some Services such as Network include operations from different Resource Providers which can
	// cause issues - as such this field can be conditionally set to remove unrelated operations.
	ResourceProviderToFilterTo *string

	// SwaggerDirectory is the path to the directory containing the Swagger/OpenAPI files for this Service/API Version.
	SwaggerDirectory string

	// SwaggerFiles is a list of the Swagger/OpenAPI files for this Service/API Version.
	SwaggerFiles []string

	// TerraformServiceDefinition defines the Terraform related details for this Service, used for Terraform
	// related processing/generation.
	TerraformServiceDefinition *definitions.ServiceDefinition
}

Jump to

Keyboard shortcuts

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