Versions in this module Expand all Collapse all v1 v1.4.0 Oct 20, 2026 Changes in this version + func Handler(si ServerInterface) http.Handler + func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler + func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler + func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler + type ChiServerOptions struct + BaseRouter chi.Router + BaseURL string + ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) + Middlewares []MiddlewareFunc + type Company struct + ID int32 + Name string + type CreateGameJSONRequestBody = CreateGameRequest + type CreateGameRequest struct + Developer string + GenresIDs []int32 + LogoURL string + Name string + PlatformsIDs []int32 + ReleaseDate string + Screenshots []string + Summary string + Websites []string + func (r *CreateGameRequest) Sanitize() + func (r *CreateGameRequest) ValidateWith(rules *validation.Rules) (bool, []web.FieldError) + type CreateRatingRequest struct + Rating uint8 + func (r *CreateRatingRequest) ValidateWith(rules *validation.Rules) (bool, []web.FieldError) + type Error = ErrorResponse + type ErrorResponse = web.ErrorResponse + type FieldError = web.FieldError + type GameDetailsResponse struct + Developers []Company + FranchiseGames []GameSummary + GameModes []GameMode + Genres []Genre + ID int32 + LogoURL string + Name string + Platforms []Platform + Publishers []Company + Rating float64 + ReleaseDate string + Screenshots []string + SimilarGames []GameSummary + Slug string + Summary string + Trailers []string + Websites []string + type GameID = int32 + type GameMode struct + ID int32 + Name string + type GameResponse struct + Developers []Company + Genres []Genre + ID int32 + LogoURL string + Name string + Platforms []Platform + Publishers []Company + Rating float64 + ReleaseDate string + Screenshots []string + Slug string + Summary string + Websites []string + type GameSummary struct + ID int32 + LogoURL string + Name string + Rating float64 + ReleaseDate string + Slug string + type GamesResponse struct + Count uint64 + Games []GameResponse + type Genre struct + ID int32 + Name string + type GetGamesParams struct + Developer int32 + Genre int32 + Name string + OrderBy GetGamesParamsOrderBy + Page uint32 + PageSize uint32 + Publisher int32 + type GetGamesParamsOrderBy string + const GetGamesParamsOrderByDefault + const GetGamesParamsOrderByName + const GetGamesParamsOrderByRating + const GetGamesParamsOrderByReleaseDate + func (e GetGamesParamsOrderBy) Valid() bool + type GetTopCompaniesParams struct + Type GetTopCompaniesParamsType + type GetTopCompaniesParamsType string + const GetTopCompaniesParamsTypeDev + const GetTopCompaniesParamsTypePub + func (e GetTopCompaniesParamsType) Valid() bool + type GetUserRatingsJSONRequestBody = GetUserRatingsRequest + type GetUserRatingsRequest struct + GameIDs []int32 + func (r *GetUserRatingsRequest) ValidateWith(rules *validation.Rules) (bool, []web.FieldError) + type IDResponse struct + ID int32 + type InvalidParamFormatError struct + Err error + ParamName string + func (e *InvalidParamFormatError) Error() string + func (e *InvalidParamFormatError) Unwrap() error + type MiddlewareFunc func(http.Handler) http.Handler + type ModerationItem struct + CreatedAt string + Details string + ID int32 + ResultStatus string + UpdatedAt string + type Platform struct + Abbreviation string + ID int32 + Name string + type RateGameJSONRequestBody = CreateRatingRequest + type RatingResponse struct + GameID int32 + Rating uint8 + type RequiredHeaderError struct + Err error + ParamName string + func (e *RequiredHeaderError) Error() string + func (e *RequiredHeaderError) Unwrap() error + type RequiredParamError struct + ParamName string + func (e *RequiredParamError) Error() string + type ServerInterface interface + CreateGame func(w http.ResponseWriter, r *http.Request) + DeleteGame func(w http.ResponseWriter, r *http.Request, id GameID) + GetGame func(w http.ResponseWriter, r *http.Request, id GameID) + GetGameModerations func(w http.ResponseWriter, r *http.Request, id GameID) + GetGames func(w http.ResponseWriter, r *http.Request, params GetGamesParams) + GetGenres func(w http.ResponseWriter, r *http.Request) + GetPlatforms func(w http.ResponseWriter, r *http.Request) + GetTopCompanies func(w http.ResponseWriter, r *http.Request, params GetTopCompaniesParams) + GetTopGenres func(w http.ResponseWriter, r *http.Request) + GetUserGames func(w http.ResponseWriter, r *http.Request) + GetUserRatings func(w http.ResponseWriter, r *http.Request) + RateGame func(w http.ResponseWriter, r *http.Request, id GameID) + UpdateGame func(w http.ResponseWriter, r *http.Request, id GameID) + UploadGameImages func(w http.ResponseWriter, r *http.Request) + type ServerInterfaceWrapper struct + ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) + Handler ServerInterface + HandlerMiddlewares []MiddlewareFunc + func NewHandler(pr *Provider) *ServerInterfaceWrapper + func (siw *ServerInterfaceWrapper) CreateGame(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) DeleteGame(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetGame(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetGameModerations(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetGames(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetGenres(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetPlatforms(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetTopCompanies(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetTopGenres(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetUserGames(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) GetUserRatings(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) RateGame(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) UpdateGame(w http.ResponseWriter, r *http.Request) + func (siw *ServerInterfaceWrapper) UploadGameImages(w http.ResponseWriter, r *http.Request) + type TooManyValuesForParamError struct + Count int + ParamName string + func (e *TooManyValuesForParamError) Error() string + type UnescapedCookieParamError struct + Err error + ParamName string + func (e *UnescapedCookieParamError) Error() string + func (e *UnescapedCookieParamError) Unwrap() error + type Unimplemented struct + func (_ Unimplemented) CreateGame(w http.ResponseWriter, r *http.Request) + func (_ Unimplemented) DeleteGame(w http.ResponseWriter, r *http.Request, id GameID) + func (_ Unimplemented) GetGame(w http.ResponseWriter, r *http.Request, id GameID) + func (_ Unimplemented) GetGameModerations(w http.ResponseWriter, r *http.Request, id GameID) + func (_ Unimplemented) GetGames(w http.ResponseWriter, r *http.Request, params GetGamesParams) + func (_ Unimplemented) GetGenres(w http.ResponseWriter, r *http.Request) + func (_ Unimplemented) GetPlatforms(w http.ResponseWriter, r *http.Request) + func (_ Unimplemented) GetTopCompanies(w http.ResponseWriter, r *http.Request, params GetTopCompaniesParams) + func (_ Unimplemented) GetTopGenres(w http.ResponseWriter, r *http.Request) + func (_ Unimplemented) GetUserGames(w http.ResponseWriter, r *http.Request) + func (_ Unimplemented) GetUserRatings(w http.ResponseWriter, r *http.Request) + func (_ Unimplemented) RateGame(w http.ResponseWriter, r *http.Request, id GameID) + func (_ Unimplemented) UpdateGame(w http.ResponseWriter, r *http.Request, id GameID) + func (_ Unimplemented) UploadGameImages(w http.ResponseWriter, r *http.Request) + type UnmarshalingParamError struct + Err error + ParamName string + func (e *UnmarshalingParamError) Error() string + func (e *UnmarshalingParamError) Unwrap() error + type UpdateGameJSONRequestBody = UpdateGameRequest + type UpdateGameRequest struct + Developer *string + GenresIDs *[]int32 + LogoURL *string + Name *string + PlatformsIDs *[]int32 + ReleaseDate *string + Screenshots *[]string + Summary *string + Websites *[]string + func (r *UpdateGameRequest) Sanitize() + func (r *UpdateGameRequest) ValidateWith(rules *validation.Rules) (bool, []web.FieldError) + type UploadGameImagesMultipartBody struct + Cover openapi_types.File + Screenshots []openapi_types.File + type UploadGameImagesMultipartRequestBody UploadGameImagesMultipartBody + type UploadImagesResponse struct + Files []UploadedFileInfo + type UploadedFileInfo struct + FileID string + FileName string + FileURL string + Type UploadedFileInfoType + type UploadedFileInfoType string + const UploadedFileInfoTypeCover + const UploadedFileInfoTypeScreenshot + func (e UploadedFileInfoType) Valid() bool + type UserRatingsResponse = map[int32]uint8 v1.3.0 Oct 18, 2026 Changes in this version type GameFacade + GetGameDetailsByID func(ctx context.Context, id int32) (model.GameDetails, error) v1.2.0 Sep 6, 2026 v1.1.0 May 5, 2026 v1.0.0 May 3, 2026 Changes in this version + func Service(log *zap.Logger, db *pgxpool.Pool, au *auth.Client, pr *Provider, ...) (http.Server, *trace.TracerProvider, error) + type Decoder interface + Decode func(r *http.Request, val any) error + type GameFacade interface + CreateGame func(ctx context.Context, cg model.CreateGame) (id int32, err error) + DeleteGame func(ctx context.Context, id int32, publisher string) error + GetCompaniesMap func(ctx context.Context) (map[int32]model.Company, error) + GetGameByID func(ctx context.Context, id int32) (model.Game, error) + GetGameModerations func(ctx context.Context, gameID int32, publisher string) ([]model.Moderation, error) + GetGames func(ctx context.Context, page, pageSize uint32, filter model.GamesFilter) (games []model.Game, count uint64, err error) + GetGenres func(ctx context.Context) ([]model.Genre, error) + GetGenresMap func(ctx context.Context) (map[int32]model.Genre, error) + GetPlatforms func(ctx context.Context) ([]model.Platform, error) + GetPlatformsMap func(ctx context.Context) (map[int32]model.Platform, error) + GetPublisherGames func(ctx context.Context, publisher string) ([]model.Game, error) + GetTopCompanies func(ctx context.Context, companyType string, limit int64) ([]model.Company, error) + GetTopGenres func(ctx context.Context, limit int64) ([]model.Genre, error) + GetUserRatings func(ctx context.Context, userID string) (map[int32]uint8, error) + RateGame func(ctx context.Context, gameID int32, userID string, rating uint8) error + UpdateGame func(ctx context.Context, id int32, upd model.UpdateGame) error + UploadGameImages func(ctx context.Context, coverFiles, screenshotFiles []*multipart.FileHeader, ...) ([]model.File, error) + type Provider struct + func NewProvider(log *zap.Logger, redisStore *cache.RedisStore, gameFacade GameFacade, ...) *Provider + func (p *Provider) CreateGame(w http.ResponseWriter, r *http.Request) + func (p *Provider) DeleteGame(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetGame(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetGameModerations(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetGames(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetGenres(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetPlatforms(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetTopCompanies(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetTopGenres(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetUserGames(w http.ResponseWriter, r *http.Request) + func (p *Provider) GetUserRatings(w http.ResponseWriter, r *http.Request) + func (p *Provider) RateGame(w http.ResponseWriter, r *http.Request) + func (p *Provider) UpdateGame(w http.ResponseWriter, r *http.Request) + func (p *Provider) UploadGameImages(w http.ResponseWriter, r *http.Request)