vangogh_integration

package
v0.1.80 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 30 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Backups    pathways.AbsDir = "backups"
	Metadata   pathways.AbsDir = "metadata"
	Input      pathways.AbsDir = "input"
	Output     pathways.AbsDir = "output"
	Images     pathways.AbsDir = "images"
	Items      pathways.AbsDir = "items"
	Downloads  pathways.AbsDir = "downloads"
	Checksums  pathways.AbsDir = "checksums"
	RecycleBin pathways.AbsDir = "recycle_bin"
	Logs       pathways.AbsDir = "logs"
)
View Source
const (
	Redux  pathways.RelDir = "_redux"
	DLCs   pathways.RelDir = "dlc"
	Extras pathways.RelDir = "extras"
)
View Source
const (
	DefaultSort = TitleProperty
	DefaultDesc = false
)
View Source
const (
	IdProperty                                = "id"
	TitleProperty                             = "title"
	DevelopersProperty                        = "developers"
	PublishersProperty                        = "publishers"
	ImageProperty                             = "image"
	VerticalImageProperty                     = "vertical-image"
	ScreenshotsProperty                       = "screenshots"
	HeroProperty                              = "hero"
	LogoProperty                              = "logo"
	IconProperty                              = "icon"
	IconSquareProperty                        = "icon-square"
	BackgroundProperty                        = "background"
	RatingProperty                            = "rating"
	AggregatedRatingProperty                  = "aggregated-rating"
	IncludesGamesProperty                     = "includes-games"
	IsIncludedByGamesProperty                 = "is-included-by-games"
	RequiresGamesProperty                     = "requires-games"
	IsRequiredByGamesProperty                 = "is-required-by-games"
	GenresProperty                            = "genres"
	StoreTagsProperty                         = "store-tags"
	FeaturesProperty                          = "features"
	SeriesProperty                            = "series"
	ThemesProperty                            = "themes"
	GameModesProperty                         = "game-modes"
	TagIdProperty                             = "tag"
	TagNameProperty                           = "tag-name"
	VideoIdProperty                           = "video-id"
	VideoTitleProperty                        = "video-title"
	VideoDurationProperty                     = "video-duration"
	VideoErrorProperty                        = "video-error"
	OperatingSystemsProperty                  = "os"
	LanguageCodeProperty                      = "lang-code"
	DownloadTypeProperty                      = "download-type"
	NoPatchesProperty                         = "no-patches"
	LanguageNameProperty                      = "lang-name"
	NativeLanguageNameProperty                = "native-lang-name"
	SlugProperty                              = "slug"
	GOGReleaseDateProperty                    = "gog-release-date"
	GOGOrderDateProperty                      = "gog-order-date"
	GlobalReleaseDateProperty                 = "global-release-date"
	TypesProperty                             = "types"
	LocalManualUrlProperty                    = "local-manual-url"
	ManualUrlStatusProperty                   = "manual-url-status"
	ManualUrlValidationResultProperty         = "manual-url-validation-result"
	ProductValidationResultProperty           = "product-validation-result"
	ManualUrlGeneratedChecksumProperty        = "manual-url-generated-checksum"
	DownloadStatusErrorProperty               = "download-status-error"
	StoreUrlProperty                          = "store-url"
	ForumUrlProperty                          = "forum-url"
	SupportUrlProperty                        = "support-url"
	ChangelogProperty                         = "changelog"
	DescriptionOverviewProperty               = "description-overview"
	DescriptionFeaturesProperty               = "description-features"
	AdditionalRequirementsProperty            = "additional-requirements"
	CopyrightsProperty                        = "copyrights"
	WishlistedProperty                        = "wishlisted"
	OwnedProperty                             = "owned"
	ProductTypeProperty                       = "product-type"
	InDevelopmentProperty                     = "in-development"
	PreOrderProperty                          = "pre-order"
	ComingSoonProperty                        = "coming-soon"
	BasePriceProperty                         = "base-price"
	PriceProperty                             = "price"
	IsFreeProperty                            = "is-free"
	IsDiscountedProperty                      = "is-discounted"
	DiscountPercentageProperty                = "discount-percentage"
	SteamAppIdProperty                        = "steam-app-id"
	LocalTagsProperty                         = "local-tags"
	SortProperty                              = "sort"
	DescendingProperty                        = "desc"
	SteamReviewScoreDescProperty              = "steam-review-score-desc"
	SteamTagsProperty                         = "steam-tags"
	SteamDeckAppCompatibilityCategoryProperty = "steam-deck-app-compatibility-category"
	DehydratedImageProperty                   = "dehydrated-image"
	DehydratedImageModifiedProperty           = "dehydrated-image-modified"
	DehydratedVerticalImageProperty           = "dehydrated-vertical-image"
	DehydratedVerticalImageModifiedProperty   = "dehydrated-vertical-image-modified"
	RepImageColorProperty                     = "rep-image-color"
	RepVerticalImageColorProperty             = "rep-vertical-image-color"
	SyncEventsProperty                        = "sync-events"
	LastSyncUpdatesProperty                   = "last-sync-updates"
	PCGWPageIdProperty                        = "pcgw-page-id"
	HLTBIdProperty                            = "hltb-id"
	HLTBBuildIdProperty                       = "hltb-next-build"
	HLTBHoursToCompleteMainProperty           = "hltb-comp-main"
	HLTBHoursToCompletePlusProperty           = "hltb-comp-plus"
	HLTBHoursToComplete100Property            = "hltb-comp-100"
	HLTBReviewScoreProperty                   = "hltb-review-score"
	HLTBGenresProperty                        = "hltb-genres"
	HLTBPlatformsProperty                     = "hltb-platforms"
	IGDBIdProperty                            = "igdb-id"
	StrategyWikiIdProperty                    = "strategy-wiki-id"
	MobyGamesIdProperty                       = "moby-games-id"
	WikipediaIdProperty                       = "wikipedia-id"
	WineHQIdProperty                          = "winehq-id"
	VNDBIdProperty                            = "vndb-id"
	IGNWikiSlugProperty                       = "ign-wiki-slug"
	EnginesProperty                           = "engines"
	EnginesBuildsProperty                     = "engines-builds"
	ProtonDBTierProperty                      = "protondb-tier"
	ProtonDBConfidenceProperty                = "protondb-confidence"
)
View Source
const (
	// property values
	TrueValue  = "true"
	FalseValue = "false"
)
View Source
const (
	SyncStartKey    = "sync-start"
	SyncCompleteKey = "sync-complete"
)
View Source
const DefaultVangoghRootDir = "/var/lib/vangogh"

