controller

package
v0.0.0-...-0810efe Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROVIDER_CUSTOM       = 0
	PROVIDER_LINODE       = 1
	PROVIDER_DIGITALOCEAN = 2
	PROVIDER_VULTR        = 3
)

Variables

This section is empty.

Functions

func GetLine

func GetLine(filename string, names chan string, readerr chan error)

func IsDirectory

func IsDirectory(path string) (bool, error)

func ReplaceCommandVars

func ReplaceCommandVars(command string, vars map[string]string) (string, error)

func SaveInFolder

func SaveInFolder(inputPath string, outputPath string)

func SendSCP

func SendSCP(source, destination, ip, username string, port int, privateKeyPath string) error

Types

type Controller

type Controller struct {
	Service provider.Provider
	Configs *models.Config
}

func NewController

func NewController(configs *models.Config) Controller

func (Controller) CreateImage

func (c Controller) CreateImage(token string, provider Provider, diskID string, label string)

func (Controller) DeleteBoxByID

func (c Controller) DeleteBoxByID(id string, token string, provider Provider)

func (Controller) DeleteFleet

func (c Controller) DeleteFleet(name string)

DeleteFleet deletes a whole fleet or a single box

func (Controller) GetBox

func (c Controller) GetBox(boxName string) (provider.Box, error)

func (Controller) GetFleet

func (c Controller) GetFleet(fleetName string) []provider.Box

func (Controller) ListBoxes

func (c Controller) ListBoxes(token string, provider Provider)

ListBoxes prints all active boxes of a provider

func (Controller) ListImages

func (c Controller) ListImages(token string, provider Provider)

ListImages prints a list of available private images of a provider

func (Controller) RemoveImages

func (c Controller) RemoveImages(token string, provider Provider, name string)

func (Controller) RunCommand

func (c Controller) RunCommand(name, command string)

func (Controller) SSH

func (c Controller) SSH(boxName, username, password string, port int, sshKey string)

func (Controller) SpawnFleet

func (c Controller) SpawnFleet(fleetName string, fleetCount int, skipWait bool, build bool)

func (Controller) Start

func (c Controller) Start(fleetName, command string, delete bool, input, outputPath1, chunksFolder string, module *models.Module)

Start runs a scan

type Provider

type Provider int

func GetProvider

func GetProvider(name string) Provider

Jump to

Keyboard shortcuts

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