config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultURLs = URLs{
	JDocs:    "jdocs-dev.api.anki.com:443",
	Token:    "token-dev.api.anki.com:443",
	Chipper:  "chipper-dev.api.anki.com:443",
	Check:    "conncheck.global.anki-dev-services.com/ok",
	LogFiles: "s3://anki-device-logs-dev/victor",
	AppKey:   "",
}

DefaultURLs provides a default, hard-coded configuration that can be used if an expected configuration is not found on disk

Env represents the URLs associated with the most recent successful call to SetGlobal. Before this, it has the same values as DefaultURLs.

Functions

func SetGlobal

func SetGlobal(filename string) error

SetGlobal sets the public Env variable to the URLs in the given filename. If the given filename is blank, a known hardcoded location for server_config.json on the robot is used.

Types

type URLs

type URLs struct {
	JDocs          string  `json:"jdocs"`
	Token          string  `json:"tms"`
	Chipper        string  `json:"chipper"`
	Check          string  `json:"check"`
	LogFiles       string  `json:"logfiles"`
	AppKey         string  `json:"appkey"`
	OffboardVision *string `json:"offboard_vision,omitempty"`
}

URLs represents a set of URLs where Anki's cloud services can be reached

func LoadURLs

func LoadURLs(filename string) (*URLs, error)

LoadURLs attempts to load a URL config from the given filename. If the given filename is blank, a known hardcoded location for server_config.json on the robot is used.

Jump to

Keyboard shortcuts

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