inputs

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RandomProvider   = "random"
	AWSProvider      = "aws"
	AlicloudProvider = "alicloud"
)

Variables

This section is empty.

Functions

func GetProviderRegion added in v0.10.0

func GetProviderRegion(providerConfig *apiv1.ProviderConfig) string

GetProviderRegion returns the region of the terraform provider.

func GetProviderURL added in v0.10.0

func GetProviderURL(providerConfig *apiv1.ProviderConfig) (string, error)

GetProviderURL returns the complete provider address from provider config in workspace.

Types

type AppConfiguration

type AppConfiguration struct {
	// Name of the target Application.
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// Workload defines how to run your application code.
	Workload *workload.Workload `json:"workload" yaml:"workload"`
	// OpsRule specifies collection of rules that will be checked for Day-2 operation.
	OpsRule    *trait.OpsRule      `json:"opsRule,omitempty" yaml:"opsRule,omitempty"`
	Monitoring *monitoring.Monitor `json:"monitoring,omitempty" yaml:"monitoring,omitempty"`

	// Database defines a locally deployed or a cloud provider managed
	// database instance for the workload.
	Database map[string]*database.Database `json:"database,omitempty" yaml:"database,omitempty"`

	// Labels and annotations can be used to attach arbitrary metadata
	// as key-value pairs to resources.
	Labels      map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
}

AppConfiguration is a developer-centric definition that describes how to run an Application. This application model builds upon a decade of experience at AntGroup running super large scale internal developer platform, combined with best-of-breed ideas and practices from the community.

Example:

 import models.schema.v1 as ac
 import models.schema.v1.workload as wl
 import models.schema.v1.workload.container as c

	appConfiguration = ac.AppConfiguration {
	    workload: wl.Service {
	        containers: {
	            "nginx": c.Container {
	                image: "nginx:v1"
	            }
	        }
	    }
	}

type Provider

type Provider struct {
	// The complete provider address.
	URL string
	// The host of the provider registry.
	Host string
	// The namespace of the provider.
	Namespace string
	// The name of the provider.
	Name string
	// The version of the provider.
	Version string
}

Provider records the information of the Terraform provider used to provision cloud resources.

func (*Provider) SetString

func (provider *Provider) SetString(providerURL string) error

SetString sets the attributes into the provider object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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