bling

package
v0.0.0-...-4b10593 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProgramInLevels

func ProgramInLevels(name string) []string

Types

type Alias

type Alias struct {
	Key         string `yaml:"key"`
	Value       string `yaml:"value"`
	Description string `yaml:"description"`
}

type Bling

type Bling struct {
	Name        string   `yaml:"name"`
	Description string   `yaml:"description"`
	Packages    []string `yaml:"packages"`
	Programs    []string `yaml:"programs"`
	PackageMap  map[string]*Package
	ProgramMap  map[string]*Program
}

func DefaultBling

func DefaultBling() (*Bling, error)

func FromString

func FromString(bling string) (*Bling, error)

func HighBling

func HighBling() (*Bling, error)

func LowBling

func LowBling() (*Bling, error)

func NoBling

func NoBling() (*Bling, error)

func (*Bling) Aliases

func (b *Bling) Aliases() string

func (*Bling) ConfigFiles

func (b *Bling) ConfigFiles() map[string]string

func (*Bling) IncludesPackage

func (b *Bling) IncludesPackage(name string) bool

func (*Bling) IncludesProgram

func (b *Bling) IncludesProgram(name string) bool

func (*Bling) InitBash

func (b *Bling) InitBash() string

func (*Bling) InitZsh

func (b *Bling) InitZsh() string

type ConfigFile

type ConfigFile struct {
	FileName string `yaml:"file_name"`
	Value    string `yaml:"value"`
}

type ConfigLine

type ConfigLine struct {
	Key   string `yaml:"key"`
	Value string `yaml:"value"`
}

ConfigLine represents a line of a program's configuration. It must be in the form of `key = value“ such that multiple config lines for the same program can be appended together to create a valid configuration.

type Init

type Init struct {
	Bash string `yaml:"bash"`
	Zsh  string `yaml:"zsh"`
	Fish string `yaml:"fish"`
}

type Package

type Package struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
}

Package is an binary or library that can be installed

func LoadPackages

func LoadPackages() ([]*Package, error)

type Program

type Program struct {
	Name        string       `yaml:"name"`
	Description string       `yaml:"description"`
	Init        *Init        `yaml:"init"`
	ConfigLines []ConfigLine `yaml:"config_lines,flow"`
	ConfigFiles []ConfigFile `yaml:"config_files,flow"`

	Aliases []Alias `yaml:",flow"`
}

Program is an application that is installed and also has configuration attached.

func LoadPrograms

func LoadPrograms() ([]*Program, error)

type Shell

type Shell string
var (
	Bash Shell = "bash"
	Zsh  Shell = "zsh"
	Fish Shell = "fish"
)

Jump to

Keyboard shortcuts

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