config

package
v0.0.0-...-0b629a7 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TLSVersions = map[string]uint16{
	"tls10": tls.VersionTLS10,
	"tls11": tls.VersionTLS11,
	"tls12": tls.VersionTLS12,
}

TLSVersions contains a correspondence map for TLS versions in config

Functions

This section is empty.

Types

type Advanced

type Advanced struct {
	CloseRequest      bool
	DisableKeepAlives bool
	Tracing           bool
}

Advanced contains advanced configuration for Sensu datacenters HTTP client

type Audit

type Audit struct {
	Level   string
	Logfile string
}

Audit struct contains the config of the Audit logger

type Config

type Config struct {
	Dashboard *GlobalConfig `json:",omitempty"`
	Sensu     []SensuConfig
	Uchiwa    GlobalConfig
}

Config struct contains []SensuConfig and UchiwaConfig structs

var (

	// Private contains the private configuration
	Private *Config
)

func Load

func Load(file, directories string) *Config

Load retrieves the Uchiwa configuration from files and directories and returns the private configuration as a Config struct pointer

func (*Config) GetPublic

func (c *Config) GetPublic() *Config

GetPublic generates the public configuration

type Db

type Db struct {
	Driver string
	Scheme string
}

Db struct contains the SQL driver configuration

type Github

type Github struct {
	ClientID     string
	ClientSecret string
	Roles        []authentication.Role
	Server       string
}

Github struct contains the GitHub driver configuration

type Gitlab

type Gitlab struct {
	ClientID     string `json:"applicationid"`
	ClientSecret string `json:"secret"`
	RedirectURL  string
	Roles        []authentication.Role
	Server       string
}

Gitlab struct contains the Gitlab driver configuration

type GlobalConfig

type GlobalConfig struct {
	Host         string
	Port         int
	LogLevel     string
	Refresh      int
	Pass         string
	User         string
	Users        []authentication.User
	Audit        Audit
	Auth         structs.Auth
	Db           Db
	Enterprise   bool
	Github       Github
	Gitlab       Gitlab
	Ldap         Ldap
	OIDC         OIDC
	SSL          SSL
	UsersOptions UsersOptions
}

GlobalConfig struct contains conf about Uchiwa

type Ldap

type Ldap struct {
	LdapServer
	Debug   bool
	Roles   []authentication.Role
	Servers []LdapServer
}

Ldap struct contains the LDAP driver configuration

type LdapServer

type LdapServer struct {
	Server               string
	Port                 int
	BaseDN               string
	BindUser             string
	BindPass             string
	Dialect              string
	DisableNestedGroups  bool
	GroupBaseDN          string
	GroupObjectClass     string
	GroupMemberAttribute string
	Insecure             bool
	Security             string
	TLSConfig            *tls.Config `json:"-"`
	UserAttribute        string
	UserBaseDN           string
	UserObjectClass      string
}

LdapServer contains the configuration of a specific LDAP server

type OIDC

type OIDC struct {
	AdditionalScopes []string
	ClientID         string
	ClientSecret     string
	Insecure         bool
	RedirectURL      string
	Roles            []authentication.Role
	Server           string
}

OIDC struct contains the OIDC driver configuration

type SSL

type SSL struct {
	CertFile      string
	KeyFile       string
	CipherSuite   []string
	TLSMinVersion string
	TLSConfig     *tls.Config `json:"-"`
}

SSL struct contains the path the SSL certificate and key

type SensuConfig

type SensuConfig struct {
	Advanced Advanced
	Name     string
	Host     string
	Port     int
	Ssl      bool
	Insecure bool
	URL      string
	User     string
	Path     string
	Pass     string
	Timeout  int
}

SensuConfig struct contains conf about a Sensu API

type UsersOptions

type UsersOptions struct {
	DateFormat             string
	DefaultTheme           string
	DisableNoExpiration    bool
	Favicon                string
	LogoURL                string
	Refresh                int
	RequireSilencingReason bool
	SilenceDurations       []float32
}

UsersOptions struct contains various config tweaks

Jump to

Keyboard shortcuts

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