checksetter

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: MIT Imports: 11 Imported by: 1

Documentation

Overview

Package checksetter holds various setter types that can be used to construct lists of check functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float64

type Float64 struct {
	param.ValueReqMandatory
	param.NilAVM

	Value *[]check.Float64
}

Float64 can be used to set a list of checkers for a float64.

func (Float64) AllowedValues

func (s Float64) AllowedValues() string

AllowedValues returns a description of the allowed values. It includes the separator to be used

func (Float64) CheckSetter

func (s Float64) CheckSetter(name string)

CheckSetter panics if the setter has not been properly created - if the Value is nil.

func (Float64) CurrentValue

func (s Float64) CurrentValue() string

CurrentValue returns the current setting of the parameter value

func (Float64) SetWithVal

func (s Float64) SetWithVal(_ string, paramVal string) error

SetWithVal (called when a value follows the parameter) splits the value into a slice of check.Float64's and sets the Value accordingly.

type Int64

type Int64 struct {
	param.ValueReqMandatory
	param.NilAVM

	Value *[]check.Int64
}

Int64 can be used to set a list of checkers for an int64.

func (Int64) AllowedValues

func (s Int64) AllowedValues() string

AllowedValues returns a description of the allowed values. It includes the separator to be used

func (Int64) CheckSetter

func (s Int64) CheckSetter(name string)

CheckSetter panics if the setter has not been properly created - if the Value is nil.

func (Int64) CurrentValue

func (s Int64) CurrentValue() string

CurrentValue returns the current setting of the parameter value

func (Int64) SetWithVal

func (s Int64) SetWithVal(_ string, paramVal string) error

SetWithVal (called when a value follows the parameter) splits the value into a slice of check.Int64's and sets the Value accordingly.

type String

type String struct {
	param.ValueReqMandatory
	param.NilAVM

	Value *[]check.String
}

String can be used to set a list of checkers for a string.

func (String) AllowedValues

func (s String) AllowedValues() string

AllowedValues returns a description of the allowed values. It includes the separator to be used

func (String) CheckSetter

func (s String) CheckSetter(name string)

CheckSetter panics if the setter has not been properly created - if the Value is nil.

func (String) CurrentValue

func (s String) CurrentValue() string

CurrentValue returns the current setting of the parameter value

func (String) SetWithVal

func (s String) SetWithVal(_ string, paramVal string) error

SetWithVal (called when a value follows the parameter) splits the value into a slice of check.String's and sets the Value accordingly.

type StringSlice

type StringSlice struct {
	param.ValueReqMandatory
	param.NilAVM

	Value *[]check.StringSlice
}

StringSlice can be used to set a list of checkers for a slice of strings.

func (StringSlice) AllowedValues

func (s StringSlice) AllowedValues() string

AllowedValues returns a description of the allowed values. It includes the separator to be used

func (StringSlice) CheckSetter

func (s StringSlice) CheckSetter(name string)

CheckSetter panics if the setter has not been properly created - if the Value is nil.

func (StringSlice) CurrentValue

func (s StringSlice) CurrentValue() string

CurrentValue returns the current setting of the parameter value

func (StringSlice) SetWithVal

func (s StringSlice) SetWithVal(_ string, paramVal string) error

SetWithVal (called when a value follows the parameter) splits the value into a slice of check.StringSlice's and sets the Value accordingly. It will return an error if a check is breached.

Jump to

Keyboard shortcuts

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