Documentation
¶
Index ¶
- func AttributeMapping(attributes map[string]interface{}, contextMapping []types.FieldMapping) map[string]string
- func SaveOptions(providerName string, options []Option) error
- type Column
- type Module
- type Option
- func (o *Option) CreateStartDirectoryIfMissing() error
- func (o *Option) ProcessUserTemplateStrings(displayNameTemplate string, startDirectoryTemplate string)
- func (o *Option) RenderPreview() string
- func (o *Option) ResolvePlaceholders(input string) string
- func (o *Option) ResolveStartDirectory(full bool) string
- type OptionsCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeMapping ¶
func AttributeMapping(attributes map[string]interface{}, contextMapping []types.FieldMapping) map[string]string
func SaveOptions ¶
Types ¶
type Column ¶
func DefaultColumns ¶
func DefaultColumns() []Column
type Module ¶
type Module interface {
Name() string // Name returns the name of the module
Type() string // Type returns the type of the module
Options() ([]Option, error) // Options returns the options
OptionsOrCache(maxAge float64) ([]Option, error) // OptionsOrCache returns the options from cache or calls Options
SelectOption(options *Option) error // Select can be used to run actions / enrich the context before opening the session
Columns() []Column // Columns returns the columns for a tabular view
}
type Option ¶
type Option struct {
ProviderName string `json:"provider_name"` // module name
ProviderType string `json:"provider_type"` // module type
Id string `json:"id"` // unique id
DisplayName string `json:"display_name"` // display name for the fuzzy finder
Name string `json:"name"` // name
Description string `json:"description"` // description
Web string `json:"web"` // web url
StartDirectory string `json:"start_directory"` // sets the initial working directory
Tags []string `json:"tags"` // tags
Context map[string]string `json:"context"` // additional context information
ModuleContext map[string]string `json:"module_context"` // internal context information, not exposed to the user
}
func (*Option) CreateStartDirectoryIfMissing ¶
func (*Option) ProcessUserTemplateStrings ¶ added in v0.8.1
func (*Option) RenderPreview ¶
func (*Option) ResolvePlaceholders ¶
func (*Option) ResolveStartDirectory ¶
Click to show internal directories.
Click to hide internal directories.