config

package
v0.0.0-...-d66cf44 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Var_dump

func Var_dump(expression ...interface{})

Types

type Banner struct {
	LoginBanner    string `yaml:"login_banner"`
	PasswordBanner string `yaml:"password_banner"`
	Banner         string `yaml:"banner"`
	BannerAccept   string `yaml:"banner_accept"`
	BannerReject   string `yaml:"banner_reject"`
}

type Config

type Config struct {
	PID    string     `yaml:"PID"`
	BIND   string     `yaml:"BIND"`
	PORT   int        `yaml:"PORT"`
	LOG    Log        `yaml:"LOG"`
	LDAP   Ldap       `yaml:"LDAP"`
	ACCESS []UserLDAP `yaml:"ACCESS"`
	Banner Banner     `yaml:"banner"`
	DEVICE []Device   `yaml:"DEVICE"`
	USER   []User     `yaml:"USER"`
}

func NewConfig

func NewConfig(configPath string) (*Config, error)

type Device

type Device struct {
	Network string `yaml:"network"`
	Token   string `yaml:"token"`
}

type Ldap

type Ldap struct {
	Base         string   `yaml:"Base"`
	Host         string   `yaml:"Host"`
	Port         int      `yaml:"Port"`
	UseSSL       bool     `yaml:"UseSSL"`
	BindDN       string   `yaml:"BindDN"`
	BindPassword string   `yaml:"BindPassword"`
	UserFilter   string   `yaml:"UserFilter"`
	GroupFilter  string   `yaml:"GroupFilter"`
	Attributes   []string `yaml:"Attributes"`
}

type Log

type Log struct {
	DEBUG struct {
		ENABLE bool `yaml:"ENABLE"`
	} `yaml:"DEBUG"`
	SYSLOG struct {
		ENABLE bool   `yaml:"ENABLE"`
		IP     string `yaml:"IP"`
		PORT   int    `yaml:"PORT"`
	} `yaml:"SYSLOG"`
	FILE struct {
		NAME string `yaml:"NAME"`
	} `yaml:"FILE"`
}

type User

type User struct {
	Login       string   `yaml:"login"`
	Password    string   `yaml:"password"`
	PrivLvl     int      `yaml:"priv-lvl"`
	Description string   `yaml:"description"`
	IPAccess    []string `yaml:"IPAccess"`
	PERMIT      []string `yaml:"PERMIT"`
}

type UserLDAP

type UserLDAP struct {
	Base        string   `yaml:"Base"`
	Group       string   `yaml:"Group"`
	PrivLvl     int      `yaml:"priv-lvl"`
	Description string   `yaml:"description"`
	IPAccess    []string `yaml:"IPAccess"`
	PERMIT      []string `yaml:"PERMIT,omitempty"`
	USERInfo    map[string][]string
}

Jump to

Keyboard shortcuts

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