Documentation
¶
Index ¶
- Variables
- func SignedByColumnar(lib, sig io.Reader) errordeprecated
- type Client
- func (c *Client) CreateManifest(cfg config.Config, di config.DriverInfo) error
- func (c *Client) Download(ctx context.Context, pkg PkgInfo) (io.ReadCloser, error)
- func (c *Client) GetConfig(level config.ConfigLevel) config.Config
- func (c *Client) GetDriver(cfg config.Config, name string) (config.DriverInfo, error)
- func (c *Client) HTTPClient() *http.Client
- func (c *Client) Install(ctx context.Context, cfg config.Config, driverName string) (*config.Manifest, error)
- func (c *Client) ListInstalled(level config.ConfigLevel) []config.DriverInfo
- func (c *Client) Login(cred *auth.Credential) error
- func (c *Client) Logout(registryURL *url.URL) error
- func (c *Client) Registries() []Registry
- func (c *Client) Search(ctx context.Context, pattern string) ([]Driver, error)
- func (c *Client) Uninstall(cfg config.Config, driverName string) error
- func (c *Client) UserAgent() string
- type Driver
- func GetDriverList() ([]Driver, error)deprecated
- func (d Driver) AllVersions() []VersionInfo
- func (d Driver) GetPackage(version *semver.Version, platformTuple string, allowPrerelease bool) (PkgInfo, error)
- func (d Driver) GetWithConstraint(c *semver.Constraints, platformTuple string) (PkgInfo, error)
- func (d Driver) HasNonPrerelease() bool
- func (d Driver) MaxVersion() (VersionInfo, bool)
- func (d Driver) Versions(platformTuple string) semver.Collection
- type Option
- type PackageInfo
- type PkgInfo
- type ProgressFunc
- type Registry
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
var ( )
var ( Version = "unknown" // DefaultClient is the HTTP client used for all requests. // // Deprecated: Use NewClient with WithHTTPClient instead. // DefaultClient must be set during program initialization, // before any concurrent calls to GetDriverList or makereq. DefaultClient = http.DefaultClient )
Functions ¶
func SignedByColumnar
deprecated
Types ¶
type Client ¶ added in v0.3.0
type Client struct {
// contains filtered or unexported fields
}
Client is a dbc client for searching registries and managing ADBC drivers.
func NewClient ¶ added in v0.3.0
NewClient creates a new driver registry client with the given options.
func (*Client) CreateManifest ¶ added in v0.3.0
CreateManifest creates a manifest file for the given driver configuration.
func (*Client) Download ¶ added in v0.3.0
Download fetches the tarball for pkg and returns its contents as an io.ReadCloser. The caller is responsible for closing the returned body. Auth credentials are resolved and injected automatically, including token refresh on 401.
func (*Client) GetConfig ¶ added in v0.3.0
func (c *Client) GetConfig(level config.ConfigLevel) config.Config
GetConfig returns the configuration at the specified level.
func (*Client) GetDriver ¶ added in v0.3.0
GetDriver retrieves driver information from the given configuration.
func (*Client) HTTPClient ¶ added in v0.3.0
func (*Client) Install ¶ added in v0.3.0
func (c *Client) Install(ctx context.Context, cfg config.Config, driverName string) (*config.Manifest, error)
Install installs a driver with the given name to the specified configuration.
func (*Client) ListInstalled ¶ added in v0.3.0
func (c *Client) ListInstalled(level config.ConfigLevel) []config.DriverInfo
ListInstalled returns a list of installed drivers at the specified configuration level.
func (*Client) Login ¶ added in v0.3.0
func (c *Client) Login(cred *auth.Credential) error
Login saves a credential for the given registry.
func (*Client) Registries ¶ added in v0.3.0
Registries returns the list of driver registries configured for this client.
func (*Client) Search ¶ added in v0.3.0
Search searches for drivers matching the given pattern across all registries.
type Driver ¶
type Driver struct {
Registry *Registry `yaml:"-"`
Title string `yaml:"name"`
Desc string `yaml:"description"`
License string `yaml:"license"`
Path string `yaml:"path"`
URLs []string `yaml:"urls"`
DocsURL string `yaml:"docs_url"`
PkgInfo []pkginfo `yaml:"pkginfo"`
}
func GetDriverList
deprecated
func (Driver) AllVersions ¶ added in v0.3.0
func (d Driver) AllVersions() []VersionInfo
AllVersions returns all version/package entries for the driver as exported VersionInfo values. This allows callers outside the dbc package to iterate over every version and platform without needing access to the unexported pkginfo type.
func (Driver) GetPackage ¶
func (Driver) GetWithConstraint ¶
func (Driver) HasNonPrerelease ¶ added in v0.2.0
func (Driver) MaxVersion ¶
func (d Driver) MaxVersion() (VersionInfo, bool)
type Option ¶ added in v0.3.0
type Option func(*clientConfig)
func WithAuthFromFilesystem ¶ added in v0.3.0
func WithAuthFromFilesystem() Option
WithAuthFromFilesystem configures the client to read credentials from the filesystem.
func WithBaseURL ¶ added in v0.3.0
WithBaseURL sets the base URL for the driver registry.
func WithCredential ¶ added in v0.3.0
func WithCredential(cred *auth.Credential) Option
WithCredential sets a specific credential to use for all requests.
func WithHTTPClient ¶ added in v0.3.0
WithHTTPClient sets the HTTP client to use for requests.
func WithRegistries ¶ added in v0.3.0
WithRegistries sets the driver registries to use.
func WithUserAgent ¶ added in v0.3.0
WithUserAgent sets the user agent string for requests. This only takes effect when no custom HTTP client is provided via WithHTTPClient; if a custom client is supplied its transport is used as-is.
type PackageInfo ¶ added in v0.3.0
PackageInfo holds the platform and raw URL string for a single package entry. The URL may be relative (joined against the registry base URL) or absolute.
type PkgInfo ¶
func (PkgInfo) DownloadPackage
deprecated
func (p PkgInfo) DownloadPackage(prog ProgressFunc) (*os.File, error)
Deprecated: Use Client.Download instead.
type ProgressFunc ¶
type ProgressFunc func(written, total int64)
type VersionInfo ¶ added in v0.3.0
type VersionInfo struct {
Version *semver.Version
Packages []PackageInfo
}
VersionInfo holds the version and its associated packages for a driver.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
dbc
command
|
|
|
fslock
Package fslock provides advisory file locking for coordinating exclusive access to shared resources across processes.
|
Package fslock provides advisory file locking for coordinating exclusive access to shared resources across processes. |
|
jsonschema
Package jsonschema defines the versioned JSON output schema for the dbc CLI.
|
Package jsonschema defines the versioned JSON output schema for the dbc CLI. |
