aumgr

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EpicOAuthHost        = "account-public-service-prod03.ol.epicgames.com"
	LauncherClientId     = "34a02cf8f4414e29b15921876da36f9a"
	LauncherClientSecret = "daafbccc737745039dffe53d94fc76cf"
	EpicUserAgent        = "UELauncher/11.0.1-14469634+++Portal+Release-Live Windows/10.0.19041.1.256.64bit"
)
View Source
const (
	EpicCatalogId  = "729a86a5146640a2ace9e8c595414c56"
	EpicNamespace  = "33956bcb55d4452d8c47e16b94e294bd"
	EpicArtifactId = "963137e4c29d4c79a81323b8fab03a40"
)

Variables

This section is empty.

Functions

func GetAmongUsDir

func GetAmongUsDir() (string, error)

func GetVersion added in v1.1.0

func GetVersion(gamePath string) (string, error)

func IsAmongUsRunning

func IsAmongUsRunning() (pid int, err error)

func IsProcessRunning added in v1.5.3

func IsProcessRunning(pid int) (bool, error)

func LaunchAmongUs

func LaunchAmongUs(launcherType LauncherType, amongUsDir string, dllDir string, exchangeCode string, directJoinInfo DirectJoinInfo, onStarted func(pid int) error) error

Types

type AppState

type AppState struct {
	AllowOtherDownloadsWhileRunning string                    `json:"AllowOtherDownloadsWhileRunning"`
	Appid                           string                    `json:"appid"`
	AutoUpdateBehavior              string                    `json:"AutoUpdateBehavior"`
	Buildid                         string                    `json:"buildid"`
	BytesDownloaded                 string                    `json:"BytesDownloaded"`
	BytesStaged                     string                    `json:"BytesStaged"`
	BytesToDownload                 string                    `json:"BytesToDownload"`
	BytesToStage                    string                    `json:"BytesToStage"`
	DownloadType                    string                    `json:"DownloadType"`
	FullValidateAfterNextUpdate     string                    `json:"FullValidateAfterNextUpdate"`
	InstallScripts                  map[string]string         `json:"InstallScripts"`
	Installdir                      string                    `json:"installdir"`
	InstalledDepots                 map[string]InstalledDepot `json:"InstalledDepots"`
	LastOwner                       string                    `json:"LastOwner"`
	LastPlayed                      string                    `json:"LastPlayed"`
	LastUpdated                     string                    `json:"LastUpdated"`
	LauncherPath                    string                    `json:"LauncherPath"`
	MountedConfig                   BetaKey                   `json:"MountedConfig"`
	Name                            string                    `json:"name"`
	ScheduledAutoUpdate             string                    `json:"ScheduledAutoUpdate"`
	SizeOnDisk                      string                    `json:"SizeOnDisk"`
	StagingSize                     string                    `json:"StagingSize"`
	StateFlags                      string                    `json:"StateFlags"`
	TargetBuildID                   string                    `json:"TargetBuildID"`
	Universe                        string                    `json:"universe"`
	UpdateResult                    string                    `json:"UpdateResult"`
	UserConfig                      BetaKey                   `json:"UserConfig"`
}

type BetaKey

type BetaKey struct {
	BetaKey string `json:"BetaKey"`
}

type BinaryType

type BinaryType string
const (
	BinaryTypeUnknown BinaryType = "unknown"
	BinaryType32Bit   BinaryType = "x86"
	BinaryType64Bit   BinaryType = "x64"
)

func GetBinaryType added in v1.1.0

func GetBinaryType(amongUsDir string) (BinaryType, error)

func (BinaryType) IsCompatibleWith added in v1.2.0

func (bt BinaryType) IsCompatibleWith(target model.TargetPlatform) bool

type DirectJoinInfo added in v1.6.11

type DirectJoinInfo struct {
	LobbyCode      string
	ServerIP       string
	ServerPort     uint16
	MatchMakerIp   string
	MatchMakerPort uint16
}

type EpicApi added in v1.1.0

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

func NewEpicApi added in v1.1.0

func NewEpicApi() *EpicApi

func (*EpicApi) GetAuthUrl added in v1.1.0

func (a *EpicApi) GetAuthUrl() string

func (*EpicApi) GetExchangeCode added in v1.1.0

func (a *EpicApi) GetExchangeCode(accessToken string) (string, error)

func (*EpicApi) LoginWithAuthCode added in v1.1.0

func (a *EpicApi) LoginWithAuthCode(code string) (*EpicSession, error)

func (*EpicApi) LoginWithCode added in v1.3.0

func (a *EpicApi) LoginWithCode(code string) (*EpicSession, error)

func (*EpicApi) LoginWithExchangeCode added in v1.3.0

func (a *EpicApi) LoginWithExchangeCode(exchangeCode string) (*EpicSession, error)

func (*EpicApi) RefreshSession added in v1.1.0

func (a *EpicApi) RefreshSession(refreshToken string) (*EpicSession, error)

type EpicManifest added in v1.0.2