Variables

Functions

func AbsAtomFeedPath

func AbsAtomFeedPath() (string, error)

func AbsCookiePath

func AbsCookiePath() (string, error)

func AbsDownloadDirFromRel

func AbsDownloadDirFromRel(p string) (string, error)

func AbsImagesDirByImageId

func AbsImagesDirByImageId(imageId string) (string, error)

func AbsItemPath

func AbsItemPath(path string) (string, error)

func AbsLocalChecksumPath

func AbsLocalChecksumPath(p string) (string, error)

func AbsLocalImagePath

func AbsLocalImagePath(imageId string) (string, error)

func AbsLocalProductTypeDir

func AbsLocalProductTypeDir(pt ProductType) (string, error)

func AbsProductDownloadsDir

func AbsProductDownloadsDir(slug string) (string, error)

func AbsSkipListPath

func AbsSkipListPath() (string, error)

func AccountStatusProperties

func AccountStatusProperties() []string

func AddLocalTags

func AddLocalTags(ids, tags []string, tpw nod.TotalProgressWriter) error

func AddTags

func AddTags(
	httpClient *http.Client,
	ids, tags []string,
	tpw nod.TotalProgressWriter) error

func AddToLocalWishlist

func AddToLocalWishlist(
	ids []string,
	tpw nod.TotalProgressWriter) ([]string, error)

func AdvancedProductProperties

func AdvancedProductProperties() []string

func AllProperties

func AllProperties() []string

func AllTextProperties

func AllTextProperties() []string

