Documentation ¶
Index ¶
- Variables
- func AddProvider(name string, provider Provider)
- func DisplayProviders() string
- func ExpandProvider(provider string) (string, error)
- func Language() string
- func ProviderNames() []string
- func Region() string
- func Search(binary string, p string, q string, verbose bool) error
- func SetBlacklist(b []string)
- func SetWhitelist(w []string)
- type CustomProvider
- type Provider
Constants ¶
This section is empty.
Variables ¶
var Providers map[string]Provider
Providers tracks loaded providers.
Functions ¶
func AddProvider ¶
AddProvider should be called within your provider's init() func. This will register the provider so it can be used.
func DisplayProviders ¶
func DisplayProviders() string
DisplayProviders displays all the loaded providers.
func ExpandProvider ¶ added in v0.1.8
ExpandProvider expands the passed in provider to the full value.
func Language ¶ added in v0.2.1
func Language() string
Language returns the users language code. Eg. "en", "es", etc
func ProviderNames ¶ added in v0.1.8
func ProviderNames() []string
ProviderNames returns a sorted slice of provider names.
func Region ¶ added in v0.2.1
func Region() string
Region returns the users region code. Eg. "US", "GB", etc
func SetBlacklist ¶ added in v0.4.0
func SetBlacklist(b []string)
SetBlacklist filters out unneeded providers.
func SetWhitelist ¶ added in v0.4.0
func SetWhitelist(w []string)
SetWhitelist sets an exact list of supported providers.
Types ¶
type CustomProvider ¶ added in v0.4.0
CustomProvider is used for Config based providers.
func (*CustomProvider) BuildURI ¶ added in v0.4.0
func (c *CustomProvider) BuildURI(q string) string
BuildURI builds the URI for custom providers.
func (*CustomProvider) Valid ¶ added in v0.4.0
func (c *CustomProvider) Valid() error
Valid checks if the custom provider is setup correctly.