Documentation
¶
Overview ¶
Package catalogimportapi is the admin REST surface for the import of a deployment's DataHub into the platform catalog (#1923): start an import from the DataHub the configuration names (#2124) or one an administrator names, and read what each run did.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Runner runs imports. nil mounts nothing.
Runner Runner
// Author resolves the acting admin.
Author func(*http.Request) string
}
Config carries the runner and the parent-owned helpers.
type RunList ¶
type RunList struct {
Imports []catalogimport.Run `json:"imports"`
// Configured is the address of the DataHub the configuration names in
// toolkits.datahub, which the platform imports from after its first
// catalog scan; empty when it names none.
Configured string `json:"configured,omitempty" example:"https://datahub.example.com:8080"`
}
RunList is the latest runs, newest first, and the DataHub the configuration names.
type Runner ¶
type Runner interface {
Start(ctx context.Context, address, token, by string) (catalogimport.Run, error)
StartConfigured(ctx context.Context, by string) (catalogimport.Run, error)
Runs(ctx context.Context, limit int) ([]catalogimport.Run, error)
Configured() string
}
Runner starts imports and lists their runs. *catalogimport.Runner satisfies it.
type StartRequest ¶
type StartRequest struct {
// URL is DataHub's GMS address, such as https://datahub.example.com:8080.
URL string `json:"url,omitempty" example:"https://datahub.example.com:8080"`
// Token is a DataHub personal access token. It is used for this run and
// not kept.
Token string `json:"token,omitempty"`
}
StartRequest names the DataHub an import reads. An empty request, or no body, reads the DataHub the configuration names.
Click to show internal directories.
Click to hide internal directories.