cmd

package
v0.0.0-...-7f86312 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type DeviceConfig

type DeviceConfig struct {
	URL string `mapstructure:"url"`
	Key string `mapstructure:"key"`
}

DeviceConfig represents config for a registered device.

type FullConfig

type FullConfig struct {
	DefaultName string                  `mapstructure:"default"`
	DeviceMap   map[string]DeviceConfig `mapstructure:"device"`
}

FullConfig represents structure of .barkme config file.

func (FullConfig) GetDefault

func (c FullConfig) GetDefault() (*bark.Device, error)

GetDefault returns the default bark.Device client.

func (FullConfig) GetDevice

func (c FullConfig) GetDevice(name string) (*bark.Device, error)

GetDevice returns the specific bark.Device client by device name.

Jump to

Keyboard shortcuts

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