vangogh_local_data

package module
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 31 Imported by: 19

README

vangogh_local_data

Documentation

Index

Constants

View Source
const (
	Backups    pasu.AbsDir = "backups"
	Metadata   pasu.AbsDir = "metadata"
	Input      pasu.AbsDir = "input"
	Output     pasu.AbsDir = "output"
	Images     pasu.AbsDir = "images"
	Videos     pasu.AbsDir = "videos"
	Items      pasu.AbsDir = "items"
	Downloads  pasu.AbsDir = "downloads"
	RecycleBin pasu.AbsDir = "recycle_bin"
	Logs       pasu.AbsDir = "logs"
)
View Source
const (
	Redux           pasu.RelDir = "_redux"
	Checksums       pasu.RelDir = "_checksums"
	DLCs            pasu.RelDir = "dlc"
	Extras          pasu.RelDir = "extras"
	VideoThumbnails pasu.RelDir = "_thumbnails"
)
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"
	RatingProperty                            = "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"
	TagIdProperty                             = "tag"
	TagNameProperty                           = "tag-name"
	VideoIdProperty                           = "video-id"
	MissingVideoUrlProperty                   = "missing-video-url"
	MissingVideoThumbnailProperty             = "missing-video-thumbnail"
	OperatingSystemsProperty                  = "os"
	LanguageCodeProperty                      = "lang-code"
	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"
	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"
	SyncEventsProperty                        = "sync-events"
	LastSyncUpdatesProperty                   = "last-sync-updates"
	ValidationResultProperty                  = "validation-result"
	ValidationCompletedProperty               = "validation-completed"
	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"

	// property values
	TrueValue  = "true"
	FalseValue = "false"
	OKValue    = "OK"
)
View Source
const (
	SyncStartKey    = "sync-start"
	SyncCompleteKey = "sync-complete"
)
View Source
const DefaultVangoghRootDir = "/var/lib/vangogh"

Variables

Functions

func AbsAtomFeedPath added in v0.2.49

func AbsAtomFeedPath() (string, error)

func AbsCookiePath added in v0.1.90

func AbsCookiePath() (string, error)

func AbsDownloadDirFromRel

func AbsDownloadDirFromRel(p string) (string, error)

func AbsImagesDirByImageId added in v0.1.82

func AbsImagesDirByImageId(imageId string) (string, error)

func AbsItemPath added in v0.1.30

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 AbsLocalVideoPath

func AbsLocalVideoPath(videoId string) (string, error)

func AbsLocalVideoThumbnailPath added in v0.1.76

func AbsLocalVideoThumbnailPath(videoId string) (string, error)

func AbsProductDownloadsDir

func AbsProductDownloadsDir(slug string) (string, error)

func AbsSkipListPath

func AbsSkipListPath() (string, error)

func AbsVideoDirByVideoId added in v0.1.76

func AbsVideoDirByVideoId(videoId string) (string, error)

func AbsVideoThumbnailsDirByVideoId added in v0.1.82

func AbsVideoThumbnailsDirByVideoId(videoId string) (string, error)

func AccountStatusProperties added in v0.1.46

func AccountStatusProperties() []string

func AddLocalTags added in v0.1.98

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

func AddTags added in v0.1.98

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

func AddToLocalWishlist added in v0.1.93

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

func AdvancedProductProperties added in v0.1.46

func AdvancedProductProperties() []string

func AllProperties

func AllProperties() []string

func AllTextProperties

func AllTextProperties() []string

func AvailabilityProperties added in v0.1.44

func AvailabilityProperties() []string

func ComputedProperties

func ComputedProperties() []string

func CreateTag added in v0.1.96

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

func DehydratedImagesProperties added in v0.2.91

func DehydratedImagesProperties() []string

func DeleteTag added in v0.1.96

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

func DiffLocalTags added in v0.1.97

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

func DiffTags added in v0.1.97

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

func DigestibleProperties

func DigestibleProperties() []string

func DownloadProperties added in v0.2.96