func AvailabilityProperties

func AvailabilityProperties() []string

func ComputedProperties

func ComputedProperties() []string

func CreateTag

func CreateTag(httpClient *http.Client, tagName string) error

func DehydratedImagesProperties

func DehydratedImagesProperties() []string

func DeleteTag

func DeleteTag(httpClient *http.Client, tagName, tagId string) error

func DiffLocalTags

func DiffLocalTags(id string, newTags []string) (add []string, rem []string, err error)

func DiffTags

func DiffTags(id string, newTags []string) (add []string, rem []string, err error)

func DigestibleProperties

func DigestibleProperties() []string

func EnginesProperties

func EnginesProperties() []string

func ExternalDataSourcesProperties

func ExternalDataSourcesProperties() []string

func ExtractDescItems

func ExtractDescItems(desc string) []string
func ExtractGameLinks(desc string) []string

func FlagFromUrl

func FlagFromUrl(u *url.URL, arg string) bool

func GetProperties

func GetProperties(
	id string,
	reader *ProductReader,
	properties []string) (propValues map[string][]string, err error)

func IdsFromUrl

func IdsFromUrl(u *url.URL) ([]string, error)

func ImageIdProperties

func ImageIdProperties() []string

func ImagePropertyUrls

func ImagePropertyUrls(imageIds []string, it ImageType) ([]*url.URL, error)

func ImageTypeDehydratedModifiedProperty

func ImageTypeDehydratedModifiedProperty(it ImageType) string

func ImageTypeDehydratedProperty

func ImageTypeDehydratedProperty(it ImageType) string

func ImageTypeDehydrationSamples

func ImageTypeDehydrationSamples(it ImageType) int

func ImageTypeRepColorProperty

func ImageTypeRepColorProperty(it ImageType) string

func IsArrayProduct

func IsArrayProduct(pt ProductType) bool

func IsFastPageFetchProduct

func IsFastPageFetchProduct(pt ProductType) bool

func IsGOGArrayProduct

func IsGOGArrayProduct(pt ProductType) bool

func IsGOGDetailProduct

func IsGOGDetailProduct(pt ProductType) bool

func IsGOGPagedProduct

func IsGOGPagedProduct(pt ProductType) bool

func IsGOGProduct

func IsGOGProduct(pt ProductType) bool

func IsGetItemsSupported

func IsGetItemsSupported(pt ProductType) bool

func IsHLTBArrayProduct

func IsHLTBArrayProduct(pt ProductType) bool

func IsHLTBDetailProduct

func IsHLTBDetailProduct(pt ProductType) bool

func IsHLTBProduct

func IsHLTBProduct(pt ProductType) bool

func IsImageRequiresAuth

func IsImageRequiresAuth(it ImageType) bool

func IsImageTypeDehydrationSupported

func IsImageTypeDehydrationSupported(it ImageType) bool

func IsImageTypeSupported

func IsImageTypeSupported(pt ProductType, it ImageType) bool

func IsPCGWDetailProduct

func IsPCGWDetailProduct(pt ProductType) bool

func IsPCGWProduct

func IsPCGWProduct(pt ProductType) bool

func IsProductRequiresAuth

func IsProductRequiresAuth(pt ProductType) bool

func IsProtonDBDetailProduct

func IsProtonDBDetailProduct(pt ProductType) bool

func IsProtonDBProduct

func IsProtonDBProduct(pt ProductType) bool

func IsSteamArrayProduct

func IsSteamArrayProduct(pt ProductType) bool

func IsSteamDetailProduct

func IsSteamDetailProduct(pt ProductType) bool

func IsSteamProduct

func IsSteamProduct(pt ProductType) bool

func IsSupportedProperty

func IsSupportedProperty(pt ProductType, property string) bool

func IsValidDownloadType

func IsValidDownloadType(dt DownloadType) bool

func IsValidImageType

func IsValidImageType(it ImageType) bool

func IsValidOperatingSystem

func IsValidOperatingSystem(os OperatingSystem) bool

func IsValidProductType

func IsValidProductType(pt ProductType) bool

func IsValidProperty

