cli

package
v0.4.39 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncOptionData             = "data"
	SyncOptionItems            = "items"
	SyncOptionImages           = "images"
	SyncOptionScreenshots      = "screenshots"
	SyncOptionVideos           = "videos"
	SyncOptionThumbnails       = "thumbnails"
	SyncOptionDownloadsUpdates = "downloads-Updates"
)
View Source
const (
	VetOptionLocalOnlyData                = "local-only-data"
	VetOptionLocalOnlyImages              = "local-only-images"
	VetOptionLocalOnlyVideosAndThumbnails = "local-only-videos-and-thumbnails"
	VetOptionRecycleBin                   = "recycle-bin"
	VetOptionInvalidData                  = "invalid-data"
	VetOptionUnresolvedManualUrls         = "unresolved-manual-urls"
	VetOptionInvalidResolvedManualUrls    = "invalid-resolved-manual-urls"
	VetOptionMissingChecksums             = "missing-checksums"
)

Variables

View Source
var (
	ErrUnresolvedManualUrl    = errors.New("unresolved manual-url")
	ErrMissingDownload        = errors.New("not downloaded")
	ErrMissingChecksum        = errors.New("missing checksum")
	ErrValidationNotSupported = errors.New("validation not supported")
	ErrValidationFailed       = errors.New("failed validation")
)

Functions

func Auth

func Auth(username, password string) error

func AuthHandler

func AuthHandler(u *url.URL) error

func Backup

func Backup() error

func BackupHandler

func BackupHandler(u *url.URL) error

func Cleanup

func Cleanup(
	idSet map[string]bool,
	operatingSystems []vangogh_local_data.OperatingSystem,
	downloadTypes []vangogh_local_data.DownloadType,
	langCodes []string,
	all, test bool) error

func CleanupHandler

func CleanupHandler(u *url.URL) error

func Digest

func Digest(property string) error

func DigestHandler

func DigestHandler(u *url.URL) error

func Export

func Export(from, to string) error

func ExportHandler

func ExportHandler(u *url.URL) error

func GetData

func GetData(
	idSet map[string]bool,
	skipIds []string,
	pt vangogh_local_data.ProductType,
	since int64,
	missing bool,
	updated bool) error

GetData gets remote data from GOG.com and stores as local products (splitting as paged data if needed)

func GetDataHandler

func GetDataHandler(u *url.URL) error

func GetDownloads

func GetDownloads(
	idSet map[string]bool,
	operatingSystems []vangogh_local_data.OperatingSystem,
	downloadTypes []vangogh_local_data.DownloadType,
	langCodes []string,
	missing,
	force bool) error

func GetDownloadsHandler

func GetDownloadsHandler(u *url.URL) error

func GetImages

func GetImages(
	idSet map[string]bool,
	its []vangogh_local_data.ImageType,
	missing bool) error

GetImages fetches remote images for a given type (box-art, screenshots, background, etc.). If requested it can check locally present files and download all missing (used in data files, but not present locally) images for a given type.

func GetImagesHandler

func GetImagesHandler(u *url.URL) error

func GetItems

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

func GetItemsHandler

func GetItemsHandler(u *url.URL) error

func GetSummary

func GetSummary() error

func GetSummaryHandler

func GetSummaryHandler(u *url.URL) error

func GetThumbnails

func GetThumbnails(idSet map[string]bool, missing bool, force bool) error

func GetThumbnailsHandler

func GetThumbnailsHandler(u *url.URL) error

func GetVideos

func GetVideos(idSet map[string]bool, missing bool, force bool) error

func GetVideosHandler

func GetVideosHandler(u *url.URL) error

func Info

func Info(idSet map[string]bool, allText, images, videoId bool) error

func InfoHandler

func InfoHandler(u *url.URL) error

func List

func List(
	idSet map[string]bool,
	modifiedSince int64,
	pt vangogh_local_data.ProductType,
	properties []string) error

List prints products of a certain product type. Can be filtered to products that were created or modified since a certain time. Provided properties will be printed for each product (if supported) in addition to default ID, Title.

func ListHandler

func ListHandler(u *url.URL) error

func LocalTag

func LocalTag(idSet map[string]bool, operation string, tagName string) error

func LocalTagHandler

func LocalTagHandler(u *url.URL) error

func NegOpt

func NegOpt(option string) string

func NewAtomFeedContent added in v0.4.35

func NewAtomFeedContent(rxa kvas.ReduxAssets, summary map[string][]string) string

func Owned

func Owned(idSet map[string]bool) error

func OwnedHandler

