encode

package
v0.24.6 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomEncoder

type CustomEncoder func(*Encoder, typeinfo.Instance) (any, error)

given a tapestry flow, return its plain value.

type Encoder

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

func (*Encoder) Customize

func (enc *Encoder) Customize(c CustomEncoder) *Encoder

func (*Encoder) Encode

func (enc *Encoder) Encode(i typeinfo.Instance) (ret any, err error)

turn the passed tapestry command into plain values.

type FlowBuilder

type FlowBuilder struct {
	SigBuilder
	// contains filtered or unexported fields
}

func (*FlowBuilder) FinalizeMap

func (out *FlowBuilder) FinalizeMap() (ret map[string]any)

build a map that we get serialized to json

func (*FlowBuilder) SetMarkup

func (out *FlowBuilder) SetMarkup(markup map[string]any)

func (*FlowBuilder) WriteArg

func (out *FlowBuilder) WriteArg(label string, value any)

type SigBuilder

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

SigBuilder helps build the "lede" used the compact format ex. "Else if:from:and:do:else:"

func (*SigBuilder) String

func (b *SigBuilder) String() string

func (*SigBuilder) WriteLabel

func (b *SigBuilder) WriteLabel(s string)

label is in break_case

func (*SigBuilder) WriteLede

func (b *SigBuilder) WriteLede(s string)

changes the autogenerated break_case into PascalCase

Jump to

Keyboard shortcuts

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