yudiencore

package
v0.0.0-...-0d0d49f Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug_Udn bool
View Source
var Debug_Udn_Api bool
View Source
var Debug_Udn_Log_Level int
View Source
var PartTypeName map[int]string

Functions

func HtmlClean

func HtmlClean(html string) string

func ParseUdnLogLevel

func ParseUdnLogLevel(level string) int

func UdnDebug

func UdnDebug(udn_schema map[string]interface{}, input interface{}, button_label string, message string)

func UdnDebugIncrementChunk

func UdnDebugIncrementChunk(udn_schema map[string]interface{})

func UdnDebugReset

func UdnDebugReset(udn_schema map[string]interface{})

func UdnDebugUpdate

func UdnDebugUpdate(udn_schema map[string]interface{})

func UdnDebugWriteHtml

func UdnDebugWriteHtml(udn_schema map[string]interface{}) string

func UdnError

func UdnError(udn_schema map[string]interface{}, format string, args ...interface{})

func UdnLog

func UdnLog(udn_schema map[string]interface{}, format string, args ...interface{})

func UdnLogHtml

func UdnLogHtml(udn_schema map[string]interface{}, log_level int, format string, args ...interface{})

func UdnLogLevel

func UdnLogLevel(udn_schema map[string]interface{}, log_level int, format string, args ...interface{})

Types

type DynamicResult

type DynamicResult struct {
	// This is the result
	Result interface{}

	Type int

	// Error messages
	Error string
}

type UdnPart

type UdnPart struct {
	Depth    int
	PartType int

	Value string

	// List of UdnPart structs, list is easier to use dynamically
	//TODO(g): Switch this to an array.  Lists suck...
	Children *list.List

	Id string

	// Puts the data here after it's been evaluated
	ValueFinal     interface{}
	ValueFinalType int

	// Allows casting the type, not sure about this, but seems useful to cast ints from strings for indexing.  We'll see
	CastValue string

	ParentUdnPart *UdnPart
	NextUdnPart   *UdnPart

	// For block functions (ex: Begin: __iterate, End: __end_iterate).  For each block begin/end, save them during parsing, so we know which __end_ function ends which block, if there are multiple per UDN statement
	BlockBegin *UdnPart
	BlockEnd   *UdnPart
}

func NewUdnPart

func NewUdnPart() UdnPart

func (*UdnPart) AddChild

func (udn_parent *UdnPart) AddChild(part_type int, value string) *UdnPart

Returns the new Child, added to the udn_parent

func (*UdnPart) AddFunction

func (udn_parent *UdnPart) AddFunction(value string) *UdnPart

Returns the new Function, added to the previous function chain

func (*UdnPart) FindBeginBlock

func (start_udn_part *UdnPart) FindBeginBlock(value string) *UdnPart

Returns a function that starts with the value string, which doesnt have a BlockBegin/BlockEnd set yet

func (*UdnPart) String

func (part *UdnPart) String() string

type UdnResult

type UdnResult struct {
	// This is the result
	Result interface{} `json:"result"`

	Type int `json:"type"`

	// This is the next UdnPart to process.  If nil, the executor will just continue from current UdnPart.NextUdnPart
	NextUdnPart *UdnPart `json:"next_udp_part,omitempty"`

	// Error messages, we will stop processing if not nil
	Error string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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