Documentation
¶
Index ¶
- Constants
- func CanAdd[T TAuthable](a auth.OpAuth, u T) error
- func CanDelete[T TAuthable](a auth.OpAuth, u T) error
- func CanUpdate[T TAuthable](a auth.OpAuth, u T, field string, value any) error
- func CanView[T TAuthable](a auth.OpAuth, u T, field string, value any) error
- type TAuthable
- type User
- func (u User) AsObjects(a *auth.Authorizator) []schema.Object
- func (u User) AsRuleEntity() (string, interface{})
- func (u User) CacheKey() string
- func (u User) IsDeleted() bool
- func (u User) IsValid() bool
- func (u User) Locked() bool
- func (u User) OTPKey() string
- func (u User) Password() ([]byte, string)
- func (u User) Role() string
- func (u User) Status() types.Status
- func (u User) String() string
- type Users
- func (uu *Users) AsObjects(a *auth.Authorizator) []schema.Object
- func (uu Users) Clone() Users
- func (uu *Users) Create(a *auth.Authorizator, oid schema.OID, value string, dbc db.DBC) ([]schema.Object, error)
- func (uu *Users) Delete(a *auth.Authorizator, oid schema.OID, dbc db.DBC) ([]schema.Object, error)
- func (uu Users) HasAdmin(role string) bool
- func (uu *Users) Load(blob json.RawMessage) error
- func (uu *Users) MakeAdminUser(name string, uid string, pwd string, role string, dbc db.DBC) error
- func (uu Users) Print()
- func (uu *Users) RevokeOTP(a *auth.Authorizator, uid string, dbc db.DBC) ([]schema.Object, error)
- func (uu Users) Save() (json.RawMessage, error)
- func (uu *Users) SetOTP(a *auth.Authorizator, uid, secret string, dbc db.DBC) ([]schema.Object, error)
- func (uu *Users) SetPassword(a *auth.Authorizator, uid, pwd string, dbc db.DBC) ([]schema.Object, error)
- func (uu *Users) Sweep(retention time.Duration)
- func (uu *Users) Update(a *auth.Authorizator, oid schema.OID, value string, dbc db.DBC) ([]schema.Object, error)
- func (uu Users) User(uid string) (auth.IUser, bool)
- func (uu *Users) UserLogin(a *auth.Authorizator, uid string, err error, dbc db.DBC)
- func (uu Users) Validate() error
Constants ¶
View Source
const MaxFailed uint32 = 5
View Source
const UserCreated = schema.Created
View Source
const UserDeleted = schema.Deleted
View Source
const UserLocked = schema.UserLocked
View Source
const UserModified = schema.Modified
View Source
const UserName = schema.UserName
View Source
const UserOTP = schema.UserOTP
View Source
const UserOTPKey = schema.UserOTPKey
View Source
const UserPassword = schema.UserPassword
View Source
const UserRole = schema.UserRole
View Source
const UserStatus = schema.Status
View Source
const UserUID = schema.UserUID
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { catalog.CatalogUser // contains filtered or unexported fields }
func (User) AsRuleEntity ¶
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
func (*Users) MakeAdminUser ¶ added in v0.8.9
func (*Users) SetPassword ¶
Click to show internal directories.
Click to hide internal directories.