Documentation
¶
Index ¶
- func NewGorm(db *gorm.DB) (authentication.DriverStorage, error)
- type GormDriver
- func (g *GormDriver) DelProfile(profileID authentication.ProfileID) error
- func (g *GormDriver) DelToken(tokenID authentication.TokenID, profileID authentication.ProfileID) error
- func (g *GormDriver) EmailDeleteSecretKey(key authentication.EmailSecretKey) error
- func (g *GormDriver) EmailNewSecretKey(key authentication.EmailSecretKey, email string, lifetime int64) error
- func (g *GormDriver) EmailReadSecretKey(key authentication.EmailSecretKey) (string, error)
- func (g *GormDriver) GetEmail(profileID authentication.ProfileID) (email string, err error)
- func (g *GormDriver) GetLogin(profileID authentication.ProfileID) (login string, err error)
- func (g *GormDriver) GetLoginByEmail(email string) (login string, err error)
- func (g *GormDriver) GetPasswordByID(profileID authentication.ProfileID) (password string, err error)
- func (g *GormDriver) GetPasswordByLogin(login string) (res *authentication.ResultPasswordByLogin, err error)
- func (g *GormDriver) GetProfileIDByEmail(email string) (profileID authentication.ProfileID, err error)
- func (g *GormDriver) IsUniqueEmail(email string) (bool, error)
- func (g *GormDriver) IsUniqueLogin(login string) (bool, error)
- func (g *GormDriver) NewProfile(login, email, password string) (authentication.ProfileID, error)
- func (g *GormDriver) NewToken(tokenID authentication.TokenID, profileID authentication.ProfileID, ...) error
- func (g *GormDriver) ReadToken(tokenID authentication.TokenID) (authentication.ProfileID, error)
- func (g *GormDriver) SetEmailByProfileID(profileID authentication.ProfileID, email string) error
- func (g *GormDriver) SetPasswordProfileByEmail(email string, password string) error
- func (g *GormDriver) SetPasswordProfileByProfileID(profileID authentication.ProfileID, password string) error
- type GormEmailSecretKeyModel
- type GormProfileModel
- type GormTokenModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGorm ¶
func NewGorm(db *gorm.DB) (authentication.DriverStorage, error)
Types ¶
type GormDriver ¶
type GormDriver struct {
// contains filtered or unexported fields
}
func (*GormDriver) DelProfile ¶
func (g *GormDriver) DelProfile(profileID authentication.ProfileID) error
func (*GormDriver) DelToken ¶
func (g *GormDriver) DelToken(tokenID authentication.TokenID, profileID authentication.ProfileID) error
func (*GormDriver) EmailDeleteSecretKey ¶
func (g *GormDriver) EmailDeleteSecretKey(key authentication.EmailSecretKey) error
func (*GormDriver) EmailNewSecretKey ¶
func (g *GormDriver) EmailNewSecretKey(key authentication.EmailSecretKey, email string, lifetime int64) error
func (*GormDriver) EmailReadSecretKey ¶
func (g *GormDriver) EmailReadSecretKey(key authentication.EmailSecretKey) (string, error)
func (*GormDriver) GetEmail ¶
func (g *GormDriver) GetEmail(profileID authentication.ProfileID) (email string, err error)
func (*GormDriver) GetLogin ¶
func (g *GormDriver) GetLogin(profileID authentication.ProfileID) (login string, err error)
func (*GormDriver) GetLoginByEmail ¶
func (g *GormDriver) GetLoginByEmail(email string) (login string, err error)
func (*GormDriver) GetPasswordByID ¶
func (g *GormDriver) GetPasswordByID(profileID authentication.ProfileID) (password string, err error)
func (*GormDriver) GetPasswordByLogin ¶
func (g *GormDriver) GetPasswordByLogin(login string) (res *authentication.ResultPasswordByLogin, err error)
func (*GormDriver) GetProfileIDByEmail ¶
func (g *GormDriver) GetProfileIDByEmail(email string) (profileID authentication.ProfileID, err error)
func (*GormDriver) IsUniqueEmail ¶
func (g *GormDriver) IsUniqueEmail(email string) (bool, error)
func (*GormDriver) IsUniqueLogin ¶
func (g *GormDriver) IsUniqueLogin(login string) (bool, error)
func (*GormDriver) NewProfile ¶
func (g *GormDriver) NewProfile(login, email, password string) (authentication.ProfileID, error)
func (*GormDriver) NewToken ¶
func (g *GormDriver) NewToken(tokenID authentication.TokenID, profileID authentication.ProfileID, lifeTime authentication.TokenLifeTime) error
func (*GormDriver) ReadToken ¶
func (g *GormDriver) ReadToken(tokenID authentication.TokenID) (authentication.ProfileID, error)
func (*GormDriver) SetEmailByProfileID ¶
func (g *GormDriver) SetEmailByProfileID(profileID authentication.ProfileID, email string) error
func (*GormDriver) SetPasswordProfileByEmail ¶
func (g *GormDriver) SetPasswordProfileByEmail(email string, password string) error
func (*GormDriver) SetPasswordProfileByProfileID ¶
func (g *GormDriver) SetPasswordProfileByProfileID(profileID authentication.ProfileID, password string) error
type GormEmailSecretKeyModel ¶
type GormProfileModel ¶
type GormTokenModel ¶
type GormTokenModel struct { Key string `gorm:"primarykey;size:36;autoIncrement:false"` Expiries int64 ProfileID int64 Profile GormProfileModel `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` }
Click to show internal directories.
Click to hide internal directories.