snowflake

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ErrSystem errors.ErrorCode = "System"
)

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(cfg *Config) error

Types

type Config

type Config struct {
	// WebAPI defines config for the base WebAPI plugin
	WebAPI webapi.PluginConfig `json:"webApi" pflag:",Defines config for the base WebAPI plugin."`

	// ResourceConstraints defines resource constraints on how many executions to be created per project/overall at any given time
	ResourceConstraints core.ResourceConstraintsSpec `` /* 141-byte string literal not displayed */

	DefaultWarehouse string `` /* 127-byte string literal not displayed */

	TokenKey string `json:"snowflakeTokenKey" pflag:",Name of the key where to find Snowflake token in the secret manager."`
	// contains filtered or unexported fields
}

Config is config for 'snowflake' plugin

func GetConfig

func GetConfig() *Config

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

for mocking/testing purposes, and we'll override this method

type Plugin

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

func (Plugin) Delete

func (p Plugin) Delete(ctx context.Context, taskCtx webapi.DeleteContext) error

func (Plugin) Get

func (p Plugin) Get(ctx context.Context, taskCtx webapi.GetContext) (latest webapi.Resource, err error)

func (Plugin) GetConfig

func (p Plugin) GetConfig() webapi.PluginConfig

func (Plugin) ResourceRequirements

func (p Plugin) ResourceRequirements(_ context.Context, _ webapi.TaskExecutionContextReader) (
	namespace core.ResourceNamespace, constraints core.ResourceConstraintsSpec, err error)

func (Plugin) Status

func (p Plugin) Status(_ context.Context, taskCtx webapi.StatusContext) (phase core.PhaseInfo, err error)

type QueryInfo

type QueryInfo struct {
	Account   string
	Warehouse string
	Schema    string
	Database  string
	Statement string
}

type ResourceMetaWrapper

type ResourceMetaWrapper struct {
	QueryID string
	Account string
	Token   string
}

type ResourceWrapper

type ResourceWrapper struct {
	StatusCode int
	Message    string
}

Jump to

Keyboard shortcuts

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