func IsValidProperty(property string) bool

func LocalDownloadDirs

func LocalDownloadDirs() (map[string]bool, error)

func LocalImageIds

func LocalImageIds() (map[string]bool, error)

func LocalSlugDownloads

func LocalSlugDownloads(slug string) (map[string]bool, error)

func LongTextProperties

func LongTextProperties() []string

func MapDownloads

func MapDownloads(
	ids []string,
	rdx kevlar.ReadableRedux,
	operatingSystems []OperatingSystem,
	langCodes []string,
	downloadTypes []DownloadType,
	excludePatches bool,
	dlProcessor DownloadsListProcessor,
	tpw nod.TotalProgressWriter) error

func MoveToRecycleBin

func MoveToRecycleBin(typeRootDir, absPath string) error

func NewReduxReader

func NewReduxReader(properties ...string) (kevlar.ReadableRedux, error)

func NewReduxWriter

func NewReduxWriter(properties ...string) (kevlar.WriteableRedux, error)

func PriceProperties

func PriceProperties() []string

func PrintParams

func PrintParams(
	ids []string,
	operatingSystems []OperatingSystem,
	langCodes []string,
	downloadTypes []DownloadType,
	noPatches bool)

func PropertiesFromUrl

func PropertiesFromUrl(u *url.URL) []string

func PropertyFromImageType

func PropertyFromImageType(it ImageType) string

func PropertyFromUrl

func PropertyFromUrl(u *url.URL) string

func PropertyListsFromIdSet

func PropertyListsFromIdSet(
	ids []string,
	propertyFilter map[string][]string,
	properties []string,
	rdx kevlar.ReadableRedux) (map[string][]string, error)

func RecycleBinDirs

func RecycleBinDirs() (map[string]bool, error)

func RecycleBinFiles

func RecycleBinFiles() (map[string]bool, error)

func ReduxProperties

func ReduxProperties() []string

func RelProductDownloadsDir

func RelProductDownloadsDir(slug string) (string, error)

func RemoteChecksumPath

func RemoteChecksumPath(p string) string

func RemoveFromLocalWishlist

func RemoveFromLocalWishlist(
	ids []string,
	tpw nod.TotalProgressWriter) ([]string, error)

func RemoveLocalTags

func RemoveLocalTags(ids, tags []string, tpw nod.TotalProgressWriter) error

func RemoveTags

func RemoveTags(
	httpClient *http.Client,
	ids, tags []string,
	tpw nod.TotalProgressWriter) error

func SinceFromUrl

func SinceFromUrl(u *url.URL) (int64, error)

func SizeToEstimatedBytes

func SizeToEstimatedBytes(size string) int

func SortStrIntMap

func SortStrIntMap(m map[string]int, desc bool) []string

func StatusValidationResultsProperties

func StatusValidationResultsProperties() []string

func SteamGridImageFilename

func SteamGridImageFilename(shortcutId uint32, imageType ImageType) string

func SupportedPropertiesOnly

func SupportedPropertiesOnly(pt ProductType, properties []string) []string

func SyncProperties

func SyncProperties() []string

func TagIdByName

func TagIdByName(tagName string) (string, error)

func TextProperties

func TextProperties() []string

func Updates

func Updates(since int64) (map[string]map[string]bool, error)

func UrlProperties

func UrlProperties() []string

func ValueFromUrl

func ValueFromUrl(u *url.URL, arg string) string

func ValuesFromUrl

func ValuesFromUrl(u *url.URL, arg string) []string

func VideoProperties

func VideoProperties() []string

Types

type Download

type Download struct {
	ManualUrl      string
	ProductTitle   string
	Name           string
	Version        string
	Date           string
	OS             OperatingSystem
	LanguageCode   string
	Type           DownloadType
	EstimatedBytes int
}

func (*Download) String

func (dl *Download) String() string

type DownloadType

type DownloadType int
const (
	AnyDownloadType DownloadType = iota
	Installer
	Movie
	DLC
	Extra
)

func AllDownloadTypes

func AllDownloadTypes() []DownloadType

func DownloadTypesFromUrl

