files

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddResult

type AddResult struct {
	GetResult
	Build *models.GameBuild `json:"build,omitempty"` // Only returned once when the file has been fully uploaded
}

AddResult is the result from the /files/add endpoint

func Add

func Add(client *cliHttp.SimpleClient, gameID, packageID int, releaseVersion *semver.Version, isDownloadable bool, size int64, checksum string, forceRestart bool, filepath string, startByte, chunkSize int64, bar *pb.ProgressBar) (*AddResult, error)

Add sends a new POST /files/add request

type GetResult

type GetResult struct {
	Status string        `json:"status"`
	FileID int           `json:"file_id,omitempty"` // Returned for partial/in progress file uploads
	Start  int64         `json:"start,omitempty"`
	Error  *models.Error `json:"error,omitempty"`
}

GetResult is the result from the /files endpoint

func Get

func Get(client *cliHttp.SimpleClient, gameID int, size int64, checksum string) (*GetResult, error)

Get sends a new GET /files/add request

type RestartResult added in v0.5.0

type RestartResult struct {
	FileID int           `json:"file_id,omitempty"` // The existing file upload that was restarted
	Error  *models.Error `json:"error,omitempty"`
}

func Restart added in v0.5.0

func Restart(client *cliHttp.SimpleClient, gameID int, size int64, checksum string) (*RestartResult, error)

Restart sends a new POST /files/add request that restarts an existing upload.

Jump to

Keyboard shortcuts

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