config

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DefaultEnvironmentName  string                 `yaml:"default_environment"`
	SelectedEnvironmentName string                 `yaml:"-"`
	SelectedEnvironment     *Environment           `yaml:"-"`
	Environments            map[string]Environment `yaml:"environments"`
	// contains filtered or unexported fields
}

func LoadFromFile

func LoadFromFile(fs afero.Fs, path string) (*Config, error)

func LoadOrCreate

func LoadOrCreate(fs afero.Fs, path string) (*Config, error)

func (*Config) Persist

func (c *Config) Persist() error

func (*Config) PersistToFs

func (c *Config) PersistToFs(fs afero.Fs) error

func (*Config) SelectEnvironment

func (c *Config) SelectEnvironment(name string) error

type Connections

type Connections struct {
	GoogleCloudPlatform []GoogleCloudPlatformConnection `yaml:"google_cloud_platform"`
	Snowflake           []SnowflakeConnection
}

type Environment

type Environment struct {
	Connections Connections `yaml:"connections"`
}

type GoogleCloudPlatformConnection

type GoogleCloudPlatformConnection struct {
	Name               string `yaml:"name"`
	ServiceAccountJSON string `yaml:"service_account_json"`
	ServiceAccountFile string `yaml:"service_account_file"`
	ProjectID          string `yaml:"project_id"`
	// contains filtered or unexported fields
}

func (*GoogleCloudPlatformConnection) GetCredentials

func (c *GoogleCloudPlatformConnection) GetCredentials() *google.Credentials

func (*GoogleCloudPlatformConnection) SetCredentials

func (c *GoogleCloudPlatformConnection) SetCredentials(cred *google.Credentials)

type Manager

type Manager struct{}

type SnowflakeConnection

type SnowflakeConnection struct {
	Name      string `yaml:"name"`
	Account   string `yaml:"account"`
	Username  string `yaml:"username"`
	Password  string `yaml:"password"`
	Region    string `yaml:"region"`
	Role      string `yaml:"role"`
	Database  string `yaml:"database"`
	Schema    string `yaml:"schema"`
	Warehouse string `yaml:"warehouse"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL