Documentation
¶
Index ¶
- Constants
- Variables
- func CheckMark(status bool) string
- func CreateAndRunProgram(progOps *vc.ProgramOptions, roomOps *vc.RoomOptions) tea.Msg
- func CreateAndRunRoomAction(progOps *vc.ProgramOptions, roomOps *vc.RoomOptions) tea.Cmd
- func CreateErrorAction() tea.Msg
- func CreateNewProgram(options vc.ProgramOptions) tea.Msg
- func CreateProgramAction(options *vc.ProgramOptions) tea.Cmd
- func CreateRoom(options vc.RoomOptions) tea.Cmd
- func CreateRoomAction(options *vc.RoomOptions) tea.Cmd
- func CreateToken(description string, readonly bool) tea.Cmd
- func DefaultStyles() table.Styles
- func DeleteProgram(id int) tea.Cmd
- func DeleteRoom(id string) tea.Cmd
- func DeleteToken(token string) tea.Cmd
- func DeviceInfoCommand() tea.Msg
- func DisplayLogo(width int) string
- func EditProgram(options vc.ProgramOptions) tea.Msg
- func EditRoom(options vc.RoomOptions) tea.Cmd
- func EditToken(description string, readonly bool, token string) tea.Cmd
- func GetIcons() string
- func GetOnlineIcon(status string) string
- func GetReadonlyIcon(status vc.TokenStatus) string
- func GetStatus(status string) string
- func HideBusyMessage() tea.Msg
- func InitFlags()
- func IpTableQuery(id string) tea.Cmd
- func NewProgramsHelpModel() programsHelpModel
- func ProgramsQuery() tea.Msg
- func QueryTokens() tea.Msg
- func RenderErrorBox(header string, err error) string
- func RenderMessageBox(width int) lipgloss.Style
- func RoomDebug(id string, enable bool) tea.Msg
- func RoomRestart(id string) tea.Msg
- func RoomStart(id string) tea.Msg
- func RoomStop(id string) tea.Msg
- func RoomsQuery() tea.Msg
- func Run()
- func ShowBusyMessage(message string) tea.Cmd
- func SumbitDeleteProgramForm(m *DeleteProgramForm) tea.Cmd
- func SumbitDeleteTokenForm(m *DeleteTokenForm) tea.Cmd
- func SumbitNewProgramForm(m *NewProgramForm) tea.Cmd
- type ActionsModel
- type BannerModel
- type BannerState
- type DeleteProgramForm
- type DeleteRoomForm
- type DeleteTokenForm
- type DeviceTableModel
- type HelpModel
- type IpTableModel
- type MainModel
- type NewProgramForm
- type NewRoomForm
- type NewTokenForm
- type ProgramsModel
- type RoomsHelpModel
- type RoomsTableModel
- type SystemsHelpModel
- type TokenModel
- type TokensHelpModel
- type VirtualControlServiceModel
Constants ¶
View Source
const ( PrimaryColor string = "#3F51B5" PrimaryLight string = "#C5CAE9" PrimaryDark string = "#001F5F" AccentColor string = "#00796B" ErrorColor string = "#8A0B29" )
View Source
const (
Logo string = `` /* 278-byte string literal not displayed */
)
Variables ¶
View Source
var ( // The hostname passed into the application as a command line argument flag Hostname string // The API token generated from the VC4 webpage, this is required to control an external appliance Token string // Program file path passed into the application used to create a new program entry ProgramFile string // The programs and room name used to whip up a new room with a simply command line arg ProgramName string // The room id passed into the application. providing a room id creates additional options that can be leveraged to process room actions RoomID string // Actions include GET PUT DEL and can be used with a combination of the Room ID and program file flags Action string // When the -o flag is provided the application will override the provided room. OverrideFile bool )
View Source
var BaseStyle = lipgloss.NewStyle(). BorderStyle(lipgloss.NormalBorder()). BorderForeground(lipgloss.Color("240"))
View Source
var GreyedOutText = lipgloss.NewStyle(). Foreground(lipgloss.Color("#555555")). Bold(false)
View Source
var HighlightedText = lipgloss.NewStyle(). Foreground(lipgloss.Color("#FF75B7")). Bold(true)
View Source
var Keys = keyMap{ Up: key.NewBinding( key.WithKeys("up", "k"), key.WithHelp("↑/k", "move up"), ), Down: key.NewBinding( key.WithKeys("down", "j"), key.WithHelp("↓/j", "move down"), ), Left: key.NewBinding( key.WithKeys("left", "h"), key.WithHelp("←/h", "move left"), ), Right: key.NewBinding( key.WithKeys("right", "l"), key.WithHelp("→/l", "move right"), ), Help: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "toggle help"), ), GoHelp: key.NewBinding( key.WithKeys("?"), key.WithHelp("?", "Show help"), ), Quit: key.NewBinding( key.WithKeys("q", "ctrl+q", "esc", "ctrl+c"), key.WithHelp("ctrl+q", "return"), ), Programs: key.NewBinding( key.WithKeys("ctrl+p"), key.WithHelp("ctrl+p", "programs"), ), Rooms: key.NewBinding( key.WithKeys("ctrl+r"), key.WithHelp("ctrl+r", "rooms"), ), Devices: key.NewBinding( key.WithKeys("ctrl+d"), key.WithHelp("ctrl+d", "devices"), ), Auth: key.NewBinding( key.WithKeys("ctrl+a"), key.WithHelp("ctrl+a", "auth"), ), Info: key.NewBinding( key.WithKeys("ctrl+i"), key.WithHelp("ctrl+i", "info"), ), }
Functions ¶
func CreateAndRunProgram ¶ added in v0.0.5
func CreateAndRunProgram(progOps *vc.ProgramOptions, roomOps *vc.RoomOptions) tea.Msg
func CreateAndRunRoomAction ¶ added in v0.0.5
func CreateAndRunRoomAction(progOps *vc.ProgramOptions, roomOps *vc.RoomOptions) tea.Cmd
func CreateErrorAction ¶ added in v0.0.5
func CreateNewProgram ¶
func CreateNewProgram(options vc.ProgramOptions) tea.Msg
func CreateProgramAction ¶ added in v0.0.4
func CreateProgramAction(options *vc.ProgramOptions) tea.Cmd
func CreateRoom ¶ added in v0.0.3
func CreateRoom(options vc.RoomOptions) tea.Cmd
func CreateRoomAction ¶ added in v0.0.4
func CreateRoomAction(options *vc.RoomOptions) tea.Cmd
func DefaultStyles ¶
func DeleteProgram ¶
func DeleteRoom ¶ added in v0.0.3
func DeleteToken ¶ added in v0.1.0
func DeviceInfoCommand ¶
func DisplayLogo ¶
func EditProgram ¶ added in v0.0.3
func EditProgram(options vc.ProgramOptions) tea.Msg
func GetOnlineIcon ¶ added in v0.0.8
func GetReadonlyIcon ¶ added in v0.1.0
func GetReadonlyIcon(status vc.TokenStatus) string
func HideBusyMessage ¶
func IpTableQuery ¶ added in v0.0.8
func NewProgramsHelpModel ¶
func NewProgramsHelpModel() programsHelpModel
func ProgramsQuery ¶
func QueryTokens ¶ added in v0.1.0
func RenderErrorBox ¶
func RenderMessageBox ¶
func RoomRestart ¶
func RoomsQuery ¶ added in v0.0.3
func ShowBusyMessage ¶
func SumbitDeleteProgramForm ¶
func SumbitDeleteProgramForm(m *DeleteProgramForm) tea.Cmd
func SumbitDeleteTokenForm ¶ added in v0.1.0
func SumbitDeleteTokenForm(m *DeleteTokenForm) tea.Cmd
func SumbitNewProgramForm ¶
func SumbitNewProgramForm(m *NewProgramForm) tea.Cmd
Types ¶
type ActionsModel ¶ added in v0.0.4
type ActionsModel struct {
// contains filtered or unexported fields
}
func InitialActionModel ¶ added in v0.0.4
func InitialActionModel(message string, action initialAction) *ActionsModel
func (ActionsModel) Init ¶ added in v0.0.4
func (m ActionsModel) Init() tea.Cmd
func (ActionsModel) View ¶ added in v0.0.4
func (m ActionsModel) View() string
type BannerModel ¶ added in v0.0.6
type BannerModel struct {
// contains filtered or unexported fields
}
func NewBanner ¶ added in v0.0.6
func NewBanner(message string, state BannerState, width int) *BannerModel
func (BannerModel) Init ¶ added in v0.0.6
func (m BannerModel) Init() tea.Cmd
func (BannerModel) View ¶ added in v0.0.6
func (m BannerModel) View() string
type BannerState ¶ added in v0.0.6
type BannerState int
const ( BannerNormalState BannerState = iota BannerErrorState BannerState = 1 )
type DeleteProgramForm ¶
type DeleteProgramForm struct {
// contains filtered or unexported fields
}
func DeleteProgramFormModel ¶
func DeleteProgramFormModel(program *vc.ProgramEntry) DeleteProgramForm
func (DeleteProgramForm) Init ¶
func (m DeleteProgramForm) Init() tea.Cmd
func (DeleteProgramForm) View ¶
func (m DeleteProgramForm) View() string
type DeleteRoomForm ¶ added in v0.0.3
type DeleteRoomForm struct {
// contains filtered or unexported fields
}
func DeleteRoomFormModel ¶ added in v0.0.3
func DeleteRoomFormModel(room *vc.Room) DeleteRoomForm
func (DeleteRoomForm) Init ¶ added in v0.0.3
func (m DeleteRoomForm) Init() tea.Cmd
func (DeleteRoomForm) View ¶ added in v0.0.3
func (m DeleteRoomForm) View() string
type DeleteTokenForm ¶ added in v0.1.0
type DeleteTokenForm struct {
// contains filtered or unexported fields
}
func DeleteTokenFormModel ¶ added in v0.1.0
func DeleteTokenFormModel(token *vc.ApiToken) DeleteTokenForm
func (DeleteTokenForm) Init ¶ added in v0.1.0
func (m DeleteTokenForm) Init() tea.Cmd
func (DeleteTokenForm) View ¶ added in v0.1.0
func (m DeleteTokenForm) View() string
type DeviceTableModel ¶
type DeviceTableModel struct { Table table.Model Help HelpModel // contains filtered or unexported fields }
func HomeDeviceInfo ¶
func HomeDeviceInfo(info vc.DeviceInfo, width int) DeviceTableModel
func NewDeviceErrorTable ¶
func NewDeviceErrorTable(msg vc.VirtualControlError, width int) DeviceTableModel
func NewDeviceInfo ¶
func NewDeviceInfo(width, height int) DeviceTableModel
func NewDeviceTable ¶
func NewDeviceTable(info vc.DeviceInfo, width int) DeviceTableModel
func (DeviceTableModel) Init ¶
func (m DeviceTableModel) Init() tea.Cmd
func (DeviceTableModel) View ¶
func (m DeviceTableModel) View() string
type HelpModel ¶
type HelpModel struct {
// contains filtered or unexported fields
}
func NewHelpModel ¶
func NewHelpModel() HelpModel
type IpTableModel ¶ added in v0.0.8
type IpTableModel struct {
// contains filtered or unexported fields
}
func InitialIpTableModel ¶ added in v0.0.8
func InitialIpTableModel(width, height int, roomid string) *IpTableModel
func (IpTableModel) Init ¶ added in v0.0.8
func (m IpTableModel) Init() tea.Cmd
func (IpTableModel) View ¶ added in v0.0.8
func (m IpTableModel) View() string
type MainModel ¶
type MainModel struct {
// contains filtered or unexported fields
}
func InitialModel ¶
func InitialModel() MainModel
func ReturnToHomeModel ¶
func ReturnToHomeModel(state appState) MainModel
type NewProgramForm ¶
type NewProgramForm struct {
// contains filtered or unexported fields
}
func EditProgramFormModel ¶ added in v0.0.3
func EditProgramFormModel(programEntry *vc.ProgramEntry) NewProgramForm
func NewProgramFormModel ¶
func NewProgramFormModel() NewProgramForm
func (NewProgramForm) Init ¶
func (m NewProgramForm) Init() tea.Cmd
func (NewProgramForm) View ¶
func (m NewProgramForm) View() string
type NewRoomForm ¶ added in v0.0.3
type NewRoomForm struct {
// contains filtered or unexported fields
}
func EditRoomFormModel ¶ added in v0.0.3
func EditRoomFormModel(room *vc.Room) NewRoomForm
func NewRoomFormModel ¶ added in v0.0.3
func NewRoomFormModel() NewRoomForm
func NewRoomFormModelWithPrograms ¶ added in v0.0.3
func NewRoomFormModelWithPrograms(programs vc.Programs) NewRoomForm
func NewRoomFromProgramFormModel ¶ added in v0.0.3
func NewRoomFromProgramFormModel(programEntry *vc.ProgramEntry) NewRoomForm
func (NewRoomForm) Init ¶ added in v0.0.3
func (m NewRoomForm) Init() tea.Cmd
func (NewRoomForm) View ¶ added in v0.0.3
func (m NewRoomForm) View() string
type NewTokenForm ¶ added in v0.1.0
type NewTokenForm struct {
// contains filtered or unexported fields
}
func EditTokenFormModel ¶ added in v0.1.0
func EditTokenFormModel(token *vc.ApiToken) NewTokenForm
func NewTokenFormModel ¶ added in v0.1.0
func NewTokenFormModel() NewTokenForm
func (NewTokenForm) Init ¶ added in v0.1.0
func (m NewTokenForm) Init() tea.Cmd
func (NewTokenForm) View ¶ added in v0.1.0
func (m NewTokenForm) View() string
type ProgramsModel ¶
func BusyProgramsModel ¶
func BusyProgramsModel(b busy, Programs vc.Programs) *ProgramsModel
func InitialProgramsModel ¶
func InitialProgramsModel(width, height int) *ProgramsModel
func NewProgramsErrorTable ¶
func NewProgramsErrorTable(msg vc.VirtualControlError) ProgramsModel
func ReturnToPrograms ¶
func ReturnToPrograms() ProgramsModel
func (ProgramsModel) Init ¶
func (m ProgramsModel) Init() tea.Cmd
func (ProgramsModel) View ¶
func (m ProgramsModel) View() string
type RoomsHelpModel ¶
type RoomsHelpModel struct {
// contains filtered or unexported fields
}
func NewRoomsHelpModel ¶
func NewRoomsHelpModel() RoomsHelpModel
func (RoomsHelpModel) Init ¶
func (m RoomsHelpModel) Init() tea.Cmd
func (RoomsHelpModel) View ¶
func (m RoomsHelpModel) View() string
type RoomsTableModel ¶
type RoomsTableModel struct {
// contains filtered or unexported fields
}
func BusyRoomsModel ¶
func BusyRoomsModel(b busy, rooms vc.Rooms) *RoomsTableModel
func InitialRoomsModel ¶
func InitialRoomsModel(width, height int) *RoomsTableModel
func NewRoomsErrorTable ¶
func NewRoomsErrorTable(msg vc.VirtualControlError) *RoomsTableModel
func ReturnRoomsModel ¶ added in v0.0.3
func ReturnRoomsModel() *RoomsTableModel
func (RoomsTableModel) Init ¶
func (m RoomsTableModel) Init() tea.Cmd
func (RoomsTableModel) View ¶
func (m RoomsTableModel) View() string
type SystemsHelpModel ¶ added in v0.0.5
type SystemsHelpModel struct {
// contains filtered or unexported fields
}
func NewSystensHelpModel ¶ added in v0.0.5
func NewSystensHelpModel() SystemsHelpModel
func (SystemsHelpModel) Init ¶ added in v0.0.5
func (m SystemsHelpModel) Init() tea.Cmd
func (SystemsHelpModel) View ¶ added in v0.0.5
func (m SystemsHelpModel) View() string
type TokenModel ¶ added in v0.1.0
type TokenModel struct {
// contains filtered or unexported fields
}
func InitialTokensModel ¶ added in v0.1.0
func InitialTokensModel(width, height int) *TokenModel
func (TokenModel) Init ¶ added in v0.1.0
func (m TokenModel) Init() tea.Cmd
func (TokenModel) View ¶ added in v0.1.0
func (m TokenModel) View() string
type TokensHelpModel ¶ added in v0.1.0
type TokensHelpModel struct {
// contains filtered or unexported fields
}
func NewtokensHelpModel ¶ added in v0.1.0
func NewtokensHelpModel() TokensHelpModel
func (TokensHelpModel) Init ¶ added in v0.1.0
func (m TokensHelpModel) Init() tea.Cmd
func (TokensHelpModel) View ¶ added in v0.1.0
func (m TokensHelpModel) View() string
type VirtualControlServiceModel ¶ added in v0.0.5
type VirtualControlServiceModel struct {
// contains filtered or unexported fields
}
func InitialSystemModel ¶ added in v0.0.5
func InitialSystemModel() VirtualControlServiceModel
func (VirtualControlServiceModel) Init ¶ added in v0.0.5
func (m VirtualControlServiceModel) Init() tea.Cmd
func (VirtualControlServiceModel) View ¶ added in v0.0.5
func (m VirtualControlServiceModel) View() string
Source Files
¶
- actions_model.go
- banner.go
- busy.go
- common.go
- device_info.go
- flags.go
- global.go
- help.go
- iptable.go
- logo.go
- progams_help.go
- program_delete.go
- program_dialog.go
- programs.go
- room_delete.go
- room_dialog.go
- rooms.go
- rooms_help.go
- root.go
- service_exec.go
- service_help.go
- styles.go
- token_delete.go
- token_dialog.go
- tokens.go
- tokens_help.go
- validation.go
Click to show internal directories.
Click to hide internal directories.