client

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitInstance

func InitInstance(timeout time.Duration)

Types

type Client

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

func GetInstance

func GetInstance() *Client

func New

func New(timeout time.Duration) *Client

func (*Client) CreateDataContainer

func (c *Client) CreateDataContainer(token string, baseUrl string, namespace string, dataSource string, name string, spec map[string]any) error

func (*Client) CreateDataSource

func (c *Client) CreateDataSource(token string, baseUrl string, namespace string, name string, typeStr string, spec map[string]any) error

func (*Client) CreateNamespace

func (c *Client) CreateNamespace(token string, baseUrl string, name string) error

func (*Client) CreateSql

func (c *Client) CreateSql(token string, baseUrl string, namespace string, dataSource string, name string, spec map[string]any) error

func (*Client) DeleteDataContainer

func (c *Client) DeleteDataContainer(token string, baseUrl string, namespace string, dataSource string, name string) error

func (*Client) DeleteDataSource

func (c *Client) DeleteDataSource(token string, baseUrl string, namespace string, name string) error

func (*Client) DeleteNamespace

func (c *Client) DeleteNamespace(token string, baseUrl string, name string) error

func (*Client) DeleteSql

func (c *Client) DeleteSql(token string, baseUrl string, namespace string, dataSource string, name string) error

func (*Client) DeleteToken

func (c *Client) DeleteToken(token string, baseUrl string, name string) error

func (*Client) ExecuteRawSql

func (c *Client) ExecuteRawSql(token string, baseUrl string,
	namespace string, dataSource string, sql string, executeParams map[string]any) ([]map[string]any, error)

func (*Client) ExecuteSql

func (c *Client) ExecuteSql(token string, baseUrl string,
	namespace string, dataSource string, name string, executeParams map[string]any) ([]map[string]any, error)

func (*Client) GenerateToken

func (c *Client) GenerateToken(token string, baseUrl string, name string) (string, error)

func (*Client) GetDataContainers

func (c *Client) GetDataContainers(token string, baseUrl string, namespace string, dataSource string, name string, pageNo int, pageSize int) ([]DataContainerInfo, error)

func (*Client) GetDataSourceSpec added in v0.2.14

func (c *Client) GetDataSourceSpec(token string, baseUrl string, namespace string, name string) (string, error)

func (*Client) GetDataSources

func (c *Client) GetDataSources(token string, baseUrl string, namespace string, name string, typeStr string, pageNo int, pageSize int) ([]DataSourceInfo, error)

func (*Client) GetExecuteSqlLogs added in v0.1.4

func (c *Client) GetExecuteSqlLogs(token string, baseUrl string, namespace string, dataSource string,
	executor string, startExecuteTime string, endExecuteTime string, pageNo int, pageSize int) ([]ExecuteSqlLogInfo, error)

func (*Client) GetNamespaces

func (c *Client) GetNamespaces(token string, baseUrl string, name string, pageNo int, pageSize int) ([]NamespaceInfo, error)

func (*Client) GetSqls

func (c *Client) GetSqls(token string, baseUrl string, namespace string, dataSource string, name string, pageNo int, pageSize int) ([]SqlInfo, error)

func (*Client) GetTokens

func (c *Client) GetTokens(token string, baseUrl string, name string, pageNo int, pageSize int) ([]TokenInfo, error)

func (*Client) ParseSqlSpec

func (c *Client) ParseSqlSpec(token string, baseUrl string, spec map[string]any, executeParams map[string]any) (string, error)

func (*Client) Version

func (c *Client) Version(baseUrl string) error

type DataContainerInfo

type DataContainerInfo struct {
	Namespace   string `json:"namespace"`
	DataSource  string `json:"dataSource"`
	Name        string `json:"name"`
	Spec        string `json:"spec"`
	Creator     string `json:"creator"`
	CreatedTime string `json:"createdTime"`
}

type DataSourceInfo

type DataSourceInfo struct {
	Namespace   string `json:"namespace"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	Spec        string `json:"spec"`
	Creator     string `json:"creator"`
	CreatedTime string `json:"createdTime"`
}

type ExecuteSqlLogInfo added in v0.1.4

type ExecuteSqlLogInfo struct {
	Namespace   string `json:"namespace"`
	DataSource  string `json:"dataSource"`
	SQL         string `json:"sql"`
	Executor    string `json:"executor"`
	ExecuteTime string `json:"executeTime"`
}

type NamespaceInfo

type NamespaceInfo struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Creator     string `json:"creator"`
	CreatedTime string `json:"createdTime"`
}

type SqlInfo

type SqlInfo struct {
	Namespace   string `json:"namespace"`
	DataSource  string `json:"dataSource"`
	Name        string `json:"name"`
	Spec        string `json:"spec"`
	Creator     string `json:"creator"`
	CreatedTime string `json:"createdTime"`
}

type TokenInfo

type TokenInfo struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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