Documentation
¶
Index ¶
- Constants
- func AddJsonSuffix(fn string) string
- func AttachCmdConfig(cmd *cobra.Command) *cobra.Command
- func AttachCmdCron(cmd *cobra.Command) *cobra.Command
- func AttachCmdData(cmd *cobra.Command) *cobra.Command
- func AttachCmdHelpFlags(cmd *cobra.Command) *cobra.Command
- func AttachCmdMqtt(cmd *cobra.Command) *cobra.Command
- func AttachCmdVersion(cmd *cobra.Command) *cobra.Command
- func AttachCmdX32(cmd *cobra.Command) *cobra.Command
- func AttachRootCmd(cmd *cobra.Command) *cobra.Command
- func BuildCmd(cmd *cobra.Command) string
- func Execute() error
- func ExtendedHelp()
- func LogPrint(format string, args ...interface{})
- func LogPrintDate(format string, args ...interface{})
- func MqttMessageHandler(_ mqtt.Client, message mqtt.Message)
- func PrintConfig(cmd *cobra.Command)
- func PrintExamples(cmd *cobra.Command, examples ...string) string
- func PrintFlagEnv(flag string) string
- func PrintFlags(cmd *cobra.Command)
- func ReExecute() error
- func ResetArgs(args ...string)
- func SwitchOutput(cmd *cobra.Command) error
- func TimeNow() string
- func X32MessageHandler(msg *Behringer.Message)
- type CommandArgs
- func (ca *CommandArgs) GetInitial()
- func (ca *CommandArgs) GitLs(options ...string) error
- func (ca *CommandArgs) GitSave(entities ...string) error
- func (ca *CommandArgs) GitSet() error
- func (ca *CommandArgs) GitSync(msg string, entities ...string) error
- func (ca *CommandArgs) GoogleUpdate(entities ...string) error
- func (ca *CommandArgs) IsValid() error
- func (ca *CommandArgs) MqttArgs(cmd *cobra.Command, args []string) error
- func (ca *CommandArgs) MqttCron() error
- func (ca *CommandArgs) PreRun(cmd *cobra.Command, args []string, fn ...PreRunE) error
- func (ca *CommandArgs) ProcessArgs(_ *cobra.Command, args []string) error
- func (ca *CommandArgs) PublishAux(id int)
- func (ca *CommandArgs) PublishAuxes()
- func (ca *CommandArgs) PublishBus(id int)
- func (ca *CommandArgs) PublishBusses()
- func (ca *CommandArgs) PublishChannel(id int)
- func (ca *CommandArgs) PublishChannels()
- func (ca *CommandArgs) PublishMatrices()
- func (ca *CommandArgs) PublishMatrix(id int)
- func (ca *CommandArgs) Update1(newDay bool) error
- func (ca *CommandArgs) X32Args(_ *cobra.Command, _ []string) error
- type CronStruct
- type PreRunE
Constants ¶
View Source
const DefaultFlagHelpTemplate = `` /* 132-byte string literal not displayed */
View Source
const DefaultHelpTemplate = `{{with (or .Long .Short)}}{{. | trimTrailingWhitespaces}}
{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
View Source
const DefaultUsageTemplate = `` /* 771-byte string literal not displayed */
View Source
const DefaultVersionTemplate = `
{{with .Name}}{{printf "%s " .}}{{end}}{{printf "version %s" .Version}}
`
View Source
const (
EnvPrefix = "X32"
)
View Source
const ExtendedHelpText = `` /* 1738-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func AddJsonSuffix ¶
func Execute ¶
func Execute() error
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.
func ExtendedHelp ¶
func ExtendedHelp()
func LogPrintDate ¶
func LogPrintDate(format string, args ...interface{})
func PrintConfig ¶
func PrintFlagEnv ¶
func PrintFlags ¶
func SwitchOutput ¶
func X32MessageHandler ¶
Types ¶
type CommandArgs ¶
type CommandArgs struct {
X32 *Behringer.X32
// Git *mmGit.Git
Mqtt *mmHa.Mqtt
ConfigDir string
CacheDir string
ConfigFile string
WriteConfig bool
Quiet bool
Debug bool
OutputType string
OutputFile string
// Behringer api
X32Timeout time.Duration
X32Host string
X32Username string
X32Password string
X32Port string
X32OutputType string
// HASSIO MQTT
MqttUsername string
MqttPassword string
MqttHost string
MqttPort string
// Google sheets
GoogleSheet string
GoogleSheetUpdate bool
// GitHub api
GitRepo string
GitRepoDir string
GitUsername string
GitPassword string
GitKeyFile string
GitToken string
GitDiffCmd string
Args []string
Valid bool
Error error
}
var Cmd CommandArgs
func (*CommandArgs) GetInitial ¶
func (ca *CommandArgs) GetInitial()
func (*CommandArgs) GitLs ¶
func (ca *CommandArgs) GitLs(options ...string) error
func (*CommandArgs) GitSave ¶
func (ca *CommandArgs) GitSave(entities ...string) error
func (*CommandArgs) GitSet ¶
func (ca *CommandArgs) GitSet() error
func (*CommandArgs) GoogleUpdate ¶
func (ca *CommandArgs) GoogleUpdate(entities ...string) error
func (*CommandArgs) IsValid ¶
func (ca *CommandArgs) IsValid() error
func (*CommandArgs) MqttArgs ¶
func (ca *CommandArgs) MqttArgs(cmd *cobra.Command, args []string) error
func (*CommandArgs) MqttCron ¶
func (ca *CommandArgs) MqttCron() error
func (*CommandArgs) ProcessArgs ¶
func (ca *CommandArgs) ProcessArgs(_ *cobra.Command, args []string) error
func (*CommandArgs) PublishAux ¶
func (ca *CommandArgs) PublishAux(id int)
func (*CommandArgs) PublishAuxes ¶
func (ca *CommandArgs) PublishAuxes()
func (*CommandArgs) PublishBus ¶
func (ca *CommandArgs) PublishBus(id int)
func (*CommandArgs) PublishBusses ¶
func (ca *CommandArgs) PublishBusses()
func (*CommandArgs) PublishChannel ¶
func (ca *CommandArgs) PublishChannel(id int)
func (*CommandArgs) PublishChannels ¶
func (ca *CommandArgs) PublishChannels()
func (*CommandArgs) PublishMatrices ¶
func (ca *CommandArgs) PublishMatrices()
func (*CommandArgs) PublishMatrix ¶
func (ca *CommandArgs) PublishMatrix(id int)
func (*CommandArgs) Update1 ¶
func (ca *CommandArgs) Update1(newDay bool) error
type CronStruct ¶
var Cron CronStruct
Click to show internal directories.
Click to hide internal directories.