franchise

package
v0.0.0-...-78f5a99 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationType

type ApplicationType string
const (
	ApplicationTypeMinecraftPE ApplicationType = "MinecraftPE"
)

type AuthorizationEnvironment

type AuthorizationEnvironment struct {
	ServiceURI        string `json:"serviceUri,omitempty"`
	Issuer            string `json:"issuer,omitempty"`
	PlayFabTitleID    string `json:"playfabTitleId,omitempty"`
	EduPlayFabTitleID string `json:"eduPlayFabTitleId,omitempty"`
}

type Capability

type Capability string
const (
	CapabilityRayTracing Capability = "Raytracing"
)

type Configuration

type Configuration struct {
	ID         string            `json:"id,omitempty"`
	Parameters map[string]string `json:"parameters,omitempty"`
}

type DeviceConfig

type DeviceConfig struct {
	ApplicationType    ApplicationType `json:"applicationType,omitempty"`
	Capabilities       []Capability    `json:"capabilities,omitempty"`
	GameVersion        string          `json:"gameVersion,omitempty"`
	ID                 uuid.UUID       `json:"id,omitempty"`
	Memory             string          `json:"memory,omitempty"`
	Platform           Platform        `json:"platform,omitempty"`
	PlayFabTitleID     string          `json:"playFabTitleId,omitempty"`
	StorePlatform      StorePlatform   `json:"storePlatform,omitempty"`
	TreatmentOverrides []string        `json:"treatmentOverrides,omitempty"`
	Type               DeviceType      `json:"type,omitempty"`
}

type DeviceType

type DeviceType string
const (
	DeviceTypeWindows10 DeviceType = "Windows10"
)

type Discovery

type Discovery struct {
	ServiceEnvironments   map[string]map[EnvironmentType]json.RawMessage `json:"serviceEnvironments,omitempty"`
	SupportedEnvironments map[string][]EnvironmentType                   `json:"supportedEnvironments,omitempty"`
}

func Discover

func Discover(build string) (*Discovery, error)

func (*Discovery) Environment

func (d *Discovery) Environment(name string, typ EnvironmentType) (json.RawMessage, bool)

type EnvironmentType

type EnvironmentType string
const (
	EnvironmentTypeProduction  EnvironmentType = "prod"
	EnvironmentTypeDevelopment EnvironmentType = "dev"
	EnvironmentTypeStage       EnvironmentType = "stage"
)

type Platform

type Platform string
const (
	PlatformWindows10 Platform = "Windows10"
)

type StorePlatform

type StorePlatform string
const (
	StorePlatformUWPStore StorePlatform = "uwp.store"
)

type Token

type Token struct {
	AuthorizationHeader string                   `json:"authorizationHeader,omitempty"`
	ValidUntil          time.Time                `json:"validUntil,omitempty"`
	Treatments          []string                 `json:"treatments,omitempty"`
	Configurations      map[string]Configuration `json:"configurations,omitempty"`
	TreatmentContext    string                   `json:"treatmentContext,omitempty"`
}

func (*Token) SetAuthHeader

func (t *Token) SetAuthHeader(req *http.Request)

type TokenConfig

type TokenConfig struct {
	Device *DeviceConfig `json:"device,omitempty"`
	User   *UserConfig   `json:"user,omitempty"`

	Environment AuthorizationEnvironment `json:"-"`
}

func (*TokenConfig) Token

func (c *TokenConfig) Token() (*Token, error)

type TokenConfigSource

type TokenConfigSource interface {
	TokenConfig() (*TokenConfig, error)
}

type TokenType

type TokenType string
const (
	TokenTypePlayFab TokenType = "PlayFab"
)

type UserConfig

type UserConfig struct {
	Language     language.Tag `json:"language,omitempty"`
	LanguageCode language.Tag `json:"languageCode,omitempty"`
	RegionCode   string       `json:"regionCode,omitempty"`
	Token        string       `json:"token,omitempty"`
	TokenType    TokenType    `json:"tokenType,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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