service

package
v0.0.0-...-1d506e1 Latest Latest
Warning

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

Go to latest
Published: May 13, 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 {
	Repo repo.Repository
}

type CreateStayInput

type CreateStayInput struct {
	RoomID        uuid.UUID
	ReservationID uuid.UUID

	CheckIn time.Time
	Notes   string
}

type CreateStayOutput

type CreateStayOutput struct {
	Stay *types.Stay
}

type ListStaysInput

type ListStaysInput struct {
	RoomID        uuid.UUID
	ReservationID uuid.UUID

	Limit  int64
	Offset int64
}

type ListStaysOutput

type ListStaysOutput struct {
	Stays []*types.Stay
	Total int64
}

type Service

type Service interface {
	ListStays(ctx context.Context, input *ListStaysInput) (*ListStaysOutput, error)
	CreateStay(ctx context.Context, input *CreateStayInput) (*CreateStayOutput, error)
	UpdateStay(ctx context.Context, input *UpdateStayInput) (*UpdateStayOutput, 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

type UpdateStayInput

type UpdateStayInput struct {
	ID     uuid.UUID
	RoomID uuid.UUID

	CheckOut time.Time
	Notes    string
}

type UpdateStayOutput

type UpdateStayOutput struct {
	Stay *types.Stay
}

Jump to

Keyboard shortcuts

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