func DownloadProperties() []string

func EnginesProperties added in v0.2.83

func EnginesProperties() []string

func ExternalDataSourcesProperties added in v0.1.51

func ExternalDataSourcesProperties() []string

func ExtractDescItems added in v0.1.28

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 IdSetFromUrl

func IdSetFromUrl(u *url.URL) (map[string]bool, error)

func ImageIdProperties

func ImageIdProperties() []string

func ImagePropertyUrls

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

func ImageTypeDehydratedModifiedProperty added in v0.2.90

func ImageTypeDehydratedModifiedProperty(it ImageType) string

func ImageTypeDehydratedProperty added in v0.2.90

func ImageTypeDehydratedProperty(it ImageType) string

func ImageTypeDehydrationSamples added in v0.2.87

func ImageTypeDehydrationSamples(it ImageType) int

func IsArrayProduct

func IsArrayProduct(pt ProductType) bool

func IsFastPageFetchProduct added in v0.1.43

func IsFastPageFetchProduct(pt ProductType) bool

func IsGOGArrayProduct added in v0.2.53

func IsGOGArrayProduct(pt ProductType) bool

func IsGOGDetailProduct added in v0.2.2

func IsGOGDetailProduct(pt ProductType) bool

func IsGOGPagedProduct added in v0.2.53

func IsGOGPagedProduct(pt ProductType) bool

func IsGOGProduct added in v0.2.53

func IsGOGProduct(pt ProductType) bool

func IsGetItemsSupported

func IsGetItemsSupported(pt ProductType) bool

func IsHLTBArrayProduct added in v0.2.68

func IsHLTBArrayProduct(pt ProductType) bool

func IsHLTBDetailProduct added in v0.2.70

func IsHLTBDetailProduct(pt ProductType) bool

func IsHLTBProduct added in v0.2.69

func IsHLTBProduct(pt ProductType) bool

func IsImageRequiresAuth

func IsImageRequiresAuth(it ImageType) bool

func IsImageTypeDehydrationSupported added in v0.2.86

func IsImageTypeDehydrationSupported(it ImageType) bool

func IsImageTypeSupported

func IsImageTypeSupported(pt ProductType, it ImageType) bool

func IsPCGWDetailProduct added in v0.2.54

func IsPCGWDetailProduct(pt ProductType) bool

func IsPCGWProduct added in v0.2.54

func IsPCGWProduct(pt ProductType) bool

func IsPathSupportingValidation

func IsPathSupportingValidation(filePath string) bool

func IsProductDownloaded

func IsProductDownloaded(id string, rdx kvas.ReadableRedux) (bool, error)

func IsProductRequiresAuth

func IsProductRequiresAuth(pt ProductType) bool

func IsProtonDBDetailProduct added in v0.3.11

func IsProtonDBDetailProduct(pt ProductType) bool

func IsProtonDBProduct added in v0.3.11

func IsProtonDBProduct(pt ProductType) bool

func IsSteamArrayProduct added in v0.2.62

func IsSteamArrayProduct(pt ProductType) bool

func IsSteamDetailProduct added in v0.2.2

func IsSteamDetailProduct(pt ProductType) bool

func IsSteamProduct added in v0.2.53

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 added in v0.2.35

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 LocalVideoIds

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

func LocalVideoThumbnailIds added in v0.1.76

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

func LongTextProperties added in v0.1.18

func LongTextProperties() []string

func MapDownloads

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

func MoveToRecycleBin added in v0.1.16

func MoveToRecycleBin(typeRootDir, absPath string) error

func NewReduxReader added in v0.4.5

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

func NewReduxVetter added in v0.4.5

func NewReduxVetter(properties ...string) (kvas.IndexVetter, error)

func NewReduxWriter added in v0.4.5

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

func PriceProperties added in v0.1.48

func PriceProperties() []string

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 kvas.ReadableRedux) (map[string][]string, error)

func RecycleBinDirs

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

func RecycleBinFiles

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

