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/>.
Index ¶
- Constants
- Variables
- func GetU2FStepCondValue(step uint) interface{}
- func InvalidScope(scopes []string, f *dbschema.NgingOauthApp) (invalidScopes []string)
- func ListSafeItemsByStep(step uint, exclude ...string) []echo.KV
- func MatchDomain(domain string, f *dbschema.NgingOauthApp) bool
- func RegisterSafeItem(itemType, itemTitle string, info SafeItemInfo, extra ...echo.H)
- func VerifyApp(f *dbschema.NgingOauthApp, domain string, scopes []string) error
- type AlertRecipient
- 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, alertData *alert.AlertData) (err error)
- type CloudBackup
- type CloudBackupExt
- type CloudBackupLog
- 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 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 Invitation
- type Kv
- func (s *Kv) Add() (pk interface{}, err error)
- func (s *Kv) AutoCreateKey(key string, value ...string) 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) GetTypeValues(typ string, defaultValue ...string) ([]string, error)
- func (s *Kv) GetValue(key string, defaultValue ...string) (string, error)
- 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 LoginLog
- func (s *LoginLog) Add() (pk interface{}, err error)
- func (s *LoginLog) AddAndSaveSession() (pk interface{}, err error)
- func (s *LoginLog) Edit(mw func(db.Result) db.Result, args ...interface{}) (err error)
- func (s *LoginLog) GetLastFailure(ownerType string, ownerId uint64) (err error)
- func (s *LoginLog) GetLastSuccess(ownerType string, ownerId uint64, sessionId string) (err error)
- func (s *LoginLog) InitLocation() (ipInfo ip2regionparser.IpInfo, err error)
- func (s *LoginLog) ListPage(cond *db.Compounds, sorts ...interface{}) ([]*dbschema.NgingLoginLog, error)
- type OAuthAgree
- type OAuthApp
- func (f *OAuthApp) Add() (pk interface{}, err error)
- func (f *OAuthApp) Edit(mw func(db.Result) db.Result, args ...interface{}) (err error)
- func (f *OAuthApp) Exists(appID string) error
- func (f *OAuthApp) GenerateAppID() (string, error)
- func (f *OAuthApp) GenerateAppSecret() string
- func (f *OAuthApp) GetAndVerify(appID string, domain string, scopes []string) error
- func (f *OAuthApp) GetByAppID(appID string, ignoreStatus ...bool) error
- func (f *OAuthApp) MatchDomain(domain string) bool
- func (f *OAuthApp) MatchScope(scopes ...string) bool
- func (f *OAuthApp) VerifyApp(domain string, scopes []string) error
- type SafeItemInfo
- type SendingLog
- 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) FireLoginFailure(authType string, pass string, err error) error
- func (u *User) FireLoginSuccess(authType string) error
- func (u *User) GetUserAllU2F(uid uint) ([]*dbschema.NgingUserU2f, error)
- func (u *User) IncrLoginFails() error
- func (u *User) NeedCheckU2F(authType string, uid uint, step uint) (need bool, err error)
- func (u *User) NewLoginLog(username string, authType string) *LoginLog
- func (u *User) Register(user, pass, email, roleIds string) error
- func (u *User) ResetLoginFails() error
- func (u *User) SetSession(users ...*dbschema.NgingUser)
- func (u *User) U2F(uid uint, typ string, step uint) (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 UserOAuth
- func (f *UserOAuth) Add() (pk interface{}, err error)
- func (f *UserOAuth) CopyFrom(user *goth.User) *UserOAuth
- func (f *UserOAuth) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (f *UserOAuth) Exists(uid uint64, unionID string, openID string, typ string) (bool, error)
- func (f *UserOAuth) ExistsOtherBinding(uid uint64, id uint64) (bool, error)
- func (f *UserOAuth) GetByOutUser(user *goth.User) (err error)
- func (f *UserOAuth) OAuthUserGender(ouser *goth.User) string
- func (f *UserOAuth) Upsert(mw func(db.Result) db.Result, args ...interface{}) (interface{}, error)
- type UserRole
- func (u *UserRole) Add() (interface{}, error)
- func (u *UserRole) Edit(mw func(db.Result) db.Result, args ...interface{}) error
- func (u *UserRole) Exists(name string) (bool, error)
- func (u *UserRole) Exists2(name string, excludeID uint) (bool, error)
- func (u *UserRole) ListByUser(user *dbschema.NgingUser) (roleList []*dbschema.NgingUserRole)
- type UserRolePermission
- type UserU2F
- func (u *UserU2F) Add() (interface{}, error)
- func (u *UserU2F) HasType(uid uint, authType string, step uint) (bool, error)
- func (u *UserU2F) ListPageByType(uid uint, typ string, step uint, sorts ...interface{}) error
- func (u *UserU2F) Unbind(uid uint, typ string, step uint) error
- func (u *UserU2F) UnbindByToken(uid uint, typ string, step uint, token string) error
- func (u *UserU2F) UpdatePrecondition(uid uint, typ string, step uint, precondition string) error
- type Verification
Constants ¶
const ( // type CloudBackupTypeFull = `full` CloudBackupTypeChange = `change` // status CloudBackupStatusSuccess = `success` CloudBackupStatusFailure = `failure` // operation CloudBackupOperationCreate = `create` CloudBackupOperationUpdate = `update` CloudBackupOperationDelete = `delete` CloudBackupOperationNone = `none` )
const ( // log type CloudBackupLogTypeAll = `all` CloudBackupLogTypeError = `error` // storage engine StorageEngineS3 = `s3` StorageEngineSFTP = `sftp` StorageEngineFTP = `ftp` StorageEngineWebDAV = `webdav` StorageEngineSMB = `smb` )
const ( KvRootType = `root` AutoCreatedType = `autoCreated` KvDefaultDataType = `text` )
const ( AuthTypePassword = `password` AuthTypeOauth2 = `oauth2` )
const StorageAccountIDKey = `storerID`
Variables ¶
var ( // SMSWaitingSeconds 短信发送后等待秒数 SMSWaitingSeconds int64 = 60 // SMSMaxPerDay 短信每人每天发送上限 SMSMaxPerDay int64 = 10 )
var CloudBackupLogTypes = echo.NewKVData().Add(CloudBackupLogTypeAll, `全部`).Add(CloudBackupLogTypeError, `报错`)
var CloudBackupOperations = echo.NewKVData().Add(CloudBackupOperationCreate, `创建`). Add(CloudBackupOperationUpdate, `更新`). Add(CloudBackupOperationDelete, `删除`). Add(CloudBackupOperationNone, `未知`)
var CloudBackupStatuses = echo.NewKVData().Add(CloudBackupStatusSuccess, `成功`).Add(CloudBackupStatusFailure, `失败`)
var CloudBackupStorageEngines = echo.NewKVData()
var CloudBackupTypes = echo.NewKVData().Add(CloudBackupTypeFull, `全量`).Add(CloudBackupTypeChange, `监控`)
var KvDataTypes = echo.NewKVData().Add(`number`, `数字`).Add(`text`, `文本`).Add(`json`, `JSON`)
var SafeItems = echo.NewKVData(). Add(`google`, `两步验证`, echo.KVOptX(SafeItemInfo{ Step: 2, ConfigTitle: `两步验证`, ConfigRoute: `gauth_bind`, })). Add(`password`, `密码登录`, echo.KVOptX(SafeItemInfo{ Step: 1, ConfigTitle: `修改密码`, ConfigRoute: `password`, }))
Functions ¶
func GetU2FStepCondValue ¶
func GetU2FStepCondValue(step uint) interface{}
func InvalidScope ¶ added in v5.2.5
func InvalidScope(scopes []string, f *dbschema.NgingOauthApp) (invalidScopes []string)
func ListSafeItemsByStep ¶ added in v5.1.1
func MatchDomain ¶ added in v5.2.5
func MatchDomain(domain string, f *dbschema.NgingOauthApp) bool
func RegisterSafeItem ¶ added in v5.1.1
func RegisterSafeItem(itemType, itemTitle string, info SafeItemInfo, extra ...echo.H)
Types ¶
type AlertRecipient ¶
type AlertRecipient struct {
*dbschema.NgingAlertRecipient
}
func NewAlertRecipient ¶
func NewAlertRecipient(ctx echo.Context) *AlertRecipient
func (*AlertRecipient) Add ¶
func (s *AlertRecipient) Add() (pk interface{}, err error)
type AlertTopic ¶
type AlertTopic struct {
*dbschema.NgingAlertTopic
}
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 CloudBackup ¶
type CloudBackup struct {
*dbschema.NgingCloudBackup
}
func NewCloudBackup ¶
func NewCloudBackup(ctx echo.Context) *CloudBackup
func (*CloudBackup) Add ¶
func (s *CloudBackup) Add() (pk interface{}, err error)
func (*CloudBackup) ListPage ¶
func (s *CloudBackup) ListPage(cond *db.Compounds, sorts ...interface{}) ([]*CloudBackupExt, error)
type CloudBackupExt ¶
type CloudBackupExt struct { *dbschema.NgingCloudBackup Storage *dbschema.NgingCloudStorage `db:"-,relation=id:dest_storage|gtZero|eq(storage_engine:s3),columns=id&name&type"` Watching bool FullBackuping bool }
type CloudBackupLog ¶ added in v5.2.1
type CloudBackupLog struct {
*dbschema.NgingCloudBackupLog
}
func NewCloudBackupLog ¶ added in v5.2.1
func NewCloudBackupLog(ctx echo.Context) *CloudBackupLog
func (*CloudBackupLog) Add ¶ added in v5.2.1
func (s *CloudBackupLog) Add() (pk interface{}, err error)
type CloudStorage ¶
type CloudStorage struct {
*dbschema.NgingCloudStorage
}
func GetCloudStorage ¶
func GetCloudStorage(ctx context.Context) (*CloudStorage, error)
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 Config ¶
type Config struct {
*dbschema.NgingConfig
}
func (*Config) ValueByKey ¶
type Invitation ¶
type Invitation struct {
*dbschema.NgingCodeInvitation
}
func NewInvitation ¶
func NewInvitation(ctx echo.Context) *Invitation
type Kv ¶
func (*Kv) AutoCreateKey ¶
AutoCreateKey 自动创建 key value: 0. 值; 1. 说明; 2. 帮助说明
func (*Kv) GetFromTypeList ¶
func (*Kv) GetTypeValues ¶
func (*Kv) IsRootType ¶
type LoginLog ¶
type LoginLog struct {
*dbschema.NgingLoginLog
}
func NewLoginLog ¶
func (*LoginLog) AddAndSaveSession ¶
func (*LoginLog) GetLastFailure ¶
func (*LoginLog) GetLastSuccess ¶
func (*LoginLog) InitLocation ¶
func (s *LoginLog) InitLocation() (ipInfo ip2regionparser.IpInfo, err error)
type OAuthAgree ¶ added in v5.2.5
type OAuthAgree struct {
*dbschema.NgingOauthAgree
}
func NewOAuthAgree ¶ added in v5.2.5
func NewOAuthAgree(ctx echo.Context) *OAuthAgree
func (*OAuthAgree) Add ¶ added in v5.2.5
func (f *OAuthAgree) Add() (pk interface{}, err error)
type OAuthApp ¶ added in v5.2.5
type OAuthApp struct {
*dbschema.NgingOauthApp
}
func NewOAuthApp ¶ added in v5.2.5
func (*OAuthApp) GenerateAppID ¶ added in v5.2.5
func (*OAuthApp) GenerateAppSecret ¶ added in v5.2.5
func (*OAuthApp) GetAndVerify ¶ added in v5.2.5
func (*OAuthApp) GetByAppID ¶ added in v5.2.5
func (*OAuthApp) MatchDomain ¶ added in v5.2.5
func (*OAuthApp) MatchScope ¶ added in v5.2.5
type SafeItemInfo ¶ added in v5.1.1
type SafeItemInfo struct { Step uint ConfigTitle string ConfigRoute string // contains filtered or unexported fields }
func GetSafeItem ¶ added in v5.1.1
func GetSafeItem(itemType string) SafeItemInfo
func (SafeItemInfo) IsHide ¶ added in v5.2.5
func (s SafeItemInfo) IsHide() bool
func (SafeItemInfo) IsZero ¶ added in v5.1.1
func (s SafeItemInfo) IsZero() bool
func (*SafeItemInfo) SetHider ¶ added in v5.2.5
func (s *SafeItemInfo) SetHider(fn func() bool) *SafeItemInfo
type SendingLog ¶
type SendingLog struct {
*dbschema.NgingSendingLog
}
func NewSendingLog ¶
func NewSendingLog(ctx echo.Context) *SendingLog
func (*SendingLog) Add ¶
func (c *SendingLog) Add() (interface{}, 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) FireLoginFailure ¶
func (*User) FireLoginSuccess ¶
func (*User) GetUserAllU2F ¶
func (u *User) GetUserAllU2F(uid uint) ([]*dbschema.NgingUserU2f, error)
func (*User) IncrLoginFails ¶
func (*User) NeedCheckU2F ¶
func (*User) ResetLoginFails ¶
func (*User) SetSession ¶
func (*User) UnsetSession ¶
func (u *User) UnsetSession()
func (*User) UpdateField ¶
type UserOAuth ¶ added in v5.2.5
type UserOAuth struct {
*dbschema.NgingUserOauth
}
func NewUserOAuth ¶ added in v5.2.5
func (*UserOAuth) ExistsOtherBinding ¶ added in v5.2.5
func (*UserOAuth) GetByOutUser ¶ added in v5.2.5
func (*UserOAuth) OAuthUserGender ¶ added in v5.2.5
type UserRole ¶
type UserRole struct { *dbschema.NgingUserRole // contains filtered or unexported fields }
func NewUserRole ¶
func (*UserRole) ListByUser ¶
func (u *UserRole) ListByUser(user *dbschema.NgingUser) (roleList []*dbschema.NgingUserRole)
type UserRolePermission ¶
type UserRolePermission struct {
*dbschema.NgingUserRolePermission
}
func NewUserRolePermission ¶
func NewUserRolePermission(ctx echo.Context) *UserRolePermission
func (*UserRolePermission) Add ¶
func (u *UserRolePermission) Add() (interface{}, error)
type UserU2F ¶
type UserU2F struct {
*dbschema.NgingUserU2f
}
func NewUserU2F ¶
func (*UserU2F) ListPageByType ¶
func (*UserU2F) UnbindByToken ¶
type Verification ¶
type Verification struct {
*dbschema.NgingCodeVerification
}
func NewVerification ¶
func NewVerification(ctx echo.Context) *Verification
Source Files ¶
- alertRecipient.go
- alertTopic.go
- cloudBackup.go
- cloudBackupLog.go
- cloudBackupLog_ext.go
- cloudBackup_ext.go
- cloudStorage.go
- cloudStorage_utils.go
- code.go
- config.go
- invitation.go
- kv.go
- kv_ext.go
- loginLog.go
- oauthAgree.go
- oauthApp.go
- sendingLog.go
- task.go
- taskGroup.go
- taskLog.go
- user.go
- userOauth.go
- userRole.go
- userRolePermission.go
- userRole_ext.go
- userU2F.go
- user_counter.go
- user_ext.go
- user_login.go
- user_register.go
- user_session.go
- user_u2f.go
- verification.go