Documentation ¶
Overview ¶
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Nging is a toolbox for webmasters Copyright (C) 2018-present Wenhui Shen <swh@admpub.com>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- Constants
- Variables
- func AlertSend(ctx echo.Context, topic string, params param.Store) error
- type AccessLog
- type AccessLogLite
- type AlertRecipient
- func (s *AlertRecipient) Add() (pk interface{}, err error)
- func (s *AlertRecipient) Delete(mw func(db.Result) db.Result, args ...interface{}) (err error)
- func (s *AlertRecipient) Edit(mw func(db.Result) db.Result, args ...interface{}) (err error)
- func (s *AlertRecipient) GetWithExt(mw func(db.Result) db.Result, args ...interface{}) (row *AlertRecipientExt, err error)
- type AlertRecipientExt
- type AlertTopic
- func (s *AlertTopic) Add(rows ...*dbschema.NgingAlertTopic) (pk interface{}, err error)
- func (s *AlertTopic) Edit(mw func(db.Result) db.Result, args ...interface{}) (err error)
- func (s *AlertTopic) Exists(topic string, recipientId uint) (bool, error)
- func (s *AlertTopic) ExistsOther(topic string, recipientId uint, excludeID uint) (bool, error)
- func (s *AlertTopic) Send(topic string, params param.Store) (err error)
- type AlertTopicExt
- type CloudStorage
- func (s *CloudStorage) Add() (pk interface{}, err error)
- func (s *CloudStorage) BaseURL() string
- func (s *CloudStorage) CachedList() map[string]*dbschema.NgingCloudStorage
- func (s *CloudStorage) Edit(mw func(db.Result) db.Result, args ...interface{}) (err error)
- func (s *CloudStorage) Get(mw func(db.Result) db.Result, args ...interface{}) error
- func (s *CloudStorage) RawSecret() string
- type Code
- func (c *Code) AddVerificationCode() (interface{}, error)
- func (c *Code) CheckFrequency(ownerID uint64, ownerType string, sendMethod string, frequencyCfg echo.H) error
- func (c *Code) CheckVerificationCode(code string, purpose string, ownerID uint64, ownerType string, ...) (err error)
- func (c *Code) CountTodayVerificationCode(ownerID uint64, ownerType string, sendMethod string) (int64, error)
- func (c *Code) LastVerificationCode(ownerID uint64, ownerType string, sendMethod string) (err error)
- func (c *Code) UseInvitationCode(m *dbschema.NgingCodeInvitation, usedUid uint) (err error)
- func (c *Code) UseVerificationCode(m *dbschema.NgingCodeVerification) (err error)
- func (c *Code) VerfyInvitationCode(code string) (err error)
- type CollectorExport
- type CollectorExportAndGroup
- type CollectorGroup
- type CollectorHistory
- type CollectorPage
- type CollectorPageAndGroup
- type CollectorRule
- type Command
- type Config
- func (f *Config) Add() (pk interface{}, err error)
- func (f *Config) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (f *Config) EditByPK(mw func(db.Result) db.Result, group string, key string) error
- func (f *Config) ListAllMapByGroup() (echo.H, error)
- func (f *Config) ListByGroup(group string) (func() int64, error)
- func (f *Config) ListMapByGroup(group string) (echo.H, error)
- func (f *Config) Upsert() (pk interface{}, err error)
- func (f *Config) ValueByKey(group, key string) string
- type DbAccount
- type DbSync
- func (a *DbSync) Add() (interface{}, error)
- func (a *DbSync) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (a *DbSync) HidePassword(dsn string) string
- func (a *DbSync) ParseDSN(dsn string) (user string, pwd string, host string, dbName string)
- func (a *DbSync) ToDSN(user, pwd, host, db string) string
- func (a *DbSync) ToDSNFromAccount(acc *dbschema.NgingDbAccount) string
- type DbSyncLog
- type DbSyncWithAccount
- type ForeverProcess
- func (u *ForeverProcess) Add() (pk interface{}, err error)
- func (u *ForeverProcess) ArgsSlice() []string
- func (u *ForeverProcess) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (u *ForeverProcess) EnvSlice() []string
- func (u *ForeverProcess) Exists(name string) (bool, error)
- func (u *ForeverProcess) Exists2(name string, excludeID uint) (bool, error)
- type FrpClient
- type FrpClientAndGroup
- type FrpGroup
- type FrpServer
- type FrpServerAndGroup
- type FtpUser
- type FtpUserAndGroup
- type FtpUserGroup
- type Invitation
- type Kv
- func (s *Kv) Add() (pk interface{}, err error)
- func (s *Kv) Delete(mw func(db.Result) db.Result, args ...interface{}) (err error)
- func (s *Kv) Edit(mw func(db.Result) db.Result, args ...interface{}) (err error)
- func (s *Kv) Get(mw func(db.Result) db.Result, args ...interface{}) error
- func (s *Kv) GetFromTypeList(typeList []*dbschema.NgingKv, key string) string
- func (s *Kv) IsRootType(typ string) bool
- func (s *Kv) KvTypeList(excludeIDs ...uint) []*dbschema.NgingKv
- func (s *Kv) ListByType(typ string, excludeIDs ...uint) []*dbschema.NgingKv
- func (s *Kv) ListToMap(typeList []*dbschema.NgingKv) map[string]*dbschema.NgingKv
- func (s *Kv) SetSingleField(id int, field string, value string) error
- type SendingLog
- type SshUser
- type SshUserAndGroup
- type SshUserGroup
- type Task
- type TaskAndGroup
- type TaskGroup
- type TaskLog
- type User
- func (u *User) Add() (err error)
- func (u *User) CheckPasswd(username string, password string) (exists bool, err error)
- func (u *User) ClearPasswordData(users ...*dbschema.NgingUser) dbschema.NgingUser
- func (u *User) Exists(username string) (bool, error)
- func (u *User) Exists2(username string, excludeUID uint) (bool, error)
- func (u *User) GetUserAllU2F(uid uint) ([]*dbschema.NgingUserU2f, error)
- func (u *User) NeedCheckU2F(uid uint) bool
- func (u *User) Register(user, pass, email, roleIds string) error
- func (u *User) SetSession(users ...*dbschema.NgingUser)
- func (u *User) U2F(uid uint, typ string) (u2f *dbschema.NgingUserU2f, err error)
- func (u *User) UnsetSession()
- func (u *User) UpdateField(uid uint, set map[string]interface{}) (err error)
- func (u *User) VerifySession(users ...*dbschema.NgingUser) error
- type UserRole
- func (u *UserRole) CheckCmdPerm(permPath string) bool
- func (u *UserRole) CheckCmdPerm2(roleList []*dbschema.NgingUserRole, perm string) (hasPerm bool)
- func (u *UserRole) CheckPerm(permPath string) bool
- func (u *UserRole) CheckPerm2(roleList []*dbschema.NgingUserRole, perm string) (hasPerm bool)
- func (u *UserRole) CleanPermAction(values []string) *UserRole
- func (u *UserRole) Exists(name string) (bool, error)
- func (u *UserRole) Exists2(name string, excludeID uint) (bool, error)
- func (u *UserRole) FilterNavigate(roleList []*dbschema.NgingUserRole, navList *navigate.List) navigate.List
- func (u *UserRole) ListByUser(user *dbschema.NgingUser) (roleList []*dbschema.NgingUserRole)
- type Verification
- type Vhost
- type VhostAndGroup
Constants ¶
const KvRootType = `root`
Variables ¶
var ( // SMSWaitingSeconds 短信发送后等待秒数 SMSWaitingSeconds int64 = 60 // SMSMaxPerDay 短信每人每天发送上限 SMSMaxPerDay int64 = 10 )
var ( ErrNoneFtpDirectory = errors.New(`No accessible directory`) ErrBannedFtpUser = errors.New(`The current account has been disabled`) )
var CaddyLogRegexpList = sync.Map{}
var (
Decode = func(r string) string { return r }
)
var DefaultSalt = ``
Functions ¶
Types ¶
type AccessLog ¶
type AccessLog struct { *dbschema.NgingAccessLog // contains filtered or unexported fields }
func NewAccessLog ¶
func (*AccessLog) ToLite ¶
func (m *AccessLog) ToLite() *AccessLogLite
type AccessLogLite ¶
type AlertRecipient ¶
type AlertRecipient struct { *dbschema.NgingAlertRecipient // contains filtered or unexported fields }
func NewAlertRecipient ¶
func NewAlertRecipient(ctx echo.Context) *AlertRecipient
func (*AlertRecipient) Add ¶
func (s *AlertRecipient) Add() (pk interface{}, err error)
func (*AlertRecipient) GetWithExt ¶
func (s *AlertRecipient) GetWithExt(mw func(db.Result) db.Result, args ...interface{}) (row *AlertRecipientExt, err error)
type AlertRecipientExt ¶
type AlertRecipientExt struct { *dbschema.NgingAlertRecipient Extra echo.H }
func (*AlertRecipientExt) Parse ¶
func (a *AlertRecipientExt) Parse() *AlertRecipientExt
type AlertTopic ¶
type AlertTopic struct { *dbschema.NgingAlertTopic // contains filtered or unexported fields }
func NewAlertTopic ¶
func NewAlertTopic(ctx echo.Context) *AlertTopic
func (*AlertTopic) Add ¶
func (s *AlertTopic) Add(rows ...*dbschema.NgingAlertTopic) (pk interface{}, err error)
func (*AlertTopic) Exists ¶
func (s *AlertTopic) Exists(topic string, recipientId uint) (bool, error)
func (*AlertTopic) ExistsOther ¶
type AlertTopicExt ¶
type AlertTopicExt struct { *dbschema.NgingAlertTopic Recipient *dbschema.NgingAlertRecipient `db:"-,relation=id:recipient_id"` Extra echo.H }
func (*AlertTopicExt) Parse ¶
func (a *AlertTopicExt) Parse() *AlertTopicExt
type CloudStorage ¶
type CloudStorage struct { *dbschema.NgingCloudStorage // contains filtered or unexported fields }
func NewCloudStorage ¶
func NewCloudStorage(ctx echo.Context) *CloudStorage
func (*CloudStorage) Add ¶
func (s *CloudStorage) Add() (pk interface{}, err error)
func (*CloudStorage) BaseURL ¶
func (s *CloudStorage) BaseURL() string
func (*CloudStorage) CachedList ¶
func (s *CloudStorage) CachedList() map[string]*dbschema.NgingCloudStorage
func (*CloudStorage) RawSecret ¶
func (s *CloudStorage) RawSecret() string
type Code ¶
type Code struct { Verification *dbschema.NgingCodeVerification Invitation *dbschema.NgingCodeInvitation *base.Base }
func (*Code) AddVerificationCode ¶
func (*Code) CheckFrequency ¶
func (*Code) CheckVerificationCode ¶
func (*Code) CountTodayVerificationCode ¶
func (*Code) LastVerificationCode ¶
func (*Code) UseInvitationCode ¶
func (c *Code) UseInvitationCode(m *dbschema.NgingCodeInvitation, usedUid uint) (err error)
func (*Code) UseVerificationCode ¶
func (c *Code) UseVerificationCode(m *dbschema.NgingCodeVerification) (err error)
func (*Code) VerfyInvitationCode ¶
type CollectorExport ¶
type CollectorExport struct { *dbschema.NgingCollectorExport *base.Base }
func NewCollectorExport ¶
func NewCollectorExport(ctx echo.Context) *CollectorExport
func (*CollectorExport) Add ¶
func (c *CollectorExport) Add() (pk interface{}, err error)
func (*CollectorExport) Export ¶
func (c *CollectorExport) Export() (int64, error)
type CollectorExportAndGroup ¶
type CollectorExportAndGroup struct { *dbschema.NgingCollectorExport Group *dbschema.NgingCollectorGroup }
type CollectorGroup ¶
type CollectorGroup struct { *dbschema.NgingCollectorGroup *base.Base }
func NewCollectorGroup ¶
func NewCollectorGroup(ctx echo.Context) *CollectorGroup
type CollectorHistory ¶
type CollectorHistory struct { *dbschema.NgingCollectorHistory *base.Base }
func NewCollectorHistory ¶
func NewCollectorHistory(ctx echo.Context) *CollectorHistory
func (*CollectorHistory) Reset ¶
func (c *CollectorHistory) Reset() *CollectorHistory
type CollectorPage ¶
type CollectorPage struct { *dbschema.NgingCollectorPage *base.Base }
func NewCollectorPage ¶
func NewCollectorPage(ctx echo.Context) *CollectorPage
type CollectorPageAndGroup ¶
type CollectorPageAndGroup struct { *dbschema.NgingCollectorPage Group *dbschema.NgingCollectorGroup `db:"-,relation=id:group_id|gtZero"` }
type CollectorRule ¶
type CollectorRule struct { *dbschema.NgingCollectorRule *base.Base }
func NewCollectorRule ¶
func NewCollectorRule(ctx echo.Context) *CollectorRule
type Config ¶
type Config struct { *dbschema.NgingConfig // contains filtered or unexported fields }
func (*Config) ValueByKey ¶
type DbAccount ¶ added in v1.3.0
type DbAccount struct { *dbschema.NgingDbAccount *base.Base }
func NewDbAccount ¶ added in v1.3.0
func (*DbAccount) SetOptions ¶
type DbSync ¶
type DbSync struct { *dbschema.NgingDbSync *base.Base }
func (*DbSync) HidePassword ¶
func (*DbSync) ToDSNFromAccount ¶
func (a *DbSync) ToDSNFromAccount(acc *dbschema.NgingDbAccount) string
type DbSyncWithAccount ¶
type DbSyncWithAccount struct { *dbschema.NgingDbSync SrcAccount *dbschema.NgingDbAccount `db:"-,relation=id:source_account_id"` DstAccount *dbschema.NgingDbAccount `db:"-,relation=id:destination_account_id"` }
type ForeverProcess ¶
type ForeverProcess struct { *dbschema.NgingForeverProcess *base.Base }
func NewForeverProcess ¶
func NewForeverProcess(ctx echo.Context) *ForeverProcess
func (*ForeverProcess) Add ¶
func (u *ForeverProcess) Add() (pk interface{}, err error)
func (*ForeverProcess) ArgsSlice ¶
func (u *ForeverProcess) ArgsSlice() []string
func (*ForeverProcess) EnvSlice ¶
func (u *ForeverProcess) EnvSlice() []string
type FrpClientAndGroup ¶
type FrpClientAndGroup struct { *dbschema.NgingFrpClient Group *dbschema.NgingFrpGroup `db:"-,relation=id:group_id|gtZero"` Running bool }
type FrpServerAndGroup ¶
type FrpServerAndGroup struct { *dbschema.NgingFrpServer Group *dbschema.NgingFrpGroup `db:"-,relation=id:group_id|gtZero"` Running bool }
type FtpUser ¶
type FtpUser struct { *dbschema.NgingFtpUser *base.Base }
func NewFtpUser ¶
func (*FtpUser) CheckPasswd ¶
type FtpUserAndGroup ¶
type FtpUserAndGroup struct { *dbschema.NgingFtpUser Group *dbschema.NgingFtpUserGroup `db:"-,relation=id:group_id|gtZero"` }
type FtpUserGroup ¶
type FtpUserGroup struct { *dbschema.NgingFtpUserGroup *base.Base }
func NewFtpUserGroup ¶
func NewFtpUserGroup(ctx echo.Context) *FtpUserGroup
func (*FtpUserGroup) ExistsOther ¶
func (f *FtpUserGroup) ExistsOther(name string, id uint) (bool, error)
func (*FtpUserGroup) ListByActive ¶
func (f *FtpUserGroup) ListByActive(page int, size int) (func() int64, []*dbschema.NgingFtpUserGroup, error)
type Invitation ¶
type Invitation struct { *dbschema.NgingCodeInvitation *base.Base }
func NewInvitation ¶
func NewInvitation(ctx echo.Context) *Invitation
type Kv ¶
func (*Kv) GetFromTypeList ¶
func (*Kv) IsRootType ¶
type SendingLog ¶
type SendingLog struct { *dbschema.NgingSendingLog *base.Base }
func NewSendingLog ¶
func NewSendingLog(ctx echo.Context) *SendingLog
func (*SendingLog) Add ¶
func (c *SendingLog) Add() (interface{}, error)
type SshUserAndGroup ¶
type SshUserAndGroup struct { *dbschema.NgingSshUser Group *dbschema.NgingSshUserGroup }
type SshUserGroup ¶
type SshUserGroup struct { *dbschema.NgingSshUserGroup *base.Base }
func NewSshUserGroup ¶
func NewSshUserGroup(ctx echo.Context) *SshUserGroup
func (*SshUserGroup) ExistsOther ¶
func (f *SshUserGroup) ExistsOther(name string, id uint) (bool, error)
type TaskAndGroup ¶
type TaskAndGroup struct { *dbschema.NgingTask Group *dbschema.NgingTaskGroup `db:"-,relation=id:group_id|gtZero"` }
type User ¶
func (*User) CheckPasswd ¶
func (*User) ClearPasswordData ¶
func (*User) GetUserAllU2F ¶
func (u *User) GetUserAllU2F(uid uint) ([]*dbschema.NgingUserU2f, error)
func (*User) NeedCheckU2F ¶
func (*User) SetSession ¶
func (*User) UnsetSession ¶
func (u *User) UnsetSession()
func (*User) UpdateField ¶
type UserRole ¶
type UserRole struct { *dbschema.NgingUserRole *base.Base // contains filtered or unexported fields }
func NewUserRole ¶
func (*UserRole) CheckCmdPerm ¶
func (*UserRole) CheckCmdPerm2 ¶
func (u *UserRole) CheckCmdPerm2(roleList []*dbschema.NgingUserRole, perm string) (hasPerm bool)
func (*UserRole) CheckPerm2 ¶
func (u *UserRole) CheckPerm2(roleList []*dbschema.NgingUserRole, perm string) (hasPerm bool)
func (*UserRole) CleanPermAction ¶
func (*UserRole) FilterNavigate ¶
func (u *UserRole) FilterNavigate(roleList []*dbschema.NgingUserRole, navList *navigate.List) navigate.List
FilterNavigate 过滤导航菜单,只显示有权限的菜单
func (*UserRole) ListByUser ¶
func (u *UserRole) ListByUser(user *dbschema.NgingUser) (roleList []*dbschema.NgingUserRole)
type Verification ¶
type Verification struct { *dbschema.NgingCodeVerification *base.Base }
func NewVerification ¶
func NewVerification(ctx echo.Context) *Verification
type VhostAndGroup ¶
type VhostAndGroup struct { *dbschema.NgingVhost Group *dbschema.NgingVhostGroup `db:"-,relation=id:group_id|gtZero"` }
Source Files ¶
- accessLog.go
- accessLog_caddy.go
- accessLog_pattern.go
- accessLog_schema.go
- alertRecipient.go
- alertRecipient_ext.go
- alertTopic.go
- alertTopic_ext.go
- cloudStorage.go
- code.go
- collectorExport.go
- collectorGroup.go
- collectorHistory.go
- collectorPage.go
- collectorRule.go
- command.go
- config.go
- dbAccount.go
- dbSync.go
- dbSyncLog.go
- foreverProcess.go
- frpClient.go
- frpGroup.go
- frpServer.go
- ftpUser.go
- ftpUserGroup.go
- invitation.go
- kv.go
- sendingLog.go
- sshUser.go
- sshUserGroup.go
- task.go
- taskGroup.go
- taskLog.go
- user.go
- userRole.go
- verification.go
- vhost.go