Documentation ¶
Index ¶
- Constants
- func Set(d *Variables)
- type ID
- type Type
- type Types
- type Variable
- type Variables
- func (vs *Variables) Add(id ID, kind Type, name string, display string, aliases []string, ...) error
- func (vs *Variables) Get(candidate string) (string, bool)
- func (vs *Variables) ID(name string) (ID, bool)
- func (vs *Variables) Match(candidate string) bool
- func (vs *Variables) Question(id ID) string
- func (vs *Variables) Size() int
- func (vs *Variables) Variable(id ID) *Variable
Constants ¶
View Source
const Zero = ID("0")
Zero defines the zero id constant assigned to the ignored variable.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Types ¶
type Types []Type
Types defines a slice of variable types
func ParseTypes ¶
ParseTypes converts the string to the variable types.
type Variable ¶
type Variable struct { ID ID // variable id Kind Type // variable type Name string // variable name Display string // variable display name Range []string // value range for nominal and ordinal variables NumRange []float64 // value range for numerical variables UnitName string // variable default unit }
Variable defines the variable schema with the relevant fields.
type Variables ¶
type Variables struct {
// contains filtered or unexported fields
}
Variables defines a collection of variables.
func DefaultCatalog ¶
func DefaultCatalog() *Variables
DefaultCatalog defines the variable names and their aliases for unit testing. The display names are omitted for the convenience.
func (*Variables) Get ¶
Match returns corresponding name if the candidate is in the variable catalog.
Click to show internal directories.
Click to hide internal directories.