Documentation ¶
Index ¶
- Constants
- func IsTerminal() bool
- type ContainerResult
- type Context
- func (ctx *Context) AuthenticateViaOauth() (*itchio.Client, error)
- func (ctx *Context) CompressionSettings() pwr.CompressionSettings
- func (ctx *Context) Context() context.Context
- func (ctx *Context) CurrentVariant() VersionVariant
- func (ctx *Context) CurrentVersion() *Version
- func (ctx *Context) DoVersionCheck()
- func (ctx *Context) HasSavedCredentials() bool
- func (ctx *Context) Must(err error)
- func (ctx *Context) NewClient(key string) (*itchio.Client, error)
- func (ctx *Context) QueryLatestVersion(variant VersionVariant) (*VersionCheckResult, error)
- func (ctx *Context) Register(clause *kingpin.CmdClause, do DoCommand)
- func (ctx *Context) UpdateBaseURL(variant VersionVariant) string
- func (ctx *Context) UserAgent() string
- type DoCommand
- type ElfPropsResult
- type FileExtractedResult
- type FileMirroredResult
- type Version
- type VersionCheckResult
- type VersionVariant
- type WalkResult
Constants ¶
View Source
const ( VersionVariantStable = "stable" VersionVariantHead = "head" )
Variables ¶
This section is empty.
Functions ¶
func IsTerminal ¶
func IsTerminal() bool
Types ¶
type ContainerResult ¶
type ContainerResult struct { Type string `json:"type"` Spell []string `json:"spell"` NumFiles int `json:"numFiles"` NumDirs int `json:"numDirs"` NumSymlinks int `json:"numSymlinks"` UncompressedSize int64 `json:"uncompressedSize"` }
A ContainerResult is sent in json mode by the file command
For command `file`
type Context ¶
type Context struct { App *kingpin.Application Commands map[string]DoCommand // Identity is the path to the credentials file Identity string // Address is the URL of the itch.io API server we're talking to Address string // VersionString is the complete version string VersionString string // Version is just the version number, as a string Version string // The git commit hash Commit string // Quiet silences all output Quiet bool // Verbose enables chatty output Verbose bool // Path to the local sqlite database DBPath string CompressionAlgorithm string CompressionQuality int Cancelled bool }
func NewContext ¶
func NewContext(app *kingpin.Application) *Context
func (*Context) AuthenticateViaOauth ¶
func (*Context) CompressionSettings ¶
func (ctx *Context) CompressionSettings() pwr.CompressionSettings
func (*Context) CurrentVariant ¶
func (ctx *Context) CurrentVariant() VersionVariant
func (*Context) CurrentVersion ¶
func (*Context) DoVersionCheck ¶
func (ctx *Context) DoVersionCheck()
func (*Context) HasSavedCredentials ¶
func (*Context) QueryLatestVersion ¶
func (ctx *Context) QueryLatestVersion(variant VersionVariant) (*VersionCheckResult, error)
func (*Context) UpdateBaseURL ¶
func (ctx *Context) UpdateBaseURL(variant VersionVariant) string
type ElfPropsResult ¶
ElfPropsResult contains the architecture of a binary file, and optionally a list of libraries it depends on
For command `elfprops`
type FileExtractedResult ¶
FileExtractedResult is sent as json so the consumer can know what we extracted It is sent even if we're resuming an extract.
For command `unzip`
type FileMirroredResult ¶
FileMirroredResult is sent as json so the consumer can know what we mirrored
For command `ditto`
type Version ¶
type Version struct { Name string Variant VersionVariant }
type VersionCheckResult ¶
type VersionVariant ¶
type VersionVariant string
type WalkResult ¶
type WalkResult struct { Type string `json:"type"` Path string `json:"path,omitempty"` Size int64 `json:"size,omitempty"` }
WalkResult is sent for each item that's walked
For command `walk`
Click to show internal directories.
Click to hide internal directories.