internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualEnvironmentVariables

func EqualEnvironmentVariables(c, o ProjectEnvironmentVariable) bool

func NewVercelPlugin

func NewVercelPlugin() schema.MachComposerPlugin

Types

type GitRepository

type GitRepository struct {
	Type string `mapstructure:"type"`
	Repo string `mapstructure:"repo"`
}

type ProjectConfig

type ProjectConfig struct {
	Name                       string                       `mapstructure:"name"`
	Framework                  string                       `mapstructure:"framework"`
	ManualProductionDeployment bool                         `mapstructure:"manual_production_deployment"`
	ServerlessFunctionRegion   string                       `mapstructure:"serverless_function_region"`
	EnvironmentVariables       []ProjectEnvironmentVariable `mapstructure:"environment_variables"`
	GitRepository              GitRepository                `mapstructure:"git_repository"`
	BuildCommand               string                       `mapstructure:"build_command"`
	RootDirectory              string                       `mapstructure:"root_directory"`
	ProjectDomains             []ProjectDomain              `mapstructure:"domains"`
}

type ProjectDomain added in v0.2.0

type ProjectDomain struct {
	Domain             string `mapstructure:"domain"`
	GitBranch          string `mapstructure:"git_branch"`
	Redirect           string `mapstructure:"redirect"`
	RedirectStatusCode int64  `mapstructure:"redirect_status_code"`
}

type ProjectEnvironmentVariable

type ProjectEnvironmentVariable struct {
	Key         string   `mapstructure:"key"`
	Value       string   `mapstructure:"value"`
	Environment []string `mapstructure:"environment"`
}

func (*ProjectEnvironmentVariable) DisplayEnvironments

func (c *ProjectEnvironmentVariable) DisplayEnvironments() string

Returns a HCL-friendly version of the list of environments which are encapsulated by quotes and are comma separated

type VercelConfig

type VercelConfig struct {
	TeamID        string        `mapstructure:"team_id"`
	APIToken      string        `mapstructure:"api_token"`
	ProjectConfig ProjectConfig `mapstructure:"project_config"`
}

type VercelPlugin

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

func (*VercelPlugin) Configure

func (p *VercelPlugin) Configure(environment string, provider string) error

func (*VercelPlugin) GetValidationSchema added in v0.0.4

func (p *VercelPlugin) GetValidationSchema() (*schema.ValidationSchema, error)

func (*VercelPlugin) RenderTerraformComponent

func (p *VercelPlugin) RenderTerraformComponent(site string, component string) (*schema.ComponentSchema, error)

func (*VercelPlugin) RenderTerraformProviders

func (p *VercelPlugin) RenderTerraformProviders(site string) (string, error)

func (*VercelPlugin) RenderTerraformResources

func (p *VercelPlugin) RenderTerraformResources(site string) (string, error)

func (*VercelPlugin) RenderTerraformStateBackend

func (p *VercelPlugin) RenderTerraformStateBackend(site string) (string, error)

func (*VercelPlugin) SetGlobalConfig

func (p *VercelPlugin) SetGlobalConfig(data map[string]any) error

func (*VercelPlugin) SetSiteComponentConfig added in v0.0.6

func (p *VercelPlugin) SetSiteComponentConfig(site string, component string, data map[string]any) error

Set config for a combination of site and component.

func (*VercelPlugin) SetSiteConfig

func (p *VercelPlugin) SetSiteConfig(site string, data map[string]any) error

Jump to

Keyboard shortcuts

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