datasource

package
v0.31.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDatasourceID

func GetDatasourceID(ctx context.Context) int64

func GetDatasourceLastUpdatedTime added in v0.17.0

func GetDatasourceLastUpdatedTime(ctx context.Context) string

Types

type AWSClient added in v0.26.0

type AWSClient interface {
	Init(config backend.DataSourceInstanceSettings)
	GetDB(ctx context.Context, id int64, options sqlds.Options) (*sql.DB, error)
	GetAsyncDB(ctx context.Context, id int64, options sqlds.Options) (awsds.AsyncDB, error)
	GetAPI(ctx context.Context, id int64, options sqlds.Options) (api.AWSAPI, error)
}

AWSClient provides creation and caching of sessions, database connections, and API clients

func New

func New(loader Loader) AWSClient

type Loader added in v0.26.0

type Loader interface {
	LoadSettings(context.Context) models.Settings
	LoadAPI(context.Context, *awsds.SessionCache, models.Settings) (api.AWSAPI, error)
	LoadDriver(context.Context, api.AWSAPI) (driver.Driver, error)
	LoadAsyncDriver(context.Context, api.AWSAPI) (asyncDriver.Driver, error)
}

Jump to

Keyboard shortcuts

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