config

package
v0.0.0-...-1a8a335 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultExportedHeaders = map[string]string{
	"Auth-User": "$uid",
}

DefaultExportedHeaders is the default exported headers when not set

View Source
var DefaultLocationRules = map[string]string{
	"default": "accept",
}

DefaultLocationRules is the default location rules when not set

Functions

This section is empty.

Types

type Application

type Application struct {
	Category    string
	Name        string
	Description string
	Display     string
	URI         string
}

Application defines a LemonLDAP::NG application

func NewApplication

func NewApplication(vhost *VHost, annotations map[string]string, prefix string) *Application

NewApplication creates a new LemonLDAP::NG application from annotations

func (*Application) Path

func (a *Application) Path() string

Path returns the application path in the menu

type Config

type Config struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Config defines a LemonLDAP::NG configuration loader

func NewConfig

func NewConfig(fs filesystem.Filesystem, configDir string) *Config

NewConfig creates a new LemonLDAP::NG configuration loader

func (*Config) AddApplication

func (c *Config) AddApplication(application *Application) error

AddApplication creates a new LemonLDAP::NG application

func (*Config) AddVHosts

func (c *Config) AddVHosts(vhosts map[string]*VHost) error

AddVHosts creates several new LemonLDAP::NG virtual hosts

func (*Config) DeleteApplication

func (c *Config) DeleteApplication(application *Application) error

DeleteApplication a LemonLDAP::NG application

func (*Config) DeleteVHosts

func (c *Config) DeleteVHosts(vhosts map[string]*VHost) error

DeleteVHosts deletes several LemonLDAP::NG virtual hosts

func (*Config) First

func (c *Config) First() (string, int, error)

First returns the first configuration file name and number

func (*Config) Last

func (c *Config) Last() (string, int, error)

Last returns the current configuration file name and number

func (*Config) Load

func (c *Config) Load(configName string) (map[string]interface{}, error)

Load loads a specific LemonLDAP::NG configuration

func (*Config) LoadFirst

func (c *Config) LoadFirst() (map[string]interface{}, error)

LoadFirst loads the first LemonLDAP::NG configuration

func (*Config) Next

func (c *Config) Next() (string, int, error)

Next returns the following configuration file name and number

func (*Config) ReloadLemonLDAPNG

func (c *Config) ReloadLemonLDAPNG() error

ReloadLemonLDAPNG issues an HTTP request to http://localhost/reload

func (*Config) Save

func (c *Config) Save() error

Save saves the current LemonLDAP::NG configuration as next

func (*Config) SetOverrides

func (c *Config) SetOverrides(overrides map[string]interface{}) error

SetOverrides creates several new LemonLDAP::NG virtual hosts

type VHost

type VHost struct {
	ServerName      string
	LocationRules   map[string]string
	ExportedHeaders map[string]string
}

VHost defines a LemonLDAP::NG virtual host

func NewVHost

func NewVHost(serverName string, locationRules, exportedHeaders map[string]string) *VHost

NewVHost creates a new LemonLDAP::NG virtual host

Jump to

Keyboard shortcuts

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