Documentation ¶
Index ¶
- Variables
- func AddToPath(newPaths ...string)
- func Cast[T any](m any) T
- func Contains[T any](list []T, elem any) bool
- func FromMap[T any](x map[string]any) *T
- func GetSubtaskNames(metas ...plugin.SubTaskMeta) []string
- func GetTestConfig[T any]() T
- func InitDB(dbUrl string)
- func IsWSL() bool
- func NormalizeBaseDirectory() (string, errors.Error)
- func SetTestConfig[T any](t T)
- func ToCleanJson(inline bool, x any) json.RawMessage
- func ToJson(x any) json.RawMessage
- func ToMap(x any) map[string]any
- func UseMySQL(host string, port int) string
- func UsePostgres(host string, port int) string
- func Val[T any](t T) *T
- type BlueprintV2Config
- type Connection
- type DevlakeClient
- func ConnectDevLakeServer(t *testing.T) *DevlakeClient
- func ConnectLocalServer(t *testing.T, clientConfig *LocalClientConfig) *DevlakeClient
- func ConnectRemoteServer(t *testing.T, clientConfig *RemoteClientConfig) *DevlakeClient
- func StartDevLakeServer(t *testing.T, loadedGoPlugins []plugin.PluginMeta) *DevlakeClient
- func (d *DevlakeClient) AwaitPluginAvailability(pluginName string, timeout time.Duration)
- func (d *DevlakeClient) CreateBasicBlueprintV2(name string, config *BlueprintV2Config) models.Blueprint
- func (d *DevlakeClient) CreateConnection(pluginName string, connection any) *Connection
- func (d *DevlakeClient) CreateProject(project *ProjectConfig) models.ApiOutputProject
- func (d *DevlakeClient) CreateScopeConfig(pluginName string, connectionId uint64, scopeConfig any) any
- func (d *DevlakeClient) CreateScopes(pluginName string, connectionId uint64, scopes ...any) any
- func (d *DevlakeClient) DeleteBlueprint(blueprintId uint64)
- func (d *DevlakeClient) DeleteConnection(pluginName string, connectionId uint64) services.BlueprintProjectPairs
- func (d *DevlakeClient) DeleteProject(projectName string)
- func (d *DevlakeClient) DeleteScope(pluginName string, connectionId uint64, scopeId string, deleteDataOnly bool) services.BlueprintProjectPairs
- func (d *DevlakeClient) DeleteScopeConfig(pluginName string, connectionId uint64, scopeConfigId uint64)
- func (d *DevlakeClient) GetBlueprint(blueprintId uint64) models.Blueprint
- func (d *DevlakeClient) GetDal() dal.Dal
- func (d *DevlakeClient) GetProject(projectName string) models.ApiOutputProject
- func (d *DevlakeClient) GetScope(pluginName string, connectionId uint64, scopeId string, listBlueprints bool) ScopeResponse
- func (d *DevlakeClient) GetScopeConfig(pluginName string, connectionId uint64, scopeConfigId uint64) any
- func (d *DevlakeClient) LastReturnedStatusCode() int
- func (d *DevlakeClient) ListBlueprints() blueprints.PaginatedBlueprint
- func (d *DevlakeClient) ListConnections(pluginName string) []*Connection
- func (d *DevlakeClient) ListProjects() apiProject.PaginatedProjects
- func (d *DevlakeClient) ListScopeConfigs(pluginName string, connectionId uint64) []any
- func (d *DevlakeClient) ListScopes(pluginName string, connectionId uint64, listBlueprints bool) []ScopeResponse
- func (d *DevlakeClient) PatchScopeConfig(pluginName string, connectionId uint64, scopeConfigId uint64, scopeConfig any) any
- func (d *DevlakeClient) RemoteScopes(query RemoteScopesQuery) RemoteScopesOutput
- func (d *DevlakeClient) RunPipeline(pipeline models.NewPipeline) models.Pipeline
- func (d *DevlakeClient) RunPlugin(ctx context.Context, pluginName string, pluginTask plugin.PluginTask, ...) errors.Error
- func (d *DevlakeClient) SearchRemoteScopes(query SearchRemoteScopesQuery) SearchRemoteScopesOutput
- func (d *DevlakeClient) SetExpectedStatusCode(code int) *DevlakeClient
- func (d *DevlakeClient) SetPipelineTimeout(timeout time.Duration)
- func (d *DevlakeClient) SetTimeout(timeout time.Duration)
- func (d *DevlakeClient) TestConnection(pluginName string, connection any)
- func (d *DevlakeClient) TriggerBlueprint(blueprintId uint64) models.Pipeline
- func (d *DevlakeClient) UpdateScope(pluginName string, connectionId uint64, scopeId string, scope any) any
- type LocalClientConfig
- type ProjectConfig
- type ProjectPlugin
- type RemoteClientConfig
- type RemoteScopesChild
- type RemoteScopesOutput
- type RemoteScopesQuery
- type ScopeResponse
- type SearchRemoteScopesOutput
- type SearchRemoteScopesQuery
Constants ¶
This section is empty.
Variables ¶
var ( ProjectRoot = "" Shell = "" )
Functions ¶
func GetSubtaskNames ¶
func GetSubtaskNames(metas ...plugin.SubTaskMeta) []string
GetSubtaskNames FIXME
func GetTestConfig ¶
func GetTestConfig[T any]() T
func InitDB ¶
func InitDB(dbUrl string)
InitDB Bootstraps the database by getting rid of all the tables
func NormalizeBaseDirectory ¶
func SetTestConfig ¶
func SetTestConfig[T any](t T)
Types ¶
type BlueprintV2Config ¶
type Connection ¶
type Connection struct { api.BaseConnection `mapstructure:",squash"` api.RestConnection `mapstructure:",squash"` api.AccessToken `mapstructure:",squash"` }
type DevlakeClient ¶
type DevlakeClient struct { Endpoint string // contains filtered or unexported fields }
DevlakeClient FIXME
func ConnectDevLakeServer ¶
func ConnectDevLakeServer(t *testing.T) *DevlakeClient
Connect to an existing DevLake server with default config. Tables are truncated. Useful for troubleshooting outside the IDE.
func ConnectLocalServer ¶
func ConnectLocalServer(t *testing.T, clientConfig *LocalClientConfig) *DevlakeClient
ConnectLocalServer spins up a local server from the config and returns a client connected to it
func ConnectRemoteServer ¶
func ConnectRemoteServer(t *testing.T, clientConfig *RemoteClientConfig) *DevlakeClient
ConnectRemoteServer returns a client to an existing server based on the config
func StartDevLakeServer ¶
func StartDevLakeServer(t *testing.T, loadedGoPlugins []plugin.PluginMeta) *DevlakeClient
Creates a new in-memory DevLake server with default settings and returns a client to it
func (*DevlakeClient) AwaitPluginAvailability ¶
func (d *DevlakeClient) AwaitPluginAvailability(pluginName string, timeout time.Duration)
AwaitPluginAvailability wait for this plugin to become available on the server given a timeout. Returns false if this condition does not get met.
func (*DevlakeClient) CreateBasicBlueprintV2 ¶
func (d *DevlakeClient) CreateBasicBlueprintV2(name string, config *BlueprintV2Config) models.Blueprint
CreateBasicBlueprintV2 FIXME
func (*DevlakeClient) CreateConnection ¶
func (d *DevlakeClient) CreateConnection(pluginName string, connection any) *Connection
CreateConnection FIXME
func (*DevlakeClient) CreateProject ¶
func (d *DevlakeClient) CreateProject(project *ProjectConfig) models.ApiOutputProject
func (*DevlakeClient) CreateScopeConfig ¶
func (d *DevlakeClient) CreateScopeConfig(pluginName string, connectionId uint64, scopeConfig any) any
func (*DevlakeClient) CreateScopes ¶
func (d *DevlakeClient) CreateScopes(pluginName string, connectionId uint64, scopes ...any) any
func (*DevlakeClient) DeleteBlueprint ¶
func (d *DevlakeClient) DeleteBlueprint(blueprintId uint64)
func (*DevlakeClient) DeleteConnection ¶
func (d *DevlakeClient) DeleteConnection(pluginName string, connectionId uint64) services.BlueprintProjectPairs
DeleteConnection FIXME
func (*DevlakeClient) DeleteProject ¶
func (d *DevlakeClient) DeleteProject(projectName string)
func (*DevlakeClient) DeleteScope ¶
func (d *DevlakeClient) DeleteScope(pluginName string, connectionId uint64, scopeId string, deleteDataOnly bool) services.BlueprintProjectPairs
func (*DevlakeClient) DeleteScopeConfig ¶
func (d *DevlakeClient) DeleteScopeConfig(pluginName string, connectionId uint64, scopeConfigId uint64)
func (*DevlakeClient) GetBlueprint ¶
func (d *DevlakeClient) GetBlueprint(blueprintId uint64) models.Blueprint
func (*DevlakeClient) GetDal ¶
func (d *DevlakeClient) GetDal() dal.Dal
GetDal get a reference to the dal.Dal used by the server
func (*DevlakeClient) GetProject ¶
func (d *DevlakeClient) GetProject(projectName string) models.ApiOutputProject
func (*DevlakeClient) GetScope ¶
func (d *DevlakeClient) GetScope(pluginName string, connectionId uint64, scopeId string, listBlueprints bool) ScopeResponse
func (*DevlakeClient) GetScopeConfig ¶
func (d *DevlakeClient) GetScopeConfig(pluginName string, connectionId uint64, scopeConfigId uint64) any
func (*DevlakeClient) LastReturnedStatusCode ¶
func (d *DevlakeClient) LastReturnedStatusCode() int
SetExpectedStatusCode return the last http status code
func (*DevlakeClient) ListBlueprints ¶
func (d *DevlakeClient) ListBlueprints() blueprints.PaginatedBlueprint
func (*DevlakeClient) ListConnections ¶
func (d *DevlakeClient) ListConnections(pluginName string) []*Connection
ListConnections FIXME
func (*DevlakeClient) ListProjects ¶
func (d *DevlakeClient) ListProjects() apiProject.PaginatedProjects
func (*DevlakeClient) ListScopeConfigs ¶
func (d *DevlakeClient) ListScopeConfigs(pluginName string, connectionId uint64) []any
func (*DevlakeClient) ListScopes ¶
func (d *DevlakeClient) ListScopes(pluginName string, connectionId uint64, listBlueprints bool) []ScopeResponse
func (*DevlakeClient) PatchScopeConfig ¶
func (*DevlakeClient) RemoteScopes ¶
func (d *DevlakeClient) RemoteScopes(query RemoteScopesQuery) RemoteScopesOutput
func (*DevlakeClient) RunPipeline ¶
func (d *DevlakeClient) RunPipeline(pipeline models.NewPipeline) models.Pipeline
RunPipeline FIXME
func (*DevlakeClient) RunPlugin ¶
func (d *DevlakeClient) RunPlugin(ctx context.Context, pluginName string, pluginTask plugin.PluginTask, options map[string]interface{}, subtaskNames ...string) errors.Error
RunPlugin manually execute a plugin directly (local server only)
func (*DevlakeClient) SearchRemoteScopes ¶
func (d *DevlakeClient) SearchRemoteScopes(query SearchRemoteScopesQuery) SearchRemoteScopesOutput
SearchRemoteScopes makes calls to the "scope API" indirectly. "Search" is the remote endpoint to hit.
func (*DevlakeClient) SetExpectedStatusCode ¶
func (d *DevlakeClient) SetExpectedStatusCode(code int) *DevlakeClient
SetExpectedStatusCode override the expected status code of the next API call. If it's anything but this, the test will fail.
func (*DevlakeClient) SetPipelineTimeout ¶
func (d *DevlakeClient) SetPipelineTimeout(timeout time.Duration)
SetTimeout override the timeout of pipeline run success expectation
func (*DevlakeClient) SetTimeout ¶
func (d *DevlakeClient) SetTimeout(timeout time.Duration)
SetTimeout override the timeout of api requests
func (*DevlakeClient) TestConnection ¶
func (d *DevlakeClient) TestConnection(pluginName string, connection any)
CreateConnection FIXME
func (*DevlakeClient) TriggerBlueprint ¶
func (d *DevlakeClient) TriggerBlueprint(blueprintId uint64) models.Pipeline
TriggerBlueprint FIXME
func (*DevlakeClient) UpdateScope ¶
type LocalClientConfig ¶
type LocalClientConfig struct { ServerPort uint DbURL string CreateServer bool DropDb bool TruncateDb bool Plugins []plugin.PluginMeta Timeout time.Duration PipelineTimeout time.Duration }
DevlakeClient FIXME
type ProjectConfig ¶
type ProjectConfig struct { ProjectName string ProjectDescription string EnableDora bool MetricPlugins []ProjectPlugin }
type ProjectPlugin ¶
type RemoteClientConfig ¶
DevlakeClient FIXME
type RemoteScopesChild ¶
type RemoteScopesOutput ¶
type RemoteScopesOutput struct { Children []RemoteScopesChild `json:"children"` NextPageToken string `json:"nextPageToken"` }
type RemoteScopesQuery ¶
type ScopeResponse ¶
type SearchRemoteScopesOutput ¶
type SearchRemoteScopesOutput struct { Children []RemoteScopesChild `json:"children"` Page int `json:"page"` PageSize int `json:"pageSize"` }