dbconfig

package
v0.0.0-...-8dae9f9 Latest Latest
Warning

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

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

Documentation

Overview

Package dbconfig is a compliance submodule that is able to parse and export databases applications configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProcResourceType

func GetProcResourceType(proc *process.Process) (string, bool)

GetProcResourceType returns the type of database resource associated with the given process.

Types

type DBConfig

type DBConfig struct {
	ProcessName     string      `json:"process_name,omitempty"`
	ProcessUser     string      `json:"process_user,omitempty"`
	ConfigFilePath  string      `json:"config_file_path"`
	ConfigFileUser  string      `json:"config_file_user"`
	ConfigFileGroup string      `json:"config_file_group"`
	ConfigFileMode  uint32      `json:"config_file_mode"`
	ConfigData      interface{} `json:"config_data"`
}

DBConfig represents a database application configuration metadata that we were able to scan.

func LoadCassandraConfig

func LoadCassandraConfig(ctx context.Context, hostroot string, proc *process.Process) (*DBConfig, bool)

LoadCassandraConfig loads and extracts the Cassandra configuration data found on the system.

func LoadConfiguration

func LoadConfiguration(ctx context.Context, rootPath string, proc *process.Process) (string, *DBConfig, bool)

LoadConfiguration loads and returns an optional DBResource associated with the given process PID.

func LoadMongoDBConfig

func LoadMongoDBConfig(ctx context.Context, hostroot string, proc *process.Process) (*DBConfig, bool)

LoadMongoDBConfig loads and extracts the MongoDB configuration data found on the system.

func LoadPostgreSQLConfig

func LoadPostgreSQLConfig(ctx context.Context, hostroot string, proc *process.Process) (*DBConfig, bool)

LoadPostgreSQLConfig loads and extracts the PostgreSQL configuration data found on the system.

type DBResource

type DBResource struct {
	Type        string   `json:"type"`
	ContainerID string   `json:"container_id,omitempty"`
	Config      DBConfig `json:"config"`
}

DBResource holds a database configuration data and the resource type associated with it.

func LoadDBResourceFromPID

func LoadDBResourceFromPID(ctx context.Context, pid int32) (*DBResource, bool)

LoadDBResourceFromPID loads and returns an optional DBResource associated with the given process PID.

Jump to

Keyboard shortcuts

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