func DownloadTypesFromUrl(u *url.URL) []DownloadType

func ParseDownloadType

func ParseDownloadType(downloadType string) DownloadType

func ParseManyDownloadTypes

func ParseManyDownloadTypes(dtStrings []string) []DownloadType

func (DownloadType) String

func (dt DownloadType) String() string

type DownloadsList

type DownloadsList []Download

func (DownloadsList) Only

func (list DownloadsList) Only(
	operatingSystems []OperatingSystem,
	langCodes []string,
	downloadTypes []DownloadType,
	excludePatches bool) DownloadsList

func (DownloadsList) TotalBytesEstimate

func (list DownloadsList) TotalBytesEstimate() int

func (DownloadsList) TotalGBsEstimate

func (list DownloadsList) TotalGBsEstimate() float64

type DownloadsListProcessor

type DownloadsListProcessor interface {
	Process(id string, slug string, downloadsList DownloadsList) error
}

type GOGUrlProvider

type GOGUrlProvider struct {
	// contains filtered or unexported fields
}

func NewGOGUrlProvider

func NewGOGUrlProvider(pt ProductType) (*GOGUrlProvider, error)

func (*GOGUrlProvider) Url

func (gup *GOGUrlProvider) Url(gogId string) *url.URL

type HLTBUrlProvider

type HLTBUrlProvider struct {
	// contains filtered or unexported fields
}

func NewHLTBUrlProvider

func NewHLTBUrlProvider(pt ProductType, rdx kevlar.ReadableRedux) (*HLTBUrlProvider, error)

func (*HLTBUrlProvider) GOGIdToHLTBId

func (hup *HLTBUrlProvider) GOGIdToHLTBId(gogId string) string

func (*HLTBUrlProvider) Url

func (hup *HLTBUrlProvider) Url(gogId string) *url.URL

type ImageType

type ImageType int
const (
	UnknownImageType ImageType = iota
	Image
	Screenshots
	VerticalImage
	Hero
	Icon
	IconSquare
	Background
)

func AllImageTypes

func AllImageTypes() []ImageType

func ImageTypeFromProperty

func ImageTypeFromProperty(property string) ImageType

func ImageTypesDehydration

func ImageTypesDehydration() []ImageType

func ImageTypesFromUrl

func ImageTypesFromUrl(u *url.URL) []ImageType

func ParseImageType

func ParseImageType(imageType string) ImageType

func (ImageType) String

func (it ImageType) String() string

type ManualUrlStatus

type ManualUrlStatus int
const (
	ManualUrlStatusUnknown ManualUrlStatus = iota
	ManualUrlQueued
	ManualUrlDownloaded
	ManualUrlValidated
)

func ParseManualUrlStatus

func ParseManualUrlStatus(muss string) ManualUrlStatus

func (ManualUrlStatus) String

func (mus ManualUrlStatus) String() string

type OperatingSystem

type OperatingSystem int
const (
	AnyOperatingSystem OperatingSystem = iota
	Windows
	MacOS
	Linux
)

func AllOperatingSystems

func AllOperatingSystems() []OperatingSystem

func OperatingSystemsFromUrl

func OperatingSystemsFromUrl(u *url.URL) []OperatingSystem

func ParseManyOperatingSystems

func ParseManyOperatingSystems(osStrings []string) []OperatingSystem

func ParseOperatingSystem

func ParseOperatingSystem(operatingSystem string) OperatingSystem

func (OperatingSystem) String

func (os OperatingSystem) String() string

type PCGWUrlProvider

type PCGWUrlProvider struct {
	// contains filtered or unexported fields
}

func NewPCGWUrlProvider

func NewPCGWUrlProvider(pt ProductType, rdx kevlar.ReadableRedux) (*PCGWUrlProvider, error)

func (*PCGWUrlProvider) GOGIdToPCGWPageId

func (pcgwup *PCGWUrlProvider) GOGIdToPCGWPageId(gogId string) string

func (*PCGWUrlProvider) Url

func (pcgwup *PCGWUrlProvider) Url(gogId string) *url.URL

type ProductReader

