Documentation
¶
Overview ¶
Package extensions contains a set of subcmd extensions that can be used by gleancli implementations. Each such extension is a submodule so that its dependencies are imported only by gleancli implementations that use it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatasourceConfig ¶
type DatasourceConfig struct {
GleanInstance string `yaml:"glean_instance" cmd:"glean instance to use"`
gleansdk.CustomDatasourceConfig `yaml:",inline" cmd:"glean custom datasource configuration"`
}
DatasourceConfig represents the configuration of the datasource with Glean's API.
type Extension ¶
type Extension interface {
subcmd.Extension
SetOptions(ExtensionOptions)
Options() ExtensionOptions
AuthConfigType() any
ServiceConfigType() any
}
func NewExtension ¶
func NewExtensionC ¶
func NewExtensionC(spec ExtensionSpec, parents []string) Extension
type ExtensionOptions ¶
type ExtensionSpec ¶
type ExtensionSpec struct {
Name string // Name of the extension
CmdSpec string // YAML subcmd spec
AuthCfg any // used for describing the auth configuration
ServiceCfg any // used for describing the service configuration
// called to add the command to its parent cmdSet.
AddFunc func(extension Extension, cmdSet *subcmd.CommandSetYAML, parents []string) error
}
type Glean ¶
type Glean []struct {
Name string `yaml:"name" cmd:"name of the glean instance"`
Auth struct {
BearerToken string `yaml:"indexing_token" cmd:"indexing token for the glean instance"`
ClientBearerToken string `yaml:"client_token" cmd:"client bearer token for the glean instance"`
}
API struct {
Domain string `yaml:"domain" cmd:"domain for the glean instance"`
}
}
func (Glean) NewClientAPIClient ¶
func (Glean) NewIndexingAPIClient ¶
type GleanFlags ¶
type GleanFlags struct {
Config string `subcmd:"config,$HOME/.glean.yaml,'glean config file'"`
}
Click to show internal directories.
Click to hide internal directories.