Documentation ¶
Index ¶
- Constants
- type CommonDiscountData
- type CommonDocumentData
- type CreateFeatureData
- type CreateGameData
- type CreateGameDiscountData
- type CreateGameLicenseData
- type CreateGameMediaData
- type CreateGameRevisionL10nData
- type CreateGameStorePublishData
- type CreateGenreData
- type CreateLanguageData
- type CreateMediaData
- type CreateOrderData
- type CreatePostData
- type CreateStorefrontData
- type CreateTagData
- type DiscountService
- type DocumentService
- type FeatureService
- type GameDiscountService
- type GameLicenseService
- type GameRevisionL10nData
- type GameRevisionL10nService
- type GameRevisionPriceData
- type GameRevisionPriceService
- type GameRevisionService
- type GameService
- type GameStorePublishService
- type GenreService
- type GetByFilterDiscountData
- type GetByFilterDocumentData
- type GetByFilterGameData
- type GetByFilterGameRevisionData
- type GetByFilterMediaData
- type GetByFilterOrderData
- type GetByFilterPostData
- type GetByFilterSignatureData
- type GetByFilterStorefrontData
- type GetUserDocumentsData
- type LanguageService
- type LocalizationData
- type LocalizationService
- type MediaParser
- type MediaService
- type OrderService
- type PostL10n
- type PostService
- type PricingConversionData
- type PricingService
- type PricingSteamData
- type RatingData
- type RatingService
- type RegionCurrencyService
- type RequirementsSet
- type ReviewData
- type ReviewService
- type SettingsService
- type SocialLink
- type StorefrontBlockData
- type StorefrontService
- type SystemRequirements
- type TagService
- type UpdateDiscountData
- type UpdateDocumentData
- type UpdateFeatureData
- type UpdateGameData
- type UpdateGameRevisionData
- type UpdateGameRevisionL10nData
- type UpdateGameStorePublishData
- type UpdateGenreData
- type UpdateLanguageData
- type UpdatePostData
- type UpdateStorefrontData
- type UpdateTagData
- type UploadGameMediaData
- type UploadMediaData
- type UpsertDocumentData
- type UpsertPostData
- type UserInfoDownloadService
- type UserService
Constants ¶
View Source
const (
LanguageDefault = "en"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonDiscountData ¶
type CommonDocumentData ¶
type CommonDocumentData struct { Title string Text string Reason string Type document.Type Language language.Language Version string CreatedBy string }
func (CommonDocumentData) Validate ¶
func (d CommonDocumentData) Validate() error
type CreateFeatureData ¶
type CreateGameData ¶
type CreateGameData struct { Title string `validate:"required"` Slug string `validate:"required"` Type game.Type `validate:"required"` ParentID *string }
func (CreateGameData) Validate ¶
func (d CreateGameData) Validate() error
type CreateGameDiscountData ¶
type CreateGameLicenseData ¶
type CreateGameMediaData ¶
func (*CreateGameMediaData) Validate ¶
func (d *CreateGameMediaData) Validate() error
type CreateGameRevisionL10nData ¶
type CreateGameRevisionL10nData struct { GameRevisionID uint L10n []GameRevisionL10nData }
type CreateGenreData ¶
type CreateGenreData struct {
Name string
}
type CreateLanguageData ¶
type CreateLanguageData struct {
Name string
}
type CreateMediaData ¶
func (*CreateMediaData) Validate ¶
func (d *CreateMediaData) Validate() error
type CreateOrderData ¶
type CreatePostData ¶
type CreateStorefrontData ¶
type CreateStorefrontData struct { Name string Blocks []StorefrontBlockData }
type CreateTagData ¶
type CreateTagData struct {
Name string
}
type DiscountService ¶
type DiscountService interface { Create(ctx context.Context, data *CommonDiscountData) (*entity.Discount, error) Update(ctx context.Context, data *UpdateDiscountData) (*entity.Discount, error) Delete(ctx context.Context, id uint) error Start(ctx context.Context, i *entity.Discount) error Archive(ctx context.Context, i *entity.Discount) error GetByID(ctx context.Context, id uint) (*entity.Discount, error) GetByFilter(ctx context.Context, data *GetByFilterDiscountData) ([]entity.Discount, error) GetCountByFilter(ctx context.Context, data *GetByFilterDiscountData) (int, error) // Get list of discounts that could be started GetToStart(ctx context.Context) ([]entity.Discount, error) GetToArchive(ctx context.Context) ([]entity.Discount, error) GetRunning(ctx context.Context) ([]entity.Discount, error) }
type DocumentService ¶
type DocumentService interface { Create(ctx context.Context, data *CommonDocumentData) (*entity.Document, error) Update(ctx context.Context, data *UpdateDocumentData) (*entity.Document, error) Upsert(ctx context.Context, data *UpsertDocumentData) (*entity.Document, error) Delete(ctx context.Context, id uint) error Activate(ctx context.Context, id uint) (*entity.Document, error) SignDocumentByUser(ctx context.Context, doc *entity.Document, userID string) (*entity.DocumentSigned, error) GetByID(ctx context.Context, id uint) (*entity.Document, error) GetByFilter(ctx context.Context, data *GetByFilterDocumentData) ([]entity.Document, error) GetCountByFilter(ctx context.Context, data *GetByFilterDocumentData) (int, error) // GetPDF Document GetPDFDocument(ctx context.Context, documentID uint) ([]byte, error) GetSignaturesByFilter(ctx context.Context, data *GetByFilterSignatureData) ([]entity.DocumentSignature, error) GetCountSignaturesByFilter(ctx context.Context, data *GetByFilterSignatureData) (int, error) }
type FeatureService ¶
type FeatureService interface { Create(ctx context.Context, data *CreateFeatureData) (*entity.Feature, error) Update(ctx context.Context, data *UpdateFeatureData) (*entity.Feature, error) Delete(ctx context.Context, id uint) error GetAll(ctx context.Context) ([]entity.Feature, error) GetByID(ctx context.Context, id uint) (*entity.Feature, error) GetExistByID(ctx context.Context, id uint) (*entity.Feature, error) GetByIDs(ctx context.Context, ids []uint) ([]entity.Feature, error) GetByGameRevisionID(ctx context.Context, gameRevisionID uint) ([]entity.Feature, error) UpdateFeaturesForGameRevision(ctx context.Context, gameRevision *entity.GameRevision, featureIDs []uint) error }
type GameDiscountService ¶
type GameDiscountService interface { Create(ctx context.Context, data *CreateGameDiscountData) (*entity.GameDiscount, error) Delete(ctx context.Context, packageID string, discountID uint) error GetByID(ctx context.Context, id uint) (*entity.GameDiscount, error) GetByDiscountID(ctx context.Context, discountID uint) ([]entity.GameDiscount, error) GetByGameID(ctx context.Context, gameID string) ([]entity.GameDiscount, error) }
type GameLicenseService ¶
type GameLicenseService interface { Create(ctx context.Context, data *CreateGameLicenseData) (*entity.GameLicense, error) GetByUserID(ctx context.Context, userID string) ([]entity.GameLicense, error) GetByGameID(ctx context.Context, gameID string) ([]entity.GameLicense, error) GetByGameIDAndUserID(ctx context.Context, gameID, userID string) (*entity.GameLicense, error) }
type GameRevisionL10nData ¶
type GameRevisionL10nData struct { LanguageID uint Summary *string Description *string CoverWideSliderMediaID *uint CoverVerticalMediaID *uint CoverHorizontalMediaID *uint CoverHorizontalSmallMediaID *uint CoverLargeSingleMediaID *uint CoverCatalogMediaID *uint CoverIconMediaID *uint Trailers []string ScreenshotMediaIDs []uint DescriptionMediaIDs []uint }
type GameRevisionL10nService ¶
type GameRevisionL10nService interface { //GetByID(ctx context.Context, id uint) (*entity.GameRevisionL10n, error) GetByGameRevisionID(ctx context.Context, revisionID uint) ([]entity.GameRevisionL10n, error) UpdateForGameRevision(ctx context.Context, rev *entity.GameRevision, data []GameRevisionL10nData) error }
type GameRevisionPriceData ¶
type GameRevisionPriceService ¶
type GameRevisionPriceService interface { GetByRevision(ctx context.Context, rev *entity.GameRevision) ([]entity.GameRevisionPrice, error) GetByRevisionAndRegionCurrencyID(ctx context.Context, rev *entity.GameRevision, regionCurrencyID uint) (*entity.GameRevisionPrice, error) GetByDiscountID(ctx context.Context, discountID uint) ([]entity.GameRevisionPrice, error) UpdateForGameRevision(ctx context.Context, rev *entity.GameRevision, prices []GameRevisionPriceData) error UpdateMultiple(ctx context.Context, prices []entity.GameRevisionPrice) error }
type GameRevisionService ¶
type GameRevisionService interface { Update(ctx context.Context, data *UpdateGameRevisionData) (*entity.GameRevisionEx, error) GetByID(ctx context.Context, id uint) (*entity.GameRevisionEx, error) GetDraftByGame(ctx context.Context, game *entity.Game) (*entity.GameRevisionEx, error) GetDraftByGameID(ctx context.Context, gameID string) (*entity.GameRevision, error) GetLastByGameIDs(ctx context.Context, gameIDs []string) ([]entity.GameRevisionEx, error) GetLastPublishedByGame(ctx context.Context, game *entity.Game) (*entity.GameRevisionEx, error) GetByFilter(ctx context.Context, data *GetByFilterGameRevisionData) ([]entity.GameRevisionEx, error) GetCountByFilter(ctx context.Context, data *GetByFilterGameRevisionData) (int, error) IsGamesPublished(ctx context.Context, ids []string) error }
type GameService ¶
type GameService interface { Create(ctx context.Context, data *CreateGameData) (*entity.Game, error) Update(ctx context.Context, data *UpdateGameData) (*entity.GameEx, error) Delete(ctx context.Context, id string) error Publish(ctx context.Context, id string) error GetByID(ctx context.Context, id string) (*entity.Game, error) GetBySKU(ctx context.Context, sku string) (*entity.Game, error) GetByFilter(ctx context.Context, data *GetByFilterGameData) ([]entity.Game, error) GetExByID(ctx context.Context, id string) (*entity.GameEx, error) GetExBySlug(ctx context.Context, slug string) (*entity.GameEx, error) GetExByFilter(ctx context.Context, data *GetByFilterGameData) ([]entity.GameEx, error) GetExLastPublishedByID(ctx context.Context, id string) (*entity.GameEx, error) GetExLastPublishedBySKU(ctx context.Context, sku string) (*entity.GameEx, error) GetCountByFilter(ctx context.Context, data *GetByFilterGameData) (int, error) }
type GameStorePublishService ¶
type GameStorePublishService interface { Create(ctx context.Context, data *CreateGameStorePublishData) (*entity.GameStorePublish, error) Update(ctx context.Context, data *UpdateGameStorePublishData) (*entity.GameStorePublish, error) }
type GenreService ¶
type GenreService interface { Create(ctx context.Context, data *CreateGenreData) (*entity.Genre, error) Update(ctx context.Context, data *UpdateGenreData) (*entity.Genre, error) Delete(ctx context.Context, id uint) error GetAll(ctx context.Context) ([]entity.Genre, error) GetByID(ctx context.Context, id uint) (*entity.Genre, error) GetExistByID(ctx context.Context, id uint) (*entity.Genre, error) GetByIDs(ctx context.Context, ids []uint) ([]entity.Genre, error) GetByGameRevisionID(ctx context.Context, gameRevisionID uint) ([]entity.Genre, error) UpdateGenresForGameRevision(ctx context.Context, gameRevision *entity.GameRevision, genreIDs []uint) error }
type GetByFilterDiscountData ¶
type GetByFilterDocumentData ¶
type GetByFilterGameData ¶
type GetByFilterMediaData ¶
type GetByFilterOrderData ¶
type GetByFilterPostData ¶
type GetByFilterPostData struct { Language string OrderType enum.SortOrderType OrderBy enum.SortOrderColumn OnlyPublished bool Limit int Offset int }
type GetUserDocumentsData ¶
type GetUserDocumentsData struct { UserID string OrderType enum.SortOrderType Limit uint Offset uint }
type LanguageService ¶
type LanguageService interface { Create(ctx context.Context, data *CreateLanguageData) (*entity.Language, error) Update(ctx context.Context, data *UpdateLanguageData) (*entity.Language, error) Delete(ctx context.Context, id uint) error GetByID(ctx context.Context, id uint) (*entity.Language, error) GetByLanguage(ctx context.Context, lng string) (*entity.Language, error) GetByLanguageOrDefault(ctx context.Context, lng string) (*entity.Language, error) GetExistByID(ctx context.Context, id uint) (*entity.Language, error) GetByIDs(ctx context.Context, ids []uint) ([]entity.Language, error) GetAll(ctx context.Context) ([]entity.Language, error) }
type LocalizationData ¶
type LocalizationService ¶
type LocalizationService interface { GetByID(ctx context.Context, id uint) (*entity.Localization, error) GetExistByID(ctx context.Context, id uint) (*entity.Localization, error) GetByIDs(ctx context.Context, ids []uint) ([]entity.Localization, error) GetByGameRevisionID(ctx context.Context, gameRevisionID uint) ([]entity.Localization, error) GetAvailableLanguages(ctx context.Context) ([]entity.LocalizationLanguage, error) UpdateLocalizationsForGameRevision(ctx context.Context, gameRevision *entity.GameRevision, localizations []LocalizationData) error }
type MediaParser ¶
type MediaService ¶
type MediaService interface { CreateGame(ctx context.Context, data *CreateGameMediaData) (*entity.Media, error) UploadGame(ctx context.Context, data *UploadGameMediaData) (*entity.Media, error) Upload(ctx context.Context, data *UploadMediaData) (*entity.Media, error) Delete(ctx context.Context, id uint) error GetByID(ctx context.Context, id uint) (*entity.Media, error) GetByIDs(ctx context.Context, ids []uint) ([]entity.Media, error) GetByFilePath(ctx context.Context, path []string) ([]entity.Media, error) GetByFilter(ctx context.Context, filter GetByFilterMediaData) ([]entity.Media, error) IsUsed(ctx context.Context, mediaID uint) (bool, error) }
type OrderService ¶
type PostService ¶
type PostService interface { Create(ctx context.Context, data *CreatePostData) (*entity.PostEx, error) Update(ctx context.Context, data *UpdatePostData) (*entity.PostEx, error) Upsert(ctx context.Context, data *UpsertPostData) (*entity.PostEx, error) Delete(ctx context.Context, id uint) error Publish(ctx context.Context, id uint) error Draft(ctx context.Context, id uint) error GetByID(ctx context.Context, id uint) (*entity.Post, error) GetExByID(ctx context.Context, id uint) (*entity.PostEx, error) GetExByIDWithLanguage(ctx context.Context, id, lngID uint) (*entity.PostEx, error) // GetExBySlug returns PostEx by slug GetExBySlug(ctx context.Context, slug string) (*entity.PostEx, error) GetExBySlugWithLanguage(ctx context.Context, slug string, lngID uint) (*entity.PostEx, error) // GetExByFilter returns posts founded by filter GetExByFilter(ctx context.Context, data *GetByFilterPostData) ([]entity.PostEx, error) GetExByFilterWithLanguage(ctx context.Context, data *GetByFilterPostData, lngID uint) ([]entity.PostEx, error) // GetCountByFilter returns count games founded by filter GetCountByFilter(ctx context.Context, data *GetByFilterPostData) (int, error) }
type PricingConversionData ¶
type PricingService ¶
type PricingSteamData ¶
type RatingData ¶
type RatingData struct { Agency game_rating.Agency Rating game_rating.Rating Descriptors []game_rating.Descriptor DisplayOnlineNotice bool DisplayOnlineMusicNotice bool ShowAgeRestrict bool AgeRestrictYears *uint }
func (RatingData) Validate ¶
func (d RatingData) Validate() error
type RatingService ¶
type RatingService interface { GetByID(ctx context.Context, id uint) (*entity.Rating, error) GetExistByID(ctx context.Context, id uint) (*entity.Rating, error) GetByIDs(ctx context.Context, ids []uint) ([]entity.Rating, error) GetByGameRevisionID(ctx context.Context, gameRevisionID uint) ([]entity.Rating, error) UpdateRatingsForGameRevision(ctx context.Context, gameRevision *entity.GameRevision, ratings []RatingData) error }
type RegionCurrencyService ¶
type RegionCurrencyService interface { Update(ctx context.Context, id uint, isActiveForUsers, isActiveForDevelopers *bool) (*entity.RegionCurrency, error) GetByID(ctx context.Context, id uint) (*entity.RegionCurrency, error) GetByCode(ctx context.Context, code string) (*entity.RegionCurrency, error) GetByRegionAndCurrencyCodes(ctx context.Context, regionCode, currencyCode string) (*entity.RegionCurrency, error) GetAll(ctx context.Context) ([]entity.RegionCurrency, error) GetActiveForUsers(ctx context.Context) ([]entity.RegionCurrency, error) GetActiveForDevelopers(ctx context.Context) ([]entity.RegionCurrency, error) }
type RequirementsSet ¶
type RequirementsSet struct { OS string `validate:"required,min=1,max=50"` CPU string `validate:"required,min=1,max=50"` GPU string `validate:"required,min=1,max=50"` DirectX uint DiskSpace uint `validate:"required,min=1"` RAM uint `validate:"required,min=1"` Other string }
func (RequirementsSet) Validate ¶
func (s RequirementsSet) Validate() error
type ReviewData ¶
type ReviewData struct { PressName string `validate:"required"` Link string `validate:"required"` Quote string `validate:"required"` Score string }
func (ReviewData) Validate ¶
func (d ReviewData) Validate() error
type ReviewService ¶
type SettingsService ¶
type SocialLink ¶
type SocialLink struct { Type game_social_link.Type URL string }
func (SocialLink) Validate ¶
func (d SocialLink) Validate() error
type StorefrontBlockData ¶
type StorefrontBlockData struct { Type storefront_block.Type Title storefront_block.Title Filter string GameIDs []string }
type StorefrontService ¶
type StorefrontService interface { Create(ctx context.Context, data *CreateStorefrontData) (*entity.Storefront, error) Update(ctx context.Context, data *UpdateStorefrontData) (*entity.Storefront, error) Delete(ctx context.Context, id uint) error Activate(ctx context.Context, id uint) error GetByID(ctx context.Context, id uint) (*entity.Storefront, error) GetByFilter(ctx context.Context, data *GetByFilterStorefrontData) ([]entity.Storefront, error) GetActive(ctx context.Context) (*entity.Storefront, error) GetCountByFilter(ctx context.Context) (int, error) }
type SystemRequirements ¶
type SystemRequirements struct { Platform game.Platform `validate:"required"` Minimal RequirementsSet `validate:"required"` Recommended RequirementsSet `validate:"required"` }
func (SystemRequirements) Validate ¶
func (s SystemRequirements) Validate() error
type TagService ¶
type TagService interface { Create(ctx context.Context, data *CreateTagData) (*entity.Tag, error) Update(ctx context.Context, data *UpdateTagData) (*entity.Tag, error) Delete(ctx context.Context, id uint) error GetAll(ctx context.Context) ([]entity.Tag, error) GetByID(ctx context.Context, id uint) (*entity.Tag, error) GetExistByID(ctx context.Context, id uint) (*entity.Tag, error) GetByIDs(ctx context.Context, ids []uint) ([]entity.Tag, error) GetByGameRevisionID(ctx context.Context, gameRevisionID uint) ([]entity.Tag, error) UpdateTagsForGameRevision(ctx context.Context, gameRevision *entity.GameRevision, tagIDs []uint) error }
type UpdateDiscountData ¶
type UpdateDiscountData struct { ID uint CommonDiscountData }
type UpdateDocumentData ¶
type UpdateDocumentData struct { ID uint CommonDocumentData }
func (UpdateDocumentData) Validate ¶
func (d UpdateDocumentData) Validate() error
type UpdateGameData ¶
type UpdateGameData struct { ID string `validate:"required"` Title *string Slug *string License *string Developer *string Publisher *string Tags *[]uint Features *[]uint Genres *[]uint PlayTime *uint ReleaseDateCountDown *bool Platforms *game.PlatformArray ReleaseDate *time.Time SocialLinks *[]SocialLink SystemRequirements *[]SystemRequirements Localizations *[]LocalizationData Ratings *[]RatingData Reviews *[]ReviewData L10n *[]GameRevisionL10nData Prices *[]GameRevisionPriceData }
func (UpdateGameData) Validate ¶
func (d UpdateGameData) Validate() error
type UpdateGameRevisionData ¶
type UpdateGameRevisionData struct { ID uint License *string Developer *string Publisher *string PlayTime *uint ReleaseDate *time.Time ReleaseDateCountDown *bool Status *game_revision.Status Platforms *game.PlatformArray SocialLinks *[]SocialLink SystemRequirements *[]SystemRequirements Localizations *[]LocalizationData Rating *[]RatingData Reviews *[]ReviewData Prices *[]GameRevisionPriceData L10n *[]GameRevisionL10nData Tags *[]uint Features *[]uint Genres *[]uint }
type UpdateGameRevisionL10nData ¶
type UpdateGameRevisionL10nData struct { GameRevisionID uint L10n []GameRevisionL10nData }
type UpdateGameStorePublishData ¶
type UpdateGameStorePublishData struct { ID uint Status game_publish.Status }
type UpdateGenreData ¶
type UpdateLanguageData ¶
type UpdatePostData ¶
type UpdateStorefrontData ¶
type UpdateStorefrontData struct { ID uint Name string Blocks []StorefrontBlockData }
type UpdateTagData ¶
type UploadGameMediaData ¶
type UploadMediaData ¶
type UpsertDocumentData ¶
type UpsertDocumentData struct { ID *uint CommonDocumentData }
func (UpsertDocumentData) Validate ¶
func (d UpsertDocumentData) Validate() error
type UpsertPostData ¶
func (UpsertPostData) Validate ¶
func (d UpsertPostData) Validate() error
type UserInfoDownloadService ¶
type UserInfoDownloadService interface { RequestAccountInfo(ctx context.Context, userID entity.UserID) (*entity.UserInfoDownload, error) GetRequestState(ctx context.Context, userID entity.UserID) (*entity.UserInfoDownload, error) }
UserInfoDownloadService is responsible for retrieving personal data by user request
Source Files ¶
- currency.go
- discount.go
- document.go
- feature.go
- game.go
- game_discount.go
- game_license.go
- game_revision.go
- game_revision_l10n.go
- game_revision_price.go
- game_store_publish.go
- genre.go
- language.go
- localization.go
- media.go
- media_parser.go
- order.go
- post.go
- pricing.go
- rating.go
- review.go
- settings.go
- storefront.go
- tag.go
- user.go
- user_info_donwload.go
Click to show internal directories.
Click to hide internal directories.