internal

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 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 {
	ProductionBranch string `mapstructure:"production_branch"`
	Type             string `mapstructure:"type"`
	Repo             string `mapstructure:"repo"`
}

type PasswordProtection added in v0.6.0

type PasswordProtection struct {
	Password          string `mapstructure:"password"`
	ProtectProduction bool   `mapstructure:"protect_production"`
}

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"`
	IgnoreCommand                 string                       `mapstructure:"ignore_command"`
	RootDirectory                 string                       `mapstructure:"root_directory"`
	ProjectDomains                []ProjectDomain              `mapstructure:"domains"`
	ProtectionBypassForAutomation bool                         `mapstructure:"protection_bypass_for_automation"`
	PasswordProtection            PasswordProtection           `mapstructure:"password_protection"`
	VercelAuthentication          VercelAuthentication         `mapstructure:"vercel_authentication"`
}

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 VercelAuthentication added in v0.6.0

type VercelAuthentication struct {
	ProtectProduction bool `mapstructure:"protect_production"`
}

type VercelConfig

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

func NewVercelConfig added in v0.6.0

func NewVercelConfig() VercelConfig

Creates a new VercelConfig with default values

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