Documentation
¶
Index ¶
- func GetDatabase(dbType, dsn string) (gorm.Dialector, error)
- type DB
- func (db *DB) AddRule(request types.Rule) (string, error)
- func (db *DB) CheckUser(username, password string) (*types.User, error)
- func (db *DB) CreateUser(username, password string) error
- func (db *DB) DeleteUser(id string) error
- func (db *DB) ExistRule(id string) error
- func (db *DB) GetRule(id string) (types.Rule, error)
- func (db *DB) GetRuleCount() int64
- func (db *DB) GetRuleList(page int) ([]types.RuleItem, int64, error)
- func (db *DB) GetUser(id string) (types.User, error)
- func (db *DB) GetUserCount() int64
- func (db *DB) GetUserList(page, pageSize int) ([]types.User, int64, error)
- func (db *DB) Init()
- func (db *DB) Migrate()
- func (db *DB) RemoveRule(id string) error
- func (db *DB) UpdatePassword(id, password, newPassword string) error
- func (db *DB) UpdatePasswordAdmin(id, password string) error
- func (db *DB) UpdateRule(request types.Rule) error
- func (db *DB) UpdateUser(id string, request types.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateUser ¶
func (*DB) DeleteUser ¶
func (*DB) GetRuleCount ¶
func (*DB) GetUserCount ¶
func (*DB) RemoveRule ¶
func (*DB) UpdatePassword ¶
func (*DB) UpdatePasswordAdmin ¶
Click to show internal directories.
Click to hide internal directories.