dbschema

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithPrefix = func(tableName string) string {
	return "" + tableName
}

Functions

This section is empty.

Types

type NgingFirewallRuleDynamic

type NgingFirewallRuleDynamic struct {
	Id                 uint   `db:"id,omitempty,pk" bson:"id,omitempty" comment:"ID" json:"id" xml:"id"`
	Name               string `db:"name" bson:"name" comment:"规则名称" json:"name" xml:"name"`
	SourceType         string `db:"source_type" bson:"source_type" comment:"资源类型" json:"source_type" xml:"source_type"`
	SourceArgs         string `db:"source_args" bson:"source_args" comment:"资源参数(JSON数组)" json:"source_args" xml:"source_args"`
	Regexp             string `db:"regexp" bson:"regexp" comment:"正则规格(JSON数组)" json:"regexp" xml:"regexp"`
	ActionType         string `db:"action_type" bson:"action_type" comment:"操作类型" json:"action_type" xml:"action_type"`
	ActionArg          string `db:"action_arg" bson:"action_arg" comment:"操作参数" json:"action_arg" xml:"action_arg"`
	AggregateDuration  string `db:"aggregate_duration" bson:"aggregate_duration" comment:"合计时长" json:"aggregate_duration" xml:"aggregate_duration"`
	AggregateRegexp    string `` /* 127-byte string literal not displayed */
	OccurrenceNum      uint   `` /* 134-byte string literal not displayed */
	OccurrenceDuration string `` /* 134-byte string literal not displayed */
	Disabled           string `db:"disabled" bson:"disabled" comment:"是否(Y/N)禁用" json:"disabled" xml:"disabled"`
	Created            uint   `db:"created" bson:"created" comment:"创建时间" json:"created" xml:"created"`
	Updated            uint   `db:"updated" bson:"updated" comment:"更新时间" json:"updated" xml:"updated"`
	// contains filtered or unexported fields
}

NgingFirewallRuleDynamic 防火墙动态规则

func NewNgingFirewallRuleDynamic

func NewNgingFirewallRuleDynamic(ctx echo.Context) *NgingFirewallRuleDynamic

func (*NgingFirewallRuleDynamic) AsKV

func (a *NgingFirewallRuleDynamic) AsKV(keyField string, valueField string, inputRows ...[]*NgingFirewallRuleDynamic) param.Store

func (*NgingFirewallRuleDynamic) AsMap

func (a *NgingFirewallRuleDynamic) AsMap(onlyFields ...string) param.Store

func (*NgingFirewallRuleDynamic) AsRow

func (a *NgingFirewallRuleDynamic) AsRow(onlyFields ...string) param.Store

func (*NgingFirewallRuleDynamic) Base_ added in v1.4.0

func (*NgingFirewallRuleDynamic) BatchValidate

func (a *NgingFirewallRuleDynamic) BatchValidate(kvset map[string]interface{}) error

func (*NgingFirewallRuleDynamic) CPAFrom

func (a *NgingFirewallRuleDynamic) CPAFrom(source factory.Model) factory.Model

func (*NgingFirewallRuleDynamic) ConnID added in v1.1.0

func (a *NgingFirewallRuleDynamic) ConnID() int

func (*NgingFirewallRuleDynamic) Context

func (a *NgingFirewallRuleDynamic) Context() echo.Context

func (*NgingFirewallRuleDynamic) Count

func (a *NgingFirewallRuleDynamic) Count(mw func(db.Result) db.Result, args ...interface{}) (int64, error)

func (*NgingFirewallRuleDynamic) Delete

func (a *NgingFirewallRuleDynamic) Delete(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingFirewallRuleDynamic) Deletex

func (a *NgingFirewallRuleDynamic) Deletex(mw func(db.Result) db.Result, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleDynamic) EventOFF

func (a *NgingFirewallRuleDynamic) EventOFF(off ...bool) factory.Model

func (*NgingFirewallRuleDynamic) EventON

func (a *NgingFirewallRuleDynamic) EventON(on ...bool) factory.Model

func (*NgingFirewallRuleDynamic) Exists

func (a *NgingFirewallRuleDynamic) Exists(mw func(db.Result) db.Result, args ...interface{}) (bool, error)

func (*NgingFirewallRuleDynamic) FromRow

func (a *NgingFirewallRuleDynamic) FromRow(row map[string]interface{})

func (*NgingFirewallRuleDynamic) Get

func (a *NgingFirewallRuleDynamic) Get(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingFirewallRuleDynamic) GroupBy

func (a *NgingFirewallRuleDynamic) GroupBy(keyField string, inputRows ...[]*NgingFirewallRuleDynamic) map[string][]*NgingFirewallRuleDynamic

