Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
DefaultEnvironment string `yaml:"default_environment"`
Environments map[string]Environment `yaml:"environments"`
}
Config represents the .bruin.yml configuration file.
func (*Config) GetEnvironment ¶
func (c *Config) GetEnvironment(name string) (*Environment, error)
GetEnvironment returns the named environment, or the default one.
type Connection ¶
type Connection struct {
Name string `yaml:"name"`
// Extra holds all other fields (host, port, database, etc.).
Extra map[string]any `yaml:",inline"`
}
Connection is a generic connection entry. Different connection types have different fields, but they all share a name. We use a map for the rest since .bruin.yml supports dozens of connection types.
type Environment ¶
type Environment struct {
SchemaPrefix string `yaml:"schema_prefix,omitempty"`
Connections map[string][]Connection `yaml:"connections"`
}
func (*Environment) FindConnection ¶
func (e *Environment) FindConnection(name string) (*Connection, error)
FindConnection looks up a connection by name across all connection types in an environment.
Click to show internal directories.
Click to hide internal directories.