steamcmd

package
v0.0.0-...-3cf66e7 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOnPath

func IsOnPath() bool

Types

type AppInfo

type AppInfo struct {
	Common   *AppInfoCommon   `json:"common,omitempty"`
	Extended *AppInfoExtended `json:"extended,omitempty"`
	Config   *AppInfoConfig   `json:"config,omitempty"`
}

type AppInfoCommon

type AppInfoCommon struct {
	Name   string `json:"name,omitempty"`
	Type   string `json:"type,omitempty"`
	OSList string `json:"oslist,omitempty"`
	GameID string `json:"gameid,omitempty"`
}

type AppInfoConfig

type AppInfoConfig struct {
	Launch      map[string]AppInfoConfigLaunch `json:"launch,omitempty"`
	ContentType string                         `json:"contenttype,omitempty"`
	InstallDir  string                         `json:"installdir,omitempty"`
}

type AppInfoConfigLaunch

type AppInfoConfigLaunch struct {
	Executable string                     `json:"executable,omitempty"`
	Arguments  string                     `json:"arguments,omitempty"`
	Config     *AppInfoConfigLaunchConfig `json:"config,omitempty"`
}

type AppInfoConfigLaunchConfig

type AppInfoConfigLaunchConfig struct {
	OSList string `json:"oslist"`
	OSArch string `json:"osarch"`
}

type AppInfoExtended

type AppInfoExtended struct {
	Developer                 string `json:"developer,omitempty"`
	GameDir                   string `json:"gamedir,omitempty"`
	Homepage                  string `json:"homepage,omitempty"`
	Icon                      string `json:"icon,omitempty"`
	NoServers                 string `json:"noservers,omitempty"`
	PrimaryCache              string `json:"primarycache,omitempty"`
	SourceGame                string `json:"sourcegame,omitempty"`
	State                     string `json:"state,omitempty"`
	VisibleOnlyWhenInstalled  string `json:"visibleonlywheninstalled,omitempty"`
	VisibleOnlyWhenSubscribed string `json:"visibleonlywhensubscribed,omitempty"`
}

type AppInfoPrintCommand

type AppInfoPrintCommand string

func (AppInfoPrintCommand) AppInfo

func (c AppInfoPrintCommand) AppInfo() *AppInfo

func (AppInfoPrintCommand) Args

func (c AppInfoPrintCommand) Args() ([]string, error)

func (AppInfoPrintCommand) Check

func (c AppInfoPrintCommand) Check(flags *PromptFlags) error

func (AppInfoPrintCommand) Modify

func (c AppInfoPrintCommand) Modify(flags *PromptFlags) error

func (AppInfoPrintCommand) ReadOutput

func (c AppInfoPrintCommand) ReadOutput(ctx context.Context, r io.Reader) error

func (AppInfoPrintCommand) String

func (c AppInfoPrintCommand) String() string

type AppUpdateCommand

type AppUpdateCommand struct {
	AppID        string
	Beta         string
	BetaPassword string
	Validate     bool
}

func (*AppUpdateCommand) Args

func (c *AppUpdateCommand) Args() ([]string, error)

func (*AppUpdateCommand) Check

func (*AppUpdateCommand) Check(flags *PromptFlags) error

func (*AppUpdateCommand) Modify

func (c *AppUpdateCommand) Modify(flags *PromptFlags) error

func (*AppUpdateCommand) ReadOutput

func (c *AppUpdateCommand) ReadOutput(ctx context.Context, r io.Reader) error

type Command

type Command interface {
	Check(*PromptFlags) error
	Args() ([]string, error)
	ReadOutput(context.Context, io.Reader) error
	Modify(*PromptFlags) error
}

type CommandLine

type CommandLine struct {
	ForceInstallDir   string
	Login             *LoginCommand
	ForcePlatformType PlatformType
	AppUpdate         *AppUpdateCommand
}

func (*CommandLine) Args

func (c *CommandLine) Args() ([]string, error)

type ForceInstallDirCommand

type ForceInstallDirCommand string

func (ForceInstallDirCommand) Args

func (c ForceInstallDirCommand) Args() ([]string, error)

func (ForceInstallDirCommand) Check

func (ForceInstallDirCommand) Modify

func (c ForceInstallDirCommand) Modify(flags *PromptFlags) error

func (ForceInstallDirCommand) ReadOutput

func (c ForceInstallDirCommand) ReadOutput(ctx context.Context, r io.Reader) error

func (ForceInstallDirCommand) String

func (c ForceInstallDirCommand) String() string

type ForcePlatformTypeCommand

type ForcePlatformTypeCommand PlatformType

func (ForcePlatformTypeCommand) Args

func (c ForcePlatformTypeCommand) Args() ([]string, error)

func (ForcePlatformTypeCommand) Check

func (c ForcePlatformTypeCommand) Check(flags *PromptFlags) error

func (ForcePlatformTypeCommand) Modify

func (c ForcePlatformTypeCommand) Modify(flags *PromptFlags) error

func (ForcePlatformTypeCommand) ReadOutput

func (c ForcePlatformTypeCommand) ReadOutput(ctx context.Context, r io.Reader) error

func (ForcePlatformTypeCommand) String

func (c ForcePlatformTypeCommand) String() string

type LoginCommand

type LoginCommand struct {
	Username       string
	Password       string
	SteamGuardCode string
}

func (*LoginCommand) Args

func (c *LoginCommand) Args() ([]string, error)

func (*LoginCommand) Check

func (c *LoginCommand) Check(flags *PromptFlags) error

func (*LoginCommand) Modify

func (*LoginCommand) Modify(flags *PromptFlags) error

func (*LoginCommand) ReadOutput

func (c *LoginCommand) ReadOutput(ctx context.Context, r io.Reader) error

type PlatformType

type PlatformType string
var (
	PlatformTypeWindows PlatformType = "windows"
	PlatformTypeLinux   PlatformType = "linux"
	PlatformTypeMacOS   PlatformType = "macos"
)

func (PlatformType) String

func (t PlatformType) String() string

type Prompt

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

func (*Prompt) Close

func (p *Prompt) Close() error

func (*Prompt) Run

func (p *Prompt) Run(ctx context.Context, cmd Command) error

type PromptFlags

type PromptFlags struct {
	LoggedIn bool
}

type QuitCommand

type QuitCommand byte

func (*QuitCommand) Args

func (c *QuitCommand) Args() ([]string, error)

func (QuitCommand) Check

func (c QuitCommand) Check(flags *PromptFlags) error

func (QuitCommand) Modify

func (c QuitCommand) Modify(flags *PromptFlags) error

func (*QuitCommand) ReadOutput

func (c *QuitCommand) ReadOutput(context.Context, io.Reader) error

type Steamcmd

type Steamcmd struct {
	Path string
}

func (*Steamcmd) Run

func (s *Steamcmd) Run(ctx context.Context, c *CommandLine) error

func (*Steamcmd) Start

func (s *Steamcmd) Start(ctx context.Context) (*Prompt, error)

Jump to

Keyboard shortcuts

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