Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoSnippetsAvailable = errors.New("No snippets are available.")
View Source
var ErrSnippetIDNotFound = errors.New("Snippet with ID not found.")
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface {
LookupSnippet() (bool, model.Snippet)
LookupAndCreatePrintableSnippet() (bool, string)
LookupSnippetArgs() (bool, string, []model.ParameterValue)
FindSnippetAndPrint(string, []model.ParameterValue) (bool, string)
LookupAndExecuteSnippet(bool, bool)
FindScriptAndExecuteWithParameters(string, []model.ParameterValue, bool, bool)
ExportSnippets([]ExportField, ExportFormat) string
GenerateSnippetWithAssistant([]string, time.Duration)
EnableAssistant()
Info()
AddManager()
SyncManager()
}
type ErrMigrateConfig ¶ added in v1.4.0
type ErrMigrateConfig struct {
// contains filtered or unexported fields
}
func (ErrMigrateConfig) Error ¶ added in v1.4.0
func (e ErrMigrateConfig) Error() string
func (ErrMigrateConfig) Is ¶ added in v1.4.0
func (e ErrMigrateConfig) Is(target error) bool
type ExecutionContext ¶ added in v1.8.0
type ExecutionContext int
ExecutionContext indicates the origin of the execution request.
const ( // ContextDefault represents normal execution (e.g., from lookup). ContextDefault ExecutionContext = iota // ContextAssistant represents execution initiated from the assistant. ContextAssistant )
type ExportField ¶ added in v1.5.0
type ExportField int64
const ( ExportFieldID ExportField = 0 ExportFieldTitle ExportField = 1 ExportFieldContent ExportField = 2 ExportFieldParameters ExportField = 3 )
type ExportFormat ¶ added in v1.5.0
type ExportFormat int64
const ( ExportFormatJSON ExportFormat = 0 ExportFormatPrettyJSON ExportFormat = 1 ExportFormatXML ExportFormat = 2 )
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option configures an App.
func WithAssistantProviderFunc ¶ added in v1.6.0
func WithAssistantProviderFunc(providerFunc func(c assistant.Config, d assistant.DemoConfig) assistant.Assistant) Option
WithAssistantProviderFunc sets the assistant provider.
func WithCheckNeedsConfigMigration ¶ added in v1.4.0
WithCheckNeedsConfigMigration sets if the config file is checked if it is up-to-date.
func WithConfig ¶
WithConfig sets the config for the App.
func WithConfigService ¶
WithConfigService sets the config service for the App.
func WithProvider ¶ added in v1.0.0
WithProvider sets the provider for the list of manager.
Click to show internal directories.
Click to hide internal directories.