Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepositoryAuth ¶
func NewLocalConfigAuth ¶
func NewLocalConfigAuth(c *clients.Clients) RepositoryAuth
NewLocalConfigAuth returns Auth repository from config
type RepositoryCompany ¶
type RepositoryCompany interface { CreateCompany(dbtx common.DBTx, company entity.Company) (*entity.Company, error) GetCompanyByUsername(dbtx common.DBTx, companyUsername string) (company entity.Company, err error) }
func NewMySQLRedisCompany ¶
func NewMySQLRedisCompany(c *clients.Clients) RepositoryCompany
NewMySQLRedisCompany returns Company repository using mysql connection
type RepositoryEmployee ¶
type RepositoryEmployee interface { CreateEmployee(dbtx common.DBTx, e entity.Employee) (*entity.Employee, error) GetEmployeeByIdentifier(dbtx common.DBTx, companyID int, employeeIdentifier string) (employee entity.Employee, err error) IsEmployeeExist(dbtx common.DBTx, companyID int, email, phoneNumber string) (bool, error) GetEmployeePassword(dbtx common.DBTx, companyID, employeeID int) (password string, err error) GetEmployeesCount(dbtx common.DBTx, companyID int) (n int, err error) GetEmployees(dbtx common.DBTx, companyID int, p common.PaginationRepo) (employees []entity.Employee, err error) UpdateEmployee(dbtx common.DBTx, e entity.Employee) (int, *entity.Employee, error) UpdateEmployeePassword(dbtx common.DBTx, companyID, employeeID int, password string) error UpdateEmployeeStatus(dbtx common.DBTx, companyID, employeeID int, status int) error }
func NewMySQLRedisEmployee ¶
func NewMySQLRedisEmployee(c *clients.Clients) RepositoryEmployee
NewMySQLRedisEmployee returns Employee repository using mysql connection
type RepositoryRole ¶
type RepositoryRole interface { CreateRole(dbtx common.DBTx, role entity.Role) (*entity.Role, error) // GetRoles(role entity.Role) (*entity.Role, error) GetRolesByIDs(dbtx common.DBTx, companyID int, ids []int) (map[int]entity.Role, error) GetRoleByID(dbtx common.DBTx, companyID int, id int) (role entity.Role, err error) }
func NewMySQLRedisRole ¶
func NewMySQLRedisRole(c *clients.Clients) RepositoryRole
NewMySQLRedisRole returns Role repository using mysql connection
Click to show internal directories.
Click to hide internal directories.