func (*NgingFirewallRuleDynamic) InitObjects

func (*NgingFirewallRuleDynamic) Insert

func (a *NgingFirewallRuleDynamic) Insert() (pk interface{}, err error)

func (*NgingFirewallRuleDynamic) KeyBy

func (*NgingFirewallRuleDynamic) List

func (a *NgingFirewallRuleDynamic) List(recv interface{}, mw func(db.Result) db.Result, page, size int, args ...interface{}) (func() int64, error)

func (*NgingFirewallRuleDynamic) ListByOffset

func (a *NgingFirewallRuleDynamic) ListByOffset(recv interface{}, mw func(db.Result) db.Result, offset, size int, args ...interface{}) (func() int64, error)

func (*NgingFirewallRuleDynamic) ListPage

func (a *NgingFirewallRuleDynamic) ListPage(cond *db.Compounds, sorts ...interface{}) error

func (*NgingFirewallRuleDynamic) ListPageAs

func (a *NgingFirewallRuleDynamic) ListPageAs(recv interface{}, cond *db.Compounds, sorts ...interface{}) error

func (*NgingFirewallRuleDynamic) Name_

func (a *NgingFirewallRuleDynamic) Name_() string

func (*NgingFirewallRuleDynamic) Namer

func (a *NgingFirewallRuleDynamic) Namer() func(factory.Model) string

func (*NgingFirewallRuleDynamic) New

func (a *NgingFirewallRuleDynamic) New(structName string, connID ...int) factory.Model

func (*NgingFirewallRuleDynamic) NewObjects

func (a *NgingFirewallRuleDynamic) NewObjects() factory.Ranger

func (*NgingFirewallRuleDynamic) NewParam

func (a *NgingFirewallRuleDynamic) NewParam() *factory.Param

func (*NgingFirewallRuleDynamic) Objects

func (*NgingFirewallRuleDynamic) Param

func (a *NgingFirewallRuleDynamic) Param(mw func(db.Result) db.Result, args ...interface{}) *factory.Param

func (*NgingFirewallRuleDynamic) Reset

func (*NgingFirewallRuleDynamic) Set

func (a *NgingFirewallRuleDynamic) Set(key interface{}, value ...interface{})

func (*NgingFirewallRuleDynamic) SetConnID

func (a *NgingFirewallRuleDynamic) SetConnID(connID int) factory.Model

func (*NgingFirewallRuleDynamic) SetContext

func (a *NgingFirewallRuleDynamic) SetContext(ctx echo.Context) factory.Model

func (*NgingFirewallRuleDynamic) SetNamer

func (a *NgingFirewallRuleDynamic) SetNamer(namer func(factory.Model) string) factory.Model

func (*NgingFirewallRuleDynamic) SetParam

func (a *NgingFirewallRuleDynamic) SetParam(param *factory.Param) factory.Model

func (*NgingFirewallRuleDynamic) Short_

func (a *NgingFirewallRuleDynamic) Short_() string

func (*NgingFirewallRuleDynamic) Struct_

func (a *NgingFirewallRuleDynamic) Struct_() string

func (*NgingFirewallRuleDynamic) Trans

func (*NgingFirewallRuleDynamic) Update

func (a *NgingFirewallRuleDynamic) Update(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingFirewallRuleDynamic) UpdateByFields

func (a *NgingFirewallRuleDynamic) UpdateByFields(mw func(db.Result) db.Result, fields []string, args ...interface{}) (err error)

func (*NgingFirewallRuleDynamic) UpdateField

func (a *NgingFirewallRuleDynamic) UpdateField(mw func(db.Result) db.Result, field string, value interface{}, args ...interface{}) (err error)

func (*NgingFirewallRuleDynamic) UpdateFields

func (a *NgingFirewallRuleDynamic) UpdateFields(mw func(db.Result) db.Result, kvset map[string]interface{}, args ...interface{}) (err error)

func (*NgingFirewallRuleDynamic) UpdateValues

func (a *NgingFirewallRuleDynamic) UpdateValues(mw func(db.Result) db.Result, keysValues *db.KeysValues, args ...interface{}) (err error)

func (*NgingFirewallRuleDynamic) Updatex

func (a *NgingFirewallRuleDynamic) Updatex(mw func(db.Result) db.Result, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleDynamic) UpdatexByFields

func (a *NgingFirewallRuleDynamic) UpdatexByFields(mw func(db.Result) db.Result, fields []string, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleDynamic) UpdatexField added in v1.2.0

func (a *NgingFirewallRuleDynamic) UpdatexField(mw func(db.Result) db.Result, field string, value interface{}, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleDynamic) UpdatexFields added in v1.2.0

func (a *NgingFirewallRuleDynamic) UpdatexFields(mw func(db.Result) db.Result, kvset map[string]interface{}, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleDynamic) Upsert

func (a *NgingFirewallRuleDynamic) Upsert(mw func(db.Result) db.Result, args ...interface{}) (pk interface{}, err error)

func (*NgingFirewallRuleDynamic) Use

func (*NgingFirewallRuleDynamic) Validate

func (a *NgingFirewallRuleDynamic) Validate(field string, value interface{}) error

func (*NgingFirewallRuleDynamic) XObjects

type NgingFirewallRuleStatic

type NgingFirewallRuleStatic struct {
	Id          uint   `db:"id,omitempty,pk" bson:"id,omitempty" comment:"ID" json:"id" xml:"id"`
	Type        string `db:"type" bson:"type" comment:"类型(filter/nat/mangle/raw)" json:"type" xml:"type"`
	Position    int    `db:"position" bson:"position" comment:"位置" json:"position" xml:"position"`
	Name        string `db:"name" bson:"name" comment:"规则名称" json:"name" xml:"name"`
	Direction   string `db:"direction" bson:"direction" comment:"方向" json:"direction" xml:"direction"`
	Protocol    string `db:"protocol" bson:"protocol" comment:"协议" json:"protocol" xml:"protocol"`
	RemoteIp    string `db:"remote_ip" bson:"remote_ip" comment:"远程IP" json:"remote_ip" xml:"remote_ip"`
	RemotePort  string `db:"remote_port" bson:"remote_port" comment:"远程端口" json:"remote_port" xml:"remote_port"`
	LocalIp     string `db:"local_ip" bson:"local_ip" comment:"本地IP" json:"local_ip" xml:"local_ip"`
	LocalPort   string `db:"local_port" bson:"local_port" comment:"本地端口" json:"local_port" xml:"local_port"`
	NatIp       string `db:"nat_ip" bson:"nat_ip" comment:"NAT IP" json:"nat_ip" xml:"nat_ip"`
	NatPort     string `db:"nat_port" bson:"nat_port" comment:"NAT 端口" json:"nat_port" xml:"nat_port"`
	Interface   string `db:"interface" bson:"interface" comment:"入站网口" json:"interface" xml:"interface"`
	Outerface   string `db:"outerface" bson:"outerface" comment:"出站往口" json:"outerface" xml:"outerface"`
	State       string `db:"state" bson:"state" comment:"状态(多个用逗号\",\"分隔)" json:"state" xml:"state"`
	ConnLimit   string `db:"conn_limit" bson:"conn_limit" comment:"连接数限制" json:"conn_limit" xml:"conn_limit"`
	RateLimit   string `db:"rate_limit" bson:"rate_limit" comment:"频率限制" json:"rate_limit" xml:"rate_limit"`
	RateBurst   uint   `db:"rate_burst" bson:"rate_burst" comment:"频率允许峰值" json:"rate_burst" xml:"rate_burst"`
	RateExpires uint   `db:"rate_expires" bson:"rate_expires" comment:"过期时间(秒)" json:"rate_expires" xml:"rate_expires"`
	Extra       string `db:"extra" bson:"extra" comment:"其它扩展设置" json:"extra" xml:"extra"`
	Action      string `db:"action" bson:"action" comment:"操作" json:"action" xml:"action"`
	IpVersion   string `db:"ip_version" bson:"ip_version" comment:"IP版本" json:"ip_version" xml:"ip_version"`
	Disabled    string `db:"disabled" bson:"disabled" comment:"是否(Y/N)禁用" json:"disabled" xml:"disabled"`
	Created     uint   `db:"created" bson:"created" comment:"创建时间" json:"created" xml:"created"`
	Updated     uint   `db:"updated" bson:"updated" comment:"更新时间" json:"updated" xml:"updated"`
	// contains filtered or unexported fields
}

NgingFirewallRuleStatic 防火墙静态规则

func NewNgingFirewallRuleStatic

func NewNgingFirewallRuleStatic(ctx echo.Context) *NgingFirewallRuleStatic

func (*NgingFirewallRuleStatic) AsKV

func (a *NgingFirewallRuleStatic) AsKV(keyField string, valueField string, inputRows ...[]*NgingFirewallRuleStatic) param.Store

func (*NgingFirewallRuleStatic) AsMap

func (a *NgingFirewallRuleStatic) AsMap(onlyFields ...string) param.Store

func (*NgingFirewallRuleStatic) AsRow

