steam

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package steam reads what Valve's tools print: the text format its SteamCMD and game clients call KeyValues, or VDF, and the build numbers inside it.

Index

Constants

View Source
const Image = "steamcmd/steamcmd:ubuntu-24@sha256:48f967bb753b38bab0049318888acf33a8e227fbc41d7fa308fc37d4e7595958"

Image is the container that asks Steam for the latest builds: Valve's SteamCMD with nothing else in it, pinned so a moved tag changes nothing.

Variables

This section is empty.

Functions

func InfoCommand

func InfoCommand(appIDs []int64) []string

InfoCommand is the command line that prints the store information of the apps, logged in anonymously. app_info_update makes SteamCMD fetch it rather than print what it cached.

func InstalledBuild

func InstalledBuild(manifest []byte) (string, error)

InstalledBuild reads the build id from an app manifest, steamapps/appmanifest_<id>.acf, which SteamCMD writes when it installs or updates a game.

func LatestBuilds

func LatestBuilds(out []byte) (map[int64]string, error)

LatestBuilds returns the build id of each app's public branch, from the output of app_info_print. An app with no public branch is left out.

func ManifestPath

func ManifestPath(appID int64) string

ManifestPath is where a game's manifest is, relative to the folder SteamCMD installs into.

func ParseAppInfo

func ParseAppInfo(out []byte) (map[int64]*Node, error)

ParseAppInfo finds the apps in the output of SteamCMD's app_info_print, which is VDF blocks among ordinary log lines, and returns each by id.

Types

type Node

type Node struct {
	Key      string
	Value    string
	Children []*Node
	// contains filtered or unexported fields
}

Node is one key of a VDF file. A key holds either a string or more keys, in file order.

func Parse

func Parse(data []byte) (*Node, error)

Parse reads a VDF document. The result is a node with no key whose children are the file's top-level keys.

func (*Node) Get

func (n *Node) Get(path ...string) *Node

Get follows keys down from n. Steam is not consistent about case (an app manifest says "AppState" and "buildid"), so keys match without it.

func (*Node) IsObject

func (n *Node) IsObject() bool

IsObject reports whether the node holds keys rather than a string.

func (*Node) Text

func (n *Node) Text(path ...string) (string, bool)

Text is the string at path, if there is one there.

Jump to

Keyboard shortcuts

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