parser

package
v0.0.0-...-ea924cd Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listen

type Listen struct {
	HostPort string
	Ssl      bool
	Ipv6only bool
}

type NginxDirective

type NginxDirective struct {
	Name          string
	Values        []string
	NewLineBefore bool
	NewLineAfter  bool
}

func (*NginxDirective) AddValues

func (d *NginxDirective) AddValues(values ...string)

type NginxHost

type NginxHost struct {
	webserver.Host
	Listens          []Listen
	ServerBlockIndex int
	Offset           int
}

func (NginxHost) IsIpv6Only

func (h NginxHost) IsIpv6Only() bool

type Parser

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

func GetParser

func GetParser(serverRoot string, logger logger.LoggerInterface) (*Parser, error)

func (*Parser) AddServerDirectives

func (p *Parser) AddServerDirectives(host *NginxHost, directives []*NginxDirective, insertAtTop bool) error

func (*Parser) Dump

func (p *Parser) Dump() error

func (*Parser) GetChangedFiles

func (p *Parser) GetChangedFiles() []string

func (*Parser) GetHosts

func (p *Parser) GetHosts() ([]NginxHost, error)

func (*Parser) Parse

func (p *Parser) Parse() error

func (*Parser) UpdateOrAddServerDirectives

func (p *Parser) UpdateOrAddServerDirectives(host *NginxHost, directives []*NginxDirective, insertAtTop bool) error

Jump to

Keyboard shortcuts

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