gatherers

package
v0.0.0-...-ba26d65 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AscsErsClusterGathererName = "ascsers_cluster"
	Ensa1                      = "ensa1"
	Ensa2                      = "ensa2"
	EnsaUnknown                = "unknown"
)
View Source
const (
	CibAdminGathererName  = "cibadmin"
	CibAdminGathererCache = "cibadmin"
)
View Source
const (
	CorosyncConfGathererName = "corosync.conf"
	CorosyncConfPath         = "/etc/corosync/corosync.conf"
)
View Source
const (
	FstabGathererName = "fstab"
	FstabFilePath     = "/etc/fstab"
)
View Source
const (
	GroupsGathererName = "groups"
	GroupsFilePath     = "/etc/group"
)
View Source
const (
	HostsFileGathererName = "hosts"
	HostsFilePath         = "/etc/hosts"
)
View Source
const (
	OSReleaseGathererName = "os-release"
	OSReleaseFilePath     = "/etc/os-release"
)
View Source
const (
	PasswdGathererName = "passwd"
	PasswdFilePath     = "/etc/passwd"
)
View Source
const (
	SapControlGathererName  = "sapcontrol"
	SapControlGathererCache = "sapcontrol"
)
View Source
const (
	CorosyncCmapCtlGathererName = "corosync-cmapctl"
)
View Source
const (
	DirScanGathererName = "dir_scan"
)
View Source
const (
	DispWorkGathererName = "disp+work"
)
View Source
const (
	MountInfoGathererName = "mount_info"
)
View Source
const (
	PackageVersionGathererName = "package_version"
)
View Source
const (
	ProductsGathererName = "products"
)
View Source
const (
	SBDConfigGathererName = "sbd_config"
)
View Source
const (
	SBDDumpGathererName = "sbd_dump"
)
View Source
const (
	SapHostCtrlGathererName = "saphostctrl"
)
View Source
const (
	SapInstanceHostnameResolverGathererName = "sapinstance_hostname_resolver"
)
View Source
const (
	SapProfilesGathererName = "sap_profiles"
)
View Source
const (
	SaptuneGathererName = "saptune"
)
View Source
const (
	SysctlGathererName = "sysctl"
)
View Source
const (
	SystemDGathererName = "systemd"
)
View Source
const (
	VerifyPasswordGathererName = "verify_password"
)

Variables

View Source
var (
	AscsErsClusterDecodingError = entities.FactGatheringError{
		Type:    "ascsers-cluster-decoding-error",
		Message: "error decoding cibadmin output",
	}

	AscsErsClusterCibError = entities.FactGatheringError{
		Type:    "ascsers-cluster-cib-error",
		Message: "error parsing cibadmin output",
	}
)

nolint:gochecknoglobals

View Source
var (
	CibAdminCommandError = entities.FactGatheringError{
		Type:    "cibadmin-command-error",
		Message: "error running cibadmin command",
	}

	CibAdminDecodingError = entities.FactGatheringError{
		Type:    "cibadmin-decoding-error",
		Message: "error decoding cibadmin output",
	}
)

nolint:gochecknoglobals

View Source
var (
	CorosyncCmapCtlValueNotFound = entities.FactGatheringError{
		Type:    "corosync-cmapctl-value-not-found",
		Message: "requested value not found in corosync-cmapctl output",
	}

	CorosyncCmapCtlCommandError = entities.FactGatheringError{
		Type:    "corosync-cmapctl-command-error",
		Message: "error while executing corosynccmap-ctl",
	}

	CorosyncCmapCtlMissingArgument = entities.FactGatheringError{
		Type:    "corosync-cmapctl-missing-argument",
		Message: "missing required argument",
	}
)

nolint:gochecknoglobals

View Source
var (
	CorosyncConfFileError = entities.FactGatheringError{
		Type:    "corosync-conf-file-error",
		Message: "error reading corosync.conf file",
	}

	CorosyncConfDecodingError = entities.FactGatheringError{
		Type:    "corosync-conf-decoding-error",
		Message: "error decoding corosync.conf file",
	}
)

