software

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// INFO : Informational messages printed with green.
	INFO = "INFO"
	// DEBUG : Debugging messages printed with teal.
	DEBUG = "DEBUG"
	// WARN : Warning messages printed with yellow.
	WARN = "WARN"
	// ERROR : Error messages printed with red.
	ERROR = "ERROR"
	// CRITICAL : Critical messages printed with magenta.
	CRITICAL = "CRITICAL"
	// NONE : Print normal messages with none of color and date, prefix.
	NONE = "NONE"
)

Variables

This section is empty.

Functions

func CheckAnsibleVersion added in v0.2.2

func CheckAnsibleVersion() error

func DeletePlaybook

func DeletePlaybook(id string) error

func GetServicePID added in v0.2.2

func GetServicePID(client *ssh.Client, serviceName, password string) (string, error)

func MakeMigrationListRes added in v0.2.2

func MakeMigrationListRes(sourceSoftwareModel *softwaremodel.SourceSoftwareModel) (*softwaremodel.TargetSoftwareModel, error)

func MigrateRepositoryConfiguration added in v0.3.1

func MigrateRepositoryConfiguration(sourceClient *ssh.Client, targetClient *ssh.Client, uuid string, migrationLogger *Logger) error

MigrateRepositoryConfiguration migrates repository configuration from source to target

func MigrateSoftware added in v0.2.2

func MigrateSoftware(execution *Execution)

Types

type ConfigFile added in v0.2.2

type ConfigFile struct {
	Path   string `json:"path"`
	Status string `json:"status,omitempty"` // Modified, Custom, or empty for default
}

type Connection added in v0.2.2

type Connection struct {
	Protocol       string
	LocalAddress   string
	ForeignAddress string
	PID            int
	Command        string
	ProgramName    string
}

func GetListeningConnections added in v0.2.2

func GetListeningConnections(client *ssh.Client, password string) ([]Connection, error)

type DirectoryRef added in v0.2.3

type DirectoryRef struct {
	Path  string
	Perms string
	UID   string
	GID   string
}

type Execution added in v0.4.0

type Execution struct {
	ExecutionID            string
	MigrationList          *softwaremodel.MigrationList
	MigrationStatusList    []model.SoftwareMigrationStatus
	Target                 model.Target
	SourceConnectionInfoID string
	SourceClient           *ssh.Client
	TargetClient           *ssh.Client
}

func PrepareSoftwareMigration added in v0.3.3

func PrepareSoftwareMigration(executionID string, targetServers []softwaremodel.MigrationServer, nsId string, infraId string) ([]Execution, []model.TargetMapping, error)

type Logger added in v0.2.2

type Logger struct {
	// contains filtered or unexported fields
}

func (*Logger) Close added in v0.2.2

func (l *Logger) Close()

Close : Close log file

func (*Logger) Fatal added in v0.2.2

func (l *Logger) Fatal(logLevel string, exitCode int, msg ...interface{})

Fatal : Print the log with a colored level then exit with return value 1

func (*Logger) Fatalf added in v0.2.2

func (l *Logger) Fatalf(logLevel string, exitCode int, format string, a ...any)

Fatalf : Print the formatted log with a colored level then exit with return value 1

func (*Logger) Fatalln added in v0.2.2

func (l *Logger) Fatalln(logLevel string, exitCode int, msg ...interface{})

Fatalln : Print the log with a colored level with new line then exit with return value 1

func (*Logger) Init added in v0.2.2

func (l *Logger) Init(logPath, logFileName string) (*Logger, error)

Init : Initialize log file

func (*Logger) Panic added in v0.2.2

func (l *Logger) Panic(logLevel string, msg ...interface{})

Panic : Print the log with a colored level then call panic()

func (*Logger) Panicf added in v0.2.2

func (l *Logger) Panicf(logLevel string, format string, a ...any)

Panicf : Print the formatted log with a colored level then call panic()

func (*Logger) Panicln added in v0.2.2

func (l *Logger) Panicln(logLevel string, msg ...interface{})

Panicln : Print the log with a colored level with new line then call panic()

func (*Logger) Print added in v0.2.2

func (l *Logger) Print(logLevel string, msg ...interface{})

Print : Print the log with a colored level without new line

func (*Logger) Printf added in v0.2.2

func (l *Logger) Printf(logLevel string, format string, a ...any)

Printf : Print the formatted log with a colored level

func (*Logger) Println added in v0.2.2

func (l *Logger) Println(logLevel string, msg ...interface{})

Println : Print the log with a colored level with new line

type ServiceInfo added in v0.2.2

type ServiceInfo struct {
	Name    string `json:"name"`
	Active  bool   `json:"active"`
	Enabled bool   `json:"enabled"`
	State   string `json:"state,omitempty"`
}

type SystemType added in v0.2.2

type SystemType int
const (
	Unknown SystemType = iota
	Debian
	RHEL
)

Jump to

Keyboard shortcuts

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