ctrl

package
v0.0.0-...-843cdbd Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BooleanSet

type BooleanSet struct {
	Yes   bool `bson:"yes" json:"yes"` //是否设置
	Value bool `json:"value"`          //对应值
}

type Ctrl

type Ctrl struct {
	Tags  []string `bson:"tags,omitempty" json:"tags,omitempty"`
	Paras []Para   `bson:"paras,omitempty" json:"paras,omitempty"`
}

Ctrl 数据控制器,用于给数据进行控制打标或者设置参数

func Mix

func Mix(ctrlM *Ctrl, setM *Set) (*Ctrl, bool)

Mix 分析更改 *Ctrl: 新的Ctrl bool: 是否有变化

func New

func New() *Ctrl

func (*Ctrl) WithPara

func (c *Ctrl) WithPara(key string, value string) *Ctrl

func (*Ctrl) WithTag

func (c *Ctrl) WithTag(tag ...string) *Ctrl

type Int64Set

type Int64Set struct {
	Yes   bool  `bson:"yes" json:"yes"` //是否设置
	Value int64 `json:"value"`          //对应值
}

type IntSet

type IntSet struct {
	Yes   bool `bson:"yes" json:"yes"` //是否设置
	Value int  `json:"value"`          //对应值
}

type Para

type Para struct {
	Key   string `bson:"key" json:"key"`
	Value string `bson:"val" json:"val"`
}

type Set

type Set struct {
	Yes      bool     `json:"yes"`                     //是否设置
	AddTag   []string `json:"add_ctrl_tag,omitempty"`  //[|]控制标中需要新增的标
	RmvTag   []string `json:"rmv_ctrl_tag,omitempty"`  //[|]控制标中需要删除的标
	CtrlPara []Para   `json:"ctrl_para,omitempty"`     //[|]控制参数中需要新增或者更新的参数
	RmvPara  []string `json:"rmv_ctrl_para,omitempty"` //[|]控制参数中需要删除的参数
}

type StringArraySet

type StringArraySet struct {
	Yes   bool     `bson:"yes" json:"yes"`
	Value []string `bson:"value" json:"value"`
}

type StringSet

type StringSet struct {
	Yes   bool   `bson:"yes" json:"yes"` //是否设置
	Value string `json:"value"`          //对应值
}

type TagSet

type TagSet = StringArraySet

Jump to

Keyboard shortcuts

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