func (a *NgingFirewallRuleStatic) AsRow(onlyFields ...string) param.Store

func (*NgingFirewallRuleStatic) Base_ added in v1.4.0

func (*NgingFirewallRuleStatic) BatchValidate

func (a *NgingFirewallRuleStatic) BatchValidate(kvset map[string]interface{}) error

func (*NgingFirewallRuleStatic) CPAFrom

func (a *NgingFirewallRuleStatic) CPAFrom(source factory.Model) factory.Model

func (*NgingFirewallRuleStatic) ConnID added in v1.1.0

func (a *NgingFirewallRuleStatic) ConnID() int

func (*NgingFirewallRuleStatic) Context

func (a *NgingFirewallRuleStatic) Context() echo.Context

func (*NgingFirewallRuleStatic) Count

func (a *NgingFirewallRuleStatic) Count(mw func(db.Result) db.Result, args ...interface{}) (int64, error)

func (*NgingFirewallRuleStatic) Delete

func (a *NgingFirewallRuleStatic) Delete(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingFirewallRuleStatic) Deletex

func (a *NgingFirewallRuleStatic) Deletex(mw func(db.Result) db.Result, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleStatic) EventOFF

func (a *NgingFirewallRuleStatic) EventOFF(off ...bool) factory.Model

func (*NgingFirewallRuleStatic) EventON

func (a *NgingFirewallRuleStatic) EventON(on ...bool) factory.Model

func (*NgingFirewallRuleStatic) Exists

func (a *NgingFirewallRuleStatic) Exists(mw func(db.Result) db.Result, args ...interface{}) (bool, error)

func (*NgingFirewallRuleStatic) FromRow

func (a *NgingFirewallRuleStatic) FromRow(row map[string]interface{})

func (*NgingFirewallRuleStatic) Get

func (a *NgingFirewallRuleStatic) Get(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingFirewallRuleStatic) GroupBy

func (a *NgingFirewallRuleStatic) GroupBy(keyField string, inputRows ...[]*NgingFirewallRuleStatic) map[string][]*NgingFirewallRuleStatic

func (*NgingFirewallRuleStatic) InitObjects

func (a *NgingFirewallRuleStatic) InitObjects() *[]*NgingFirewallRuleStatic

func (*NgingFirewallRuleStatic) Insert

func (a *NgingFirewallRuleStatic) Insert() (pk interface{}, err error)

func (*NgingFirewallRuleStatic) KeyBy

func (a *NgingFirewallRuleStatic) KeyBy(keyField string, inputRows ...[]*NgingFirewallRuleStatic) map[string]*NgingFirewallRuleStatic

func (*NgingFirewallRuleStatic) List

func (a *NgingFirewallRuleStatic) List(recv interface{}, mw func(db.Result) db.Result, page, size int, args ...interface{}) (func() int64, error)

func (*NgingFirewallRuleStatic) ListByOffset

func (a *NgingFirewallRuleStatic) ListByOffset(recv interface{}, mw func(db.Result) db.Result, offset, size int, args ...interface{}) (func() int64, error)

func (*NgingFirewallRuleStatic) ListPage

func (a *NgingFirewallRuleStatic) ListPage(cond *db.Compounds, sorts ...interface{}) error

func (*NgingFirewallRuleStatic) ListPageAs

func (a *NgingFirewallRuleStatic) ListPageAs(recv interface{}, cond *db.Compounds, sorts ...interface{}) error

func (*NgingFirewallRuleStatic) Name_

func (a *NgingFirewallRuleStatic) Name_() string

func (*NgingFirewallRuleStatic) Namer

func (a *NgingFirewallRuleStatic) Namer() func(factory.Model) string

func (*NgingFirewallRuleStatic) New

func (a *NgingFirewallRuleStatic) New(structName string, connID ...int) factory.Model

func (*NgingFirewallRuleStatic) NewObjects

func (a *NgingFirewallRuleStatic) NewObjects() factory.Ranger

func (*NgingFirewallRuleStatic) NewParam

func (a *NgingFirewallRuleStatic) NewParam() *factory.Param

func (*NgingFirewallRuleStatic) Objects

func (*NgingFirewallRuleStatic) Param

func (a *NgingFirewallRuleStatic) Param(mw func(db.Result) db.Result, args ...interface{}) *factory.Param

func (*NgingFirewallRuleStatic) Reset

func (*NgingFirewallRuleStatic) Set

func (a *NgingFirewallRuleStatic) Set(key interface{}, value ...interface{})

func (*NgingFirewallRuleStatic) SetConnID

func (a *NgingFirewallRuleStatic) SetConnID(connID int) factory.Model

