config

package
v1.0.0-rc.104 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Path string

Functions

This section is empty.

Types

type Config

type Config struct {
	Oneliners  []Oneliner                 `json:"oneliners,omitempty"`
	Extensions map[string]ExtensionConfig `json:"extensions,omitempty"`
	// contains filtered or unexported fields
}

func Load

func Load(configPath string) (Config, error)

func (Config) Aliases

func (cfg Config) Aliases() []string

func (Config) Resolve

func (cfg Config) Resolve(path string) string

func (Config) Save

func (c Config) Save() error

type ExtensionConfig

type ExtensionConfig struct {
	Origin      string         `json:"origin,omitempty"`
	Preferences map[string]any `json:"preferences,omitempty"`
	Root        []RootItem     `json:"root,omitempty"`
}

type Oneliner

type Oneliner struct {
	Title   string `json:"title"`
	Command string `json:"command"`
	Cwd     string `json:"cwd,omitempty"`
	Exit    bool   `json:"exit,omitempty"`
}

type RootItem

type RootItem struct {
	Title   string                 `json:"title"`
	Command string                 `json:"command"`
	Params  map[string]types.Param `json:"params,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL