Documentation
¶
Index ¶
- Constants
- func ErrorBool(ctx context.Context, input []types.Value) (types.Value, error)
- func Int2Str(ctx context.Context, input []types.Value) (types.Value, error)
- func Plus(ctx context.Context, input []types.Value) (types.Value, error)
- func Str2Int(ctx context.Context, input []types.Value) (types.Value, error)
- func TheAnswerToLifeTheUniverseAndEverything(context.Context, []types.Value) (types.Value, error)
- type FlipFlop
- func (obj *FlipFlop) Call(ctx context.Context, args []types.Value) (types.Value, error)
- func (obj *FlipFlop) Info() *interfaces.Info
- func (obj *FlipFlop) Init(init *interfaces.Init) error
- func (obj *FlipFlop) Stream(ctx context.Context) error
- func (obj *FlipFlop) String() string
- func (obj *FlipFlop) Validate() error
- type VUMeterFunc
- func (obj *VUMeterFunc) ArgGen(index int) (string, error)
- func (obj *VUMeterFunc) Call(ctx context.Context, args []types.Value) (types.Value, error)
- func (obj *VUMeterFunc) Info() *interfaces.Info
- func (obj *VUMeterFunc) Init(init *interfaces.Init) error
- func (obj *VUMeterFunc) Stream(ctx context.Context) error
- func (obj *VUMeterFunc) String() string
- func (obj *VUMeterFunc) Validate() error
Constants ¶
const Answer = 42
Answer is the Answer to Life, the Universe and Everything.
const (
// FlipFlopFuncName is the name this func is registered as.
FlipFlopFuncName = "flipflop"
)
const (
// ModuleName is the prefix given to all the functions in this module.
ModuleName = "example"
)
const (
// VUMeterFuncName is the name this function is registered as.
VUMeterFuncName = "vumeter"
)
Variables ¶
This section is empty.
Functions ¶
func ErrorBool ¶
ErrorBool causes this function to error if you pass it true. Otherwise it returns a string reminding you how to use it.
Types ¶
type FlipFlop ¶
type FlipFlop struct {
interfaces.Textarea
// contains filtered or unexported fields
}
FlipFlop is a func which flips a bool repeatedly. This is an example func and is not meant for serious computing. This would be better served by a flip function which you could specify an interval for.
func (*FlipFlop) Call ¶
Call this func and return the value if it is possible to do so at this time.
func (*FlipFlop) Info ¶
func (obj *FlipFlop) Info() *interfaces.Info
Info returns some static info about itself.
func (*FlipFlop) Init ¶
func (obj *FlipFlop) Init(init *interfaces.Init) error
Init runs some startup code for this func.
type VUMeterFunc ¶
type VUMeterFunc struct {
interfaces.Textarea
// contains filtered or unexported fields
}
VUMeterFunc is a gimmic function to display a vu meter from the microphone.
func (*VUMeterFunc) ArgGen ¶
func (obj *VUMeterFunc) ArgGen(index int) (string, error)
ArgGen returns the Nth arg name for this function.
func (*VUMeterFunc) Call ¶
Call this function with the input args and return the value if it is possible to do so at this time.
func (*VUMeterFunc) Info ¶
func (obj *VUMeterFunc) Info() *interfaces.Info
Info returns some static info about itself.
func (*VUMeterFunc) Init ¶
func (obj *VUMeterFunc) Init(init *interfaces.Init) error
Init runs some startup code for this function.
func (*VUMeterFunc) Stream ¶
func (obj *VUMeterFunc) Stream(ctx context.Context) error
Stream returns the changing values that this func has over time.
func (*VUMeterFunc) String ¶
func (obj *VUMeterFunc) String() string
String returns a simple name for this function. This is needed so this struct can satisfy the pgraph.Vertex interface.
func (*VUMeterFunc) Validate ¶
func (obj *VUMeterFunc) Validate() error
Validate makes sure we've built our struct properly. It is usually unused for normal functions that users can use directly.