func OwnedHandler(u *url.URL) error

func Reduce

func Reduce(since int64, properties []string, propertiesOnly bool) error

func ReduceHandler

func ReduceHandler(u *url.URL) error
func Search(query map[string][]string) error

Search using provided property: values query

func SearchHandler

func SearchHandler(u *url.URL) error

func Serve

func Serve(port int, stderr bool) error

func ServeHandler

func ServeHandler(u *url.URL) error

func Size

func Size(
	idSet map[string]bool,
	operatingSystems []vangogh_local_data.OperatingSystem,
	downloadTypes []vangogh_local_data.DownloadType,
	langCodes []string,
	missing bool,
	all bool) error

func SizeHandler

func SizeHandler(u *url.URL) error

func Summarize

func Summarize(since int64) error

func SummarizeHandler

func SummarizeHandler(u *url.URL) error

func Sync

func Sync(
	since int64,
	syncOpts *syncOptions,
	operatingSystems []vangogh_local_data.OperatingSystem,
	downloadTypes []vangogh_local_data.DownloadType,
	langCodes []string) error

func SyncHandler

func SyncHandler(u *url.URL) error

func Tag

func Tag(idSet map[string]bool, operation, tagName string) error

func TagHandler

func TagHandler(u *url.URL) error

func UpdateDownloads

func UpdateDownloads(
	operatingSystems []vangogh_local_data.OperatingSystem,
	downloadTypes []vangogh_local_data.DownloadType,
	langCodes []string,
	since int64,
	updatesOnly bool) error

func UpdateDownloadsHandler

func UpdateDownloadsHandler(u *url.URL) error

func Validate

func Validate(
	idSet map[string]bool,
	operatingSystems []vangogh_local_data.OperatingSystem,
	downloadTypes []vangogh_local_data.DownloadType,
	langCodes []string,
	all bool,
	skipValid bool) error

func ValidateHandler

func ValidateHandler(u *url.URL) error

func Vet

func Vet(
	vetOpts *vetOptions,
	operatingSystems []vangogh_local_data.OperatingSystem,
	downloadTypes []vangogh_local_data.DownloadType,
	langCodes []string,
	fix bool) error

func VetHandler

func VetHandler(u *url.URL) error

func Wishlist

func Wishlist(addProductIds, removeProductIds []string) error

func WishlistHandler

func WishlistHandler(u *url.URL) error

Types

type AtomEntry added in v0.4.35

type AtomEntry struct {
	Title string `xml:"title"` // <title>Atom-Powered Robots Run Amok</title>
	// <link href="http://example.org/2003/12/13/atom03" />
	// <link rel="alternate" type="text/html" href="http://example.org/2003/12/13/atom03.html"/>
	// <link rel="edit" href="http://example.org/2003/12/13/atom03/edit"/>
	Id        string            `xml:"id"`                // <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
	Published string            `xml:"published"`         // <published>2003-11-09T17:23:02Z</published>
	Updated   string            `xml:"updated"`           // <updated>2003-12-13T18:30:02Z</updated>
	Summary   string            `xml:"summary,omitempty"` // <summary>Some text.</summary>
	Author    *AtomEntryAuthor  `xml:"author"`
	Content   *AtomEntryContent `xml:"content"`
}

type AtomEntryAuthor added in v0.4.35

type AtomEntryAuthor struct {
	XMLName xml.Name `xml:"author"`
	Name    string   `xml:"name"`            // <name>John Doe</name>
	Email   string   `xml:"email,omitempty"` // <email>johndoe@example.com</email>
}

type AtomEntryContent added in v0.4.35

type AtomEntryContent struct {
	XMLName xml.Name `xml:"content"`
	Type    string   `xml:"type,attr"`
	Content string   `xml:",innerxml"`
}

type AtomFeed added in v0.4.35

type AtomFeed struct {
	XMLName xml.Name `xml:"feed"` // <feed xmlns="http://www.w3.org/2005/Atom">
	XMLNS   string   `xml:"xmlns,attr"`
	Title   string   `xml:"title"` // <title>Example Feed</title>
	//<subtitle>A subtitle.</subtitle>
	//<link href="http://example.org/feed/" rel="self" />
	//<link href="http://example.org/" />
	Updated string     `xml:"updated"` // <updated>2003-12-13T18:30:02Z</updated>
	Entry   *AtomEntry `xml:"entry"`
}

func NewAtomFeed added in v0.4.35

func NewAtomFeed(rxa kvas.ReduxAssets, summary map[string][]string) *AtomFeed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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