dto

package
v1.6.4-0...-ed49831 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTrigger

func RunTrigger(msg, trigger string, v *Val)

生成参数跟括号

func ValRunTrigger

func ValRunTrigger(msg, trigger string, setV, v *Val)

变量生成参数跟括号

Types

type BuildDic

type BuildDic struct {
	Trigger string   `json:"trigger"`
	Text    []string `json:"text"`
}

词库结构

type BuildValue

type BuildValue struct {
	Head        []string             `json:"头部"`
	Dic         []*BuildDic          `json:"词库"`
	LocalStatic []*BuildDic          `json:"内部"`
	LocalFunc   []*BuildDic          `json:"函数"`
	LocalClass  map[string]*DicClass `json:"整合包"`
}

type DicClass

type DicClass struct {
	LocalValue *Val        `json:"变量"`
	LocalFunc  []*BuildDic `json:"函数"`
}

type LocalDicValue

type LocalDicValue struct {
	For struct {
		Success   bool        `json:"success"`
		Run       interface{} `json:"for"`
		Num       int         `json:"num"`
		VlaueName string      `json:"vlaueName"`
		Content   []string    `json:"content"`
		IsFor     bool        `json:"IsFor"`
		Jump      bool        `json:"jump"`
	} `json:"循环框"`
	Func struct {
		Success   bool     `json:"success"`
		Num       int      `json:"num"`
		VlaueName string   `json:"vlaueName"`
		Trigger   string   `json:"trigger"`
		Content   []string `json:"content"`
	} `json:"函数框"`
	Text struct {
		Success   bool   `json:"success"`
		ReadValue bool   `json:"readValue"`
		LineFeed  string `json:"lineFeed"`
		VlaueName string `json:"vlaueName"`
		Content   string `json:"content"`
	} `json:"文本框"`
	ValText struct {
		Success   bool   `json:"success"`
		ReadValue bool   `json:"readValue"`
		LineFeed  string `json:"lineFeed"`
		VlaueName string `json:"vlaueName"`
		Content   string `json:"content"`
	} `json:"赋予值文本框"`
	Lua struct {
		Success   bool   `json:"success"`
		VlaueName string `json:"vlaueName"`
		VlaueList string `json:"vlaueList"`
		Content   string `json:"content"`
	} `json:"Lua框"`
	Js struct {
		Success   bool   `json:"success"`
		VlaueName string `json:"vlaueName"`
		VlaueList string `json:"vlaueList"`
		Content   string `json:"content"`
	} `json:"Js框"`
	IfFunc struct {
		Success bool       `json:"success"`
		IsElse  bool       `json:"IsElse"`
		Num     int        `json:"num"`
		IfNum   int        `json:"ifnum"`
		If      []string   `json:"if"`
		Else    []string   `json:"Else"`
		Run     [][]string `json:"Run"`
		IsIf    bool       `json:"IsIf"`
		Jump    bool       `json:"jump"`
	} `json:"判断框"`
	SetJson struct {
		Success   bool        `json:"success"`
		VlaueName string      `json:"vlaueName"`
		Json      interface{} `json:"json"`
		OkLen     bool        `json:"OkLen"`
		Len       int         `json:"Len"`
	} `json:"Json框"`
	Database *sql.DB     `json:"database"`
	Json     interface{} `json:"json"`
	Access   interface{} `json:"access"`
	Stop     bool        `json:"stop"`
}

系统变量

func (*LocalDicValue) ForGetRun

func (d *LocalDicValue) ForGetRun() interface{}

type MysqlResultInfo

type MysqlResultInfo struct {
	RowsAffected int64 `json:"rows_affected"`
	LastInsertID int64 `json:"last_insert_id,omitempty"`
}

type SingleValue

type SingleValue struct {
	Data string
}

单值寄存结构体

func (*SingleValue) Add

func (s *SingleValue) Add(v string) *SingleValue

追加值

func (*SingleValue) Clear

func (s *SingleValue) Clear() *SingleValue

清空值

func (*SingleValue) Get

func (s *SingleValue) Get() string

获取值

func (*SingleValue) Prepend

func (s *SingleValue) Prepend(v string) *SingleValue

反着追加值

func (*SingleValue) Set

func (s *SingleValue) Set(v string) *SingleValue

设置值

type Val

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

value变量

var GV *Val = NewVal()

线程变量

func NewVal

func NewVal() *Val

NewVal 初始化 Val 对象

func (*Val) Add

func (v *Val) Add(key string, val interface{})

Add 将值添加到指定键的值后面

func (*Val) AddObjs

func (v *Val) AddObjs(key string, mapV []map[string]interface{})

覆盖obj

func (*Val) Get

func (v *Val) Get(key string) interface{}

Get 返回指定键的值

func (*Val) GetAll

func (v *Val) GetAll() map[string]interface{}

GetAll 返回全部对象

func (*Val) GetObj

func (v *Val) GetObj(key string) map[string]interface{}

GetObj 返回指定键的值

func (*Val) HeaderAdd

func (v *Val) HeaderAdd(key string, val interface{})

HeaderAdd 将值添加到指定键的值前面

func (*Val) NewObj

func (v *Val) NewObj(val map[string]interface{})

NewObj 添加新对象

func (*Val) Reset

func (v *Val) Reset(val map[string]interface{})

Reset 重新设置对象

func (*Val) Set

func (v *Val) Set(key string, val interface{}) *Val

Set 设置指定键的值

func (*Val) SetLock

func (v *Val) SetLock(key string, val bool) *Val

Set 设置指定键的值

func (*Val) SetObj

func (v *Val) SetObj(key string, objkey string, val interface{}) bool

SetObj 设置指定键的值,如果操作成功返回 true,否则返回 false

func (*Val) Text

func (v *Val) Text(str string) string

Text 读取变量

func (*Val) Texts

func (v *Val) Texts(str, start, end string) string

Jump to

Keyboard shortcuts

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