service

package
v0.0.0-...-bfb259f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ResvRepo repo.Repository
}

type CreateReservationInput

type CreateReservationInput struct {
	RoomID uuid.UUID

	Start time.Time
	End   time.Time
}

type CreateReservationOutput

type CreateReservationOutput struct {
	Reservation *types.Reservation
}

type ListReservationsInput

type ListReservationsInput struct {
	RoomID uuid.UUID
	Start  time.Time
	End    time.Time

	Limit  int64
	Offset int64
}

type ListReservationsOutput

type ListReservationsOutput struct {
	Reservations []*types.Reservation
	Total        int64
}

type Service

type Service interface {
	ListReservations(ctx context.Context, input *ListReservationsInput) (*ListReservationsOutput, error)
	CreateReservation(ctx context.Context, input *CreateReservationInput) (*CreateReservationOutput, error)
}

func New

func New(cfg *Config) Service

func NewMeter

func NewMeter(svc Service, mt metric.Meter) (Service, error)

func NewTracer

func NewTracer(svc Service, tr trace.Tracer) Service

Jump to

Keyboard shortcuts

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