Documentation ¶
Index ¶
- func IsBusLineExisting(ctx context.Context, name, company string) (bool, error)
- func IsBusRouteExisting(ctx context.Context, routefilter schema.BusRouteFilter) (bool, error)
- func IsBusUnitExisting(ctx context.Context, busId, code string) (bool, error)
- func IsCancelledBookingExists(ctx context.Context, bookingId string) (bool, error)
- func IsUsernameExisting(ctx context.Context, username string) (bool, error)
- func UpdateBookingFields(booking, old schema.Bookings) schema.Bookings
- func UpdateBusLineFields(bus schema.Bus, old schema.Bus) schema.Bus
- func UpdateBusRouteFields(route, old schema.BusRoute) schema.BusRoute
- func UpdateBusUnitFields(unit, old schema.BusUnit) schema.BusUnit
- func UpdateUserAccountFields(user schema.User, old schema.User) schema.User
- func UserAccountExists(ctx context.Context, username, password string) (bool, schema.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBusLineExisting ¶
IsBusLineExisting checks if the DynamoDB Table is configured on the environment, and returns a boolean and error value to check whether the bus line already exist or not.
func IsBusRouteExisting ¶
IsBusRouteExisting checks if the DynamoDB Table is configured on the environment, and returns a boolean and error value to check whether the bus route alreadu exist or not.
func IsBusUnitExisting ¶
IsBusUnitExisting checks if the DynamoDB Table is configured on the environment, and returns a boolean and error value to check whether the bus unit already exist or not.
func IsCancelledBookingExists ¶
IsCancelledBookingExists checks if the DynamoDB Table is configured on the environment, and returns a boolean and error value to check whether the cancelled booking already exist or not.
func IsUsernameExisting ¶
IsUsernameExisting checks if the DynamoDB Table is configured on the environment, and returns a boolean and error value to check whether the username already exist or not.
func UpdateBookingFields ¶
UpdateBookingFields validates if the field that are going to be updated are empty or not to set its previous value.
Fields that are validated:
seat_number, status, reason
Fields that are validated if it is a cancelled booking:
reason, cancelled_by
func UpdateBusLineFields ¶
UpdateBusLineFields validates if the field that are going to be updated are empty or not to set its previous value.
Fields that are validated:
owner, email, address, mobile_number
func UpdateBusRouteFields ¶
UpdateBusRouteFields validates if the field that are going to be updated are empty or not to set its previous value.
Fields that are validated:
currency_code, rate, active, departure_time, arrival_time, from_route, to_route
func UpdateBusUnitFields ¶
UpdateBusUnitFields validates if the field that are going to be updated are empty or not to set its previous value.
Fields that are valdiated:
active, min_capacity, max_capacity
func UpdateUserAccountFields ¶
UpdateUserAccountFields validates if the field that are going to be updated are empty or not to set its previous value.
Fields that are validated:
first_name, last_name, address, email, mobile_number
func UserAccountExists ¶
UserAccountExists checks if the DynamoDB Table is configured on the environment, and returns a boolean and error value to check whether the user account credentials are correct or not.
Types ¶
This section is empty.