nolint:gochecknoglobals

View Source
var (
	DirScanMissingArgumentError = entities.FactGatheringError{
		Type:    "dir-scan-missing-argument",
		Message: "missing required argument",
	}

	DirScanOpenError = entities.FactGatheringError{
		Type:    "dir-scan-open-error",
		Message: "could not open the provided directory",
	}

	DirScanScanningError = entities.FactGatheringError{
		Type:    "dir-scan-scanning-error",
		Message: "error during directory scanning",
	}
)

nolint:gochecknoglobals

View Source
var (
	DispWorkFileSystemError = entities.FactGatheringError{
		Type:    "dispwork-file-system-error",
		Message: "error reading the file system",
	}

	DispWorkCommandError = entities.FactGatheringError{
		Type:    "dispwork-command-error",
		Message: "error running disp+work command",
	}

	DispWorkDecodingError = entities.FactGatheringError{
		Type:    "dispwork-decoding-error",
		Message: "error decoding disp+work output",
	}
)

nolint:gochecknoglobals

View Source
var (
	FstabFileError = entities.FactGatheringError{
		Type:    "fstab-file-error",
		Message: "error reading /etc/fstab file",
	}

	FstabFileDecodingError = entities.FactGatheringError{
		Type:    "fstab-decoding-error",
		Message: "error decoding fstab file",
	}
)

nolint:gochecknoglobals

View Source
var (
	GroupsFileError = entities.FactGatheringError{
		Type:    "groups-file-error",
		Message: "error reading /etc/group file",
	}

	GroupsFileDecodingError = entities.FactGatheringError{
		Type:    "groups-decoding-error",
		Message: "error deconding groups file",
	}
)

nolint:gochecknoglobals

View Source
var (
	HostsFileError = entities.FactGatheringError{
		Type:    "hosts-file-error",
		Message: "error reading /etc/hosts file",
	}

	HostsFileDecodingError = entities.FactGatheringError{
		Type:    "hosts-file-decoding-error",
		Message: "error decoding /etc/hosts file",
	}

	HostsFileEntryNotFoundError = entities.FactGatheringError{
		Type:    "hosts-file-value-not-found",
		Message: "requested field value not found in /etc/hosts file",
	}
)

nolint:gochecknoglobals

View Source
var (
	MountInfoParsingError = entities.FactGatheringError{
		Type:    "mount-info-parsing-error",
		Message: "error parsing mount information",
	}

	MountInfoMissingArgumentError = entities.FactGatheringError{
		Type:    "mount-info-missing-argument",
		Message: "missing required argument",
	}

	MountInfoDecodingError = entities.FactGatheringError{
		Type:    "mount-info-decoding-error",
		Message: "error decoding mount information",
	}
)

nolint:gochecknoglobals

View Source
var (
	OSReleaseFileError = entities.FactGatheringError{
		Type:    "os-release-file-error",
		Message: "error reading /etc/os-release file",
	}

	OSReleaseDecodingError = entities.FactGatheringError{
		Type:    "os-release-decoding-error",
		Message: "error decoding file content",
	}
)

nolint:gochecknoglobals

View Source
var (
	PackageVersionRpmCommandError = entities.FactGatheringError{
		Type:    "package-version-rpm-cmd-error",
		Message: "error while fetching package version",
	}

	PackageVersionZypperCommandError = entities.FactGatheringError{
		Type:    "package-version-zypper-cmd-error",
		Message: "error while executing zypper",
	}

	PackageVersionMissingArgument = entities.FactGatheringError{
		Type:    "package-version-missing-argument",
		Message: "missing required argument",
	}
)

nolint:gochecknoglobals

View Source
var (
	PasswdFileError = entities.FactGatheringError{
		Type:    "passwd-file-error",
		Message: "error reading /etc/passwd file",
	}

	PasswdDecodingError = entities.FactGatheringError{
		Type:    "passwd-decoding-error",
		Message: "error decoding file content",
	}
)

