Webserv
Loading...
Searching...
No Matches
config::Validator Class Reference

Performs semantic validation on mapped configuration blocks. More...

#include <Validator.hpp>

Static Public Member Functions

static void validate (ServerBlockVec &servers, bool perform_fs_checks=true)

Private Member Functions

 Validator ()
 Validator (bool perform_fs_checks=true)
void validateServer (ServerBlock &server)
void validateLocation (LocationBlock &location, ServerBlock const &server)
void validateListen (ServerBlock &server)
void validateRoot (Block &block)
void validateServerNames (ServerBlock &server)

Static Private Member Functions

static void locationCompleteRoot (LocationBlock &l, ServerBlock const &s)

Private Attributes

bool perform_fs_checks_

Detailed Description

Performs semantic validation on mapped configuration blocks.

After the Mapper creates the structure, this class inspects the values to ensure they are valid and logical (e.g., port numbers are in range, required directives are present).

Constructor & Destructor Documentation

◆ Validator() [1/2]

config::Validator::Validator ( )
private

◆ Validator() [2/2]

config::Validator::Validator ( bool perform_fs_checks = true)
private

Member Function Documentation

◆ locationCompleteRoot()

void config::Validator::locationCompleteRoot ( LocationBlock & l,
ServerBlock const & s )
staticprivate

◆ validate()

void config::Validator::validate ( ServerBlockVec & servers,
bool perform_fs_checks = true )
static

◆ validateListen()

void config::Validator::validateListen ( ServerBlock & server)
private

◆ validateLocation()

void config::Validator::validateLocation ( LocationBlock & location,
ServerBlock const & server )
private

◆ validateRoot()

void config::Validator::validateRoot ( Block & block)
private

◆ validateServer()

void config::Validator::validateServer ( ServerBlock & server)
private

◆ validateServerNames()

void config::Validator::validateServerNames ( ServerBlock & server)
private

Member Data Documentation

◆ perform_fs_checks_

bool config::Validator::perform_fs_checks_
private

The documentation for this class was generated from the following files: