service

package
v0.0.0-...-023eac5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Booking

type Booking interface {
	Create(booking *model.Booking) (int, error)
	Delete(id int) error
	GetByRoomId(roomId int) ([]*model.Booking, error)
}

type BookingService

type BookingService struct {
	// contains filtered or unexported fields
}

func NewBookingService

func NewBookingService(repo repository.Booking, roomRepo repository.Room) *BookingService

func (*BookingService) Create

func (s *BookingService) Create(booking *model.Booking) (int, error)

func (*BookingService) Delete

func (s *BookingService) Delete(id int) error

func (*BookingService) GetByRoomId

func (s *BookingService) GetByRoomId(roomId int) ([]*model.Booking, error)

type Room

type Room interface {
	Create(room *model.Room) (int, error)
	Delete(id int) error
	GetAll(sortField string) ([]*model.Room, error)
}

type RoomService

type RoomService struct {
	// contains filtered or unexported fields
}

func NewRoomService

func NewRoomService(repo repository.Room) *RoomService

func (*RoomService) Create

func (s *RoomService) Create(room *model.Room) (int, error)

func (*RoomService) Delete

func (s *RoomService) Delete(id int) error

func (*RoomService) GetAll

func (s *RoomService) GetAll(sortField string) ([]*model.Room, error)

type Service

type Service struct {
	Room
	Booking
}

func NewService

func NewService(repos *repository.Repository) *Service

Directories

Path Synopsis
Package mock_service is a generated GoMock package.
Package mock_service is a generated GoMock package.

Jump to

Keyboard shortcuts

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