opconfig

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetOperatorConfigParams

type GetOperatorConfigParams struct {
	OperatorName string
}

GetOperatorConfigParams contains the parameters for the GetSection function

func (*GetOperatorConfigParams) OperatorNameSuggestions

func (p *GetOperatorConfigParams) OperatorNameSuggestions(oc *OpConfig) map[string]string

OperatorNameSuggestions returns a map of possible arguments for the given function and argument name

type OpConfig

type OpConfig struct {
	CR *utils.ConfigReader
	GE *freepsgraph.GraphEngine
}

OpConfig is a FreepsOperator that can be used to retrieve and modify the config

func (*OpConfig) GetOperatorConfig

func (oc *OpConfig) GetOperatorConfig(ctx *base.Context, mainInput *base.OperatorIO, args GetOperatorConfigParams) *base.OperatorIO

GetOperatorConfig returns the default config for a given section

func (*OpConfig) GetSection

func (oc *OpConfig) GetSection(ctx *base.Context, mainInput *base.OperatorIO, args SectionParams) *base.OperatorIO

GetSection returns the section with the given name

func (*OpConfig) RemoveSection

func (oc *OpConfig) RemoveSection(ctx *base.Context, mainInput *base.OperatorIO, args SectionParams) *base.OperatorIO

RemoveSection removes the given section from the config file

func (*OpConfig) WriteSection

func (oc *OpConfig) WriteSection(ctx *base.Context, mainInput *base.OperatorIO) *base.OperatorIO

WriteSection writes the given section to the config file

type SectionParams

type SectionParams struct {
	SectionName string
}

SectionParams contains the parameters for the GetSection function

func (*SectionParams) SectionNameSuggestions

func (p *SectionParams) SectionNameSuggestions(oc *OpConfig) map[string]string

SectionNameSuggestions returns a map of possible arguments for the given function and argument name

Jump to

Keyboard shortcuts

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