mariadb

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0, BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package mariadb returns a list of secret mariadb credentials found in *.cnf and *.ini mariadb files

Index

Constants

View Source
const (
	// Name is the unique name of this extractor.
	Name = "secrets/mariadb"
)

Variables

This section is empty.

Functions

func New

func New(cfg Config) filesystem.Extractor

New returns the Extractor with the specified config settings.

func NewDefault

func NewDefault() filesystem.Extractor

NewDefault returns the Extractor with the default config settings.

Types

type Config

type Config struct {
	// FollowInclude directive tells the extractor to follow the include or not
	FollowInclude bool
}

Config is the extractor config

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration values for the Extractor.

type Credentials

type Credentials struct {
	Section  string
	Host     string
	Port     string
	User     string
	Password string
}

Credentials contains mariadb credentials

type Extractor

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

Extractor extracts mariadb secret credentials.

func (Extractor) Extract

Extract returns a list of secret mariadb credentials

func (*Extractor) FileRequired

func (e *Extractor) FileRequired(api filesystem.FileAPI) bool

FileRequired returns true if the file contains mariadb config information ref: https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/configuring-mariadb/configuring-mariadb-with-option-files

func (Extractor) Name

func (e Extractor) Name() string

Name of the extractor.

func (Extractor) Requirements

func (e Extractor) Requirements() *plugin.Capabilities

Requirements of the extractor.

func (Extractor) Version

func (e Extractor) Version() int

Version of the extractor.

Jump to

Keyboard shortcuts

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