egs_integration

package
v0.5.21 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: AGPL-3.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const (
	GrantTypeRefreshToken      GrantType = "refresh_token"
	GrantTypeExchangeToken               = "exchange_code"
	GrantTypeAuthorizationCode           = "authorization_code"
	GrantTypeClientCredentials           = "client_credentials"
)
View Source
const (
	StorageUncompressed uint8 = 0x00
	StorageCompressed   uint8 = 0x01
	StorageEncrypted    uint8 = 0x02
)
View Source
const ManifestExt = ".manifest"
View Source
const (
	UserAgent = "UELauncher/15.18.2-29993784+++Portal+Release-Live Windows/10.0.19041.1.256.64bit"
)

Variables

Functions

func AccountApiOauthKillUrl

func AccountApiOauthKillUrl(token string) *url.URL

func AccountApiOauthTokenUrl

func AccountApiOauthTokenUrl() *url.URL

func AccountApiOauthVerifyUrl

func AccountApiOauthVerifyUrl() *url.URL

func ApiRedirectUrl

func ApiRedirectUrl() *url.URL

func CatalogItemUrl

func CatalogItemUrl(namespace, itemId string, includeMainGameDetails, includeDlcDetails bool, country, locale string) *url.URL

func DeleteToken

func DeleteToken(token string, client *http.Client) error

func EntitlementsUrl

func EntitlementsUrl(accountId string, start, count int) *url.URL

func GetApiRedirect

func GetApiRedirect(client *http.Client) (io.ReadCloser, error)

func GetCatalogItem

func GetCatalogItem(namespace, itemId string, token string, client *http.Client) (io.ReadCloser, error)

func GetGameAssets

func GetGameAssets(platform string, token string, client *http.Client) (io.ReadCloser, error)

func GetGameManifest

func GetGameManifest(namespace, catalogItemId, appName string, platform string, token string, client *http.Client) (io.ReadCloser, error)

func GetLauncherManifests

func GetLauncherManifests(platform string, token string, client *http.Client) (io.ReadCloser, error)

func GetLibraryItems

func GetLibraryItems(cursor string, token string, client *http.Client) (io.ReadCloser, error)

func GetUserEntitlements

func GetUserEntitlements(accountId string, token string, start, count int, client *http.Client) (io.ReadCloser, error)

func GetVerifyToken

func GetVerifyToken(token string, client *http.Client) (io.ReadCloser, error)

func HostUrl

func HostUrl() *url.URL

func LauncherGameAssetsUrl

func LauncherGameAssetsUrl(platform string, label string) *url.URL

func LauncherGameManifestUrl

func LauncherGameManifestUrl(namespace, catalogItemId, appName string, platform, label string) *url.URL

func LauncherManifestsUrl

func LauncherManifestsUrl(platform, label string) *url.URL

func LibraryItemsUrl

func LibraryItemsUrl(includeMetadata bool, cursor string) *url.URL

func Platform added in v0.4.42

func Platform(operatingSystem vangogh_integration.OperatingSystem) string

func PostToken

func PostToken(token string, grantType GrantType, client *http.Client) (io.ReadCloser, error)

func ReadChunk added in v0.4.28

func ReadChunk(r io.ReadSeeker) (io.Reader, error)

Types

type CatalogItem

type CatalogItem struct {
	Id          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	KeyImages   []struct {
		Type         string    `json:"type"`
		Url          string    `json:"url"`
		Md5          string    `json:"md5"`
		Width        int       `json:"width"`
		Height       int       `json:"height"`
		Size         int       `json:"size"`
		UploadedDate time.Time `json:"uploadedDate"`
	} `json:"keyImages"`
	Categories []struct {
		Path string `json:"path"`
	} `json:"categories"`
	Namespace        string               `json:"namespace"`
	Status           string               `json:"status"`
	CreationDate     time.Time            `json:"creationDate"`
	LastModifiedDate time.Time            `json:"lastModifiedDate"`
	CustomAttributes map[string]TypeValue `json:"customAttributes"`
	EntitlementName  string               `json:"entitlementName"`
	EntitlementType  string               `json:"entitlementType"`
	ItemType         string               `json:"itemType"`
	ReleaseInfo      []struct {
		Id       string   `json:"id"`
		AppId    string   `json:"appId"`
		Platform []string `json:"platform"`
	} `json:"releaseInfo"`
	Developer    string   `json:"developer"`
	DeveloperId  string   `json:"developerId"`
	EulaIds      []string `json:"eulaIds"`
	EndOfSupport bool     `json:"endOfSupport"`
	//MainGameItem        CatalogItem   `json:"mainGameItem"`
	MainGameItemList    []CatalogItem `json:"mainGameItemList"`
	DlcItemList         []CatalogItem `json:"dlcItemList"`
	EsrbGameRatingValue string        `json:"esrbGameRatingValue"`
	AgeGatings          struct {
	} `json:"ageGatings"`
	Unsearchable bool `json:"unsearchable"`
}

type Chunk

type Chunk struct {
	Uuid       uuid.UUID
	Hash       uint64
	ShaHash    []byte
	Group      uint8
	WindowSize uint32
	FileSize   uint64
}

