Documentation
¶
Index ¶
- Variables
- type Base64Source
- type Depot
- type DepotConfig
- type DepotManifest
- type DownloadConfig
- type Downloader
- type DownloaderOptFunc
- type FilesDepotManifest
- type FilesDepotManifestFile
- type FilesDepotManifestMetadata
- type HttpSource
- type Installer
- type Manifest
- type Metadata
- type Source
- type SteamDepotManifest
- type SteamSourceMetadata
- type Waiter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrManifestNotExists = errors.New("manifest does not exists") ErrRemoteFileSchemeNotSupported = errors.New("file scheme with remote host not supported") )
View Source
var ( ErrMissingSourceType = errors.New("missing type attribute in source") ErrUnknownSourceType = errors.New("unknown source type") ErrMissingDepotManifestType = errors.New("missing type attribute in depot manifest") ErrUnknownDepotManifestType = errors.New("unknown depot manifest type") )
Functions ¶
This section is empty.
Types ¶
type Base64Source ¶ added in v0.5.0
type Base64Source struct {
Content string `mapstructure:"content,omitempty"`
}
func (*Base64Source) Download ¶ added in v0.6.0
func (s *Base64Source) Download(ctx context.Context, dl *Downloader, dst string) error
func (*Base64Source) GetDownloaderOptions ¶ added in v0.5.0
func (s *Base64Source) GetDownloaderOptions() []DownloaderOptFunc
type Depot ¶ added in v0.6.0
type Depot struct { Name string `mapstructure:"name,omitempty"` Path string `mapstructure:"path,omitempty"` Config DepotConfig `mapstructure:"config,omitempty"` Exports map[string]any `mapstructure:"exports,omitempty"` Manifest DepotManifest `mapstructure:"manifest,omitempty"` }
type DepotConfig ¶ added in v0.6.0
type DepotManifest ¶ added in v0.6.0
type DepotManifest interface { GetDownloaderOptions() []DownloaderOptFunc GetMetadata(context.Context, *Downloader, string) (Metadata, error) }
type DownloadConfig ¶ added in v0.5.0
type Downloader ¶ added in v0.5.0
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶ added in v0.5.0
func NewDownloader(opts ...DownloaderOptFunc) *Downloader
func (*Downloader) GetConfig ¶ added in v0.5.0
func (d *Downloader) GetConfig() DownloadConfig
func (*Downloader) GetHttpClient ¶ added in v0.5.0
func (d *Downloader) GetHttpClient() *http.Client
func (*Downloader) GetSteamClient ¶ added in v0.5.0
func (d *Downloader) GetSteamClient() *steamdl.SteamDownloadClient
func (*Downloader) Initialize ¶ added in v0.5.0
func (d *Downloader) Initialize() error
type DownloaderOptFunc ¶ added in v0.5.0
type DownloaderOptFunc (func(*Downloader))
func WithDownloadConfig ¶ added in v0.5.0
func WithDownloadConfig(config DownloadConfig) DownloaderOptFunc
func WithHttpClient ¶ added in v0.5.0
func WithHttpClient() DownloaderOptFunc
func WithSteamClient ¶ added in v0.5.0
func WithSteamClient() DownloaderOptFunc
type FilesDepotManifest ¶ added in v0.6.0
type FilesDepotManifest struct {
Files []FilesDepotManifestFile `mapstructure:"files,omitempty"`
}
func (*FilesDepotManifest) GetDownloaderOptions ¶ added in v0.6.0
func (manifest *FilesDepotManifest) GetDownloaderOptions() []DownloaderOptFunc
func (*FilesDepotManifest) GetMetadata ¶ added in v0.6.0
func (manifest *FilesDepotManifest) GetMetadata(ctx context.Context, dl *Downloader, path string) (Metadata, error)
type FilesDepotManifestFile ¶ added in v0.6.0
type FilesDepotManifestMetadata ¶ added in v0.6.0
type FilesDepotManifestMetadata struct {
Files []FilesDepotManifestFile
}
func (*FilesDepotManifestMetadata) Install ¶ added in v0.6.0
func (metadata *FilesDepotManifestMetadata) Install(ctx context.Context, pool pond.Pool, dl *Downloader) (Waiter, error)
type HttpSource ¶ added in v0.5.0
type HttpSource struct { Url string `mapstructure:"url,omitempty"` Hash string `mapstructure:"hash,omitempty"` Archive string `mapstructure:"archive,omitempty"` }
func (*HttpSource) Download ¶ added in v0.6.0
func (s *HttpSource) Download(ctx context.Context, dl *Downloader, dst string) error
func (*HttpSource) GetDownloaderOptions ¶ added in v0.5.0
func (s *HttpSource) GetDownloaderOptions() []DownloaderOptFunc
type Installer ¶
type Installer struct{}
func NewInstaller ¶
func (*Installer) GetManifest ¶ added in v0.4.0
type Metadata ¶ added in v0.5.0
type Metadata interface {
Install(context.Context, pond.Pool, *Downloader) (Waiter, error)
}
type Source ¶
type Source interface { GetDownloaderOptions() []DownloaderOptFunc Download(context.Context, *Downloader, string) error }
type SteamDepotManifest ¶ added in v0.6.0
type SteamDepotManifest struct {
AppId uint32 `mapstructure:"appid,omitempty"`
}
func (*SteamDepotManifest) GetDownloaderOptions ¶ added in v0.6.0
func (manifest *SteamDepotManifest) GetDownloaderOptions() []DownloaderOptFunc
func (*SteamDepotManifest) GetMetadata ¶ added in v0.6.0
func (manifest *SteamDepotManifest) GetMetadata(ctx context.Context, dl *Downloader, path string) (Metadata, error)
type SteamSourceMetadata ¶ added in v0.5.0
type SteamSourceMetadata struct { AppId uint32 Destination string Depots []steamSourceDepotMetadata }
func (*SteamSourceMetadata) Install ¶ added in v0.5.0
func (metadata *SteamSourceMetadata) Install(ctx context.Context, pool pond.Pool, dl *Downloader) (Waiter, error)
Click to show internal directories.
Click to hide internal directories.