nolint:gochecknoglobals

View Source
var (
	ProductsFolderMissingError = entities.FactGatheringError{
		Type:    "products-folder-missing-error",
		Message: "products folder does not exist",
	}

	ProductsFolderReadingError = entities.FactGatheringError{
		Type:    "products-folder-reading-error",
		Message: "error reading the products folder",
	}

	ProductsFileReadingError = entities.FactGatheringError{
		Type:    "products-file-reading-error",
		Message: "error reading the products file",
	}
)

nolint:gochecknoglobals

View Source
var (
	SapcontrolFileSystemError = entities.FactGatheringError{
		Type:    "sapcontrol-file-system-error",
		Message: "error in the SAP file system",
	}

	SapcontrolArgumentUnsupported = entities.FactGatheringError{
		Type:    "sapcontrol-unsupported-argument",
		Message: "the requested argument is not currently supported",
	}

	SapcontrolMissingArgument = entities.FactGatheringError{
		Type:    "sapcontrol-missing-argument",
		Message: "missing required argument",
	}

	SapcontrolWebmethodError = entities.FactGatheringError{
		Type:    "sapcontrol-webmethod-error",
		Message: "error executing sapcontrol webmethod",
	}

	SapcontrolDecodingError = entities.FactGatheringError{
		Type:    "sapcontrol-decoding-error",
		Message: "error decoding sapcontrol output",
	}
)

nolint:gochecknoglobals

View Source
var (
	SapHostCtrlCommandError = entities.FactGatheringError{
		Type:    "saphostctrl-cmd-error",
		Message: "error executing saphostctrl command",
	}

	SapHostCtrlUnsupportedFunction = entities.FactGatheringError{
		Type:    "saphostctrl-webmethod-error",
		Message: "requested webmethod not supported",
	}

	SapHostCtrlParseError = entities.FactGatheringError{
		Type:    "saphostctrl-parse-error",
		Message: "error while parsing saphostctrl output",
	}

	SapHostCtrlMissingArgument = entities.FactGatheringError{
		Type:    "saphostctrl-missing-argument",
		Message: "missing required argument",
	}
)

nolint:gochecknoglobals

View Source
var (
	SapInstanceHostnameResolverDetailsError = entities.FactGatheringError{
		Type:    "sapinstance-hostname-resolver-details-error",
		Message: "error gathering details",
	}
	SapInstanceHostnameResolverGathererDecodingError = entities.FactGatheringError{
		Type:    "sapinstance-hostname-resolver-decoding-error",
		Message: "error decoding output to FactValue",
	}
)

nolint:gochecknoglobals

View Source
var (
	SapProfilesFileSystemError = entities.FactGatheringError{
		Type:    "sap-profiles-file-system-error",
		Message: "error reading the sap profiles file system",
	}

	SapProfilesDecodingError = entities.FactGatheringError{
		Type:    "sap-profiles-decoding-error",
		Message: "error deconding sap profiles content",
	}
)

nolint:gochecknoglobals

View Source
var (
	SapServicesParsingError = entities.FactGatheringError{
		Type:    "sap-services-parsing-error",
		Message: "error parsing the sapservices file",
	}
	SapServicesFileError = entities.FactGatheringError{
		Type:    "sap-services-reading-error",
		Message: "error reading the sapservices file",
	}
	SapstartSIDExtractionPattern = regexp.MustCompile(`(?s)pf=[^[:space:]]+/(.*?)_.*_.*`)
	SystemdSIDExtractionPattern  = regexp.MustCompile(`(?s)start SAP(.*?)_.*`)
)

nolint:gochecknoglobals

