configurator

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: GPL-3.0, GPL-3.0-or-later Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurator

type Configurator struct {
	Bindings struct {
		Transformers *Items
		Sorters      *Items
	}
}

Configurator is a list of config entries

func New

func New() *Configurator

New create a configurator

func (*Configurator) Delete

func (c *Configurator) Delete(category *string, key *string) error

Delete from a category a given key

func (*Configurator) Get

func (c *Configurator) Get(category *string, key *string) (string, error)

Get from a category a value associated with a key

func (*Configurator) Set

func (c *Configurator) Set(category *string, key *string, value *string) error

Set associate a value to a key in a defined category

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler handle configurators

func NewHandler

func NewHandler(filename string) (*Handler, error)

NewHandler create a new handler

func (*Handler) Load

func (h *Handler) Load() (*Configurator, error)

Load create a configurator from saved config file

func (*Handler) Save

func (h *Handler) Save(config *Configurator) error

Save configurator to config file

type Items

type Items map[string]string

Items represents a config file option

Jump to

Keyboard shortcuts

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