shared

package
v0.0.0-...-4a87c2a Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package shared provides SSH key algo utilities.

Index

Constants

This section is empty.

Variables

View Source
var CheckPortMock func(port int, proto string) bool

checkPortMock is a mock function used for testing purposes. It simulates checking the availability of a port for a given protocol. The function takes an integer port number and a string representing the protocol (e.g., "tcp", "udp") as arguments, and returns a boolean indicating whether the port is available (true) or not (false).

Functions

func CheckPort

func CheckPort(port int, proto string) bool

checkPort tests if a port is open

Types

type ParetoRelease

type ParetoRelease struct {
	Version     string    `json:"tag_name,omitempty"`
	PublishedAt time.Time `json:"published_at,omitempty"`
	Draft       bool      `json:"draft,omitempty"`
	Prerelease  bool      `json:"prerelease,omitempty"`
}

type ParetoUpdated

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

func (*ParetoUpdated) FailedMessage

func (f *ParetoUpdated) FailedMessage() string

FailedMessage returns the message to return if the check failed

func (*ParetoUpdated) IsRunnable

func (f *ParetoUpdated) IsRunnable() bool

CanRun returns whether the check can run

func (*ParetoUpdated) Name

func (f *ParetoUpdated) Name() string

Name returns the name of the check

func (*ParetoUpdated) Passed

func (f *ParetoUpdated) Passed() bool

Passed returns the status of the check

func (*ParetoUpdated) PassedMessage

func (f *ParetoUpdated) PassedMessage() string

PassedMessage returns the message to return if the check passed

func (*ParetoUpdated) RequiresRoot

func (f *ParetoUpdated) RequiresRoot() bool

RequiresRoot returns whether the check requires root access

func (*ParetoUpdated) Run

func (f *ParetoUpdated) Run() error

Run executes the check

func (*ParetoUpdated) Status

func (f *ParetoUpdated) Status() string

Status returns the status of the check

func (*ParetoUpdated) UUID

func (f *ParetoUpdated) UUID() string

UUID returns the UUID of the check

type RemoteLogin

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

func (*RemoteLogin) FailedMessage

func (f *RemoteLogin) FailedMessage() string

FailedMessage returns the message to return if the check failed

func (*RemoteLogin) IsRunnable

func (f *RemoteLogin) IsRunnable() bool

CanRun returns whether the check can run

func (*RemoteLogin) Name

func (f *RemoteLogin) Name() string

Name returns the name of the check

func (*RemoteLogin) Passed

func (f *RemoteLogin) Passed() bool

Passed returns the status of the check

func (*RemoteLogin) PassedMessage

func (f *RemoteLogin) PassedMessage() string

PassedMessage returns the message to return if the check passed

func (*RemoteLogin) RequiresRoot

func (f *RemoteLogin) RequiresRoot() bool

RequiresRoot returns whether the check requires root access

func (*RemoteLogin) Run

func (f *RemoteLogin) Run() error

Run executes the check

func (*RemoteLogin) Status

func (f *RemoteLogin) Status() string

Status returns the status of the check

func (*RemoteLogin) UUID

func (f *RemoteLogin) UUID() string

UUID returns the UUID of the check

type SSHKeys

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

func (*SSHKeys) FailedMessage

func (f *SSHKeys) FailedMessage() string

FailedMessage returns the message to return if the check failed

func (*SSHKeys) IsRunnable

func (f *SSHKeys) IsRunnable() bool

CanRun returns whether the check can run

func (*SSHKeys) Name

func (f *SSHKeys) Name() string

Name returns the name of the check

func (*SSHKeys) Passed

func (f *SSHKeys) Passed() bool

Passed returns the status of the check

func (*SSHKeys) PassedMessage

func (f *SSHKeys) PassedMessage() string

PassedMessage returns the message to return if the check passed

func (*SSHKeys) RequiresRoot

func (f *SSHKeys) RequiresRoot() bool

RequiresRoot returns whether the check requires root access

func (*SSHKeys) Run

func (f *SSHKeys) Run() error

Run executes the check

func (*SSHKeys) Status

func (f *SSHKeys) Status() string

Status returns the status of the check

func (*SSHKeys) UUID

func (f *SSHKeys) UUID() string

UUID returns the UUID of the check

type SSHKeysAlgo

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

SSHKeysAlgo runs the SSH keys algorithm.

func (*SSHKeysAlgo) FailedMessage

func (f *SSHKeysAlgo) FailedMessage() string

FailedMessage returns the message to return if the check failed

func (*SSHKeysAlgo) IsRunnable

func (f *SSHKeysAlgo) IsRunnable() bool

IsRunnable returns whether SSHKeysAlgo is runnable.

func (*SSHKeysAlgo) Name

func (f *SSHKeysAlgo) Name() string

Name returns the name of the check

func (*SSHKeysAlgo) Passed

func (f *SSHKeysAlgo) Passed() bool

Passed returns the status of the check

func (*SSHKeysAlgo) PassedMessage

func (f *SSHKeysAlgo) PassedMessage() string

PassedMessage returns the message to return if the check passed

func (*SSHKeysAlgo) RequiresRoot

func (f *SSHKeysAlgo) RequiresRoot() bool

RequiresRoot returns whether the check requires root access

func (*SSHKeysAlgo) Run

func (f *SSHKeysAlgo) Run() error

Run executes the check

func (*SSHKeysAlgo) Status

func (f *SSHKeysAlgo) Status() string

Status returns the status of the check

func (*SSHKeysAlgo) UUID

func (f *SSHKeysAlgo) UUID() string

UUID returns the UUID of the check

Jump to

Keyboard shortcuts

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