func ReduxProperties added in v0.1.6

func ReduxProperties() []string

func RelProductDownloadsDir

func RelProductDownloadsDir(slug string) (string, error)

func RemoteChecksumPath

func RemoteChecksumPath(p string) string

func RemoveFromLocalWishlist added in v0.1.93

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

func RemoveLocalTags added in v0.1.99

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

func RemoveTags added in v0.1.98

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 added in v0.1.14

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

func SupportedPropertiesOnly

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

func SyncProperties added in v0.2.14

func SyncProperties() []string

func TagIdByName added in v0.1.96

func TagIdByName(tagName string) (string, error)

func TextProperties

func TextProperties() []string

func Updates added in v0.1.22

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

func UrlProperties added in v0.1.18

func UrlProperties() []string

func ValidationProperties added in v0.2.28

func ValidationProperties() []string

func ValueFromUrl

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

func ValuesFromUrl

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

func VideoIdProperties

func VideoIdProperties() []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,
	downloadTypes []DownloadType,
	langCodes []string,
	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 added in v0.2.51

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

func NewGOGUrlProvider added in v0.2.52

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

func (*GOGUrlProvider) Url added in v0.2.51

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

type HLTBUrlProvider added in v0.2.69

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

func NewHLTBUrlProvider added in v0.2.69

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

func (*HLTBUrlProvider) GOGIdToHLTBId added in v0.2.69

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

func (*HLTBUrlProvider) Url added in v0.2.69

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

type ImageType

type ImageType int
const (
	UnknownImageType ImageType = iota
	Image
	Screenshots
	VerticalImage
)

func AllImageTypes

func AllImageTypes() []ImageType

func ImageTypeFromProperty

func ImageTypeFromProperty(property string) ImageType

func ImageTypesDehydration added in v0.2.89

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 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 added in v0.2.54

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

func NewPCGWUrlProvider added in v0.2.54

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

func (*PCGWUrlProvider) GOGIdToPCGWPageId added in v0.2.54

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

func (*PCGWUrlProvider) Url added in v0.2.54

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

type ProductReader added in v0.4.12

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

func NewProductReader added in v0.4.12

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

func (*ProductReader) AccountPage added in v0.4.12

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

func (*ProductReader) AccountProduct added in v0.4.12

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

func (*ProductReader) ApiProductV1 added in v0.4.12

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

func (*ProductReader) ApiProductV2 added in v0.4.12

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

func (*ProductReader) CatalogPage added in v0.4.12

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

func (*ProductReader) CatalogProduct added in v0.4.12

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

func (*ProductReader) CreatedAfter added in v0.4.12

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

func (*ProductReader) CurrentModTime added in v0.4.12

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

func (*ProductReader) Cut added in v0.4.12

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

func (*ProductReader) Details added in v0.4.12

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

func (*ProductReader) Get added in v0.4.12

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

func (*ProductReader) GetFromStorage added in v0.4.12

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

func (*ProductReader) HLTBData added in v0.4.12

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

func (*ProductReader) HLTBRootPage added in v0.4.12

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

func (*ProductReader) Has added in v0.4.12

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

func (*ProductReader) IndexCurrentModTime added in v0.4.12

func (pr *ProductReader) IndexCurrentModTime() (int64, error)

func (*ProductReader) IndexRefresh added in v0.4.12

func (pr *ProductReader) IndexRefresh() error

func (*ProductReader) IsModifiedAfter added in v0.4.12

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

func (*ProductReader) Keys added in v0.4.12

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

func (*ProductReader) Licences added in v0.4.12

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

func (*ProductReader) ModifiedAfter added in v0.4.12

func (pr *ProductReader) ModifiedAfter(timestamp int64, excludeCreated bool) []string

func (*ProductReader) Order added in v0.4.12

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

func (*ProductReader) OrderPage added in v0.4.12

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

func (*ProductReader) PCGWEngine added in v0.4.12

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 added in v0.4.12

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

func (*ProductReader) ProductType added in v0.4.12