func (*NgingFirewallRuleStatic) SetContext

func (a *NgingFirewallRuleStatic) SetContext(ctx echo.Context) factory.Model

func (*NgingFirewallRuleStatic) SetNamer

func (a *NgingFirewallRuleStatic) SetNamer(namer func(factory.Model) string) factory.Model

func (*NgingFirewallRuleStatic) SetParam

func (a *NgingFirewallRuleStatic) SetParam(param *factory.Param) factory.Model

func (*NgingFirewallRuleStatic) Short_

func (a *NgingFirewallRuleStatic) Short_() string

func (*NgingFirewallRuleStatic) Struct_

func (a *NgingFirewallRuleStatic) Struct_() string

func (*NgingFirewallRuleStatic) Trans

func (*NgingFirewallRuleStatic) Update

func (a *NgingFirewallRuleStatic) Update(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingFirewallRuleStatic) UpdateByFields

func (a *NgingFirewallRuleStatic) UpdateByFields(mw func(db.Result) db.Result, fields []string, args ...interface{}) (err error)

func (*NgingFirewallRuleStatic) UpdateField

func (a *NgingFirewallRuleStatic) UpdateField(mw func(db.Result) db.Result, field string, value interface{}, args ...interface{}) (err error)

func (*NgingFirewallRuleStatic) UpdateFields

func (a *NgingFirewallRuleStatic) UpdateFields(mw func(db.Result) db.Result, kvset map[string]interface{}, args ...interface{}) (err error)

func (*NgingFirewallRuleStatic) UpdateValues

func (a *NgingFirewallRuleStatic) UpdateValues(mw func(db.Result) db.Result, keysValues *db.KeysValues, args ...interface{}) (err error)

func (*NgingFirewallRuleStatic) Updatex

func (a *NgingFirewallRuleStatic) Updatex(mw func(db.Result) db.Result, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleStatic) UpdatexByFields

func (a *NgingFirewallRuleStatic) UpdatexByFields(mw func(db.Result) db.Result, fields []string, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleStatic) UpdatexField added in v1.2.0

func (a *NgingFirewallRuleStatic) UpdatexField(mw func(db.Result) db.Result, field string, value interface{}, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleStatic) UpdatexFields added in v1.2.0

func (a *NgingFirewallRuleStatic) UpdatexFields(mw func(db.Result) db.Result, kvset map[string]interface{}, args ...interface{}) (affected int64, err error)

func (*NgingFirewallRuleStatic) Upsert

func (a *NgingFirewallRuleStatic) Upsert(mw func(db.Result) db.Result, args ...interface{}) (pk interface{}, err error)

func (*NgingFirewallRuleStatic) Use

func (*NgingFirewallRuleStatic) Validate

func (a *NgingFirewallRuleStatic) Validate(field string, value interface{}) error

func (*NgingFirewallRuleStatic) XObjects

type Slice_NgingFirewallRuleDynamic

type Slice_NgingFirewallRuleDynamic []*NgingFirewallRuleDynamic

func (Slice_NgingFirewallRuleDynamic) AsKV

func (s Slice_NgingFirewallRuleDynamic) AsKV(keyField string, valueField string) param.Store

func (Slice_NgingFirewallRuleDynamic) FromList

func (Slice_NgingFirewallRuleDynamic) GroupBy

func (Slice_NgingFirewallRuleDynamic) KeyBy

func (Slice_NgingFirewallRuleDynamic) Range

func (Slice_NgingFirewallRuleDynamic) RangeRaw

func (Slice_NgingFirewallRuleDynamic) Transform

func (s Slice_NgingFirewallRuleDynamic) Transform(transfers map[string]param.Transfer) []param.Store

type Slice_NgingFirewallRuleStatic

type Slice_NgingFirewallRuleStatic []*NgingFirewallRuleStatic

func (Slice_NgingFirewallRuleStatic) AsKV

func (s Slice_NgingFirewallRuleStatic) AsKV(keyField string, valueField string) param.Store

func (Slice_NgingFirewallRuleStatic) FromList

func (s Slice_NgingFirewallRuleStatic) FromList(data interface{}) Slice_NgingFirewallRuleStatic

func (Slice_NgingFirewallRuleStatic) GroupBy

func (Slice_NgingFirewallRuleStatic) KeyBy

func (Slice_NgingFirewallRuleStatic) Range

func (Slice_NgingFirewallRuleStatic) RangeRaw

func (Slice_NgingFirewallRuleStatic) Transform

func (s Slice_NgingFirewallRuleStatic) Transform(transfers map[string]param.Transfer) []param.Store

Jump to

Keyboard shortcuts

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