playfab

package
v1.41.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 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 Client

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

func NewClient

func NewClient(discovery *discovery.Discovery, src oauth2.TokenSource) *Client

func (*Client) LoggedIn

func (c *Client) LoggedIn() bool

func (*Client) Login

func (c *Client) Login(ctx context.Context) error

func (*Client) MCToken

func (c *Client) MCToken() (*MCToken, error)

type Entity

type Entity struct {
	ID         string `json:"Id"`
	Type       string
	TypeString string
}

type EntityToken

type EntityToken struct {
	EntityToken     string    `json:"EntityToken"`
	TokenExpiration time.Time `json:"TokenExpiration"`
	Entity          *Entity   `json:"Entity"`
}

type MCToken

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 PlayfabError

type PlayfabError struct {
	StatusCode   int `json:"-"`
	Status       string
	ErrorCode    int    `json:"errorCode"`
	ErrorMessage string `json:"errorMessage"`
}

func (*PlayfabError) Error

func (p *PlayfabError) Error() string

type Response

type Response[T any] struct {
	Code   int    `json:"code"`
	Status string `json:"string"`
	Data   *T     `json:"data"`
}

Jump to

Keyboard shortcuts

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