carservice

package
v0.0.0-...-bfeb8cb Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddNewCarInput

type AddNewCarInput struct {
	RegistrationNumber string
	Mark               string
	Model              string
	Year               int
	OwnerName          string
	OwnerSurname       string
	Valid              bool
}

type Service

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

func NewCarService

func NewCarService(carRepository carRepository) *Service

func (*Service) AddNewCar

func (s *Service) AddNewCar(ctx context.Context, car AddNewCarInput) error

func (*Service) AddNewCars

func (s *Service) AddNewCars(ctx context.Context, cars []AddNewCarInput, errs chan error) *sync.Map

func (*Service) DeleteCar

func (s *Service) DeleteCar(ctx context.Context, regNumber string) error

func (*Service) GetCars

func (s *Service) GetCars(ctx context.Context, limit, offset int, filterOptions filter.Options) ([]model.Car, error)

func (*Service) UpdateCar

func (s *Service) UpdateCar(ctx context.Context, car UpdateCarInput) error

type UpdateCarInput

type UpdateCarInput struct {
	RegistrationNumber string
	Mark               string
	Model              string
	Year               int
	OwnerName          string
	OwnerSurname       string
}

Jump to

Keyboard shortcuts

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