func (*Chunk) Path added in v0.4.27

func (chk *Chunk) Path(featureLevel uint32) string

type ChunkHeader added in v0.4.28

type ChunkHeader struct {
	Magic          uint32
	Version        uint32
	Offset         uint32
	SizeCompressed uint32
	Uuid           uuid.UUID
	RollingHash    uint64
	Storage        uint8
	ShaHash        []byte
	HashType       uint32
}

type ChunkList

type ChunkList struct {
	Offset  uint32
	Version uint8
	Count   uint32
	Chunks  []*Chunk
	Lookup  map[uuid.UUID]uint32
}

type ChunkPart

type ChunkPart struct {
	DataSize   uint32
	ParentUuid uuid.UUID
	Offset     uint32
	Size       uint32
	Chunk      *Chunk
}

type CustomFields

type CustomFields struct {
	Offset  uint32
	Version uint8
	Count   uint32
	Fields  map[string]string
}

type Entitlement

type Entitlement struct {
	Id               string    `json:"id"`
	EntitlementName  string    `json:"entitlementName"`
	Namespace        string    `json:"namespace"`
	CatalogItemId    string    `json:"catalogItemId"`
	Store            string    `json:"store"`
	AccountId        string    `json:"accountId"`
	IdentityId       string    `json:"identityId"`
	EntitlementType  string    `json:"entitlementType"`
	GrantDate        time.Time `json:"grantDate"`
	Consumable       bool      `json:"consumable"`
	Status           string    `json:"status"`
	Active           bool      `json:"active"`
	UseCount         int       `json:"useCount"`
	OriginalUseCount int       `json:"originalUseCount"`
	PlatformType     string    `json:"platformType"`
	Created          time.Time `json:"created"`
	Updated          time.Time `json:"updated"`
	GroupEntitlement bool      `json:"groupEntitlement"`
	Country          string    `json:"country"`
	ReadFromCache    bool      `json:"readFromCache"`
}

type File

type File struct {
	Filename      string
	SymlinkTarget string
	ShaHash       []byte
	Flags         uint8
	InstallTags   []string
	Size          uint64
	Parts         []ChunkPart
}

type FileList

type FileList struct {
	Offset  uint32
	Version uint8
	Count   uint32
	List    []File
}

type GameAsset

type GameAsset struct {
	AppName       string `json:"appName"`
	LabelName     string `json:"labelName"`
	BuildVersion  string `json:"buildVersion"`
	CatalogItemId string `json:"catalogItemId"`
	Namespace     string `json:"namespace"`
	Metadata      struct {
		InstallationPoolId string `json:"installationPoolId,omitempty"`
		UpdateType         string `json:"update_type,omitempty"`
	} `json:"metadata"`
	SidecarRvn int    `json:"sidecarRvn,omitempty"`
	AssetId    string `json:"assetId"`
}

type GameManifest

type GameManifest struct {
	Elements []struct {
		AppName      string `json:"appName"`
		LabelName    string `json:"labelName"`
		BuildVersion string `json:"buildVersion"`
		Hash         string `json:"hash"`
		UseSignedUrl bool   `json:"useSignedUrl"`
		Metadata     struct {
			InstallationPoolId string `json:"installationPoolId"`
			UpdateType         string `json:"update_type"`
		} `json:"metadata"`
		Manifests   []ManifestUri `json:"manifests"`
		IsPreloaded bool          `json:"isPreloaded"`
	} `json:"elements"`
}

func (*GameManifest) Urls added in v0.4.44

func (gm *GameManifest) Urls() ([]*url.URL, error)

type GetApiRedirectResponse

type GetApiRedirectResponse struct {
	Warning           string `json:"warning"`
	RedirectUrl       string `json:"redirectUrl"`
	AuthorizationCode string `json:"authorizationCode"`
	ExchangeCode      any    `json:"exchangeCode"`
	Sid               any    `json:"sid"`
}

type GetVerifyTokenResponse

type GetVerifyTokenResponse struct {
	Token          string    `json:"token"`
	SessionId      string    `json:"session_id"`
	TokenType      string    `json:"token_type"`
	ClientId       string    `json:"client_id"`
	InternalClient bool      `json:"internal_client"`
	ClientService  string    `json:"client_service"`
	AccountId      string    `json:"account_id"`
	ExpiresIn      int       `json:"expires_in"`
	ExpiresAt      time.Time `json:"expires_at"`
	AuthMethod     string    `json:"auth_method"`
	DisplayName    string    `json:"display_name"`
	App            string    `json:"app"`
	InAppId        string    `json:"in_app_id"`
	Scope          any       `json:"scope"`
	Acr            string    `json:"acr"`
	AuthTime       time.Time `json:"auth_time"`
}

type GrantType added in v0.4.41

type GrantType string
type Header struct {
	Offset           uint32
	SizeUncompressed uint32
	SizeCompressed   uint32
	ShaHash          []byte
	Storage          uint8
	FeatureLevel     uint32
}

type JsonManifest added in v0.4.61

