lib

package
v0.0.0-...-aedd5b3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGidCounterOL

func GetGidCounterOL() int

func GetMaxGidAD

func GetMaxGidAD() int

GetMaxGidAD return max GID from AD

func GetMaxGidOL

func GetMaxGidOL() int

GetMaxGidOL return max GID from OpenLDAP

func GetMaxUidAD

func GetMaxUidAD() int

GetMaxUidAD return max UID from AD

func GetMaxUidOL

func GetMaxUidOL() int

GetMaxUidOL return max UID from OpenLDAP

func GetUidCounterOL

func GetUidCounterOL() int

func InitConfig

func InitConfig(c string)

InitConfig initialize the configuration

func InitLogger

func InitLogger(cfg LoggingConfig)

func ListGroupOL

func ListGroupOL()

func ListUserOL

func ListUserOL()

ListUserOL list all users

func Max

func Max(x, y int) int

func NextFreeGid

func NextFreeGid(verbose bool) int

func NextFreeUid

func NextFreeUid(verbose bool) int

func SetADConfigDefaults

func SetADConfigDefaults()

SetADConfigDefaults sets defautl values to OpenLDAP config

func SetApiserverConfigDefaults

func SetApiserverConfigDefaults()

SetApiserverConfigDefaults sets defautl values to API server config

func SetConfigDefaults

func SetConfigDefaults()

SetConfigDefaults Set config to default values

func SetLoggingConfigDefaults

func SetLoggingConfigDefaults(app string)

func SetOpenldapConfigDefaults

func SetOpenldapConfigDefaults()

SetOpenldapConfigDefaults sets defautl values to OpenLDAP config

func UpdateGidCounterOL

func UpdateGidCounterOL(gidNumber int)

func UpdateUidCounterOL

func UpdateUidCounterOL(uidNumber int)

Types

type ADConfig

type ADConfig struct {
	Server   string
	Port     string
	BaseDN   string
	OUusers  string
	OUgroups string
	DN       string
	PS       string
}

ADConfig structure to store OpenLDAP config

type ApiserverConfig

type ApiserverConfig struct {
	Port string
	Cert string
	Key  string
}

ApiserverConfig structure to store API config

type LdapGroup

type LdapGroup struct {
	Cn        string
	Gidnumber string
}

LdapGroup structure for manage ldap groups

type LdapUser

type LdapUser struct {
	Cn        string
	Uidnumber string
	Gidnumber string
	Sn        string
}

LdapUser structure for manage ldap users

type LoggingConfig

type LoggingConfig struct {
	Level string
	File  string
}

type LxldapConfig

type LxldapConfig struct {
	Openldap  OpenldapConfig  `mapstructure:"openldap"`
	Ad        ADConfig        `mapstructure:"ad"`
	Logging   LoggingConfig   `mapstructure:"logging"`
	Apiserver ApiserverConfig `mapstructure:"apiserver"`
}

LxldapConfig lxldap configuration data

var Config *LxldapConfig

Config to storage

type OpenldapConfig

type OpenldapConfig struct {
	Server   string
	Port     string
	BaseDN   string
	OUusers  string
	OUgroups string
	OUconfig string
	DN       string
	PS       string
}

OpenldapConfig structure to store OpenLDAP config

Jump to

Keyboard shortcuts

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