Documentation
¶
Overview ¶
Package client holds the public library files for use in the client executable At the root level, this includes the setup code to keep the main namespace sparsely populated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleDownload ¶
func HandleDownload(do DownloadOption) error
HandleDownload is responsible for parsing the necessary download arguments and fetching the files from the BitBurner server. If there is an issue with any of the arguments or the download an error will be returned. Nil on success.
func HandleList ¶
func HandleList(lo CommandOption) error
func HandleUpload ¶ added in v0.0.3
func HandleUpload(uo UploadOption) error
func WriteFiles ¶
func WriteFiles(outputDir string, files []models.GBBFileData) error
Types ¶
type CommandOption ¶
type CommandOption interface {
AuthToken() string
Host() string
Port() int
Valid() bool
Server() string
AddAuth(req *http.Request) *http.Request
}
CommandOption represents the available actions on a base CommandOption
type DownloadOption ¶
type DownloadOption interface {
CommandOption
Destination() string
}
DownloadOption represents the options available to the Download command.
type FileWriter ¶
type GBBClient ¶
GBBClient is an interface to the http.Client methods used for mocking purposes
var (
Client GBBClient = http.DefaultClient
)
type UploadOption ¶ added in v0.0.3
type UploadOption interface {
CommandOption
ToUpload() []models.GBBFileName
}
Click to show internal directories.
Click to hide internal directories.