View Source
var (
	SaptuneNotInstalled = entities.FactGatheringError{
		Type:    "saptune-not-installed",
		Message: "saptune is not installed",
	}

	SaptuneVersionUnsupported = entities.FactGatheringError{
		Type:    "saptune-version-not-supported",
		Message: "currently installed version of saptune is not supported",
	}

	SaptuneArgumentUnsupported = entities.FactGatheringError{
		Type:    "saptune-unsupported-argument",
		Message: "the requested argument is not currently supported",
	}

	SaptuneMissingArgument = entities.FactGatheringError{
		Type:    "saptune-missing-argument",
		Message: "missing required argument",
	}

	SaptuneCommandError = entities.FactGatheringError{
		Type:    "saptune-cmd-error",
		Message: "error executing saptune command",
	}
)

nolint:gochecknoglobals

View Source
var (
	SBDConfigFileError = entities.FactGatheringError{
		Type:    "sbd-config-file-error",
		Message: "error reading sbd configuration file",
	}

	SBDConfigValueNotFoundError = entities.FactGatheringError{
		Type:    "sbd-config-value-not-found",
		Message: "requested field value not found",
	}

	SBDConfigMissingArgument = entities.FactGatheringError{
		Type:    "sbd-config-missing-argument",
		Message: "missing required argument",
	}
)

nolint:gochecknoglobals

View Source
var (
	SBDDevicesLoadingError = entities.FactGatheringError{
		Type:    "sbd-devices-loading-error",
		Message: "error loading the configured sbd devices",
	}

	SBDDumpCommandError = entities.FactGatheringError{
		Type:    "sbd-dump-command-error",
		Message: "error while executing sbd dump",
	}
)

nolint:gochecknoglobals

View Source
var (
	SysctlValueNotFound = entities.FactGatheringError{
		Type:    "sysctl-value-not-found",
		Message: "requested value not found in sysctl output",
	}

	SysctlCommandError = entities.FactGatheringError{
		Type:    "sysctl-cmd-error",
		Message: "error executing sysctl command",
	}

	SysctlMissingArgument = entities.FactGatheringError{
		Type:    "sysctl-missing-argument",
		Message: "missing required argument",
	}
)

nolint:gochecknoglobals

View Source
var (
	SystemDNotInitializedError = entities.FactGatheringError{
		Type:    "systemd-dbus-not-initialized",
		Message: "systemd gatherer not initialized properly",
	}

	SystemDListUnitsError = entities.FactGatheringError{
		Type:    "systemd-list-units-error",
		Message: "error getting unit states",
	}

	SystemDMissingArgument = entities.FactGatheringError{
		Type:    "systemd-missing-argument",
		Message: "missing required argument",
	}
)

nolint:gochecknoglobals

View Source
var (
	SystemDUnitError = entities.FactGatheringError{
		Type:    "systemd-unit-error",
		Message: "error getting systemd unit properties",
	}

	SystemDDecodingError = entities.FactGatheringError{
		Type:    "systemd-decoding-error",
		Message: "error decoding systemd unit status",
	}
)

nolint:gochecknoglobals

View Source
var (
	VerifyPasswordInvalidUsername = entities.FactGatheringError{
		Type:    "verify-password-invalid-username",
		Message: "requested user is not whitelisted for password check",
	}

	VerifyPasswordShadowError = entities.FactGatheringError{
		Type:    "verify-password-shadow-error",
		Message: "error getting shadow output",
	}

	VerifyPasswordPasswordBlocked = entities.FactGatheringError{
		Type:    "verify-password-password-blocked",
		Message: "password authentication blocked for user",
	}

	VerifyPasswordPasswordNotSet = entities.FactGatheringError{
		Type:    "verify-password-password-not-set",
		Message: "password not set for user",
	}

	VerifyPasswordCryptError = entities.FactGatheringError{
		Type:    "verify-password-crypt-error",
		Message: "error while verifying the password for user",
	}
)

nolint:gochecknoglobals

View Source
var ImplementationError = entities.FactGatheringError{
	Type:    "implemetation-error",
	Message: "implementation error",
}

nolint:gochecknoglobals

Functions

func CleanupPlugins

func CleanupPlugins()

Types

type AscsErsClusterGatherer

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

