cmd

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: GPL-3.0 Imports: 37 Imported by: 0

Documentation

Overview

Package cmd /*

Package cmd /*

Package cmd /*

Package cmd /*

Package cmd /*

Package cmd /*

package cmd

Package cmd /*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToServer

func ConnectToServer(user, host string)

ConnectToServer initiates an SSH connection to the specified server

func ConnectToServerRDP

func ConnectToServerRDP(user, host, credentialKey string)

func DownloadFile

func DownloadFile(client *ssh.Client, remoteFile, localFile string, isDir bool) error

DownloadFile downloads a file or directory from the remote server to the local machine

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.

func ListToConnectServers

func ListToConnectServers(group, environment string) (string, string, string, bool, error)

ListToConnectServers retrieves and displays a list of servers for connection

Types

type FileInfo

type FileInfo struct {
	Name  string
	IsDir bool
	Path  string
}

FileInfo represents information about a file or directory on the remote server

func ListFiles

func ListFiles(client *ssh.Client, remoteDir string, showHidden bool) ([]FileInfo, error)

ListFiles retrieves a list of files and directories from the specified remote directory

type GitHubRelease

type GitHubRelease struct {
	TagName string `json:"tag_name"`
	Assets  []struct {
		Name               string `json:"name"`
		BrowserDownloadURL string `json:"browser_download_url"`
	} `json:"assets"`
}

GitHubRelease represents the structure of a GitHub release API response

func CheckForUpdates

func CheckForUpdates() (bool, *GitHubRelease, *semver.Version)

CheckForUpdates compares the current version with the latest release on GitHub and returns whether an update is available along with release information

Jump to

Keyboard shortcuts

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