meta

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Unlicense Imports: 0 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Aliases       []string
	Tags          []string
	Label         string
	Description   string
	Documentation string
	Default       string
	Options       []string
}

Data is the specification for a Metadata

type Metadata added in v0.1.18

type Metadata struct {
	Aliases       func() []string
	Tags          func() []string
	Label         func() string
	Description   func() string
	Documentation func() string
	Default       func() string
	Options       func() []string
	Typ           Type
}

Metadata is a set of accessor functions that never write to the store and thus do not create race conditions.

func New added in v0.1.18

func New(d Data, t Type) Metadata

New loads Data into a Metadata. Implementing types need to populate the Data.Type field before calling this function

type Type added in v0.1.18

type Type string
const (
	Bool     Type = "Bool"
	Duration Type = "Duration"
	Float    Type = "Float"
	Integer  Type = "Integer"
	List     Type = "List"
	Text     Type = "Text"
)

Type has same name as string for neater comparisons.

Jump to

Keyboard shortcuts

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