func NewDefaultAscsErsClusterGatherer

func NewDefaultAscsErsClusterGatherer() *AscsErsClusterGatherer

func (*AscsErsClusterGatherer) Gather

func (g *AscsErsClusterGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

func (*AscsErsClusterGatherer) SetCache

func (g *AscsErsClusterGatherer) SetCache(cache *factscache.FactsCache)

type AscsErsSidEntry

type AscsErsSidEntry struct {
	EnsaVersion string               `json:"ensa_version"`
	Instances   []AscsErsSidInstance `json:"instances"`
}

type AscsErsSidInstance

type AscsErsSidInstance struct {
	ResourceGroup    string `json:"resource_group"`
	ResourceInstance string `json:"resource_instance"`
	Name             string `json:"name"`
	InstanceNumber   string `json:"instance_number"`
	VirtualHostname  string `json:"virtual_hostname"`
	FilesystemBased  bool   `json:"filesystem_based"`
	Local            bool   `json:"local"`
}

type CibAdminGatherer

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

func NewCibAdminGatherer

func NewCibAdminGatherer(executor utils.CommandExecutor, cache *factscache.FactsCache) *CibAdminGatherer

func NewDefaultCibAdminGatherer

func NewDefaultCibAdminGatherer() *CibAdminGatherer

func (*CibAdminGatherer) Gather

func (g *CibAdminGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

func (*CibAdminGatherer) SetCache

func (g *CibAdminGatherer) SetCache(cache *factscache.FactsCache)

type CorosyncCmapctlGatherer

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

func NewCorosyncCmapctlGatherer

func NewCorosyncCmapctlGatherer(executor utils.CommandExecutor) *CorosyncCmapctlGatherer

func NewDefaultCorosyncCmapctlGatherer

func NewDefaultCorosyncCmapctlGatherer() *CorosyncCmapctlGatherer

func (*CorosyncCmapctlGatherer) Gather

func (s *CorosyncCmapctlGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type CorosyncConfGatherer

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

func NewCorosyncConfGatherer

func NewCorosyncConfGatherer(configFile string) *CorosyncConfGatherer

func NewDefaultCorosyncConfGatherer

func NewDefaultCorosyncConfGatherer() *CorosyncConfGatherer

func (*CorosyncConfGatherer) Gather

func (s *CorosyncConfGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type CredentialsFetcher

type CredentialsFetcher struct{}

func (*CredentialsFetcher) GetGroupByID

func (f *CredentialsFetcher) GetGroupByID(groupID string) (string, error)

func (*CredentialsFetcher) GetUsernameByID

func (f *CredentialsFetcher) GetUsernameByID(userID string) (string, error)

type DbusConnector

type DbusConnector interface {
	GetUnitPropertiesContext(ctx context.Context, unit string) (map[string]interface{}, error)
	ListUnitsByNamesContext(ctx context.Context, units []string) ([]dbus.UnitStatus, error)
}

type DirScanDetails

type DirScanDetails struct {
	Name  string `json:"name"`
	Owner string `json:"owner"`
	Group string `json:"group"`
}

type DirScanGatherer

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

func NewDefaultDirScanGatherer

func NewDefaultDirScanGatherer() *DirScanGatherer

func NewDirScanGatherer

func NewDirScanGatherer(fs afero.Fs, userSearcher UserSearcher, groupSearcher GroupSearcher) *DirScanGatherer

func (*DirScanGatherer) Gather

func (d *DirScanGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type DirScanResult

type DirScanResult []DirScanDetails

type DispWorkGatherer

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

func NewDefaultDispWorkGatherer

func NewDefaultDispWorkGatherer() *DispWorkGatherer

func NewDispWorkGatherer

func NewDispWorkGatherer(fs afero.Fs, executor utils.CommandExecutor) *DispWorkGatherer

func (*DispWorkGatherer) Gather

func (g *DispWorkGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type FactGatherer

type FactGatherer interface {
	Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)
}

type FactGathererWithCache

type FactGathererWithCache interface {
	SetCache(cache *factscache.FactsCache)
}

type FactGatherersTree

type FactGatherersTree map[string]map[string]FactGatherer

map[gathererName]map[GathererVersion]FactGatherer

func GetGatherersFromPlugins

func GetGatherersFromPlugins(
	loaders PluginLoaders,
	pluginsFolder string,
) (FactGatherersTree, error)

func StandardGatherers

func StandardGatherers() FactGatherersTree

type FstabEntry

type FstabEntry struct {
	Device         string   `json:"device"`
	MountPoint     string   `json:"mount_point"`
	FileSystemType string   `json:"file_system_type"`
	Options        []string `json:"options"`
	Backup         uint8    `json:"backup"`
	CheckOrder     uint     `json:"check_order"`
}

type FstabGatherer

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

func NewDefaultFstabGatherer

func NewDefaultFstabGatherer() *FstabGatherer

func NewFstabGatherer

func NewFstabGatherer(filePath string) *FstabGatherer

func (*FstabGatherer) Gather

func (f *FstabGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type GathererNotFoundError

type GathererNotFoundError struct {
	Name string
}

func (*GathererNotFoundError) Error

func (e *GathererNotFoundError) Error() string

type GroupSearcher

type GroupSearcher interface {
	GetGroupByID(groupID string) (string, error)
}

type GroupsEntry

type GroupsEntry struct {
	Name  string   `json:"name"`
	GID   uint64   `json:"gid"`
	Users []string `json:"users"`
}

type GroupsGatherer

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

func NewDefaultGroupsGatherer

func NewDefaultGroupsGatherer() *GroupsGatherer

func NewGroupsGatherer

func NewGroupsGatherer(groupsFilePath string) *GroupsGatherer

func (*GroupsGatherer) Gather

func (g *GroupsGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type HostPinger

type HostPinger interface {
	Ping(host string) bool
}

type HostnameResolver

type HostnameResolver interface {
	LookupHost(host string) ([]string, error)
}

type HostsFileGatherer

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

func NewDefaultHostsFileGatherer

func NewDefaultHostsFileGatherer() *HostsFileGatherer

func NewHostsFileGatherer

func NewHostsFileGatherer(hostsFile string) *HostsFileGatherer

func (*HostsFileGatherer) Gather

func (s *HostsFileGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type MountInfoGatherer

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

func NewDefaultMountInfoGatherer

func NewDefaultMountInfoGatherer() *MountInfoGatherer

func NewMountInfoGatherer

func NewMountInfoGatherer(mInfo MountParserInterface, executor utils.CommandExecutor) *MountInfoGatherer

func (*MountInfoGatherer) Gather

func (g *MountInfoGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type MountInfoResult

type MountInfoResult struct {
	BlockUUID  string `json:"block_uuid"`
	FSType     string `json:"fs_type"`
	MountPoint string `json:"mount_point"`
	Options    string `json:"options"`
	Source     string `json:"source"`
}

type MountParser

type MountParser struct{}

func (*MountParser) GetMounts

func (x *MountParser) GetMounts(f mountinfo.FilterFunc) ([]*mountinfo.Info, error)

type MountParserInterface

type MountParserInterface interface {
	GetMounts(f mountinfo.FilterFunc) ([]*mountinfo.Info, error)
}

type OSReleaseGatherer

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

func NewDefaultOSReleaseGatherer

func NewDefaultOSReleaseGatherer() *OSReleaseGatherer

func NewOSReleaseGatherer

func NewOSReleaseGatherer(path string) *OSReleaseGatherer

func (*OSReleaseGatherer) Gather

func (g *OSReleaseGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type PackageVersionGatherer

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

func NewDefaultPackageVersionGatherer

func NewDefaultPackageVersionGatherer() *PackageVersionGatherer

func NewPackageVersionGatherer

func NewPackageVersionGatherer(executor utils.CommandExecutor) *PackageVersionGatherer

func (*PackageVersionGatherer) Gather

func (g *PackageVersionGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type PasswdEntry

type PasswdEntry struct {
	User        string `json:"user"`
	UID         string `json:"uid"`
	GID         string `json:"gid"`
	Description string `json:"description"`
	Home        string `json:"home"`
	Shell       string `json:"shell"`
}

A PasswdEntry contains all the fields for a specific user

type PasswdGatherer

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

func NewDefaultPasswdGatherer

func NewDefaultPasswdGatherer() *PasswdGatherer

func NewPasswdGatherer

func NewPasswdGatherer(path string) *PasswdGatherer

func (*PasswdGatherer) Gather

func (g *PasswdGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type Pinger

type Pinger struct{}

func (*Pinger) Ping

func (p *Pinger) Ping(host string) bool

type PluginLoader

type PluginLoader interface {
	Load(pluginPath string) (FactGatherer, error)
}

type PluginLoaders

type PluginLoaders map[string]PluginLoader

type ProductsGatherer

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

func NewDefaultProductsGatherer

func NewDefaultProductsGatherer() *ProductsGatherer

func NewProductsGatherer

func NewProductsGatherer(fs afero.Fs, productsPath string) *ProductsGatherer

func (*ProductsGatherer) Gather

func (g *ProductsGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type RPCPluginLoader

type RPCPluginLoader struct{}

func (*RPCPluginLoader) Load

func (l *RPCPluginLoader) Load(pluginPath string) (FactGatherer, error)

type Registry

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

func NewRegistry

func NewRegistry(gatherers FactGatherersTree) *Registry

func (*Registry) AddGatherers

func (m *Registry) AddGatherers(gatherers FactGatherersTree)

This is not safe, please not use concurrently.

func (*Registry) AvailableGatherers

func (m *Registry) AvailableGatherers() []string

func (*Registry) GetGatherer

func (m *Registry) GetGatherer(name string) (FactGatherer, error)

type ResolvabilityDetails

type ResolvabilityDetails struct {
	Hostname     string   `json:"hostname"`
	Addresses    []string `json:"addresses"`
	InstanceName string   `json:"instance_name"`
	Reachability bool     `json:"reachability"`
}

type Resolver

type Resolver struct{}

func (*Resolver) LookupHost

func (r *Resolver) LookupHost(host string) ([]string, error)

type SBDDumpGatherer

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

func NewDefaultSBDDumpGatherer

func NewDefaultSBDDumpGatherer() *SBDDumpGatherer

func NewSBDDumpGatherer

func NewSBDDumpGatherer(executor utils.CommandExecutor, sbdConfigFile string) *SBDDumpGatherer

func (*SBDDumpGatherer) Gather

func (gatherer *SBDDumpGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type SBDGatherer

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

func NewDefaultSBDGatherer

func NewDefaultSBDGatherer() *SBDGatherer

func NewSBDGatherer

func NewSBDGatherer(configFile string) *SBDGatherer

func (*SBDGatherer) Gather

func (g *SBDGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type SapControlGatherer

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

func NewDefaultSapControlGatherer

func NewDefaultSapControlGatherer() *SapControlGatherer

func NewSapControlGatherer

func NewSapControlGatherer(
	webService sapcontrolapi.WebServiceConnector,
	fs afero.Fs,
	cache *factscache.FactsCache) *SapControlGatherer

func (*SapControlGatherer) Gather

func (s *SapControlGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

func (*SapControlGatherer) SetCache

func (s *SapControlGatherer) SetCache(cache *factscache.FactsCache)

type SapControlInstance

type SapControlInstance struct {
	Name       string      `json:"name"`
	InstanceNr string      `json:"instance_nr"`
	Output     interface{} `json:"output"`
}

type SapControlMap

type SapControlMap map[string][]SapControlInstance

type SapHostCtrlGatherer

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

func NewDefaultSapHostCtrlGatherer

func NewDefaultSapHostCtrlGatherer() *SapHostCtrlGatherer

func NewSapHostCtrlGatherer

func NewSapHostCtrlGatherer(executor utils.CommandExecutor) *SapHostCtrlGatherer

func (*SapHostCtrlGatherer) Gather

func (g *SapHostCtrlGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type SapInstanceHostnameResolverGatherer

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

func NewDefaultSapInstanceHostnameResolverGatherer

func NewDefaultSapInstanceHostnameResolverGatherer() *SapInstanceHostnameResolverGatherer

func (*SapInstanceHostnameResolverGatherer) Gather

type SapProfile

type SapProfile struct {
	Name    string            `json:"name"`
	Path    string            `json:"path"`
	Content map[string]string `json:"content"`
}

type SapProfilesGatherer

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

func NewDefaultSapProfilesGatherer

func NewDefaultSapProfilesGatherer() *SapProfilesGatherer

func NewSapProfilesGatherer

func NewSapProfilesGatherer(fs afero.Fs) *SapProfilesGatherer

func (*SapProfilesGatherer) Gather

func (s *SapProfilesGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type SapServices

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

func NewDefaultSapServicesGatherer

func NewDefaultSapServicesGatherer() *SapServices

func NewSapServicesGatherer

func NewSapServicesGatherer(servicesFilePath string, fs afero.Fs) *SapServices

func (*SapServices) Gather

func (s *SapServices) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type SapServicesEntry

type SapServicesEntry struct {
	SID     string                 `json:"sid"`
	Kind    SapServicesStartupKind `json:"kind"`
	Content string                 `json:"content"`
}

type SapServicesStartupKind

type SapServicesStartupKind string
const (
	SapServicesSystemdStartup  SapServicesStartupKind = "systemctl"
	SapServicesSapstartStartup SapServicesStartupKind = "sapstartsrv"

	SapServicesGathererName = "sapservices"
)

type SapSystemEntry

type SapSystemEntry struct {
	Profiles []SapProfile `json:"profiles"`
}

type SapSystemMap

type SapSystemMap map[string]SapSystemEntry

type SaptuneGatherer

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

func NewDefaultSaptuneGatherer

func NewDefaultSaptuneGatherer() *SaptuneGatherer

func NewSaptuneGatherer

func NewSaptuneGatherer(executor utils.CommandExecutor) *SaptuneGatherer

func (*SaptuneGatherer) Gather

func (s *SaptuneGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type SysctlGatherer

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

func NewDefaultSysctlGatherer

func NewDefaultSysctlGatherer() *SysctlGatherer

func NewSysctlGatherer

func NewSysctlGatherer(executor utils.CommandExecutor) *SysctlGatherer

func (*SysctlGatherer) Gather

func (s *SysctlGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type SystemDGatherer

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

func NewDefaultSystemDGatherer

func NewDefaultSystemDGatherer() *SystemDGatherer

func NewSystemDGatherer

func NewSystemDGatherer(conn DbusConnector, initialized bool) *SystemDGatherer

func (*SystemDGatherer) Gather

func (g *SystemDGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type SystemDGathererV2

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

func NewDefaultSystemDGathererV2

func NewDefaultSystemDGathererV2() *SystemDGathererV2

func NewSystemDGathererV2

func NewSystemDGathererV2(conn DbusConnector, initialized bool) *SystemDGathererV2

func (*SystemDGathererV2) Gather

func (g *SystemDGathererV2) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

type UserSearcher

type UserSearcher interface {
	GetUsernameByID(userID string) (string, error)
}

type VerifyPasswordGatherer

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

func NewDefaultPasswordGatherer

func NewDefaultPasswordGatherer() *VerifyPasswordGatherer

func NewVerifyPasswordGatherer

func NewVerifyPasswordGatherer(executor utils.CommandExecutor) *VerifyPasswordGatherer

func (*VerifyPasswordGatherer) Gather

func (g *VerifyPasswordGatherer) Gather(factsRequests []entities.FactRequest) ([]entities.Fact, error)

This gatherer expects only the username for which the password will be verified

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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