datasource

package
v0.0.0-...-228c16a Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedSourceKinds = []*datasourcepb.SourceKind{
	{Name: "MySQL"},
	{Name: "PostgreSQL"},
	{Name: "ClickHouse"},
	{Name: "Kafka"},
	{Name: "Hbase"},
	{Name: "Ftp"},
	{Name: "HDFS"},
}

Functions

func CreateConnection

func CreateConnection(tx *gorm.DB, info *model.DataSourceConnection) (err error)

func CreateDataSource

func CreateDataSource(tx *gorm.DB, info *model.DataSource) (err error)

CreateDataSource creates a new data source.

func DeleteConnectionBySourceIds

func DeleteConnectionBySourceIds(tx *gorm.DB, sourceIds []string) (err error)

func DeleteConnectionBySpaceIds

func DeleteConnectionBySpaceIds(tx *gorm.DB, spaceIds []string) (err error)

func DeleteDataSourceBySourceIds

func DeleteDataSourceBySourceIds(tx *gorm.DB, sourceIds []string) (err error)

DeleteDataSourceBySourceIds do batch deletes data source.

func DeleteDataSourceBySpaceIds

func DeleteDataSourceBySpaceIds(tx *gorm.DB, spaceIds []string) (err error)

DeleteDataSourceBySpaceIds delete all data source of the specified workspaces.

func DescribeDataSource

func DescribeDataSource(tx *gorm.DB, sourceId string) (info *model.DataSource, err error)

DescribeDataSource query the data source info by id.

func DescribeLastConnection

func DescribeLastConnection(tx *gorm.DB, sourceId string) (info *model.DataSourceConnection, err error)

DescribeLastConnection query the data source info by id.

func ListDataSourceConnections

func ListDataSourceConnections(tx *gorm.DB, input *request.ListDataSourceConnections) (output *response.ListDataSourceConnections, err error)

ListDataSourceConnections used to list data source by specified space_id

func ListDataSources

func ListDataSources(tx *gorm.DB, input *request.ListDataSources) (output *response.ListDataSources, err error)

ListDataSources used to list data source by specified space_id

func PingDataSourceConnection

func PingDataSourceConnection(ctx context.Context, sourceType model.DataSource_Type, sourceURL *model.DataSource_URL) (connInfo *model.DataSourceConnection, err error)

func UpdateDataSource

func UpdateDataSource(tx *gorm.DB, info *model.DataSource) (err error)

UpdateDataSource update the data source info.

func UpdateDataSourceStatus

func UpdateDataSourceStatus(tx *gorm.DB, sourceIds []string, status model.DataSource_Status) (err error)

UpdateDataSourceStatus do update the data source status.

Types

This section is empty.

Jump to

Keyboard shortcuts

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