Documentation
¶
Overview ¶
Package config provides functionality for working with the sidekick.toml configuration file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllSourceRoots ¶
func SourceRoots ¶
func UpdateRootConfig ¶
func WriteSidekickToml ¶
Types ¶
type Config ¶
type Config struct { General GeneralConfig `toml:"general"` Source map[string]string `toml:"source,omitempty"` Codec map[string]string `toml:"codec,omitempty"` CommentOverrides []DocumentationOverride `toml:"documentation-overrides,omitempty"` // Gcloud is used to pass data into gcloud.Generate. It does not use the // normal .sidekick.toml file, but instead reads a gcloud.yaml file. Gcloud *gcloudyaml.Config }
func LoadConfig ¶
LoadConfig loads the top-level configuration file and validates its contents. If no top-level file is found, falls back to the default configuration. Where applicable, overrides the top level (or default) configuration values with the ones passed in the command line. Returns the merged configuration, or an error if the top level configuration is invalid.
func LoadRootConfig ¶
type DocumentationOverride ¶
type DocumentationOverride struct { ID string `toml:"id"` Match string `toml:"match"` Replace string `toml:"replace"` }
Describe overrides for the documentation of a single element.
This should be used sparingly. Generally we should prefer updating the comments upstream, and then getting a new version of the services specification. The exception may be when the fixes take a long time, or are specific to one language.
type GeneralConfig ¶
type GeneralConfig struct { Language string `toml:"language,omitempty"` SpecificationFormat string `toml:"specification-format,omitempty"` SpecificationSource string `toml:"specification-source,omitempty"` ServiceConfig string `toml:"service-config,omitempty"` }
Configuration parameters that affect Parsers and Codecs, including the selection of parser and codec.