type ProductReader struct {
	// contains filtered or unexported fields
}

func NewProductReader

func NewProductReader(pt ProductType) (*ProductReader, error)

func (*ProductReader) AccountPage

func (pr *ProductReader) AccountPage(page string) (accountPage *gog_integration.AccountPage, err error)

func (*ProductReader) AccountProduct

func (pr *ProductReader) AccountProduct(id string) (accountProduct *gog_integration.AccountProduct, err error)

func (*ProductReader) ApiProductV1

func (pr *ProductReader) ApiProductV1(id string) (apiProductV1 *gog_integration.ApiProductV1, err error)

func (*ProductReader) ApiProductV2

func (pr *ProductReader) ApiProductV2(id string) (apiProductV2 *gog_integration.ApiProductV2, err error)

func (*ProductReader) CatalogPage

func (pr *ProductReader) CatalogPage(page string) (catalogPage *gog_integration.CatalogPage, err error)

func (*ProductReader) CatalogProduct

func (pr *ProductReader) CatalogProduct(id string) (catalogProduct *gog_integration.CatalogProduct, err error)

func (*ProductReader) CreatedAfter

func (pr *ProductReader) CreatedAfter(timestamp int64) ([]string, error)

func (*ProductReader) CreatedOrUpdatedAfter

func (pr *ProductReader) CreatedOrUpdatedAfter(timestamp int64) ([]string, error)

func (*ProductReader) Cut

func (pr *ProductReader) Cut(id string) (bool, error)

func (*ProductReader) Details

func (pr *ProductReader) Details(id string) (details *gog_integration.Details, err error)

func (*ProductReader) GamesDbProduct added in v0.1.69

func (pr *ProductReader) GamesDbProduct(id string) (gdp *gog_integration.GamesDbProduct, err error)

func (*ProductReader) Get

func (pr *ProductReader) Get(id string) (io.ReadCloser, error)

func (*ProductReader) GetFromStorage

func (pr *ProductReader) GetFromStorage(id string) (io.ReadCloser, error)

func (*ProductReader) HLTBData

func (pr *ProductReader) HLTBData(id string) (data *hltb_integration.Data, err error)

func (*ProductReader) HLTBRootPage

func (pr *ProductReader) HLTBRootPage() (*hltb_integration.RootPage, error)

func (*ProductReader) Has

func (pr *ProductReader) Has(id string) (bool, error)

func (*ProductReader) IsCurrent

func (pr *ProductReader) IsCurrent() (bool, int64)

func (*ProductReader) IsUpdatedAfter

func (pr *ProductReader) IsUpdatedAfter(id string, timestamp int64) (bool, error)

func (*ProductReader) Keys

func (pr *ProductReader) Keys() ([]string, error)

func (*ProductReader) Licences

func (pr *ProductReader) Licences() (licences *gog_integration.Licences, err error)

func (*ProductReader) ModTime

func (pr *ProductReader) ModTime(id string) (int64, error)

func (*ProductReader) Order

func (pr *ProductReader) Order(id string) (order *gog_integration.Order, err error)

func (*ProductReader) OrderPage

func (pr *ProductReader) OrderPage(page string) (orderPage *gog_integration.OrderPage, err error)

func (*ProductReader) PCGWEngine

func (pr *ProductReader) PCGWEngine(id string) (e *pcgw_integration.Engine, err error)
func (pr *ProductReader) PCGWExternalLinks(id string) (pel *pcgw_integration.ParseExternalLinks, err error)

func (*ProductReader) PCGWPageId

func (pr *ProductReader) PCGWPageId(id string) (ps *pcgw_integration.PageId, err error)

func (*ProductReader) ProductType

func (pr *ProductReader) ProductType() ProductType

func (*ProductReader) ProductsGetter

func (pr *ProductReader) ProductsGetter(page string) (productsGetter gog_integration.ProductsGetter, err error)

func (*ProductReader) ProtonDBSummary

func (pr *ProductReader) ProtonDBSummary(id string) (summary *protondb_integration.Summary, err error)

func (*ProductReader) ReadValue

