configurator

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: AGPL-3.0 Imports: 4 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.3.0

type Option func(*Options)

func WithConfigPaths added in v0.3.0

func WithConfigPaths(paths []string) Option

func WithFileName added in v0.3.0

func WithFileName(fileName string) Option

func WithFileType added in v0.3.0

func WithFileType(fileType string) Option

func WithName added in v0.3.0

func WithName(name string) Option

func WithWriteDefaults added in v0.3.0

func WithWriteDefaults(write bool) Option

type Options

type Options struct {
	Name          string
	FileName      string
	FileType      string
	ConfigPaths   []string
	WriteDefaults bool
}

Options struct

type Plugin

type Plugin struct {
	plugin.Plugin

	Options *Options
}

Plugin struct

func NewPlugin

func NewPlugin(options ...Option) (*Plugin, error)

NewPlugin ...

func (*Plugin) Close

func (p *Plugin) Close() error

Close returns error if database has disconnect error

func (*Plugin) Configure

func (p *Plugin) Configure(pl plugin.Plugin) error

Configure gived plugin

func (*Plugin) GetConfiguration

func (p *Plugin) GetConfiguration() interface{}

GetConfiguration return configuration

func (*Plugin) GetName

func (p *Plugin) GetName() string

GetName return plugin name

func (*Plugin) GetVersion

func (p *Plugin) GetVersion() string

func (*Plugin) Init

func (p *Plugin) Init() error

Init plugin, run after configure

func (*Plugin) OnConfigChange

func (p *Plugin) OnConfigChange(e fsnotify.Event)

func (*Plugin) Write

func (p *Plugin) Write(plugin plugin.Plugin) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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