Documentation
¶
Index ¶
- Constants
- func GetAmongUsDir() (string, error)
- func GetVersion(gamePath string) (string, error)
- func IsAmongUsRunning() (pid int, err error)
- func IsProcessRunning(pid int) (bool, error)
- func LaunchAmongUs(launcherType LauncherType, amongUsDir string, dllDir string, ...) error
- type AppState
- type BetaKey
- type BinaryType
- type DirectJoinInfo
- type EpicApi
- func (a *EpicApi) GetAuthUrl() string
- func (a *EpicApi) GetExchangeCode(accessToken string) (string, error)
- func (a *EpicApi) LoginWithAuthCode(code string) (*EpicSession, error)
- func (a *EpicApi) LoginWithCode(code string) (*EpicSession, error)
- func (a *EpicApi) LoginWithExchangeCode(exchangeCode string) (*EpicSession, error)
- func (a *EpicApi) RefreshSession(refreshToken string) (*EpicSession, error)
- type EpicManifest
- type EpicSession
- type EpicSessionManager
- type InstalledDepot
- type LauncherType
- type Manifest
- type UnknownManifest
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 GetVersion ¶ added in v1.1.0
func IsAmongUsRunning ¶
func IsProcessRunning ¶ added in v1.5.3
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 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 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 (*EpicApi) GetExchangeCode ¶ added in v1.1.0
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 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 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
Click to show internal directories.
Click to hide internal directories.