func (pr *ProductReader) ReadValue(key string) (interface{}, error)

func (*ProductReader) Set

func (pr *ProductReader) Set(id string, data io.Reader) error

func (*ProductReader) SteamAppList

func (pr *ProductReader) SteamAppList() (steamAppListResponse *steam_integration.GetAppListResponse, err error)

func (*ProductReader) SteamAppReviews

func (pr *ProductReader) SteamAppReviews(id string) (steamAppReviews *steam_integration.AppReviews, err error)

func (*ProductReader) SteamDeckAppCompatibilityReport

func (pr *ProductReader) SteamDeckAppCompatibilityReport(id string) (deckAppCompatibilityReport *steam_integration.DeckAppCompatibilityReport, err error)

func (*ProductReader) SteamGetAppNewsResponse

func (pr *ProductReader) SteamGetAppNewsResponse(id string) (steamAppNewsResponse *steam_integration.GetNewsForAppResponse, err error)

func (*ProductReader) SteamStorePage

func (pr *ProductReader) SteamStorePage(id string) (*steam_integration.StorePage, error)

func (*ProductReader) UpdatedAfter

func (pr *ProductReader) UpdatedAfter(timestamp int64) ([]string, error)

func (*ProductReader) UserWishlist

func (pr *ProductReader) UserWishlist() (userWishlist *gog_integration.UserWishlist, err error)

func (*ProductReader) UserWishlistProduct

func (pr *ProductReader) UserWishlistProduct(id string) (userWishlistProduct string, err error)

type ProductType

type ProductType int
const (
	UnknownProductType ProductType = iota
	// GOG.com product types
	CatalogPage
	CatalogProducts
	AccountPage
	AccountProducts
	UserWishlist
	UserWishlistProducts
	Details
	ApiProductsV1
	ApiProductsV2
	Licences
	LicenceProducts
	OrderPage
	Orders
	GamesDbProducts
	// Steam product types
	SteamAppList
	SteamAppNews
	SteamReviews
	SteamStorePage
	SteamDeckCompatibilityReport
	// PCGamingWiki product types
	PCGWPageId
	PCGWEngine
	PCGWExternalLinks
	// HLTB product types
	HLTBRootPage
	HLTBData
	// ProtonDB product types
	ProtonDBSummary
)

func FastPageFetchProducts

func FastPageFetchProducts() []ProductType

func GOGArrayProducts

func GOGArrayProducts() []ProductType

func GOGDetailProducts

func GOGDetailProducts() []ProductType

func GOGPagedProducts

func GOGPagedProducts() []ProductType

func GOGRemoteProducts

func GOGRemoteProducts() []ProductType

func HLTBArrayProducts

func HLTBArrayProducts() []ProductType

func HLTBDetailProducts

func HLTBDetailProducts() []ProductType

func HLTBRemoteProducts

func HLTBRemoteProducts() []ProductType

func LocalProducts

func LocalProducts() []ProductType

func MainProductTypes

func MainProductTypes(pt ProductType) []ProductType

func PCGWDetailProducts

func PCGWDetailProducts() []ProductType

func PCGWRemoteProducts

func PCGWRemoteProducts() []ProductType

func ParseProductType

func ParseProductType(productType string) ProductType

func ProductTypeFromUrl

func ProductTypeFromUrl(u *url.URL) ProductType

func ProductTypesSupportingImageType

func ProductTypesSupportingImageType(imageType ImageType) []ProductType

func ProtonDBDetailProducts

func ProtonDBDetailProducts() []ProductType

func ProtonDBRemoteProducts

func ProtonDBRemoteProducts() []ProductType

func RemoteProducts

func RemoteProducts() []ProductType

func SplitProductType

func SplitProductType(pt ProductType) ProductType

func SteamArrayProducts

func SteamArrayProducts() []ProductType

func SteamDetailProducts

func SteamDetailProducts() []ProductType

func SteamRemoteProducts

func SteamRemoteProducts() []ProductType

func (ProductType) HumanReadableString

func (pt ProductType) HumanReadableString() string

func (ProductType) String

func (pt ProductType) String() string

