cmd

package
v0.3.1-beta Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	History   []string
	Switches  []Switch
	DebugInfo debug.DebugInfo
)
View Source
var (
	Verbose  bool
	ShowInfo bool

	SmarthomeURL   string
	SessionCookies []*http.Cookie

	Username string
	Password string
)

Functions

func Execute

func Execute()

func Login

func Login()

Tests if the provided credentials are valid

func PromptLogin

func PromptLogin()

The login function prompts the user to enter his password and username (if not provided via flag)

func StartRepl

func StartRepl()

Types

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Switch

type Switch struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	RoomId string `json:"roomId"`
}

Used when starting a REPL session (for autocompletion)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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