cmd

package
v0.0.0-...-4a7d1bf Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2016 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultAppsDir = "/opt/steam/apps"

Default application directory.

View Source
const DefaultDir = "/opt/steam/cmd"

Default Steam Console Client (SteamCMD) directory.

Variables

View Source
var (
	ErrNoAppId  = errors.New("We're aleady running")
	ErrNoAppDir = errors.New("We're aleady running")
)
View Source
var (
	ErrAlreadyRunning = errors.New("We're aleady running")
)

Functions

func AddQuestion

func AddQuestion(regex, q string, sensitive bool)

AddQuestion registers a question the SteamCMD utility may ask to the user. The provided regex is used to match the output line from the SteamCMD utility, the regex must compile (causing a panic otherwise).

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func (*App) Remove

func (a *App) Remove() error

Remove the Steam application.

type Client

type Client struct {
	SccDir  string
	AppsDir string

	Stdout io.Writer

	AuthUser string
	AuthPw   string
}

func (*Client) GetApp

func (c *Client) GetApp(id steam.AppId) *App

GetApp returns an installed Steam application. If it returns nil the app is not installed.

func (*Client) InstallApp

func (c *Client) InstallApp(id steam.AppId, i Interviewer) (err error)

InstallApp installs the app indicated by the provided Steam app id. When during the installation process steam has questions for you it will call the interviewer with a question.

func (*Client) UpdateApp

func (c *Client) UpdateApp(a *App, i Interviewer) error

type Installer

type Installer struct {
	AnonymousLogin bool
	Questions      chan *Question
	Answers        chan string
	// contains filtered or unexported fields
}

func (*Installer) Install

func (i *Installer) Install(appId steam.AppId) error

func (*Installer) Running

func (i *Installer) Running() bool

func (*Installer) Update

func (i *Installer) Update(app *App) (err error)

type Interviewer

type Interviewer func(question string, sensitive bool) string

Interviewer asks a question and expects an answer

type Question

type Question struct {
	Sensitive bool
	Message   string
}

Jump to

Keyboard shortcuts

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