type SteamUrlProvider

type SteamUrlProvider struct {
	// contains filtered or unexported fields
}

func NewSteamUrlProvider

func NewSteamUrlProvider(pt ProductType, rdx kevlar.ReadableRedux) (*SteamUrlProvider, error)

func (*SteamUrlProvider) GOGIdToSteamAppId

func (sup *SteamUrlProvider) GOGIdToSteamAppId(gogId string) uint32

func (*SteamUrlProvider) Url

func (sup *SteamUrlProvider) Url(gogId string) *url.URL
type TheoDownloadLink struct {
	ManualUrl        string `json:"manual-url"`
	Name             string `json:"name"`
	Status           string `json:"status"`
	ValidationResult string `json:"validation-result"`
	LocalFilename    string `json:"local-filename"`
	Md5              string `json:"md5"`
	OS               string `json:"os"`
	Type             string `json:"type"`
	LanguageCode     string `json:"language-code"`
	Version          string `json:"version"`
	EstimatedBytes   int    `json:"estimated-bytes"`
}
type TheoDownloadLinks []TheoDownloadLink

func (TheoDownloadLinks) FilterDownloadTypes

func (tdl TheoDownloadLinks) FilterDownloadTypes(downloadTypes ...DownloadType) TheoDownloadLinks

func (TheoDownloadLinks) FilterLanguageCodes

func (tdl TheoDownloadLinks) FilterLanguageCodes(languageCodes ...string) TheoDownloadLinks

func (TheoDownloadLinks) FilterOperatingSystems

func (tdl TheoDownloadLinks) FilterOperatingSystems(operatingSystems ...OperatingSystem) TheoDownloadLinks

type TheoImages

type TheoImages struct {
	VerticalImage string `json:"vertical-image,omitempty"`
	Image         string `json:"image,omitempty"`
	Hero          string `json:"hero,omitempty"`
	Icon          string `json:"icon,omitempty"`
	IconSquare    string `json:"icon-square,omitempty"`
	Background    string `json:"background"`
}

type TheoMetadata

type TheoMetadata struct {
	Id            string            `json:"id"`
	Slug          string            `json:"slug"`
	Title         string            `json:"title"`
	Images        TheoImages        `json:"images"`
	DownloadLinks TheoDownloadLinks `json:"download-links,omitempty"`
}

type UrlProvider

type UrlProvider interface {
	Url(gogId string) *url.URL
}

func NewUrlProvider

func NewUrlProvider(pt ProductType, rdx kevlar.ReadableRedux) (UrlProvider, error)

type ValidationChunk

type ValidationChunk struct {
	XMLName xml.Name `xml:"chunk"`
	ID      int      `xml:"id,attr"`
	From    int      `xml:"from,attr"`
	To      int      `xml:"to,attr"`
	Method  string   `xml:"method,attr"`
	Value   string   `xml:",innerxml"`
}

type ValidationFile

type ValidationFile struct {
	XMLName             xml.Name          `xml:"file"`
	Name                string            `xml:"name,attr"`
	Available           int               `xml:"available,attr"`
	NotAvailableMessage string            `xml:"notavailablemsg,attr"`
	MD5                 string            `xml:"md5,attr"`
	Chunks              int               `xml:"chunks,attr"`
	Timestamp           string            `xml:"timestamp,attr"`
	TotalSize           int               `xml:"total_size,attr"`
	ValidationChunks    []ValidationChunk `xml:"chunk"`
}

type ValidationResult

type ValidationResult int
const (
	ValidationResultUnknown ValidationResult = iota
	ValidatedSuccessfully
	ValidatedWithGeneratedChecksum
	ValidatedUnresolvedManualUrl
	ValidatedMissingLocalFile
	ValidatedMissingChecksum
	ValidationError
	ValidatedChecksumMismatch
)

func ParseValidationResult

func ParseValidationResult(vrs string) ValidationResult

func (ValidationResult) HumanReadableString

func (vr ValidationResult) HumanReadableString() string

func (ValidationResult) String

func (vr ValidationResult) String() string

Jump to

Keyboard shortcuts

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