config

package
v0.11.35 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdjustConnection added in v0.11.30

type AdjustConnection struct {
	Name   string `yaml:"name" json:"name" mapstructure:"name"`
	APIKey string `yaml:"api_key" json:"api_key" mapstructure:"api_key"`
}

func (AdjustConnection) GetName added in v0.11.30

func (c AdjustConnection) GetName() string

type AppsflyerConnection added in v0.11.35

type AppsflyerConnection struct {
	Name   string `yaml:"name" json:"name" mapstructure:"name"`
	ApiKey string `yaml:"api_key" json:"api_key" mapstructure:"api_key"`
}

func (AppsflyerConnection) GetName added in v0.11.35

func (c AppsflyerConnection) GetName() string

type AthenaConnection added in v0.11.21

type AthenaConnection struct {
	Name             string `yaml:"name" json:"name" mapstructure:"name"`
	AccessKey        string `yaml:"access_key" json:"access_key" mapstructure:"access_key"`
	SecretKey        string `yaml:"secret_key" json:"secret_key" mapstructure:"secret_key"`
	QueryResultsPath string `yaml:"query_results_path" json:"query_results_path" mapstructure:"query_results_path"`
	Region           string `yaml:"region" json:"region" mapstructure:"region"`
	Database         string `yaml:"database" json:"database" mapstructure:"database"`
}

func (AthenaConnection) GetName added in v0.11.22

func (c AthenaConnection) GetName() string

type AwsConnection added in v0.11.20

type AwsConnection struct {
	Name      string `yaml:"name" json:"name" mapstructure:"name"`
	AccessKey string `yaml:"access_key" json:"access_key" mapstructure:"access_key"`
	SecretKey string `yaml:"secret_key" json:"secret_key" mapstructure:"secret_key"`
}

func (AwsConnection) GetName added in v0.11.22

func (c AwsConnection) GetName() string

type Config

