Documentation ¶
Index ¶
- func NewModels(db *interface{}) interface{}
- type AccountModel
- type AuthSessionModel
- type CategoryModel
- type Models
- type TransactionModel
- type UserModel
- func (m *UserModel) Authenticate(email, password string) (string, error)
- func (m *UserModel) Confirm(id int64) error
- func (m *UserModel) Delete(id int64) error
- func (m *UserModel) Get(id int64) (*models.User, error)
- func (m *UserModel) GetByEmail(email string) (*models.User, error)
- func (m *UserModel) Insert(email, password string) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthSessionModel ¶
type AuthSessionModel struct{}
AuthSessionModel represents mocked AuthSessionModel
func (*AuthSessionModel) Delete ¶
func (m *AuthSessionModel) Delete(id int64) error
Delete drops mocked auth session
func (*AuthSessionModel) Get ¶
func (m *AuthSessionModel) Get(id int64) (*models.AuthSession, error)
Get fetches mock auth session by ID
func (*AuthSessionModel) GetByToken ¶
func (m *AuthSessionModel) GetByToken(token string) (*models.AuthSession, error)
GetByToken fetches mock auth session by token
type CategoryModel ¶
type CategoryModel struct{}
func (*CategoryModel) Insert ¶
func (m *CategoryModel) Insert(name string, categoryType models.CategoryType, userID int64, inactive bool) (int64, error)
type TransactionModel ¶
type TransactionModel struct{}
type UserModel ¶
type UserModel struct{}
UserModel represents mock UserModel
func (*UserModel) Authenticate ¶
Authenticate mock authenticate user
func (*UserModel) GetByEmail ¶
GetByEmail mock fetching user by Email
Click to show internal directories.
Click to hide internal directories.