Documentation
¶
Index ¶
- func CheckPasswordHash(password string, hash []byte) error
- func ConvertToDuration(pgi pgtype.Interval) (time.Duration, error)
- func ConvertToTime(pgt pgtype.Time) (time.Time, error)
- func GetTimeSlotCount(openingTime, closingTime pgtype.Time, haircutInterval pgtype.Interval) (int, error)
- func HashPassword(password string) ([]byte, error)
- func IsTodayBeforeTime(date, timeslot time.Time) (bool, error)
- type Appointment
- type AppointmentService
- func (s *AppointmentService) CancelAppointmentsById(appointmentID, employeeID int, date string, timeslot string) error
- func (s *AppointmentService) CloseAppointmentsById(appointmentID int) error
- func (s *AppointmentService) GenerationsTimeSlots(open, close pgtype.Time, haircut pgtype.Interval, timeSlot time.Time) ([]time.Time, error)
- func (s *AppointmentService) GetAppointmentsById(employeeID int, isOpen bool) ([]Appointment, error)
- func (s *AppointmentService) RecordAppointment(open, close pgtype.Time, haircut pgtype.Interval, timeSlot time.Time) error
- type CalendarService
- type ClientData
- type CropperData
- type Employee
- type EmployeeService
- func (s *EmployeeService) CreateEmployee(ctx context.Context, employee Employee, creator int) error
- func (s *EmployeeService) EmailValidator(email string) bool
- func (s *EmployeeService) EmployeeImageCropper(img image.Image, data CropperData) (image.Image, error)
- func (s *EmployeeService) FriedEmployeeById(ctx context.Context, id int) error
- func (s *EmployeeService) GetAll(ctx context.Context) ([]*models.Employee, error)
- func (s *EmployeeService) GetAllEmployee(ctx context.Context) ([]*models.Employee, error)
- func (s *EmployeeService) GetEmployeeById(ctx context.Context, id int) (*models.Employee, error)
- func (s *EmployeeService) GetEmployeeByLogin(ctx context.Context, login string) (*models.Employee, error)
- func (s *EmployeeService) NewPassValidator(pass string) bool
- func (s *EmployeeService) PhoneValidator(phone string) bool
- func (s *EmployeeService) RevertEmployeeById(ctx context.Context, id int) error
- func (s *EmployeeService) UpdateEmployeeAvatar(ctx context.Context, id int, url string) error
- func (s *EmployeeService) UpdateEmployeeById(ctx context.Context, id int) (int, error)
- func (s *EmployeeService) UpdateEmployeeData(ctx context.Context, id int, name, phone, email, pass *string) (*models.Employee, error)
- type GalleryService
- func (s *GalleryService) AddPhotosGallery(ctx context.Context, photos []models.Photo) (int, error)
- func (s *GalleryService) GetGallery(ctx context.Context) ([]models.Photo, error)
- func (s *GalleryService) GetGalleryByID(ctx context.Context, id int) ([]models.Photo, error)
- func (s *GalleryService) RemovePhoto(ctx context.Context, id int) (string, error)
- type Mailer
- type TimeSlot
- type WorkSchedule
- type WorkScheduleService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func GetTimeSlotCount ¶
func HashPassword ¶
Types ¶
type Appointment ¶
type Appointment struct { Id int ClientName string `json:"client_name" db:"client_name"` ClientPhone string `json:"client_phone" db:"client_phone"` ClientEmail string `json:"client_email" db:"client_email"` AppointmentTime time.Time `json:"appointment_time" db:"appointment_time"` EmployeeId int `json:"employee_id" db:"employee_id"` CreateAt time.Time `json:"create_at" db:"create_at"` IsOpen bool `json:"is_open" db:"is_open"` }
type AppointmentService ¶
type AppointmentService struct {
// contains filtered or unexported fields
}
func NewAppointmentService ¶
func NewAppointmentService(db *pgxpool.Pool, appointment *models.Appointment) *AppointmentService
func (*AppointmentService) CancelAppointmentsById ¶
func (s *AppointmentService) CancelAppointmentsById(appointmentID, employeeID int, date string, timeslot string) error
func (*AppointmentService) CloseAppointmentsById ¶
func (s *AppointmentService) CloseAppointmentsById(appointmentID int) error
func (*AppointmentService) GenerationsTimeSlots ¶
func (*AppointmentService) GetAppointmentsById ¶
func (s *AppointmentService) GetAppointmentsById(employeeID int, isOpen bool) ([]Appointment, error)
func (*AppointmentService) RecordAppointment ¶
type CalendarService ¶
type CalendarService struct {
// contains filtered or unexported fields
}
func NewCalendarService ¶
func NewCalendarService(db *pgxpool.Pool, calendar *models.Calendar) *CalendarService
func (*CalendarService) GetCalendar ¶
type ClientData ¶
type CropperData ¶
type EmployeeService ¶
type EmployeeService struct {
// contains filtered or unexported fields
}
func NewEmployeeService ¶
func NewEmployeeService(db *pgxpool.Pool, employee *models.Employee) *EmployeeService
func (*EmployeeService) CreateEmployee ¶
func (*EmployeeService) EmailValidator ¶
func (s *EmployeeService) EmailValidator(email string) bool
func (*EmployeeService) EmployeeImageCropper ¶
func (s *EmployeeService) EmployeeImageCropper(img image.Image, data CropperData) (image.Image, error)
func (*EmployeeService) FriedEmployeeById ¶
func (s *EmployeeService) FriedEmployeeById(ctx context.Context, id int) error
func (*EmployeeService) GetAllEmployee ¶
func (*EmployeeService) GetEmployeeById ¶
func (*EmployeeService) GetEmployeeByLogin ¶
func (*EmployeeService) NewPassValidator ¶
func (s *EmployeeService) NewPassValidator(pass string) bool
func (*EmployeeService) PhoneValidator ¶
func (s *EmployeeService) PhoneValidator(phone string) bool
func (*EmployeeService) RevertEmployeeById ¶
func (s *EmployeeService) RevertEmployeeById(ctx context.Context, id int) error
func (*EmployeeService) UpdateEmployeeAvatar ¶
func (*EmployeeService) UpdateEmployeeById ¶
func (*EmployeeService) UpdateEmployeeData ¶
type GalleryService ¶
type GalleryService struct {
// contains filtered or unexported fields
}
func NewGalleryService ¶
func NewGalleryService(db *pgxpool.Pool) *GalleryService
func (*GalleryService) AddPhotosGallery ¶
func (*GalleryService) GetGallery ¶
func (*GalleryService) GetGalleryByID ¶
func (*GalleryService) RemovePhoto ¶
type Mailer ¶
type Mailer struct { SmtpUsername string SmtpPassword string SmtpHost string SmtpPort int From string To string Body string Message string // contains filtered or unexported fields }
type WorkSchedule ¶
type WorkScheduleService ¶
type WorkScheduleService struct {
// contains filtered or unexported fields
}
func NewWorkScheduleService ¶
func NewWorkScheduleService(db *pgxpool.Pool, schedule *models.WorkSchedule) *WorkScheduleService
func (*WorkScheduleService) GetWorkSchedule ¶
func (s *WorkScheduleService) GetWorkSchedule(id int) (*models.WorkSchedule, error)
func (*WorkScheduleService) UpdateWorkSchedule ¶
func (s *WorkScheduleService) UpdateWorkSchedule(ctx context.Context, workSchedule *WorkSchedule, id int) (*models.WorkSchedule, error)
Click to show internal directories.
Click to hide internal directories.