data

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: GPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToStruct

func MapToStruct(source map[string]interface{}, dest interface{}) error

Types

type Info

type Info struct {
	Id       uint64                   `json:"id"`
	Time     *time.Time               `json:"time"`
	ChanId   string                   `json:"chan_id"`
	Timeout  time.Duration            `json:"timeout"`
	Infinite bool                     `json:"infinite"`
	MapNode  map[string]*NodeRule     `json:"map_node"`
	RootNode *NodeRule                `json:"root_node"`
	Data     map[string]interface{}   `json:"data"`
	Result   map[string]*OutputEngine `json:"result"`
	EndCount int                      `json:"end_count"`
}

type InputEngine

type InputEngine struct {
	SessionId  uint64                 `json:"session_id"`
	ChanId     string                 `json:"chan_id"`
	IdNode     string                 `json:"id_node"`
	FromEngine string                 `json:"from_engine"`
	ToEngine   string                 `json:"to_engine"`
	Node       *NodeRule              `json:"node"`
	MetaData   map[string]interface{} `json:"meta_data"`
	Data       map[string]interface{} `json:"data"`
	BranchMain string                 `json:"branch_main"`
	Type       TypeOutputEngine       `json:"type"`
	Error      *errors.ErrorEngine    `json:"error"`
	Time       *time.Time             `json:"time"`
}

type NodeRule

type NodeRule struct {
	NodeId string                 `json:"node_id"`
	RuleId string                 `json:"rule_id"`
	Option map[string]interface{} `json:"option"`
	Debug  bool                   `json:"debug"`
	End    bool                   `json:"end"`
}

type OutputEngine

type OutputEngine struct {
	SessionId  uint64                 `json:"session_id"`
	ChanId     string                 `json:"chan_id"`
	IdNode     string                 `json:"id_node"`
	FromEngine string                 `json:"from_engine"`
	Data       map[string]interface{} `json:"data"`
	BranchMain string                 `json:"branch_main"`
	Next       []string               `json:"next"`
	Time       *time.Time             `json:"time"`
	Type       TypeOutputEngine       `json:"type"`
	Error      *errors.ErrorEngine    `json:"error"`
	Debug      bool
}

func CreateOutput

func CreateOutput(input *InputEngine, id string) (output *OutputEngine)

func (OutputEngine) Clone

func (o OutputEngine) Clone() *OutputEngine

type ResultSession

type ResultSession struct {
	Id     uint64                   `json:"id"`
	ChanId string                   `json:"chan_id"`
	Data   map[string]interface{}   `json:"data"`
	Result map[string]*OutputEngine `json:"result"`
}

type Session

type Session struct {
	ChanId   string                   `json:"chan_id"`
	MapNode  map[string]*NodeRule     `json:"map_node"`
	RootNode string                   `json:"root_node"`
	Data     map[string]interface{}   `json:"data"`
	Result   map[string]*OutputEngine `json:"result"`
}

type TypeOutputEngine

type TypeOutputEngine string
const (
	TypeOutputEngineError   TypeOutputEngine = "error"
	TypeOutputEngineSuccess TypeOutputEngine = "success"
)

Jump to

Keyboard shortcuts

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