param

package
v0.0.0-...-1e0f0e2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IParam

type IParam interface {
	Prepare() error
	Name() string
	Values() ([]string, error)
	Delete(conf *config.Config) []error
}

func NewPath

func NewPath(name string, path string, conf *config.Config) IParam

type IResult

type IResult interface {
	Urls() ([]string, error)
}

type Param

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

func New

func New(name string) *Param

func NewBool

func NewBool(name string, value bool) *Param

func NewError

func NewError(name string, err error) (param *Param)

func NewFloat

func NewFloat(name string, value float64) *Param

func NewInt

func NewInt(name string, value int) *Param

func NewString

func NewString(name string, value string) (param *Param)

func (*Param) Delete

func (this *Param) Delete(conf *config.Config) (errs []error)

func (*Param) Name

func (this *Param) Name() string

func (*Param) Prepare

func (this *Param) Prepare() error

func (*Param) String

func (this *Param) String() string

func (*Param) Values

func (this *Param) Values() ([]string, error)

type ParamFile

type ParamFile struct {
	ParamReader
	// contains filtered or unexported fields
}

func NewFile

func NewFile(name string, file *os.File, conf *config.Config) *ParamFile

func (*ParamFile) Prepare

func (this *ParamFile) Prepare() error

func (*ParamFile) String

func (this *ParamFile) String() string

func (*ParamFile) Values

func (this *ParamFile) Values() ([]string, error)

type ParamReader

type ParamReader struct {
	Param

	sync.Mutex
	// contains filtered or unexported fields
}

func NewReader

func NewReader(name string, reader io.Reader, filename string, conf *config.Config) *ParamReader

func (*ParamReader) Prepare

func (this *ParamReader) Prepare() error

func (*ParamReader) String

func (this *ParamReader) String() string

func (*ParamReader) Values

func (this *ParamReader) Values() ([]string, error)

type ParamResult

type ParamResult struct {
	Param

	sync.Mutex
	// contains filtered or unexported fields
}

func NewResult

func NewResult(name string, res IResult, conf *config.Config) (param *ParamResult)

func (*ParamResult) Prepare

func (this *ParamResult) Prepare() error

func (*ParamResult) Values

func (this *ParamResult) Values() ([]string, error)

type ParamResultIdx

type ParamResultIdx struct {
	ParamResult
	// contains filtered or unexported fields
}

func NewResultIdx

func NewResultIdx(name string, res IResult, idx int, conf *config.Config) *ParamResultIdx

func (*ParamResultIdx) Values

func (this *ParamResultIdx) Values() ([]string, error)

Jump to

Keyboard shortcuts

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