Documentation ¶
Index ¶
- Constants
- type CinemaHallDTO
- type CinemaHallModel
- type CinemaHallRequest
- type CinemaHallResponse
- type CinemaSeatDTO
- type CinemaSeatModel
- type CinemaService
- func (cinemaService CinemaService) AddCinemaHall(request CinemaHallRequest) (CinemaHallResponse, []error)
- func (cinemaService CinemaService) AddCinemaSeat(request CreateCinemaSeatRequest) (CreateCinemaSeatResponse, []error)
- func (cinemaService CinemaService) CreateCinema(request CreateCinemaRequest) CreateCinemaResponse
- type CityModelResponse
- type CityService
- type CreateCinemaRequest
- type CreateCinemaResponse
- type CreateCinemaSeatRequest
- type CreateCinemaSeatResponse
- type CreateShowRequest
- type CreateShowResponse
- type CreateUserRequest
- type CreateUserResponse
- type GetCityByIdRequest
- type GetCityByIdResponse
- type GetMovieByIdRequest
- type GetMovieByIdResponse
- type GetMoviesRequest
- type GetMoviesResponse
- type GetSearchRequest
- type GetSearchResponse
- type GetShowsByLocationRequest
- type GetShowsByLocationResponse
- type MovieDataResponse
- type MovieService
- type ShowDateTime
- type ShowService
- type ShowsDTO
- type UserDTO
- type UserService
Constants ¶
View Source
const ( TIME_OVERLAP_ERROR = "time overlap between the show Start and End Time" INVALID_UUID_ERROR = "%s should have a valid UUID" )
View Source
const ( EmailRegex = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$" PhoneNumberRegex = "\\+[1-9]{1}[0-9]{0,2}-[2-9]{1}[0-9]{2}-[2-9]{1}[0-9]{2}-[0-9]{4}$" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CinemaHallDTO ¶
type CinemaHallModel ¶
type CinemaHallModel struct { Name string `json:"name"` TotalSeat int `json:"totalSeat"` CinemaSeats []CinemaSeatModel `json:"cinemaSeats"` }
type CinemaHallRequest ¶
type CinemaHallRequest struct { Id string `param:"Id"` Halls []CinemaHallModel `json:"halls"` }
type CinemaHallResponse ¶
type CinemaHallResponse struct {
CinemaId string `json:"CinemaId"`
}
type CinemaSeatDTO ¶
type CinemaSeatModel ¶
type CinemaService ¶
func (CinemaService) AddCinemaHall ¶
func (cinemaService CinemaService) AddCinemaHall(request CinemaHallRequest) (CinemaHallResponse, []error)
func (CinemaService) AddCinemaSeat ¶
func (cinemaService CinemaService) AddCinemaSeat(request CreateCinemaSeatRequest) (CreateCinemaSeatResponse, []error)
func (CinemaService) CreateCinema ¶
func (cinemaService CinemaService) CreateCinema(request CreateCinemaRequest) CreateCinemaResponse
type CityModelResponse ¶
type CityService ¶
func (CityService) GetCityById ¶
func (cityService CityService) GetCityById(request GetCityByIdRequest) (GetCityByIdResponse, error)
type CreateCinemaRequest ¶
type CreateCinemaResponse ¶
type CreateCinemaSeatRequest ¶
type CreateCinemaSeatRequest struct { Id string `param:"Id"` CinemaHallId string `param:"cinemaHallId"` Seats []CinemaSeatModel `json:"cinemaSeats"` }
type CreateCinemaSeatResponse ¶
type CreateCinemaSeatResponse struct {
StatusCode int
}
type CreateShowRequest ¶
type CreateShowRequest struct { ShowTimes []ShowDateTime `json:"showTimes"` CinemaHallId string `json:"cinemaHallId"` MovieId string `json:"movieId"` }
type CreateShowResponse ¶
type CreateUserRequest ¶
type CreateUserRequest struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` Email string `json:"email"` Password string `json:"password"` PhoneNumber string `json:"phoneNumber"` CityId string `json:"cityId"` Address string `json:"address"` Longitude float32 `json:"longitude"` Latitude float32 `json:"latitude"` }
type CreateUserResponse ¶
type GetCityByIdRequest ¶
type GetCityByIdRequest struct {
Id string `param:"id"`
}
type GetCityByIdResponse ¶
type GetCityByIdResponse struct { City CityModelResponse StatusCode int }
type GetMovieByIdRequest ¶
type GetMovieByIdRequest struct {
Id string `param:"id" validate:"required"`
}
type GetMovieByIdResponse ¶
type GetMovieByIdResponse struct { StatusCode int Movie MovieDataResponse `json:"movie"` }
type GetMoviesRequest ¶
type GetMoviesResponse ¶
type GetMoviesResponse struct { Page int `json:"page"` PerPage int `json:"perPage"` TotalResults int64 `json:"totalResults"` RequestedPageLength int `json:"requestedPageLength"` Movies []MovieDataResponse `json:"movies"` }
type GetSearchRequest ¶
type GetSearchRequest struct {
Term string `query:"term"`
}
type GetSearchResponse ¶
type GetSearchResponse struct { StatusCode int Result []MovieDataResponse `json:"results"` }
type GetShowsByLocationRequest ¶
type GetShowsByLocationRequest struct {
UserId string `json:"userId"`
}
type MovieDataResponse ¶
type MovieService ¶
func (MovieService) GetMovieById ¶
func (movieService MovieService) GetMovieById(request GetMovieByIdRequest) (GetMovieByIdResponse, error)
func (MovieService) GetMovies ¶
func (movieService MovieService) GetMovies(request GetMoviesRequest) (GetMoviesResponse, error)
func (MovieService) SearchMovie ¶
func (movieService MovieService) SearchMovie(request GetSearchRequest) (GetSearchResponse, error)
type ShowDateTime ¶
type ShowService ¶
func (ShowService) CreateShow ¶
func (showService ShowService) CreateShow(request CreateShowRequest) (CreateShowResponse, []error)
func (ShowService) GetShowsByUserLocation ¶
func (showService ShowService) GetShowsByUserLocation(request GetShowsByLocationRequest) (GetShowsByLocationResponse, error)
type ShowsDTO ¶
type ShowsDTO struct { ShowId string `json:"showId"` Date time.Time `json:"showDate"` MovieId string `json:"movieId"` Title string `json:"movieTitle"` Description string `json:"movieDescription"` Language string `json:"language"` Genre int `json:"genre"` StartTime time.Time `json:"showStartTime"` EndTime time.Time `json:"showEndTime"` AddressLine string `json:"address"` Coordinates entities.Coordinate `json:"coordinates"` Distance float64 `json:"distance"` // contains filtered or unexported fields }
type UserDTO ¶
type UserDTO struct { UserId string IsDeprecated bool Coordinates entities.Coordinate CityId string }
type UserService ¶
func (UserService) CreateUser ¶
func (userService UserService) CreateUser(request CreateUserRequest) CreateUserResponse
Click to show internal directories.
Click to hide internal directories.