config

package
v0.0.0-...-4bcbab6 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Host string `yaml:"host"`
	Port int16  `yaml:"port"`
	JWT  APIJWT `yaml:"jwt"`
}

API : Config struct for the api

type APIJWT

type APIJWT struct {
	Secret   string `yaml:"secret"`
	LifeTime string `yaml:"lifetime"`
}

type Config

type Config struct {
	DevMode   bool      `yaml:"dev"`
	General   General   `yaml:"general"`
	Wireguard Wireguard `yaml:"wireguard"`
	Database  Database  `yaml:"database"`
	Provider  Provider  `yaml:"provider"`
	API       API       `yaml:"api"`
}

Config type for the config file to be handled

func GetConfig

func GetConfig() *Config

GetConfig : Return the viper config

type Database

type Database struct {
	Host     string `yaml:"host"`
	Port     int16  `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

Database : Config struct for the database

type General

type General struct {
	User   GeneralUser   `yaml:"user"`
	Subnet GeneralSubnet `yaml:"subnet"`
	Sync   GeneralSync   `yaml:"sync"`
}

General : Config struct for general settings

type GeneralSubnet

type GeneralSubnet struct {
	V4        string `yaml:"v4"`
	V6        string `yaml:"v6"`
	GatewayV4 string `yaml:"gatewayV4"`
	GatewayV6 string `yaml:"gatewayV6"`
}

GeneralSubnet : Config struct for the subnet

type GeneralSync

type GeneralSync struct {
	Interval string `yaml:"interval"`
}

GeneralSync : Config struct for the synchronisation

type GeneralUser

type GeneralUser struct {
	MaxDevices int8 `yaml:"maxDevices"`
}

GeneralUser : Config struct for user settings

type Provider

type Provider struct {
	Ldap ProviderLdap `yaml:"ldap"`
}

Provider : Config struct for the Providers

type ProviderLdap

type ProviderLdap struct {
	Enabled      bool     `yaml:"enabled"`
	Type         string   `yaml:"type"`
	Host         string   `yaml:"host"`
	Port         int16    `yaml:"port"`
	BindDn       string   `yaml:"bindDn"`
	BindPassword string   `yaml:"bindPassword"`
	BaseDn       string   `yaml:"baseDn"`
	GroupFilter  string   `yaml:"groupFilter"`
	UserFilter   string   `yaml:"userFilter"`
	UserAttr     []string `yaml:"userAttr"`
	GroupAttr    []string `yaml:"groupAttr"`
	UserRDN      string   `yaml:"userRdn"`
	GroupRDN     string   `yaml:"groupRdn"`
}

ProviderLdap : Config struct for the LDAP provider

type Wireguard

type Wireguard struct {
	Interface string `yaml:"interface"`
}

Wireguard : Config struct for wireguard

Jump to

Keyboard shortcuts

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