Documentation
¶
Index ¶
- type Authentication
- type Driver
- func (d *Driver) CreateAuthenticationFor(user *User) (*Authentication, error)
- func (d *Driver) CreateUser() (*User, error)
- func (d *Driver) GetUser(id uint32) (*User, error)
- func (d *Driver) GetUserFor(auth *Authentication) (*User, error)
- func (d *Driver) TryGetAuthentication(provider string, subject string) (*Authentication, error)
- func (d *Driver) UpdateAuthentication(auth *Authentication) error
- func (d *Driver) UpdateUser(user *User) error
- type User
- type UserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver wrapper for a db
func (*Driver) CreateAuthenticationFor ¶
func (d *Driver) CreateAuthenticationFor(user *User) (*Authentication, error)
func (*Driver) CreateUser ¶
func (*Driver) GetUserFor ¶
func (d *Driver) GetUserFor(auth *Authentication) (*User, error)
func (*Driver) TryGetAuthentication ¶
func (d *Driver) TryGetAuthentication(provider string, subject string) (*Authentication, error)
func (*Driver) UpdateAuthentication ¶
func (d *Driver) UpdateAuthentication(auth *Authentication) error
func (*Driver) UpdateUser ¶
type User ¶
type User struct {
gorm.Model
Authentications []Authentication
PublicData string
PrivateData string
LastLogin time.Time
}
func (*User) GetPrivateUserdata ¶
func (*User) GetPublicUserdata ¶
func (*User) SetPrivateUserdata ¶
func (*User) SetPublicUserdata ¶
Click to show internal directories.
Click to hide internal directories.