utils

package
v0.0.0-...-42c0c98 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "v0.1"
	AUTHOR  = "BradHacker"
)

Variables

View Source
	"\033c",
	boldg(`      _    _______  _______  _______  _______       _     %s`, boldc(`  _______  _______  _        _______ `)),
	boldg(`     / )  (  ____ \(  ___  )(       )(  ____ )   /\( \    %s`, boldc(` (  ____ \(  ___  )( \      (  ____ \`)),
	boldg(`    / /   | (    \/| (   ) || () () || (    )|  / / \ \   %s`, boldc(` | (    \/| (   ) || (      | (    \/`)),
	boldg(`   / /    | |      | |   | || || || || (____)| / /   \ \  %s`, boldc(` | (_____ | |   | || |      | (__    `)),
	boldg(`  ( (     | |      | |   | || |(_)| ||  _____)/ /     ) ) %s`, boldc(` (_____  )| |   | || |      |  __)   `)),
	boldg(`   \ \    | |      | |   | || |   | || (     / /     / /  %s`, boldc(`       ) || |   | || |      | (      `)),
	boldg(`    \ \   | (____/\| (___) || )   ( || )    / /     / /   %s`, boldc(` /\____) || (___) || (____/\| (____/\`)),
	boldg(`     \_)  (_______/(_______)|/     \||/     \/     (_/    %s`, boldc(` \_______)(_______)(_______/(_______/`)),
	boldw("                                                                             AUTHOR: %s", boldr("%s", AUTHOR)),
	boldw("                                                                            VERSION: %s", boldm("%s", VERSION)),
}

Functions

func LoadProviderConfig

func LoadProviderConfig(configFilePath string, config interface{}) error

LoadProviderConfig is a helper function which loads the config file into a provider

func NewPassword

func NewPassword() string

func PrintBanner

func PrintBanner()

func UserCanAccessVM

func UserCanAccessVM(ctx context.Context, entVmObject *ent.VmObject, entUser *ent.User) (bool, error)

Types

type ConsoleType

type ConsoleType string

type PowerState

type PowerState string
const (
	PoweredOn    PowerState = "POWERED_ON"
	PoweredOff   PowerState = "POWERED_OFF"
	Rebooting    PowerState = "REBOOTING"
	ShuttingDown PowerState = "SHUTTING_DOWN"
	Suspended    PowerState = "SUSPENDED"
	Unknown      PowerState = "UNKNOWN"
)

type RebootType

type RebootType string
const (
	SoftReboot RebootType = "SOFT"
	HardReboot RebootType = "HARD"
)

Jump to

Keyboard shortcuts

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