Documentation ¶
Index ¶
- type TestBackend
- func (b *TestBackend) Add(u *TestUser)
- func (b *TestBackend) AuthPassword(sub, passwd string) (ret bool, err error)
- func (b *TestBackend) AuthPasswordByFeature(feature, passwd string) (ret bool, u iuser.User, err error)
- func (b *TestBackend) CreateUser(user iuser.User, passwordHashed bool) (err error)
- func (b *TestBackend) DeleteUser(u iuser.User) (err error)
- func (b *TestBackend) GetUser(id int) (ret iuser.User, err error)
- func (b *TestBackend) GetUserByEmail(email string) (iuser.User, error)
- func (b *TestBackend) GetUserByFeature(email string) (ret iuser.User, err error)
- func (b *TestBackend) GetUserByName(name string) (ret iuser.User, err error)
- func (b *TestBackend) InitModel(model interface{})
- func (b *TestBackend) ListUsers(ctx context.Context) (ret []iuser.User, err error)
- func (b *TestBackend) Name() (ret string)
- func (b *TestBackend) SupportedVerificationMethods() (ret []string)
- func (b *TestBackend) UserIdToSub(id int) (ret string)
- func (b *TestBackend) UserSubToId(sub string) (ret int, err error)
- type TestUser
- func (u *TestUser) GetId() (ret int)
- func (u *TestUser) GetMobile() (ret string)
- func (u *TestUser) GetName() (ret string)
- func (u *TestUser) GetProfile() iuser.UserProfile
- func (u *TestUser) GetPublicProfile() (ret iuser.UserProfile)
- func (u *TestUser) GetSub() (ret string)
- func (u *TestUser) SetBackend(back iuser.UserBackend)
- type UserProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestBackend ¶
type TestBackend struct {
// contains filtered or unexported fields
}
func (*TestBackend) Add ¶
func (b *TestBackend) Add(u *TestUser)
func (*TestBackend) AuthPassword ¶
func (b *TestBackend) AuthPassword(sub, passwd string) (ret bool, err error)
func (*TestBackend) AuthPasswordByFeature ¶
func (*TestBackend) CreateUser ¶
func (b *TestBackend) CreateUser(user iuser.User, passwordHashed bool) (err error)
func (*TestBackend) DeleteUser ¶
func (b *TestBackend) DeleteUser(u iuser.User) (err error)
func (*TestBackend) GetUserByEmail ¶
func (b *TestBackend) GetUserByEmail(email string) (iuser.User, error)
func (*TestBackend) GetUserByFeature ¶
func (b *TestBackend) GetUserByFeature(email string) (ret iuser.User, err error)
func (*TestBackend) GetUserByName ¶
func (b *TestBackend) GetUserByName(name string) (ret iuser.User, err error)
func (*TestBackend) InitModel ¶
func (b *TestBackend) InitModel(model interface{})
func (*TestBackend) Name ¶
func (b *TestBackend) Name() (ret string)
func (*TestBackend) SupportedVerificationMethods ¶
func (b *TestBackend) SupportedVerificationMethods() (ret []string)
func (*TestBackend) UserIdToSub ¶
func (b *TestBackend) UserIdToSub(id int) (ret string)
func (*TestBackend) UserSubToId ¶
func (b *TestBackend) UserSubToId(sub string) (ret int, err error)
type TestUser ¶
func (*TestUser) GetProfile ¶
func (u *TestUser) GetProfile() iuser.UserProfile
func (*TestUser) GetPublicProfile ¶
func (u *TestUser) GetPublicProfile() (ret iuser.UserProfile)
func (*TestUser) SetBackend ¶
func (u *TestUser) SetBackend(back iuser.UserBackend)
type UserProfile ¶
type UserProfile struct { Name string `json:"name"` FullName string `json:"fullname"` Email string `json:"email"` Mobile string `json:"mobile"` }
func (*UserProfile) GetEmail ¶
func (p *UserProfile) GetEmail() string
func (*UserProfile) GetMobile ¶
func (p *UserProfile) GetMobile() string
func (*UserProfile) GetName ¶
func (p *UserProfile) GetName() string
Click to show internal directories.
Click to hide internal directories.