connectiq

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgreementURL = "https://developer.garmin.com/downloads/connect-iq/sdks/agreement.html"
View Source
var ConfigPath = filepath.Join(RootPath, "sdkmanager-config.ini")
View Source
var CurrentSDKPath = filepath.Join(RootPath, "current-sdk.cfg")
View Source
var DevicesPath = filepath.Join(RootPath, "Devices")
View Source
var FontsPath = filepath.Join(RootPath, "Fonts")
View Source
var RootPath, _ = rootGarminFolder()
View Source
var SDKsPath = filepath.Join(RootPath, "Sdks")

Functions

func LoadConfigVals added in v0.6.0

func LoadConfigVals(keys ...string) []string

func SDKVersionFromFilename added in v0.4.0

func SDKVersionFromFilename(name string) string

func SetContextToken

func SetContextToken(ctx context.Context, token Token) context.Context

func StoreConfigKeyVal added in v0.6.0

func StoreConfigKeyVal(key, val string) error

func StoreConfigKeyVals added in v0.6.0

func StoreConfigKeyVals(values ...ConfigEntity) error

Types

type ConfigEntity added in v0.6.0

type ConfigEntity struct {
	Key   string
	Value string
}

type DeviceGroup

type DeviceGroup string

DeviceGroup express the type of device

const (
	DeviceGroupWatchesWearables DeviceGroup = "Watches/Wearables"
	DeviceGroupEdge             DeviceGroup = "Edge"
	DeviceGroupOutdoorHandhelds DeviceGroup = "Outdoor Handhelds"
)

type SimulatorFile added in v0.6.0

type SimulatorFile struct {
	Fonts []struct {
		FontSet string `json:"fontSet"`
		Fonts   []struct {
			Filename string `json:"filename"`
			Name     string `json:"name"`
		} `json:"fonts"`
	} `json:"fonts"`
}

SimulatorFile represent useful information in the simulator.json file located in the root/Devices/[Device]/simulator.json

type Token

type Token struct {
	AccessToken           string    `json:"accessToken"`
	ExpiresAt             time.Time `json:"expiresAt"`
	RefreshToken          string    `json:"refreshToken"`
	RefreshTokenExpiresAt time.Time `json:"refreshTokenExpiresIn"`
}

Token contains information about the token used for requests to the Garmin API

func GetContextToken

func GetContextToken(ctx context.Context) (Token, bool)

Jump to

Keyboard shortcuts

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