Documentation
¶
Index ¶
- type BSONUser
- type DuplicatedIdError
- type Encryptor
- type Factory
- type Id
- type IncorrectNamespaceError
- type IncorrectPasskeyError
- type Login
- type Namespace
- type NotExistentUser
- type Passkey
- type PasskeyEncryptor
- type SignInValidator
- type Source
- type Token
- type User
- func (u User) CheckToken(t Token) bool
- func (u *User) GenerateToken()
- func (u User) GetBSON() (bu interface{}, err error)
- func (u *User) GrantAccessTo(n Namespace)
- func (u User) HasAccessTo(n Namespace) bool
- func (u User) HasToken() bool
- func (u User) Id() Id
- func (u User) Passkey() Passkey
- func (u *User) SetBSON(raw bson.Raw) (err error)
- type UserSourceTests
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DuplicatedIdError ¶
type DuplicatedIdError struct {
Id Id
}
func (DuplicatedIdError) Error ¶
func (DuplicatedIdError) Error() string
type Factory ¶
type Factory struct {
Encryptor PasskeyEncryptor
}
type IncorrectNamespaceError ¶
func (IncorrectNamespaceError) Error ¶
func (IncorrectNamespaceError) Error() string
type IncorrectPasskeyError ¶
type IncorrectPasskeyError struct{}
func (IncorrectPasskeyError) Error ¶
func (IncorrectPasskeyError) Error() string
type Login ¶
type Login struct { Validator SignInValidator UserSource Source }
type NotExistentUser ¶
type NotExistentUser struct {
Id Id
}
func (NotExistentUser) Error ¶
func (NotExistentUser) Error() string
type PasskeyEncryptor ¶
type PasskeyEncryptor struct {
Encryptor Encryptor
}
type SignInValidator ¶
type SignInValidator struct {
Encryptor PasskeyEncryptor
}
type User ¶
type User struct { Token Token // contains filtered or unexported fields }
func (User) CheckToken ¶
func (*User) GenerateToken ¶
func (u *User) GenerateToken()
func (*User) GrantAccessTo ¶
func (User) HasAccessTo ¶
type UserSourceTests ¶
type UserSourceTests struct { Source func() Source AfterEach func() }
func (UserSourceTests) Run ¶
func (ut UserSourceTests) Run(t *t.T)
func (UserSourceTests) TestGettingAUserIfNotExistsShouldReturnAError ¶
func (ust UserSourceTests) TestGettingAUserIfNotExistsShouldReturnAError(t *t.T)
func (UserSourceTests) TestShouldReturnTheSameUserAsAdded ¶
func (ust UserSourceTests) TestShouldReturnTheSameUserAsAdded(t *t.T)
func (UserSourceTests) TestWhenAddingAUserIfIdExistsShouldReturnError ¶
func (ust UserSourceTests) TestWhenAddingAUserIfIdExistsShouldReturnError(t *t.T)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.