hotel

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHotelAvailability

func AddHotelAvailability(ctx context.Context, hotelId string, capacity int) string

func CheckAvailability

func CheckAvailability(ctx context.Context, customerName string, hotelIds []string, inDate string, outDate string, numberOfRooms int) []string

func FrontendReservation

func FrontendReservation(ctx context.Context, hotelId string, inDate string, outDate string, rooms int, username string, password string) bool

func GetProfiles

func GetProfiles(ctx context.Context, hotelIds []string) []*hotelpb.HotelProfile

func GetRates

func GetRates(ctx context.Context, hotelIds []string) []*hotelpb.Rate

func GetUserId

func GetUserId(ctx context.Context, username string) string

func Login

func Login(ctx context.Context, username string, password string) string

func MakeReservation

func MakeReservation(ctx context.Context, customerName string, hotelId string, inDate string, outDate string, numberOfRooms int) bool

func Nearby

func Nearby(ctx context.Context, inDate string, outDate string, location string) []*hotelpb.Rate

func RegisterUser

func RegisterUser(ctx context.Context, username string, password string) bool

func SearchHotels

func SearchHotels(ctx context.Context, inDate string, outDate string, location string) []*hotelpb.HotelProfile

func StoreHotel

func StoreHotel(ctx context.Context, hotelId string, name string, phone string, location string, rate int, capacity int, info string) string

func StoreHotelLocation

func StoreHotelLocation(ctx context.Context, hotelId string, location string) string

func StoreProfile

func StoreProfile(ctx context.Context, profile *hotelpb.HotelProfile) string

func StoreRate

func StoreRate(ctx context.Context, rate *hotelpb.Rate) string

Types

type ProfileServer

type ProfileServer struct {
	hotelpb.UnimplementedProfileServiceServer
}

func (*ProfileServer) GetProfiles

func (*ProfileServer) StoreProfile

type RateServer

type RateServer struct {
	hotelpb.UnimplementedRateServiceServer
}

func (*RateServer) GetRates

func (*RateServer) StoreRate

type ReservationServer

type ReservationServer struct {
	hotelpb.UnimplementedReservationServiceServer
}

func (*ReservationServer) CheckAvailability

func (*ReservationServer) MakeReservation

type SearchServer

type SearchServer struct {
	hotelpb.UnimplementedSearchServiceServer
}

func (*SearchServer) Nearby

type User

type User struct {
	UserId   string `json:"user_id"`
	Username string `json:"username"`
	Password []byte `json:"password"`
	Salt     string `json:"salt"`
}

type UserServer

type UserServer struct {
	hotelpb.UnimplementedUserServiceServer
}

func (*UserServer) Login

func (*UserServer) RegisterUser

Jump to

Keyboard shortcuts

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