Versions in this module Expand all Collapse all v0 v0.0.1 May 24, 2023 Changes in this version + const DefaultServer + func IsRepeatKey(key string) bool + type Block struct + Comment string + Directives []IDirective + Line int + func (b *Block) FindDirectives(directiveName string) []IDirective + func (b *Block) GetComment() string + func (b *Block) GetDirectives() []IDirective + func (b *Block) GetLine() int + func (b *Block) RemoveDirective(key string, params []string) + func (b *Block) UpdateDirective(key string, params []string) + type Comment struct + Detail string + Line int + func (c *Comment) GetBlock() IBlock + func (c *Comment) GetComment() string + func (c *Comment) GetLine() int + func (c *Comment) GetName() string + func (c *Comment) GetParameters() []string + type Config struct + FilePath string + func (c *Config) FindDirectives(directiveName string) []IDirective + func (c *Config) FindHttp() *Http + func (c *Config) FindServers() []*Server + func (c *Config) FindUpstreams() []*Upstream + type Directive struct + Block IBlock + Comment string + Line int + Name string + Parameters []string + func (d *Directive) GetBlock() IBlock + func (d *Directive) GetComment() string + func (d *Directive) GetLine() int + func (d *Directive) GetName() string + func (d *Directive) GetParameters() []string + type Http struct + Comment string + Directives []IDirective + Line int + Servers []*Server + func NewHttp(directive IDirective) (*Http, error) + func (h *Http) FindDirectives(directiveName string) []IDirective + func (h *Http) GetBlock() IBlock + func (h *Http) GetComment() string + func (h *Http) GetDirectives() []IDirective + func (h *Http) GetLine() int + func (h *Http) GetName() string + func (h *Http) GetParameters() []string + func (h *Http) RemoveDirective(key string, params []string) + func (h *Http) UpdateDirective(key string, params []string) + type IBlock interface + FindDirectives func(directiveName string) []IDirective + GetComment func() string + GetDirectives func() []IDirective + GetLine func() int + RemoveDirective func(name string, params []string) + UpdateDirective func(name string, params []string) + type IDirective interface + GetBlock func() IBlock + GetComment func() string + GetLine func() int + GetName func() string + GetParameters func() []string + type Location struct + Cache bool + CacheTime int + CacheUint string + Comment string + Directives []IDirective + Host string + Line int + Match string + Modifier string + Parameters []string + ProxyPass string + Replaces map[string]string + func NewLocation(directive IDirective) *Location + func (l *Location) AddCache(cacheTime int, cacheUint string) + func (l *Location) AddSubFilter(subFilters map[string]string) + func (l *Location) ChangePath(Modifier string, Match string) + func (l *Location) FindDirectives(directiveName string) []IDirective + func (l *Location) GetBlock() IBlock + func (l *Location) GetComment() string + func (l *Location) GetDirectives() []IDirective + func (l *Location) GetLine() int + func (l *Location) GetName() string + func (l *Location) GetParameters() []string + func (l *Location) RemoveCache() + func (l *Location) RemoveDirective(key string, params []string) + func (l *Location) RemoveSubFilter() + func (l *Location) UpdateDirective(key string, params []string) + type Server struct + Comment string + Directives []IDirective + Line int + Listens []*ServerListen + func NewServer(directive IDirective) (*Server, error) + func (s *Server) AddHTTP2HTTPS() + func (s *Server) AddListen(bind string, defaultServer bool, params ...string) + func (s *Server) AddServerName(name string) + func (s *Server) DeleteListen(bind string) + func (s *Server) DeleteServerName(name string) + func (s *Server) FindDirectives(directiveName string) []IDirective + func (s *Server) GetBlock() IBlock + func (s *Server) GetComment() string + func (s *Server) GetDirectives() []IDirective + func (s *Server) GetLine() int + func (s *Server) GetName() string + func (s *Server) GetParameters() []string + func (s *Server) RemoveDirective(key string, params []string) + func (s *Server) RemoveListenByBind(bind string) + func (s *Server) UpdateDirective(key string, params []string) + func (s *Server) UpdateDirectiveBySecondKey(name string, key string, directive Directive) + func (s *Server) UpdateListen(bind string, defaultServer bool, params ...string) + func (s *Server) UpdatePHPProxy(proxy []string, localPath string) + func (s *Server) UpdateRoot(path string) + func (s *Server) UpdateRootLocation() + func (s *Server) UpdateRootProxy(proxy []string) + func (s *Server) UpdateServerName(names []string) + type ServerListen struct + Bind string + Comment string + DefaultServer string + Line int + Parameters []string + func NewServerListen(params []string, line int) *ServerListen + func (sl *ServerListen) AddDefaultServer() + func (sl *ServerListen) GetBlock() IBlock + func (sl *ServerListen) GetComment() string + func (sl *ServerListen) GetLine() int + func (sl *ServerListen) GetName() string + func (sl *ServerListen) GetParameters() []string + func (sl *ServerListen) RemoveDefaultServe() + type Upstream struct + Comment string + Directives []IDirective + Line int + UpstreamName string + UpstreamServers []*UpstreamServer + func NewUpstream(directive IDirective) (*Upstream, error) + func (us *Upstream) AddServer(server *UpstreamServer) + func (us *Upstream) FindDirectives(directiveName string) []IDirective + func (us *Upstream) GetBlock() IBlock + func (us *Upstream) GetComment() string + func (us *Upstream) GetDirectives() []IDirective + func (us *Upstream) GetLine() int + func (us *Upstream) GetName() string + func (us *Upstream) GetParameters() []string + func (us *Upstream) RemoveDirective(key string, params []string) + func (us *Upstream) UpdateDirective(key string, params []string) + type UpstreamServer struct + Address string + Comment string + Flags []string + Line int + Parameters map[string]string + func NewUpstreamServer(directive IDirective) *UpstreamServer + func (uss *UpstreamServer) GetBlock() IBlock + func (uss *UpstreamServer) GetComment() string + func (uss *UpstreamServer) GetDirective() *Directive + func (uss *UpstreamServer) GetLine() int + func (uss *UpstreamServer) GetName() string + func (uss *UpstreamServer) GetParameters() []string