implementation

package
v0.0.0-...-a5345d3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSessionDAOFromEntity

func CreateSessionDAOFromEntity(session *entities.Session) *dao.Session

CreateSessionDAOFromEntity create DAO instance from session entities.Session.

func CreateSessionEntityFromDAO

func CreateSessionEntityFromDAO(sessionRecord *dao.Session) *entities.Session

CreateSessionEntityFromDAO create entities.Session instance from session DAO.

func CreateUserDAOFromEntity

func CreateUserDAOFromEntity(user *entities.User) *dao.User

CreateUserDAOFromEntity create DAO for core.entities.User

func CreateUserEntityFromDAO

func CreateUserEntityFromDAO(userRecord *dao.User) *entities.User

CreateUserEntityFromDAO create entities.User pointer from DAO

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.

func (*SessionRepositoryImpl) FindByID

func (sessionRepository *SessionRepositoryImpl) FindByID(id string) (*entities.Session, error)

FindByID search session by ID.

func (*SessionRepositoryImpl) Store

func (sessionRepository *SessionRepositoryImpl) Store(session *entities.Session) error

Store saves session entity.

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.

func (*UserRepositoryImpl) Store

func (userRepository *UserRepositoryImpl) Store(user *entities.User) error

Store saves user entity.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL