Documentation ¶
Index ¶
- func CreateSessionDAOFromEntity(session *entities.Session) *dao.Session
- func CreateSessionEntityFromDAO(sessionRecord *dao.Session) *entities.Session
- func CreateUserDAOFromEntity(user *entities.User) *dao.User
- func CreateUserEntityFromDAO(userRecord *dao.User) *entities.User
- type SessionRepository
- type SessionRepositoryImpl
- type UserRepository
- type UserRepositoryImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSessionDAOFromEntity ¶
CreateSessionDAOFromEntity create DAO instance from session entities.Session.
func CreateSessionEntityFromDAO ¶
CreateSessionEntityFromDAO create entities.Session instance from session DAO.
func CreateUserDAOFromEntity ¶
CreateUserDAOFromEntity create DAO for core.entities.User
Types ¶
type SessionRepository ¶
type SessionRepository interface { FindByID(id string) (*entities.Session, error) Store(*entities.Session) error }
SessionRepository represents session storage.
func NewSessionRepository ¶
func NewSessionRepository(db *reform.DB) SessionRepository
NewSessionRepository creates session storage.
type SessionRepositoryImpl ¶
type SessionRepositoryImpl struct {
// contains filtered or unexported fields
}
SessionRepositoryImpl implements session storage interface.
type UserRepository ¶
type UserRepository interface { FindByUsername(string) (*entities.User, error) Store(*entities.User) error }
UserRepository represent storage for user entities.
func NewUserRepository ¶
func NewUserRepository(config config.AppConfig, db *reform.DB) UserRepository
NewUserRepository create UserRepository instance.
type UserRepositoryImpl ¶
type UserRepositoryImpl struct {
// contains filtered or unexported fields
}
UserRepositoryImpl implemen--ts UserRepository.
func (*UserRepositoryImpl) FindByUsername ¶
func (userRepository *UserRepositoryImpl) FindByUsername(username string) (*entities.User, error)
FindByUsername search user by username.
Click to show internal directories.
Click to hide internal directories.