discovery

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
	ServiceWithEdu
	Issuer string `json:"issuer"`
}

func (*AuthService) MultiplayerSessionStart added in v1.50.0

func (a *AuthService) MultiplayerSessionStart(ctx context.Context, publicKey []byte, mcToken *MCToken) (signedToken string, validUntil time.Time, err error)

func (*AuthService) StartSession added in v1.45.1

func (a *AuthService) StartSession(ctx context.Context, xblToken, titleid string) (*MCToken, error)

type Discovery

type Discovery struct {
	ServiceEnvironments struct {
		Persona        map[string]ServiceWithTitle   `json:"persona"`
		Store          map[string]ServiceWithEdu     `json:"store"`
		Auth           map[string]AuthService        `json:"auth"`
		Signaling      map[string]SignalingService   `json:"signaling"`
		Filetocloud    map[string]Service            `json:"filetocloud"`
		Safety         map[string]Service            `json:"safety"`
		Mpsas          map[string]Service            `json:"mpsas"`
		Gatherings     map[string]*GatheringsService `json:"gatherings"`
		Messaging      map[string]Service            `json:"messaging"`
		Entitlements   map[string]ServiceWithTitle   `json:"entitlements"`
		Frontend       map[string]Service            `json:"frontend"`
		Multiplayer    map[string]Service            `json:"multiplayer"`
		Cdn            map[string]Service            `json:"cdn"`
		Realmsfrontend map[string]ServiceWithTitle   `json:"realmsfrontend"`
	} `json:"serviceEnvironments"`
	SupportedEnvironments map[string][]string `json:"supportedEnvironments"`
	// contains filtered or unexported fields
}

func GetDiscovery

func GetDiscovery(env string) (*Discovery, error)

func (*Discovery) AuthService

func (d *Discovery) AuthService() (AuthService, error)

func (*Discovery) CdnService

func (d *Discovery) CdnService() (Service, error)

func (*Discovery) EntitlementsService

func (d *Discovery) EntitlementsService() (ServiceWithTitle, error)

func (*Discovery) FiletocloudService

func (d *Discovery) FiletocloudService() (Service, error)

func (*Discovery) FrontendService

func (d *Discovery) FrontendService() (Service, error)

func (*Discovery) GatheringsService

func (d *Discovery) GatheringsService() (*GatheringsService, error)

func (*Discovery) MessagingService

func (d *Discovery) MessagingService() (Service, error)

func (*Discovery) MpsasService

func (d *Discovery) MpsasService() (Service, error)

func (*Discovery) MultiplayerService

func (d *Discovery) MultiplayerService() (Service, error)

func (*Discovery) PersonaService

func (d *Discovery) PersonaService() (ServiceWithTitle, error)

func (*Discovery) RealmsfrontendService

func (d *Discovery) RealmsfrontendService() (ServiceWithTitle, error)

func (*Discovery) SafetyService

func (d *Discovery) SafetyService() (Service, error)

func (*Discovery) SignalingService

func (d *Discovery) SignalingService() (SignalingService, error)

func (*Discovery) StoreService

func (d *Discovery) StoreService() (ServiceWithEdu, error)

type FeaturedServer added in v1.51.0

type FeaturedServer struct {
	Name         string
	Address      string
	ExperienceId string
}

type Gathering added in v1.45.1

type Gathering struct {
	GatheringID   string         `json:"gatheringId"`
	StartTimeUtc  time.Time      `json:"startTimeUtc"`
	EndTimeUtc    time.Time      `json:"endTimeUtc"`
	Segments      []Segment      `json:"segments"`
	Title         string         `json:"title"`
	Description   string         `json:"description"`
	IsEnabled     bool           `json:"isEnabled"`
	IsPrivate     bool           `json:"isPrivate"`
	GatheringType string         `json:"gatheringType"`
	AdditionalLoc map[string]any `json:"additionalLoc"`
	// contains filtered or unexported fields
}

func (*Gathering) Address added in v1.45.1

func (g *Gathering) Address(ctx context.Context, mcToken *MCToken) (string, error)

type GatheringsService added in v1.45.1

type GatheringsService struct {
	Service
}

func (*GatheringsService) GetFeaturedServers added in v1.51.0

func (g *GatheringsService) GetFeaturedServers(ctx context.Context, mcToken *MCToken) ([]FeaturedServer, error)

func (*GatheringsService) GetGatherings added in v1.51.0

func (g *GatheringsService) GetGatherings(ctx context.Context, mcToken *MCToken) ([]*Gathering, error)

func (*GatheringsService) JoinExperience added in v1.50.0

func (g *GatheringsService) JoinExperience(ctx context.Context, mcToken *MCToken, id uuid.UUID) (string, error)

type JsonResponseError added in v1.45.1

type JsonResponseError struct {
	Status string
	Data   map[string]any
}

func (JsonResponseError) Error added in v1.45.1

func (e JsonResponseError) Error() string

type MCToken added in v1.45.1

type MCToken struct {
	AuthorizationHeader string    `json:"authorizationHeader"`
	ValidUntil          time.Time `json:"validUntil"`
	Treatments          []string  `json:"treatments"`
	Configurations      struct {
		Minecraft struct {
			ID         string         `json:"id"`
			Parameters map[string]any `json:"parameters"`
		} `json:"minecraft"`
	} `json:"configurations"`
}

type Segment added in v1.45.1

type Segment struct {
	SegmentType  string    `json:"segmentType"`
	StartTimeUtc time.Time `json:"startTimeUtc"`
	EndTimeUtc   time.Time `json:"endTimeUtc"`
	UI           struct {
		CaptionText              string `json:"captionText"`
		CaptionForegroundColor   string `json:"captionForegroundColor"`
		CaptionBackgroundColor   string `json:"captionBackgroundColor"`
		StartScreenButtonText    string `json:"startScreenButtonText"`
		BadgeImage               string `json:"badgeImage"`
		CaptionIncludesCountdown bool   `json:"captionIncludesCountdown"`
		ActionButtonText         string `json:"actionButtonText"`
		InfoButtonText           string `json:"infoButtonText"`
		HeaderText               string `json:"headerText"`
		TitleText                string `json:"titleText"`
		BodyText                 string `json:"bodyText"`
		EventImage               string `json:"eventImage"`
		BodyImage                string `json:"bodyImage"`
		ActionButtonURL          string `json:"actionButtonUrl"`
		InfoButtonURL            string `json:"infoButtonUrl"`
	} `json:"ui"`
}

type Service

type Service struct {
	ServiceURI string `json:"serviceUri"`
}

type ServiceWithEdu

type ServiceWithEdu struct {
	ServiceWithTitle
	EduPlayFabTitleID string `json:"eduPlayFabTitleId"`
}

type ServiceWithTitle

type ServiceWithTitle struct {
	Service
	PlayfabTitleID string `json:"playfabTitleId"`
}

type SignalingService

type SignalingService struct {
	Service
	StunURI string `json:"stunUri"`
	TurnURI string `json:"turnUri"`
}

Jump to

Keyboard shortcuts

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