type EpicManifest struct {
	FormatVersion               int      `json:"FormatVersion"`
	BIsIncompleteInstall        bool     `json:"bIsIncompleteInstall"`
	LaunchCommand               string   `json:"LaunchCommand"`
	LaunchExecutable            string   `json:"LaunchExecutable"`
	ManifestLocation            string   `json:"ManifestLocation"`
	ManifestHash                string   `json:"ManifestHash"`
	BIsApplication              bool     `json:"bIsApplication"`
	BIsExecutable               bool     `json:"bIsExecutable"`
	BIsManaged                  bool     `json:"bIsManaged"`
	BNeedsValidation            bool     `json:"bNeedsValidation"`
	BRequiresAuth               bool     `json:"bRequiresAuth"`
	BAllowMultipleInstances     bool     `json:"bAllowMultipleInstances"`
	BCanRunOffline              bool     `json:"bCanRunOffline"`
	BAllowURICmdArgs            bool     `json:"bAllowUriCmdArgs"`
	BLaunchElevated             bool     `json:"bLaunchElevated"`
	BaseURLs                    []string `json:"BaseURLs"`
	BuildLabel                  string   `json:"BuildLabel"`
	AppCategories               []string `json:"AppCategories"`
	ChunkDbs                    []any    `json:"ChunkDbs"`
	CompatibleApps              []any    `json:"CompatibleApps"`
	DisplayName                 string   `json:"DisplayName"`
	InstallationGUID            string   `json:"InstallationGuid"`
	InstallLocation             string   `json:"InstallLocation"`
	InstallSessionID            string   `json:"InstallSessionId"`
	InstallTags                 []any    `json:"InstallTags"`
	InstallComponents           []any    `json:"InstallComponents"`
	HostInstallationGUID        string   `json:"HostInstallationGuid"`
	PrereqIds                   []any    `json:"PrereqIds"`
	PrereqSHA1Hash              string   `json:"PrereqSHA1Hash"`
	LastPrereqSucceededSHA1Hash string   `json:"LastPrereqSucceededSHA1Hash"`
	StagingLocation             string   `json:"StagingLocation"`
	TechnicalType               string   `json:"TechnicalType"`
	VaultThumbnailURL           string   `json:"VaultThumbnailUrl"`
	VaultTitleText              string   `json:"VaultTitleText"`
	InstallSize                 int      `json:"InstallSize"`
	MainWindowProcessName       string   `json:"MainWindowProcessName"`
	ProcessNames                []any    `json:"ProcessNames"`
	BackgroundProcessNames      []any    `json:"BackgroundProcessNames"`
	IgnoredProcessNames         []any    `json:"IgnoredProcessNames"`
	DlcProcessNames             []any    `json:"DlcProcessNames"`
	MandatoryAppFolderName      string   `json:"MandatoryAppFolderName"`
	OwnershipToken              string   `json:"OwnershipToken"`
	SidecarConfigRevision       int      `json:"SidecarConfigRevision"`
	CatalogNamespace            string   `json:"CatalogNamespace"`
	CatalogItemID               string   `json:"CatalogItemId"`
	AppName                     string   `json:"AppName"`
	AppVersionString            string   `json:"AppVersionString"`
	MainGameCatalogNamespace    string   `json:"MainGameCatalogNamespace"`
	MainGameCatalogItemID       string   `json:"MainGameCatalogItemId"`
	MainGameAppName             string   `json:"MainGameAppName"`
	AllowedURIEnvVars           []any    `json:"AllowedUriEnvVars"`
}

func (EpicManifest) GetVersion added in v1.0.2

func (e EpicManifest) GetVersion() string

type EpicSession added in v1.1.0

type EpicSession struct {
	AccessToken  string    `json:"access_token"`
	ExpiresAt    time.Time `json:"expires_at"`
	RefreshToken string    `json:"refresh_token"`
	RefreshAt    time.Time `json:"refresh_at"`
	AccountId    string    `json:"account_id"`
	DisplayName  string    `json:"display_name"`
}

type EpicSessionManager added in v1.1.0

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

func NewEpicSessionManager added in v1.1.0

func NewEpicSessionManager(storagePath string) (*EpicSessionManager, error)

func (*EpicSessionManager) Clear added in v1.1.0

func (m *EpicSessionManager) Clear() error

func (*EpicSessionManager) GetSession added in v1.1.0

func (m *EpicSessionManager) GetSession() *EpicSession

func (*EpicSessionManager) GetValidSession added in v1.1.0

func (m *EpicSessionManager) GetValidSession(api *EpicApi) (*EpicSession, error)

func (*EpicSessionManager) Load added in v1.1.0

func (m *EpicSessionManager) Load() error

func (*EpicSessionManager) Save added in v1.1.0

func (m *EpicSessionManager) Save(session *EpicSession) error

type InstalledDepot

type InstalledDepot struct {
	Manifest string `json:"manifest"`
	Size     string `json:"size"`
}

type LauncherType

type LauncherType string
const (
	LauncherUnknown   LauncherType = ""
	LauncherSteam     LauncherType = "steam"
	LauncherEpicGames LauncherType = "epic"
	LauncherMicrosoft LauncherType = "microsoft"
)

func DetectLauncherType

func DetectLauncherType(amongUsDir string) LauncherType

func LauncherFromString

func LauncherFromString(s string) LauncherType

func (LauncherType) String

func (lt LauncherType) String() string

type Manifest

type Manifest interface {
	// Deprecated: use GetVersion instead
	GetVersion() string
}

func GetManifest

func GetManifest(launcherType LauncherType, amongUsDir string) (Manifest, error)

type UnknownManifest

type UnknownManifest struct{}

func (UnknownManifest) GetVersion

func (m UnknownManifest) GetVersion() string

Jump to

Keyboard shortcuts

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