Documentation ¶
Index ¶
- func ClientFromCredentials(credentials *butlerd.GameCredentials) (*itchio.Client, error)
- func CredentialsForGameID(db *gorm.DB, gameID int64) *butlerd.GameCredentials
- func DownloadInstallSource(consumer *state.Consumer, stageFolder string, ctx context.Context, ...) error
- func GameToString(game *itchio.Game) string
- func GetFilteredUploads(client *itchio.Client, game *itchio.Game, credentials *butlerd.GameCredentials, ...) (*manager.NarrowDownUploadsResult, error)
- func InstallPerform(ctx context.Context, rc *butlerd.RequestContext, ...) error
- func LogUpload(consumer *state.Consumer, u *itchio.Upload, b *itchio.Build)
- func MakeItchfsURL(params *ItchfsURLParams) string
- func TeeConsumer(c *state.Consumer, logFile io.Writer) *state.Consumer
- func UninstallPerform(ctx context.Context, rc *butlerd.RequestContext, ...) error
- func UploadIsProbablyExternal(u *itchio.Upload) bool
- func ValidateCave(rc *butlerd.RequestContext, caveID string) *models.Cave
- type CommitInstallParams
- type InstallParams
- type InstallSubcontext
- type InstallSubcontextState
- type ItchfsURLParams
- type MetaSubcontext
- type OperationContext
- type OperationError
- type Subcontext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientFromCredentials ¶
func ClientFromCredentials(credentials *butlerd.GameCredentials) (*itchio.Client, error)
func CredentialsForGameID ¶
func CredentialsForGameID(db *gorm.DB, gameID int64) *butlerd.GameCredentials
func DownloadInstallSource ¶
func GameToString ¶
func GetFilteredUploads ¶
func InstallPerform ¶
func InstallPerform(ctx context.Context, rc *butlerd.RequestContext, performParams *butlerd.InstallPerformParams) error
func MakeItchfsURL ¶
func MakeItchfsURL(params *ItchfsURLParams) string
func UninstallPerform ¶
func UninstallPerform(ctx context.Context, rc *butlerd.RequestContext, params *butlerd.UninstallPerformParams) error
func ValidateCave ¶
func ValidateCave(rc *butlerd.RequestContext, caveID string) *models.Cave
Types ¶
type CommitInstallParams ¶
type InstallParams ¶
type InstallParams struct { StagingFolder string `json:"stagingFolder"` Reason butlerd.DownloadReason `json:"reason"` CaveID string `json:"caveId"` InstallFolderName string `json:"installFolderName"` InstallLocationID string `json:"installLocationID"` InstallFolder string `json:"installFolder"` NoCave bool `json:"noCave"` Game *itchio.Game `json:"game"` Upload *itchio.Upload `json:"upload"` Build *itchio.Build `json:"build"` IgnoreInstallers bool `json:"ignoreInstallers,omitempty"` Credentials *butlerd.GameCredentials `json:"credentials"` }
type InstallSubcontext ¶
type InstallSubcontext struct {
Data *InstallSubcontextState
}
func (*InstallSubcontext) GetData ¶
func (mt *InstallSubcontext) GetData() interface{}
func (*InstallSubcontext) Key ¶
func (mt *InstallSubcontext) Key() string
type InstallSubcontextState ¶
type InstallSubcontextState struct { DownloadSessionId string `json:"downloadSessionId,omitempty"` InstallerInfo *installer.InstallerInfo `json:"installerInfo,omitempty"` IsAvailableLocally bool `json:"isAvailableLocally,omitempty"` FirstInstallResult *installer.InstallResult `json:"firstInstallResult,omitempty"` SecondInstallerInfo *installer.InstallerInfo `json:"secondInstallerInfo,omitempty"` }
type ItchfsURLParams ¶
type MetaSubcontext ¶
type MetaSubcontext struct {
Data *InstallParams
}
func NewMetaSubcontext ¶
func NewMetaSubcontext() *MetaSubcontext
func (*MetaSubcontext) GetData ¶
func (mt *MetaSubcontext) GetData() interface{}
func (*MetaSubcontext) Key ¶
func (mt *MetaSubcontext) Key() string
type OperationContext ¶
type OperationContext struct {
// contains filtered or unexported fields
}
func LoadContext ¶
func LoadContext(ctx context.Context, rc *butlerd.RequestContext, stageFolder string) (*OperationContext, error)
func (*OperationContext) Consumer ¶
func (oc *OperationContext) Consumer() *state.Consumer
func (*OperationContext) Load ¶
func (oc *OperationContext) Load(s Subcontext)
func (*OperationContext) Retire ¶
func (oc *OperationContext) Retire() error
func (*OperationContext) Save ¶
func (oc *OperationContext) Save(s Subcontext) error
func (*OperationContext) StageFolder ¶
func (oc *OperationContext) StageFolder() string
type OperationError ¶
type OperationError struct { Type string `json:"type"` Code string `json:"code"` Message string `json:"message"` Operation string `json:"operation"` }
func (*OperationError) Error ¶
func (oe *OperationError) Error() string
func (*OperationError) Throw ¶
func (oe *OperationError) Throw() error
type Subcontext ¶
type Subcontext interface { // Key returns a unique string key used for storing // something under the context object Key() string // Data should return a pointer to the underlying struct // of the subcontext GetData() interface{} }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.