endpoint

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCreateStayEndpoint

func MakeCreateStayEndpoint(svc service.Service) kitendpoint.Endpoint

func MakeListStaysEndpoint

func MakeListStaysEndpoint(svc service.Service) kitendpoint.Endpoint

func MakeUpdateStayEndpoint

func MakeUpdateStayEndpoint(svc service.Service) kitendpoint.Endpoint

Types

type CreateStayRequest

type CreateStayRequest struct {
	RoomID        string
	ReservationID string
	CheckIn       time.Time
	Notes         string
}

type CreateStayResponse

type CreateStayResponse struct {
	Stay *types.Stay
}

type Endpoints

type Endpoints struct {
	ListStaysEndpoint  kitendpoint.Endpoint
	CreateStayEndpoint kitendpoint.Endpoint
	UpdateStayEndpoint kitendpoint.Endpoint
}

func New

func New(svc service.Service) Endpoints

type ListStaysRequest

type ListStaysRequest struct {
	RoomID        string
	ReservationID string

	Limit  int64
	Offset int64
}

type ListStaysResponse

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

type UpdateStayRequest

type UpdateStayRequest struct {
	ID       string
	RoomID   string
	CheckOut time.Time
	Notes    string
}

type UpdateStayResponse

type UpdateStayResponse struct {
	Stay *types.Stay
}

Jump to

Keyboard shortcuts

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