config

package
v0.0.0-...-c4175cc Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(name string) (bool, error)

Types

type Config

type Config interface {
	Disable(name ...string)
	Enable(name ...string)

	State() map[string]bool
	List() (idxEnable []string, idxDisable []string)

	Load() error
	Save(saveEnable bool) error
}

type FilePluginsConfig

type FilePluginsConfig struct {
	Dir        string
	Filename   string
	IdxEnable  map[string]bool
	IdxDisable map[string]bool
}

func (*FilePluginsConfig) Disable

func (s *FilePluginsConfig) Disable(names ...string)

func (*FilePluginsConfig) Enable

func (s *FilePluginsConfig) Enable(names ...string)

func (*FilePluginsConfig) List

func (s *FilePluginsConfig) List() (idxEnable []string, idxDisable []string)

func (*FilePluginsConfig) Load

func (s *FilePluginsConfig) Load() error

func (*FilePluginsConfig) Save

func (s *FilePluginsConfig) Save(saveEnable bool) error

func (*FilePluginsConfig) State

func (s *FilePluginsConfig) State() (pl map[string]bool)

Jump to

Keyboard shortcuts

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