Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
An Emitter is a simpler interface for the emitter.FileEmitter. It is used to download the wp-config.php file.
type EmitterWPConfigParser ¶
type EmitterWPConfigParser struct {
// contains filtered or unexported fields
}
EmitterWPConfigParser is responsible for parsing the required fields from the wp-config.php file. It uses an Emitter to download the remote file.
func NewEmitterCredentialsParser ¶
func NewEmitterCredentialsParser(e Emitter) *EmitterWPConfigParser
NewEmitterCredentialsParser is a constructor that returns an EmitterWPConfigParser.
func (*EmitterWPConfigParser) ParseWPConfig ¶
func (p *EmitterWPConfigParser) ParseWPConfig(publicPath types.PublicPath) (WPConfigFields, error)
ParseWPConfig is the main function of the EmitterWPConfigParser. It downloads the wp-config.php file and parses the fields we need (database credentials, table prefix) from it.
type WPConfigFields ¶
type WPConfigFields struct { Credentials database.DatabaseCredentials Prefix string }
WPConfigFields holds the fields parsed from the wp-config.php file.
Click to show internal directories.
Click to hide internal directories.