Documentation
¶
Index ¶
- Constants
- func GetNetlifyConfigPath(base string) (path string, err error)
- func Save(conf *NetlifyToml) error
- func SaveTo(conf *NetlifyToml, path string) error
- type BuildConfig
- type DeployContext
- type FoundMoreThanOneConfigPathError
- type FoundNoConfigPathError
- type NetlifyToml
- type Plugin
- type Redirect
- type RedirectCondition
- type Settings
Constants ¶
View Source
const DefaultFilename = "netlify.toml"
Variables ¶
This section is empty.
Functions ¶
func GetNetlifyConfigPath ¶
func Save ¶
func Save(conf *NetlifyToml) error
func SaveTo ¶
func SaveTo(conf *NetlifyToml, path string) error
Types ¶
type BuildConfig ¶
type BuildConfig struct { Command string `toml:"command" json:"command" yaml:"command"` Base string `toml:"base" json:"base" yaml:"base"` Publish string `toml:"publish" json:"publish" yaml:"publish"` Ignore string `toml:"ignore" json:"ignore" yaml:"ignore"` Environment map[string]string `toml:"environment" json:"environment" yaml:"environment"` Functions string `toml:"functions" json:"functions" yaml:"functions"` EdgeHandlers string `toml:"edge_handlers" json:"edge_handlers" yaml:"edge_handlers"` }
type DeployContext ¶
type DeployContext struct {
BuildConfig `yaml:",inline"`
}
type FoundMoreThanOneConfigPathError ¶
type FoundMoreThanOneConfigPathError struct {
// contains filtered or unexported fields
}
func (*FoundMoreThanOneConfigPathError) Error ¶
func (f *FoundMoreThanOneConfigPathError) Error() string
type FoundNoConfigPathError ¶
type FoundNoConfigPathError struct {
// contains filtered or unexported fields
}
func (*FoundNoConfigPathError) Error ¶
func (f *FoundNoConfigPathError) Error() string
type NetlifyToml ¶
type NetlifyToml struct { Settings Settings `toml:"settings" json:"settings" yaml:"settings"` Redirects []Redirect `toml:"redirects,omitempty" json:"redirects,omitempty" yaml:"redirects,omitempty"` // this is the default context Build *BuildConfig `toml:"build" json:"build" yaml:"build"` Plugins []Plugin `toml:"plugins" json:"plugins" yaml:"plugins"` Context map[string]DeployContext `toml:"context,omitempty" json:"context,omitempty" yaml:"context,omitempty"` }
func Load ¶
func Load() (*NetlifyToml, error)
func LoadFrom ¶
func LoadFrom(paths ...string) (*NetlifyToml, error)
type Redirect ¶
type Redirect struct { Origin string `toml:"origin" json:"origin" yaml:"origin"` Destination string `toml:"destination" json:"destination" yaml:"destination"` Parmeters map[string]string `toml:"parameters" json:"parameters" yaml:"parameters"` Status int `toml:"status" json:"status" yaml:"status"` Force bool `toml:"force" json:"force" yaml:"force"` Conditions *RedirectCondition `toml:"conditions" json:"conditions" yaml:"conditions"` Headers map[string]string `toml:"headers" json:"headers" yaml:"headers"` }
type RedirectCondition ¶
Click to show internal directories.
Click to hide internal directories.