func (pr *ProductReader) ProductType() ProductType

func (*ProductReader) ProductsGetter added in v0.4.12

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

func (*ProductReader) ProtonDBSummary added in v0.4.12

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

func (*ProductReader) ReadValue added in v0.4.12

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

func (*ProductReader) Set added in v0.4.12

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

func (*ProductReader) SteamAppList added in v0.4.12

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

func (*ProductReader) SteamAppReviews added in v0.4.12

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

func (*ProductReader) SteamDeckAppCompatibilityReport added in v0.4.12

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

func (*ProductReader) SteamGetAppNewsResponse added in v0.4.12

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

func (*ProductReader) SteamStorePage added in v0.4.12

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

func (*ProductReader) UserWishlist added in v0.4.12

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

func (*ProductReader) UserWishlistProduct added in v0.4.12

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

func (*ProductReader) VetIndexMissing added in v0.4.12

func (pr *ProductReader) VetIndexMissing(fix bool, tpw nod.TotalProgressWriter) ([]string, error)

func (*ProductReader) VetIndexOnly added in v0.4.12

func (pr *ProductReader) VetIndexOnly(fix bool, tpw nod.TotalProgressWriter) ([]string, 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
	// Steam product types
	SteamAppList
	SteamAppNews
	SteamReviews
	SteamStorePage
	//SteamAppDetails // currently not implemented - requires implementing throttling support
	SteamDeckCompatibilityReport
	// PCGamingWiki product types
	PCGWPageId
	PCGWEngine
	PCGWExternalLinks
	// HLTB product types
	HLTBRootPage
	HLTBData
	// ProtonDB product types
	ProtonDBSummary
)

func FastPageFetchProducts added in v0.1.43

func FastPageFetchProducts() []ProductType

func GOGArrayProducts added in v0.2.53

func GOGArrayProducts() []ProductType

func GOGDetailProducts added in v0.2.2

func GOGDetailProducts() []ProductType

func GOGPagedProducts added in v0.2.53

func GOGPagedProducts() []ProductType

func GOGRemoteProducts added in v0.2.2

func GOGRemoteProducts() []ProductType

func HLTBArrayProducts added in v0.2.68

func HLTBArrayProducts() []ProductType

func HLTBDetailProducts added in v0.2.70

func HLTBDetailProducts() []ProductType

func HLTBRemoteProducts added in v0.2.68

func HLTBRemoteProducts() []ProductType

func LocalProducts

func LocalProducts() []ProductType

func MainProductTypes

func MainProductTypes(pt ProductType) []ProductType

func PCGWDetailProducts added in v0.2.54

func PCGWDetailProducts() []ProductType

func PCGWRemoteProducts added in v0.2.54

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 added in v0.3.11

func ProtonDBDetailProducts() []ProductType

func ProtonDBRemoteProducts added in v0.3.11

func ProtonDBRemoteProducts() []ProductType

func RemoteProducts

func RemoteProducts() []ProductType

func SplitProductType

func SplitProductType(pt ProductType) ProductType

func SteamArrayProducts added in v0.2.61

func SteamArrayProducts() []ProductType

func SteamDetailProducts added in v0.2.2

func SteamDetailProducts() []ProductType

func SteamRemoteProducts added in v0.2.2

func SteamRemoteProducts() []ProductType

func (ProductType) HumanReadableString

func (pt ProductType) HumanReadableString() string

func (ProductType) String

func (pt ProductType) String() string

type SteamUrlProvider added in v0.2.51

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

func NewSteamUrlProvider added in v0.2.52

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

func (*SteamUrlProvider) GOGIdToSteamAppId added in v0.2.51

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

func (*SteamUrlProvider) Url added in v0.2.51

func (sup *SteamUrlProvider) Url(gogId string) *url.URL

type UrlProvider added in v0.2.51

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

func NewUrlProvider added in v0.2.51

func NewUrlProvider(pt ProductType, rdx kvas.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"`
}

Jump to

Keyboard shortcuts

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