Documentation
¶
Index ¶
Constants ¶
const FilePermissions = 0666
FilePermissions represents a read/write file mode.
const Filename = "fastly.toml"
Filename is the name of the package manifest file. It is expected to be a project specific configuration file.
const ManifestLatestVersion = 1
ManifestLatestVersion represents the latest known manifest schema version supported by the CLI.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
Data holds global-ish manifest data from manifest files, and flag sources. It has methods to give each parameter to the components that need it, including the place the parameter came from, which is a requirement.
If the same parameter is defined in multiple places, it is resolved according to the following priority order: the manifest file (lowest priority) and then explicit flags (highest priority).
func (*Data) Description ¶ added in v0.16.0
Description yields a Description.
type File ¶
type File struct { ManifestVersion Version `toml:"manifest_version"` Name string `toml:"name"` Description string `toml:"description"` Authors []string `toml:"authors"` Language string `toml:"language"` ServiceID string `toml:"service_id"` // contains filtered or unexported fields }
File represents all of the configuration parameters in the fastly.toml manifest file schema.
type Flag ¶
Flag represents all of the manifest parameters that can be set with explicit flags. Consumers should bind their flag values to these fields directly.
type Source ¶
type Source uint8
Source enumerates where a manifest parameter is taken from.
const ( // SourceUndefined indicates the parameter isn't provided in any of the // available sources, similar to "not found". SourceUndefined Source = iota // SourceFile indicates the parameter came from a manifest file. SourceFile // SourceFlag indicates the parameter came from an explicit flag. SourceFlag )
type Version ¶ added in v0.25.0
type Version int
Version represents the currently supported schema for the fastly.toml manifest file that determines the configuration for a compute@edge service.
NOTE: the File object has a field called ManifestVersion which this type is assigned. The reason we don't name this type ManifestVersion is to appease the static analysis linter which complains re: stutter in the import manifest.ManifestVersion.
func (*Version) UnmarshalText ¶ added in v0.25.0
UnmarshalText manages multiple scenarios where historically the manifest version was a string value and not an integer.
Example mappings:
"0.1.0" -> 1 "1" -> 1 1 -> 1 "1.0.0" -> 1 0.1 -> 1 "0.2.0" -> 1 "2.0.0" -> 2
We also constrain the version so that if a user has a manifest_version defined as "99.0.0" then we won't accidentally store it as the integer 99 but instead will return an error because it exceeds the current ManifestLatestVersion version of 1.