snowflake

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Account  string `envconfig:"SNOWFLAKE_ACCOUNT"`
	Username string `envconfig:"SNOWFLAKE_USERNAME"`
	Password string `envconfig:"SNOWFLAKE_PASSWORD"`
	Region   string `envconfig:"SNOWFLAKE_REGION"`
	Role     string `envconfig:"SNOWFLAKE_ROLE"`
	Database string `envconfig:"SNOWFLAKE_DATABASE"`
	Schema   string `envconfig:"SNOWFLAKE_SCHEMA"`
}

func LoadConfigFromEnv

func LoadConfigFromEnv() (*Config, error)

func (Config) DSN

func (c Config) DSN() (string, error)

func (Config) IsValid

func (c Config) IsValid() bool

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(c *Config, logger *zap.SugaredLogger) (*DB, error)

func (DB) IsValid

func (db DB) IsValid(ctx context.Context, query *query.Query) (bool, error)

Jump to

Keyboard shortcuts

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