type JsonManifest struct {
	ManifestFileVersion string   `json:"ManifestFileVersion"`
	IsFileData          bool     `json:"bIsFileData"`
	AppId               string   `json:"AppID"`
	AppName             string   `json:"AppNameString"`
	BuildVersion        string   `json:"BuildVersionString"`
	LaunchExe           string   `json:"LaunchExeString"`
	LaunchCommand       string   `json:"LaunchCommand"`
	PrereqIds           []string `json:"PrereqIds"`
	PrereqName          string   `json:"PrereqName"`
	PrereqPath          string   `json:"PrereqPath"`
	PrereqArgs          string   `json:"PrereqArgs"`
	FileManifestList    []struct {
		Filename         string `json:"Filename"`
		FileHash         string `json:"FileHash"`
		IsReadOnly       bool   `json:"bIsReadOnly"`
		IsCompressed     bool   `json:"bIsCompressed"`
		IsUnixExecutable bool   `json:"bIsUnixExecutable"`
		FileChunkParts   []struct {
			Guid   string `json:"Guid"`
			Offset string `json:"Offset"`
			Size   string `json:"Size"`
		} `json:"FileChunkParts"`
	} `json:"FileManifestList"`
	ChunkHashList     map[string]string `json:"ChunkHashList"`
	ChunkShaList      map[string]string `json:"ChunkShaList"`
	DataGroupList     map[string]string `json:"DataGroupList"`
	ChunkFilesizeList map[string]string `json:"ChunkFilesizeList"`
	CustomFields      map[string]string `json:"CustomFields"`
}

func (*JsonManifest) Manifest added in v0.4.62

func (jm *JsonManifest) Manifest() (*Manifest, error)

type LauncherManifests

type LauncherManifests struct {
	Elements []struct {
		AppName      string `json:"appName"`
		LabelName    string `json:"labelName"`
		BuildVersion string `json:"buildVersion"`
		Hash         string `json:"hash"`
		UseSignedUrl bool   `json:"useSignedUrl"`
		Manifests    []struct {
			Uri         string `json:"uri"`
			QueryParams []struct {
				Name  string `json:"name"`
				Value string `json:"value"`
			} `json:"queryParams"`
		} `json:"manifests"`
		IsPreloaded bool `json:"isPreloaded"`
	} `json:"elements"`
}

type LibraryItems

type LibraryItems struct {
	ResponseMetadata struct {
		NextCursor string `json:"nextCursor"`
		StateToken string `json:"stateToken"`
	} `json:"responseMetadata"`
	Records []struct {
		Namespace       string    `json:"namespace"`
		CatalogItemId   string    `json:"catalogItemId"`
		AppName         string    `json:"appName"`
		Country         string    `json:"country"`
		Platform        []string  `json:"platform"`
		ProductId       string    `json:"productId"`
		SandboxName     string    `json:"sandboxName"`
		SandboxType     string    `json:"sandboxType"`
		RecordType      string    `json:"recordType"`
		AcquisitionDate time.Time `json:"acquisitionDate"`
		Dependencies    []any     `json:"dependencies"`
		AvailableDate   time.Time `json:"availableDate"`
	} `json:"records"`
}

type Manifest

type Manifest struct {
	Header       *Header
	Metadata     *Metadata
	ChunkList    *ChunkList
	FileList     *FileList
	CustomFields *CustomFields
}

func ReadManifest

func ReadManifest(r io.ReadSeeker) (*Manifest, error)

type ManifestUri added in v0.4.27

type ManifestUri struct {
	Uri         string `json:"uri"`
	QueryParams []struct {
		Name  string `json:"name"`
		Value string `json:"value"`
	} `json:"queryParams"`
}

func (*ManifestUri) Url added in v0.4.27

func (mu *ManifestUri) Url() (*url.URL, error)

type Metadata

type Metadata struct {
	Offset        uint32
	Version       uint8
	FeatureLevel  uint32
	IsFileData    bool
	AppId         uint32
	AppName       string
	BuildVersion  string
	LaunchExe     string
	LaunchCommand string
	PrereqIds     []string
	PrereqName    string
	PrereqPath    string
	PrereqArgs    string
	BuildId       string
}

type PostTokenResponse

type PostTokenResponse struct {
	AccessToken      string    `json:"access_token"`
	ExpiresIn        int       `json:"expires_in"`
	ExpiresAt        time.Time `json:"expires_at"`
	TokenType        string    `json:"token_type"`
	RefreshToken     string    `json:"refresh_token"`
	RefreshExpires   int       `json:"refresh_expires"`
	RefreshExpiresAt time.Time `json:"refresh_expires_at"`
	AccountId        string    `json:"account_id"`
	ClientId         string    `json:"client_id"`
	InternalClient   bool      `json:"internal_client"`
	ClientService    string    `json:"client_service"`
	Scope            any       `json:"scope"`
	DisplayName      string    `json:"displayName"`
	App              string    `json:"app"`
	InAppId          string    `json:"in_app_id"`
	Acr              string    `json:"acr"`
	AuthTime         time.Time `json:"auth_time"`
}

type TypeValue added in v0.4.57

type TypeValue struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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