internal

package
v0.2.63 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package internal contains utility functions and constants for Spy Cards Online.

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &Config{
	UserImageBaseURL: "https://spy-cards.lubar.me/spy-cards/user-img/",
	ArcadeAPIBaseURL: "https://spy-cards.lubar.me/spy-cards/arcade/api/",
}

DefaultConfig is the Config used by the official Spy Cards Online site.

View Source
var Version = [3]uint64{0, 2, 62}

Version is the current version of Spy Cards Online.

Functions

func Await

func Await(promise js.Value) (js.Value, error)

Await implements the JavaScript await operator.

func SaveSettings

func SaveSettings(s *Settings)

func SetActive

func SetActive(b bool)

SetActive sets the active flag for the UI, which hides some UI elements.

func WithConfig

func WithConfig(ctx context.Context, config *Config) context.Context

WithConfig attaches a Config to a context.

Types

type Config

type Config struct {
	UserImageBaseURL string `json:"user_image_base_url"`
	ArcadeAPIBaseURL string `json:"arcade_api_base_url"`
}

Config holds data about external services used by Spy Cards Online.

func GetConfig

func GetConfig(ctx context.Context) *Config

GetConfig returns the Config associated with a context, or DefaultConfig.

type Settings

type Settings struct {
	LastTermacadeName []string
}

func LoadSettings

func LoadSettings() *Settings

Jump to

Keyboard shortcuts

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