streamdeck-remote/remote.go

33 lines
547 B
Go

package main
import (
"log"
"meow.tf/streamdeck/sdk"
"os"
)
const (
sshAction = "tf.meow.remote.ssh"
websiteAction = "tf.meow.remote.website"
openAction = "tf.meow.remote.open"
)
func main() {
f, err := os.Create("log.txt")
if err == nil {
log.SetOutput(f)
}
sdk.RegisterAction(sshAction, sshActionHandler)
sdk.RegisterAction(websiteAction, serverActionHandler(websiteActionHandler))
sdk.RegisterAction(openAction, serverActionHandler(openActionHandler))
err = sdk.Open()
if err != nil {
log.Fatalln(err)
}
sdk.Wait()
}