config

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigNotFound = errors.New("config not found")
	ErrConfigInvalid  = errors.New("config invalid")
)

Functions

This section is empty.

Types

type App

type App struct {
	Paths []Path `json:"paths" toml:"paths"`
}

Read from file

type Config

type Config interface {
	Install(appNames ...string) error
	Update(appNames ...string) error
	Clean() error
	Diff(appNames ...string) error
	Download(appNames ...string) error
	Validate(appNames ...string) error
	List() []string
}

func LoadConfig

func LoadConfig(path string, isDryRun bool) (Config, error)

LoadConfig return config, configDemo

type ConfigApps added in v0.13.0

type ConfigApps struct {
	Apps map[string]App `json:"apps" toml:"apps"`
	// Sort version
	Apps2 []string `json:"-" toml:"-"`
}

type Path

type Path struct {
	Internal string `json:"internal" toml:"internal"`
	External string `json:"external,omitempty" toml:"external"`
	URL      string `json:"url,omitempty" toml:"url"`
}

Jump to

Keyboard shortcuts

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