{"modulePath":"github.com/GoCodeAlone/workflow-plugin-steam","version":"v0.3.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package workshop\n\n## Functions\n\n```go\nfunc BuildPackage(opts PackageOptions) error\n```\nBuildPackage validates a workshop item directory and produces a .steamworkshop zip archive.\n\n## Types\n\n```go\ntype InstallOptions struct {\n\t// PublishedFileId is the Steam Workshop file ID (used as directory name).\n\tPublishedFileId string\n\t// ZipData is the raw zip archive bytes to extract.\n\tZipData []byte\n\t// InstallDir is the base directory; item is installed to \u003cInstallDir\u003e/\u003cPublishedFileId\u003e/.\n\tInstallDir string\n\t// ValidateRuleset runs the server-side validator after extraction.\n\tValidateRuleset bool\n}\n```\nInstallOptions controls how a Workshop item is installed.\n\n```go\ntype InstallResult struct {\n\tItemDir        string\n\tManifest       *WorkshopManifest\n\tAlreadyCurrent bool\n}\n```\nInstallResult holds the outcome of a successful Workshop item install.\n\n```go\nfunc Install(opts InstallOptions) (InstallResult, error)\n```\nInstall extracts a Workshop zip archive to the install directory, validates the manifest, optionally validates the ruleset YAML, and returns the result.\n\nCalling Install twice with the same zip data is a no-op (AlreadyCurrent=true).\n\n```go\ntype ItemType string\n```\nItemType classifies a Workshop item.\n\n```go\nconst (\n\tItemTypeRuleset  ItemType = \"ruleset\"\n\tItemTypeCardPack ItemType = \"card_pack\"\n\tItemTypeGameMode ItemType = \"game_mode\" // ruleset + UI theme\n)\n```\n\n```go\ntype ModCheckOptions struct {\n\t// PackageDir is the path to the workshop item directory (already extracted).\n\tPackageDir string\n\t// AllowedStepTypes overrides the default allowlist. If nil, defaults are used.\n\tAllowedStepTypes []string\n}\n```\nModCheckOptions controls the automated moderation check.\n\n```go\ntype ModCheckResult struct {\n\tPassed     bool\n\tViolations []string\n\tWarnings   []string\n}\n```\nModCheckResult holds the outcome of the moderation check.\n\n```go\nfunc RunModCheck(opts ModCheckOptions) (ModCheckResult, error)\n```\nRunModCheck performs automated pre-publish moderation checks on a workshop package directory.\n\n```go\ntype PackageOptions struct {\n\t// SourceDir is the directory containing manifest.json and item files.\n\tSourceDir string\n\t// OutputPath is the destination .steamworkshop zip file path.\n\tOutputPath string\n\t// MaxTotalBytes is the maximum allowed total uncompressed size (default 100 MB).\n\tMaxTotalBytes int64\n\t// MaxPreviewBytes is the maximum allowed size for the preview image (default 1 MB).\n\tMaxPreviewBytes int64\n}\n```\nPackageOptions controls the workshop package build.\n\n```go\ntype ValidationResult struct {\n\tValid    bool\n\tErrors   []string\n\tManifest *WorkshopManifest\n}\n```\nValidationResult holds the outcome of a workshop package validation.\n\n```go\nfunc ValidatePackage(packageDir string, strictMode bool) (ValidationResult, error)\n```\nValidatePackage validates an extracted workshop item directory. If strictMode is true, ruleset YAML step types are also checked against an allowlist of safe step types.\n\n```go\ntype VersionDB struct {\n\t// contains filtered or unexported fields\n}\n```\nVersionDB is a JSON-backed store of Workshop item version records. It is stored as a single JSON file at the configured path.\n\n```go\nfunc NewVersionDB(dbPath string) *VersionDB\n```\nNewVersionDB creates a VersionDB backed by a JSON file at dbPath. Existing data is loaded lazily on first access.\n\n```go\nfunc (db *VersionDB) Get(publishedFileId string) (VersionRecord, bool)\n```\nGet returns the VersionRecord for the given publishedFileId, if it exists.\n\n```go\nfunc (db *VersionDB) ListAll() ([]VersionRecord, error)\n```\nListAll returns all VersionRecords.\n\n```go\nfunc (db *VersionDB) Remove(publishedFileId string) error\n```\nRemove deletes the VersionRecord for the given publishedFileId.\n\n```go\nfunc (db *VersionDB) Set(r VersionRecord) error\n```\nSet inserts or updates a VersionRecord.\n\n```go\ntype VersionRecord struct {\n\tPublishedFileId string    `json:\"publishedFileId\"`\n\tLastUpdatedAt   time.Time `json:\"lastUpdatedAt\"`\n\tInstalledAt     time.Time `json:\"installedAt\"`\n\tVersion         string    `json:\"version\"`\n\tItemDir         string    `json:\"itemDir\"`\n}\n```\nVersionRecord tracks the installed state of a Workshop item.\n\n```go\ntype WorkshopManifest struct {\n\tSchemaVersion    int      `json:\"schemaVersion\"`\n\tItemType         ItemType `json:\"itemType\"`\n\tTitle            string   `json:\"title\"`\n\tDescription      string   `json:\"description\"`\n\tTags             []string `json:\"tags\"`\n\tPreviewImagePath string   `json:\"previewImagePath\"`\n\tGameTypes        []string `json:\"gameTypes\"`\n\tMinPlayers       int      `json:\"minPlayers\"`\n\tMaxPlayers       int      `json:\"maxPlayers\"`\n\tAuthor           string   `json:\"author\"`  // Steam ID 64 as string\n\tVersion          string   `json:\"version\"` // semver string\n}\n```\nWorkshopManifest is the deserialized form of a Workshop item's manifest.json.\n\n```go\nfunc (m *WorkshopManifest) Validate() error\n```\nValidate checks that the manifest has required fields and valid values.\n\n","path":"github.com/GoCodeAlone/workflow-plugin-steam/internal/workshop","name":"workshop","synopsis":"","isRedistributable":true}
