repository

package
v0.0.0-...-2fddd97 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepositoryAuth

type RepositoryAuth interface {
	GetAuthConfig(provider string) (*oauth2.Config, error)
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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