type Config struct {
	DefaultEnvironmentName  string                 `yaml:"default_environment" json:"default_environment_name" mapstructure:"default_environment_name"`
	SelectedEnvironmentName string                 `yaml:"-" json:"selected_environment_name" mapstructure:"selected_environment_name"`
	SelectedEnvironment     *Environment           `yaml:"-" json:"selected_environment" mapstructure:"selected_environment"`
	Environments            map[string]Environment `yaml:"environments" json:"environments" mapstructure:"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) AddConnection added in v0.11.22

func (c *Config) AddConnection(environmentName, name, connType string, creds map[string]interface{}) error

func (*Config) DeleteConnection added in v0.11.22

func (c *Config) DeleteConnection(environmentName, connectionName string) error

func (*Config) GetEnvironmentNames added in v0.11.4

func (c *Config) GetEnvironmentNames() []string

func (*Config) GetSecretByKey

func (c *Config) GetSecretByKey(key string) (string, 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 {
	AwsConnection       []AwsConnection                 `yaml:"aws,omitempty" json:"aws,omitempty" mapstructure:"aws"`
	AthenaConnection    []AthenaConnection              `yaml:"athena,omitempty" json:"athena,omitempty" mapstructure:"athena"`
	GoogleCloudPlatform []GoogleCloudPlatformConnection `yaml:"google_cloud_platform,omitempty" json:"google_cloud_platform,omitempty" mapstructure:"google_cloud_platform"`
	Snowflake           []SnowflakeConnection           `yaml:"snowflake,omitempty" json:"snowflake,omitempty" mapstructure:"snowflake"`
	Postgres            []PostgresConnection            `yaml:"postgres,omitempty" json:"postgres,omitempty" mapstructure:"postgres"`
	RedShift            []PostgresConnection            `yaml:"redshift,omitempty" json:"redshift,omitempty" mapstructure:"redshift"`
	MsSQL               []MsSQLConnection               `yaml:"mssql,omitempty" json:"mssql,omitempty" mapstructure:"mssql"`
	Databricks          []DatabricksConnection          `yaml:"databricks,omitempty" json:"databricks,omitempty" mapstructure:"databricks"`
	Synapse             []MsSQLConnection               `yaml:"synapse,omitempty" json:"synapse,omitempty" mapstructure:"synapse"`
	Mongo               []MongoConnection               `yaml:"mongo,omitempty" json:"mongo,omitempty" mapstructure:"mongo"`
	MySQL               []MySQLConnection               `yaml:"mysql,omitempty" json:"mysql,omitempty" mapstructure:"mysql"`
	Notion              []NotionConnection              `yaml:"notion,omitempty" json:"notion,omitempty" mapstructure:"notion"`
	HANA                []HANAConnection                `yaml:"hana,omitempty" json:"hana,omitempty" mapstructure:"hana"`
	Shopify             []ShopifyConnection             `yaml:"shopify,omitempty" json:"shopify,omitempty" mapstructure:"shopify"`
	Gorgias             []GorgiasConnection             `yaml:"gorgias,omitempty" json:"gorgias,omitempty" mapstructure:"gorgias"`
	Klaviyo             []KlaviyoConnection             `yaml:"klaviyo,omitempty" json:"klaviyo,omitempty" mapstructure:"klaviyo"`
	Adjust              []AdjustConnection              `yaml:"adjust,omitempty" json:"adjust,omitempty" mapstructure:"adjust"`
	Generic             []GenericConnection             `yaml:"generic,omitempty" json:"generic,omitempty" mapstructure:"generic"`
	FacebookAds         []FacebookAdsConnection         `yaml:"facebookads,omitempty" json:"facebookads,omitempty" mapstructure:"facebookads"`
	Stripe              []StripeConnection              `yaml:"stripe,omitempty" json:"stripe,omitempty" mapstructure:"stripe"`
	Appsflyer           []AppsflyerConnection           `yaml:"appsflyer,omitempty" json:"appsflyer,omitempty" mapstructure:"appsflyer"`
	// contains filtered or unexported fields
}

func (*Connections) ConnectionsSummaryList added in v0.11.22

func (c *Connections) ConnectionsSummaryList() map[string]string

func (*Connections) Exists added in v0.11.22

func (c *Connections) Exists(name string) bool

type DatabricksConnection added in v0.11.20

type DatabricksConnection struct {
	Name    string `yaml:"name"  json:"name" mapstructure:"name"`
	Token   string `yaml:"token" json:"token" mapstructure:"token"`
	Path    string `yaml:"path"  json:"path" mapstructure:"path"`
	Host    string `yaml:"host"  json:"host" mapstructure:"host"`
	Port    int    `yaml:"port"  json:"port" mapstructure:"port"`
	Catalog string `yaml:"catalog"  json:"catalog" mapstructure:"catalog"`
	Schema  string `yaml:"schema"  json:"schema" mapstructure:"schema"`
}

func (DatabricksConnection) GetName added in v0.11.22

func (c DatabricksConnection) GetName() string

type Environment

type Environment struct {
	Connections *Connections `yaml:"connections" json:"connections" mapstructure:"connections"`
}

func (*Environment) GetSecretByKey

func (e *Environment) GetSecretByKey(key string) (string, error)

type FacebookAdsConnection added in v0.11.30

type FacebookAdsConnection struct {
	Name        string `yaml:"name" json:"name" mapstructure:"name"`
	AccessToken string `yaml:"access_token" json:"access_token" mapstructure:"access_token"`
	AccountID   string `yaml:"account_id" json:"account_id" mapstructure:"account_id"`
}

func (FacebookAdsConnection) GetName added in v0.11.30

func (c FacebookAdsConnection) GetName() string

type GenericConnection

type GenericConnection struct {
	Name  string `yaml:"name" json:"name" mapstructure:"name"`
	Value string `yaml:"value" json:"value" mapstructure:"value"`
}

func (GenericConnection) GetName added in v0.11.22

func (c GenericConnection) GetName() string

func (GenericConnection) MarshalJSON

func (c GenericConnection) MarshalJSON() ([]byte, error)

type GoogleCloudPlatformConnection

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

func (*GoogleCloudPlatformConnection) GetCredentials

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

func (GoogleCloudPlatformConnection) GetName added in v0.11.22

func (GoogleCloudPlatformConnection) MarshalJSON

func (c GoogleCloudPlatformConnection) MarshalJSON() ([]byte, error)

func (GoogleCloudPlatformConnection) MarshalYAML added in v0.11.22

func (c GoogleCloudPlatformConnection) MarshalYAML() (interface{}, error)

func (*GoogleCloudPlatformConnection) SetCredentials

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

type GorgiasConnection added in v0.11.5

type GorgiasConnection struct {
	Name   string `yaml:"name" json:"name" mapstructure:"name"`
	Domain string `yaml:"domain" json:"domain" mapstructure:"domain"`
	APIKey string `yaml:"api_key" json:"api_key" mapstructure:"api_key"`
	Email  string `yaml:"email" json:"email" mapstructure:"email"`
}

func (GorgiasConnection) GetName added in v0.11.22

func (c GorgiasConnection) GetName() string

type HANAConnection added in v0.8.2

type HANAConnection struct {
	Name     string `yaml:"name" json:"name" mapstructure:"name"`
	Username string `yaml:"username" json:"username" mapstructure:"username"`
	Password string `yaml:"password" json:"password" mapstructure:"password"`
	Host     string `yaml:"host"     json:"host" mapstructure:"host"`
	Port     int    `yaml:"port"     json:"port" mapstructure:"port"`
	Database string `yaml:"database" json:"database" mapstructure:"database"`
}

func (HANAConnection) GetName added in v0.11.22

func (c HANAConnection) GetName() string

type KlaviyoConnection added in v0.11.26

type KlaviyoConnection struct {
	Name   string `yaml:"name" json:"name" mapstructure:"name"`
	APIKey string `yaml:"api_key" json:"api_key" mapstructure:"api_key"`
}

func (KlaviyoConnection) GetName added in v0.11.26

func (c KlaviyoConnection) GetName() string

type MongoConnection added in v0.7.2

type MongoConnection struct {
	Name     string `yaml:"name" json:"name" mapstructure:"name"`
	Username string `yaml:"username" json:"username" mapstructure:"username"`
	Password string `yaml:"password" json:"password" mapstructure:"password"`
	Host     string `yaml:"host"     json:"host" mapstructure:"host"`
	Port     int    `yaml:"port"     json:"port" mapstructure:"port"`
	Database string `yaml:"database" json:"database" mapstructure:"database"`
}

func (MongoConnection) GetName added in v0.11.22

func (c MongoConnection) GetName() string

type MsSQLConnection added in v0.5.6

type MsSQLConnection struct {
	Name     string `yaml:"name" json:"name" mapstructure:"name"`
	Username string `yaml:"username" json:"username" mapstructure:"username"`
	Password string `yaml:"password" json:"password" mapstructure:"password"`
	Host     string `yaml:"host"     json:"host" mapstructure:"host"`
	Port     int    `yaml:"port"     json:"port" mapstructure:"port"`
	Database string `yaml:"database" json:"database" mapstructure:"database"`
}

func (MsSQLConnection) GetName added in v0.11.22

func (c MsSQLConnection) GetName() string

type MySQLConnection added in v0.7.8

type MySQLConnection struct {
	Name     string `yaml:"name" json:"name" mapstructure:"name"`
	Username string `yaml:"username" json:"username" mapstructure:"username"`
	Password string `yaml:"password" json:"password" mapstructure:"password"`
	Host     string `yaml:"host"     json:"host" mapstructure:"host"`
	Port     int    `yaml:"port"     json:"port" mapstructure:"port"`
	Database string `yaml:"database" json:"database" mapstructure:"database"`
	Driver   string `yaml:"driver" json:"driver" mapstructure:"driver"`
}

func (MySQLConnection) GetName added in v0.11.22

func (c MySQLConnection) GetName() string

type Named added in v0.11.22

type Named interface {
	GetName() string
}

type NotionConnection added in v0.7.9

type NotionConnection struct {
	Name   string `yaml:"name" json:"name" mapstructure:"name"`
	APIKey string `yaml:"api_key" json:"api_key" mapstructure:"api_key"`
}

func (NotionConnection) GetName added in v0.11.22

func (c NotionConnection) GetName() string

type PostgresConnection added in v0.5.0

type PostgresConnection struct {
	Name         string `yaml:"name" json:"name" mapstructure:"name"`
	Username     string `yaml:"username" json:"username" mapstructure:"username"`
	Password     string `yaml:"password" json:"password" mapstructure:"password"`
	Host         string `yaml:"host" json:"host" mapstructure:"host"`
	Port         int    `yaml:"port" json:"port" mapstructure:"port"`
	Database     string `yaml:"database" json:"database" mapstructure:"database"`
	Schema       string `yaml:"schema" json:"schema" mapstructure:"schema"`
	PoolMaxConns int    `yaml:"pool_max_conns" json:"pool_max_conns" mapstructure:"pool_max_conns" default:"10"`
	SslMode      string `yaml:"ssl_mode" json:"ssl_mode" mapstructure:"ssl_mode" default:"disable"`
}

func (PostgresConnection) GetName added in v0.11.22

func (c PostgresConnection) GetName() string

type ShopifyConnection added in v0.11.5

type ShopifyConnection struct {
	Name   string `yaml:"name" json:"name" mapstructure:"name"`
	URL    string `yaml:"url" json:"url" mapstructure:"url"`
	APIKey string `yaml:"api_key" json:"api_key" mapstructure:"api_key"`
}

func (ShopifyConnection) GetName added in v0.11.22

func (c ShopifyConnection) GetName() string

type SnowflakeConnection

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

func (SnowflakeConnection) GetName added in v0.11.22

func (c SnowflakeConnection) GetName() string

func (SnowflakeConnection) MarshalJSON

func (c SnowflakeConnection) MarshalJSON() ([]byte, error)

type StripeConnection added in v0.11.32

type StripeConnection struct {
	Name   string `yaml:"name" json:"name" mapstructure:"name"`
	APIKey string `yaml:"api_key" json:"api_key" mapstructure:"api_key"`
}

func (StripeConnection) GetName added in v0.11.32

func (c StripeConnection) GetName() string

Jump to

Keyboard shortcuts

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