Documentation
¶
Index ¶
- Constants
- func DefaultToolboxDir() (string, error)
- func DeleteKey(key registry.Key, path string) error
- func OpenOrCreateKey(key registry.Key, path string, access uint32) (registry.Key, error)
- func ReadSubCommands() ([]string, bool, error)
- func SetItem(tool *Tool, admin bool) error
- func SetMenu(dir string, items []string, top bool) error
- func SetMenuItem(path, display, command, subCommands string, top bool) error
- func SortTools(tools []*Tool, sortType int)
- type Availability
- type Tool
- type ToolBox
Constants ¶
View Source
const ( SortNames = 0 SortOrder = 1 )
View Source
const ( AppName = "Toolbox" // registry keys DirectoryBackgroundShell = `Directory\Background\shell\` DirectoryShell = `Directory\shell\` CommandStoreShell = `SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\` // EntryLimit max limit for cascade menu EntryLimit = 16 )
Variables ¶
This section is empty.
Functions ¶
func DefaultToolboxDir ¶ added in v3.1.0
DefaultToolboxDir returns default toolbox installation directory.
func OpenOrCreateKey ¶ added in v3.1.0
OpenOrCreateKey open a registry key, create it if it doesn't exist.
func ReadSubCommands ¶
ReadSubCommands returns current menu items
func SetMenuItem ¶ added in v3.1.0
SetMenuItem add menu to registry
Types ¶
type Availability ¶
type Availability int
func (Availability) String ¶
func (a Availability) String() string
type Tool ¶
type Tool struct {
Id string `json:"toolId"`
Tag string `json:"tag"`
Name string `json:"displayName"`
Version string `json:"displayVersion"`
BuildNumber string `json:"buildNumber"`
Channel string `json:"channelId"`
Location string `json:"installLocation"`
// exe
Command string `json:"launchCommand"`
// script file
Script string
Availability Availability
// contains filtered or unexported fields
}
Tool represents an IDE in ToolBox.
func FindLatestTool ¶
FindLatestTool find the latest tool in a list of tools.
type ToolBox ¶
type ToolBox struct {
Version string `json:"AppVersion"`
Tools []*Tool `json:"tools"`
ShellPath string
}
ToolBox is a struct to hold the toolbox state.
func GetAllTools ¶
GetAllTools return local tool list description
func GetLatestTools ¶
GetLatestTools returns latest tool list
func GetToolBoxState ¶
GetToolBoxState returns content of ToolBox/state.json
Click to show internal directories.
Click to hide internal directories.