cfg

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionContext

type ExecutionContext struct {
	Cfg                *GlobalCfg
	Spinner            *spinner.Spinner
	Stderr, Stdout     io.Writer
	SwitchBotAPIClient *switchbot.Switchbot
	Version            semver.Version
}

func NewExecutionContext

func NewExecutionContext() *ExecutionContext

func (*ExecutionContext) Prepare

func (ec *ExecutionContext) Prepare(v, token, secret string, gc *GlobalCfg) error

func (*ExecutionContext) Spin

func (ec *ExecutionContext) Spin(message string)

type GlobalCfg

type GlobalCfg struct {
	DeviceListSize int    `json:"deviceListSize"`
	Token          string `json:"token"`
	Secret         string `json:"secret"`
}

func NewGlobalConfig

func NewGlobalConfig() GlobalCfg

func (*GlobalCfg) Prepare

func (g *GlobalCfg) Prepare(path string) error

Jump to

Keyboard shortcuts

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